[email protected] | 9cdd715 | 2014-01-14 14:20:43 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_ | ||||
6 | #define CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_ | ||||
7 | |||||
8 | #include "base/compiler_specific.h" | ||||
9 | #include "base/memory/ref_counted.h" | ||||
10 | #include "content/common/content_export.h" | ||||
11 | #include "third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h" | ||||
12 | |||||
tfarina | ae8232df | 2015-02-04 13:10:02 | [diff] [blame] | 13 | namespace cc_blink { |
[email protected] | 9cdd715 | 2014-01-14 14:20:43 | [diff] [blame] | 14 | class ContextProviderWebContext; |
tfarina | ae8232df | 2015-02-04 13:10:02 | [diff] [blame] | 15 | } |
[email protected] | 9cdd715 | 2014-01-14 14:20:43 | [diff] [blame] | 16 | |
17 | namespace content { | ||||
18 | |||||
19 | class CONTENT_EXPORT WebGraphicsContext3DProviderImpl | ||||
20 | : public NON_EXPORTED_BASE(blink::WebGraphicsContext3DProvider) { | ||||
21 | public: | ||||
22 | explicit WebGraphicsContext3DProviderImpl( | ||||
tfarina | ae8232df | 2015-02-04 13:10:02 | [diff] [blame] | 23 | scoped_refptr<cc_blink::ContextProviderWebContext> provider); |
avi | 5c77d21 | 2015-09-25 20:08:25 | [diff] [blame^] | 24 | ~WebGraphicsContext3DProviderImpl() override; |
[email protected] | 9cdd715 | 2014-01-14 14:20:43 | [diff] [blame] | 25 | |
26 | // WebGraphicsContext3DProvider implementation. | ||||
avi | 5c77d21 | 2015-09-25 20:08:25 | [diff] [blame^] | 27 | blink::WebGraphicsContext3D* context3d() override; |
28 | GrContext* grContext() override; | ||||
[email protected] | 9cdd715 | 2014-01-14 14:20:43 | [diff] [blame] | 29 | |
30 | private: | ||||
tfarina | ae8232df | 2015-02-04 13:10:02 | [diff] [blame] | 31 | scoped_refptr<cc_blink::ContextProviderWebContext> provider_; |
[email protected] | 9cdd715 | 2014-01-14 14:20:43 | [diff] [blame] | 32 | }; |
33 | |||||
34 | } // namespace content | ||||
35 | |||||
36 | #endif // CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_ |