OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 protected: | 58 protected: |
59 PPB_Graphics3D_Shared(PP_Instance instance); | 59 PPB_Graphics3D_Shared(PP_Instance instance); |
60 PPB_Graphics3D_Shared(const HostResource& host_resource); | 60 PPB_Graphics3D_Shared(const HostResource& host_resource); |
61 virtual ~PPB_Graphics3D_Shared(); | 61 virtual ~PPB_Graphics3D_Shared(); |
62 | 62 |
63 virtual gpu::CommandBuffer* GetCommandBuffer() = 0; | 63 virtual gpu::CommandBuffer* GetCommandBuffer() = 0; |
64 virtual int32 DoSwapBuffers() = 0; | 64 virtual int32 DoSwapBuffers() = 0; |
65 | 65 |
66 bool HasPendingSwap() const; | 66 bool HasPendingSwap() const; |
67 bool CreateGLES2Impl(int32 command_buffer_size, | 67 bool CreateGLES2Impl(int32 command_buffer_size, |
68 int32 transfer_buffer_size); | 68 int32 transfer_buffer_size, |
| 69 gpu::gles2::GLES2Implementation* share_gles2); |
69 void DestroyGLES2Impl(); | 70 void DestroyGLES2Impl(); |
70 | 71 |
71 private: | 72 private: |
72 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; | 73 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; |
73 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 74 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
74 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; | 75 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; |
75 | 76 |
76 // Callback that needs to be executed when swap-buffers is completed. | 77 // Callback that needs to be executed when swap-buffers is completed. |
77 scoped_refptr<TrackedCallback> swap_callback_; | 78 scoped_refptr<TrackedCallback> swap_callback_; |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); | 80 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace ppapi | 83 } // namespace ppapi |
83 | 84 |
84 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 85 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
85 | 86 |
OLD | NEW |