OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #ifndef CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
| 5 #define CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
4 | 6 |
5 #include "webkit/plugins/ppapi/plugin_delegate.h" | 7 #include "webkit/plugins/ppapi/plugin_delegate.h" |
6 | 8 |
7 #ifdef ENABLE_GPU | 9 #ifdef ENABLE_GPU |
8 | 10 |
9 namespace ggl { | 11 namespace ggl { |
10 | 12 |
11 class Context; | 13 class Context; |
12 | 14 |
13 } // namespace ggl; | 15 } // namespace ggl; |
14 | 16 |
15 class PlatformContext3DImpl | 17 class PlatformContext3DImpl |
16 : public webkit::ppapi::PluginDelegate::PlatformContext3D { | 18 : public webkit::ppapi::PluginDelegate::PlatformContext3D { |
17 public: | 19 public: |
18 explicit PlatformContext3DImpl(ggl::Context* parent_context); | 20 explicit PlatformContext3DImpl(ggl::Context* parent_context); |
19 virtual ~PlatformContext3DImpl(); | 21 virtual ~PlatformContext3DImpl(); |
20 | 22 |
21 virtual bool Init(); | 23 virtual bool Init(); |
22 virtual bool SwapBuffers(); | 24 virtual bool SwapBuffers(); |
23 virtual unsigned GetError(); | 25 virtual unsigned GetError(); |
24 virtual void SetSwapBuffersCallback(Callback0::Type* callback); | 26 virtual void SetSwapBuffersCallback(Callback0::Type* callback); |
25 void ResizeBackingTexture(const gfx::Size& size); | |
26 virtual unsigned GetBackingTextureId(); | 27 virtual unsigned GetBackingTextureId(); |
27 virtual gpu::gles2::GLES2Implementation* GetGLES2Implementation(); | 28 virtual gpu::gles2::GLES2Implementation* GetGLES2Implementation(); |
28 | 29 |
29 private: | 30 private: |
30 ggl::Context* parent_context_; | 31 ggl::Context* parent_context_; |
31 ggl::Context* context_; | 32 ggl::Context* context_; |
32 }; | 33 }; |
33 | 34 |
34 #endif // ENABLE_GPU | 35 #endif // ENABLE_GPU |
35 | 36 |
| 37 #endif // CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
OLD | NEW |