| 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_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 } // namespace gpu | 30 } // namespace gpu |
| 31 | 31 |
| 32 namespace pp { | 32 namespace pp { |
| 33 namespace proxy { | 33 namespace proxy { |
| 34 | 34 |
| 35 class Surface3D; | 35 class Surface3D; |
| 36 | 36 |
| 37 class Context3D : public PluginResource, | 37 class Context3D : public PluginResource, |
| 38 public ppapi::thunk::PPB_Context3D_API { | 38 public ppapi::thunk::PPB_Context3D_API { |
| 39 public: | 39 public: |
| 40 explicit Context3D(const HostResource& resource); | 40 explicit Context3D(const ppapi::HostResource& resource); |
| 41 virtual ~Context3D(); | 41 virtual ~Context3D(); |
| 42 | 42 |
| 43 // ResourceObjectBase overrides. | 43 // ResourceObjectBase overrides. |
| 44 virtual ::ppapi::thunk::PPB_Context3D_API* AsPPB_Context3D_API() OVERRIDE; | 44 virtual ::ppapi::thunk::PPB_Context3D_API* AsPPB_Context3D_API() OVERRIDE; |
| 45 | 45 |
| 46 gpu::gles2::GLES2Implementation* gles2_impl() const { | 46 gpu::gles2::GLES2Implementation* gles2_impl() const { |
| 47 return gles2_impl_.get(); | 47 return gles2_impl_.get(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // PPB_Context3D_API implementation. | 50 // PPB_Context3D_API implementation. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 PP_Resource share_context, | 105 PP_Resource share_context, |
| 106 const int32_t* attrib_list); | 106 const int32_t* attrib_list); |
| 107 | 107 |
| 108 // InterfaceProxy implementation. | 108 // InterfaceProxy implementation. |
| 109 virtual bool OnMessageReceived(const IPC::Message& msg); | 109 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 void OnMsgCreate(PP_Instance instance, | 112 void OnMsgCreate(PP_Instance instance, |
| 113 PP_Config3D_Dev config, | 113 PP_Config3D_Dev config, |
| 114 const std::vector<int32_t>& attribs, | 114 const std::vector<int32_t>& attribs, |
| 115 HostResource* result); | 115 ppapi::HostResource* result); |
| 116 void OnMsgBindSurfaces(const HostResource& context, | 116 void OnMsgBindSurfaces(const ppapi::HostResource& context, |
| 117 const HostResource& draw, | 117 const ppapi::HostResource& draw, |
| 118 const HostResource& read, | 118 const ppapi::HostResource& read, |
| 119 int32_t* result); | 119 int32_t* result); |
| 120 void OnMsgInitialize(const HostResource& context, | 120 void OnMsgInitialize(const ppapi::HostResource& context, |
| 121 int32 size, | 121 int32 size, |
| 122 base::SharedMemoryHandle* ring_buffer); | 122 base::SharedMemoryHandle* ring_buffer); |
| 123 void OnMsgGetState(const HostResource& context, | 123 void OnMsgGetState(const ppapi::HostResource& context, |
| 124 gpu::CommandBuffer::State* state); | 124 gpu::CommandBuffer::State* state); |
| 125 void OnMsgFlush(const HostResource& context, | 125 void OnMsgFlush(const ppapi::HostResource& context, |
| 126 int32 put_offset, | 126 int32 put_offset, |
| 127 int32 last_known_get, | 127 int32 last_known_get, |
| 128 gpu::CommandBuffer::State* state); | 128 gpu::CommandBuffer::State* state); |
| 129 void OnMsgAsyncFlush(const HostResource& context, | 129 void OnMsgAsyncFlush(const ppapi::HostResource& context, |
| 130 int32 put_offset); | 130 int32 put_offset); |
| 131 void OnMsgCreateTransferBuffer(const HostResource& context, | 131 void OnMsgCreateTransferBuffer(const ppapi::HostResource& context, |
| 132 int32 size, | 132 int32 size, |
| 133 int32* id); | 133 int32* id); |
| 134 void OnMsgDestroyTransferBuffer(const HostResource& context, | 134 void OnMsgDestroyTransferBuffer(const ppapi::HostResource& context, |
| 135 int32 id); | 135 int32 id); |
| 136 void OnMsgGetTransferBuffer(const HostResource& context, | 136 void OnMsgGetTransferBuffer(const ppapi::HostResource& context, |
| 137 int32 id, | 137 int32 id, |
| 138 base::SharedMemoryHandle* transfer_buffer, | 138 base::SharedMemoryHandle* transfer_buffer, |
| 139 uint32* size); | 139 uint32* size); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace proxy | 142 } // namespace proxy |
| 143 } // namespace pp | 143 } // namespace pp |
| 144 | 144 |
| 145 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 145 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
| OLD | NEW |