| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 int32_t end) override; | 55 int32_t end) override; |
| 56 uint32_t InsertSyncPoint() override; | 56 uint32_t InsertSyncPoint() override; |
| 57 uint32_t InsertFutureSyncPoint() override; | 57 uint32_t InsertFutureSyncPoint() override; |
| 58 void RetireSyncPoint(uint32_t sync_point) override; | 58 void RetireSyncPoint(uint32_t sync_point) override; |
| 59 void EnsureWorkVisible() override; | 59 void EnsureWorkVisible() override; |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 // PPB_Graphics3D_Shared overrides. | 62 // PPB_Graphics3D_Shared overrides. |
| 63 gpu::CommandBuffer* GetCommandBuffer() override; | 63 gpu::CommandBuffer* GetCommandBuffer() override; |
| 64 gpu::GpuControl* GetGpuControl() override; | 64 gpu::GpuControl* GetGpuControl() override; |
| 65 int32_t DoSwapBuffers() override; | 65 int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) override; |
| 66 | 66 |
| 67 scoped_ptr<PpapiCommandBufferProxy> command_buffer_; | 67 scoped_ptr<PpapiCommandBufferProxy> command_buffer_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(Graphics3D); | 69 DISALLOW_COPY_AND_ASSIGN(Graphics3D); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 class PPB_Graphics3D_Proxy : public InterfaceProxy { | 72 class PPB_Graphics3D_Proxy : public InterfaceProxy { |
| 73 public: | 73 public: |
| 74 explicit PPB_Graphics3D_Proxy(Dispatcher* dispatcher); | 74 explicit PPB_Graphics3D_Proxy(Dispatcher* dispatcher); |
| 75 ~PPB_Graphics3D_Proxy(); | 75 ~PPB_Graphics3D_Proxy(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 103 int32_t end, | 103 int32_t end, |
| 104 gpu::CommandBuffer::State* state, | 104 gpu::CommandBuffer::State* state, |
| 105 bool* success); | 105 bool* success); |
| 106 void OnMsgAsyncFlush(const HostResource& context, int32_t put_offset); | 106 void OnMsgAsyncFlush(const HostResource& context, int32_t put_offset); |
| 107 void OnMsgCreateTransferBuffer( | 107 void OnMsgCreateTransferBuffer( |
| 108 const HostResource& context, | 108 const HostResource& context, |
| 109 uint32_t size, | 109 uint32_t size, |
| 110 int32_t* id, | 110 int32_t* id, |
| 111 ppapi::proxy::SerializedHandle* transfer_buffer); | 111 ppapi::proxy::SerializedHandle* transfer_buffer); |
| 112 void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id); | 112 void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id); |
| 113 void OnMsgSwapBuffers(const HostResource& context); | 113 void OnMsgSwapBuffers(const HostResource& context, |
| 114 const gpu::SyncToken& sync_token); |
| 114 void OnMsgInsertSyncPoint(const HostResource& context, uint32_t* sync_point); | 115 void OnMsgInsertSyncPoint(const HostResource& context, uint32_t* sync_point); |
| 115 void OnMsgInsertFutureSyncPoint(const HostResource& context, | 116 void OnMsgInsertFutureSyncPoint(const HostResource& context, |
| 116 uint32_t* sync_point); | 117 uint32_t* sync_point); |
| 117 void OnMsgRetireSyncPoint(const HostResource& context, uint32_t sync_point); | 118 void OnMsgRetireSyncPoint(const HostResource& context, uint32_t sync_point); |
| 118 void OnMsgEnsureWorkVisible(const HostResource& context); | 119 void OnMsgEnsureWorkVisible(const HostResource& context); |
| 119 // Renderer->plugin message handlers. | 120 // Renderer->plugin message handlers. |
| 120 void OnMsgSwapBuffersACK(const HostResource& context, | 121 void OnMsgSwapBuffersACK(const HostResource& context, |
| 121 int32_t pp_error); | 122 int32_t pp_error); |
| 122 | 123 |
| 123 void SendSwapBuffersACKToPlugin(int32_t result, | 124 void SendSwapBuffersACKToPlugin(int32_t result, |
| 124 const HostResource& context); | 125 const HostResource& context); |
| 125 | 126 |
| 126 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; | 127 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; |
| 127 | 128 |
| 128 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); | 129 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); |
| 129 }; | 130 }; |
| 130 | 131 |
| 131 } // namespace proxy | 132 } // namespace proxy |
| 132 } // namespace ppapi | 133 } // namespace ppapi |
| 133 | 134 |
| 134 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 135 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 135 | 136 |
| OLD | NEW |