| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 4 |
| 5 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 5 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
| 6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| 11 #include "ppapi/thunk/ppb_graphics_3d_api.h" | 11 #include "ppapi/thunk/ppb_graphics_3d_api.h" |
| 12 | 12 |
| 13 namespace gpu { | 13 namespace gpu { |
| 14 class CommandBuffer; | 14 class CommandBuffer; |
| 15 namespace gles2 { | 15 namespace gles2 { |
| 16 class GLES2CmdHelper; | 16 class GLES2CmdHelper; |
| 17 class GLES2Implementation; | 17 class GLES2Implementation; |
| 18 } // namespace gles2 | 18 } // namespace gles2 |
| 19 } // namespace gpu. | 19 } // namespace gpu. |
| 20 | 20 |
| 21 namespace ppapi { | 21 namespace ppapi { |
| 22 | 22 |
| 23 class Graphics3DImpl : public thunk::PPB_Graphics3D_API { | 23 class Graphics3DImpl : public thunk::PPB_Graphics3D_API { |
| 24 public: | 24 public: |
| 25 // PPB_Graphics3D_API implementation. | 25 // PPB_Graphics3D_API implementation. |
| 26 virtual int32_t GetAttribs(int32_t* attrib_list) OVERRIDE; | 26 virtual int32_t GetAttribs(int32_t* attrib_list) OVERRIDE; |
| 27 virtual int32_t SetAttribs(int32_t* attrib_list) OVERRIDE; | 27 virtual int32_t SetAttribs(int32_t* attrib_list) OVERRIDE; |
| 28 virtual int32_t Resize(int32_t width, int32_t height) OVERRIDE; |
| 28 virtual int32_t SwapBuffers(PP_CompletionCallback callback) OVERRIDE; | 29 virtual int32_t SwapBuffers(PP_CompletionCallback callback) OVERRIDE; |
| 29 | 30 |
| 30 gpu::gles2::GLES2Implementation* gles2_impl() { | 31 gpu::gles2::GLES2Implementation* gles2_impl() { |
| 31 return gles2_impl_.get(); | 32 return gles2_impl_.get(); |
| 32 } | 33 } |
| 33 | 34 |
| 34 // Sends swap-buffers notification to the plugin. | 35 // Sends swap-buffers notification to the plugin. |
| 35 void SwapBuffersACK(int32_t pp_error); | 36 void SwapBuffersACK(int32_t pp_error); |
| 36 | 37 |
| 37 protected: | 38 protected: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 54 // Callback that needs to be executed when swap-buffers is completed. | 55 // Callback that needs to be executed when swap-buffers is completed. |
| 55 PP_CompletionCallback swap_callback_; | 56 PP_CompletionCallback swap_callback_; |
| 56 | 57 |
| 57 DISALLOW_COPY_AND_ASSIGN(Graphics3DImpl); | 58 DISALLOW_COPY_AND_ASSIGN(Graphics3DImpl); |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 } // namespace ppapi | 61 } // namespace ppapi |
| 61 | 62 |
| 62 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 63 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
| 63 | 64 |
| OLD | NEW |