| 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_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 public: | 30 public: |
| 31 explicit Graphics3D(const HostResource& resource); | 31 explicit Graphics3D(const HostResource& resource); |
| 32 virtual ~Graphics3D(); | 32 virtual ~Graphics3D(); |
| 33 | 33 |
| 34 bool Init(gpu::gles2::GLES2Implementation* share_gles2); | 34 bool Init(gpu::gles2::GLES2Implementation* share_gles2); |
| 35 | 35 |
| 36 // Graphics3DTrusted API. These are not implemented in the proxy. | 36 // Graphics3DTrusted API. These are not implemented in the proxy. |
| 37 virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE; | 37 virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE; |
| 38 virtual gpu::CommandBuffer::State GetState() OVERRIDE; | 38 virtual gpu::CommandBuffer::State GetState() OVERRIDE; |
| 39 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; | 39 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; |
| 40 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; | 40 virtual int32_t CreateTransferBuffer(uint32_t size, |
| 41 int* shm_handle, |
| 42 uint32_t* shm_size) OVERRIDE; |
| 41 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; | 43 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; |
| 42 virtual PP_Bool GetTransferBuffer(int32_t id, | |
| 43 int* shm_handle, | |
| 44 uint32_t* shm_size) OVERRIDE; | |
| 45 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, | 44 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, |
| 46 int32_t end) OVERRIDE; | 45 int32_t end) OVERRIDE; |
| 47 virtual gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, | 46 virtual gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, |
| 48 int32_t end) | 47 int32_t end) |
| 49 OVERRIDE; | 48 OVERRIDE; |
| 50 virtual uint32_t InsertSyncPoint() OVERRIDE; | 49 virtual uint32_t InsertSyncPoint() OVERRIDE; |
| 51 | 50 |
| 52 private: | 51 private: |
| 53 // PPB_Graphics3D_Shared overrides. | 52 // PPB_Graphics3D_Shared overrides. |
| 54 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; | 53 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 int32 start, | 88 int32 start, |
| 90 int32 end, | 89 int32 end, |
| 91 gpu::CommandBuffer::State* state, | 90 gpu::CommandBuffer::State* state, |
| 92 bool* success); | 91 bool* success); |
| 93 void OnMsgWaitForGetOffsetInRange(const HostResource& context, | 92 void OnMsgWaitForGetOffsetInRange(const HostResource& context, |
| 94 int32 start, | 93 int32 start, |
| 95 int32 end, | 94 int32 end, |
| 96 gpu::CommandBuffer::State* state, | 95 gpu::CommandBuffer::State* state, |
| 97 bool* success); | 96 bool* success); |
| 98 void OnMsgAsyncFlush(const HostResource& context, int32 put_offset); | 97 void OnMsgAsyncFlush(const HostResource& context, int32 put_offset); |
| 99 void OnMsgCreateTransferBuffer(const HostResource& context, | 98 void OnMsgCreateTransferBuffer( |
| 100 uint32 size, | 99 const HostResource& context, |
| 101 int32* id); | 100 uint32 size, |
| 101 int32* id, |
| 102 ppapi::proxy::SerializedHandle* transfer_buffer); |
| 102 void OnMsgDestroyTransferBuffer(const HostResource& context, | 103 void OnMsgDestroyTransferBuffer(const HostResource& context, |
| 103 int32 id); | 104 int32 id); |
| 104 void OnMsgGetTransferBuffer(const HostResource& context, | |
| 105 int32 id, | |
| 106 ppapi::proxy::SerializedHandle* transfer_buffer); | |
| 107 void OnMsgSwapBuffers(const HostResource& context); | 105 void OnMsgSwapBuffers(const HostResource& context); |
| 108 void OnMsgInsertSyncPoint(const HostResource& context, uint32* sync_point); | 106 void OnMsgInsertSyncPoint(const HostResource& context, uint32* sync_point); |
| 109 // Renderer->plugin message handlers. | 107 // Renderer->plugin message handlers. |
| 110 void OnMsgSwapBuffersACK(const HostResource& context, | 108 void OnMsgSwapBuffersACK(const HostResource& context, |
| 111 int32_t pp_error); | 109 int32_t pp_error); |
| 112 | 110 |
| 113 void SendSwapBuffersACKToPlugin(int32_t result, | 111 void SendSwapBuffersACKToPlugin(int32_t result, |
| 114 const HostResource& context); | 112 const HostResource& context); |
| 115 | 113 |
| 116 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; | 114 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; |
| 117 | 115 |
| 118 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); | 116 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); |
| 119 }; | 117 }; |
| 120 | 118 |
| 121 } // namespace proxy | 119 } // namespace proxy |
| 122 } // namespace ppapi | 120 } // namespace ppapi |
| 123 | 121 |
| 124 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 122 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 125 | 123 |
| OLD | NEW |