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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 PP_Bool SetGetBuffer(int32_t shm_id) override; | 48 PP_Bool SetGetBuffer(int32_t shm_id) override; |
49 PP_Bool Flush(int32_t put_offset) override; | 49 PP_Bool Flush(int32_t put_offset) override; |
50 scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, | 50 scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, |
51 int32_t* id) override; | 51 int32_t* id) override; |
52 PP_Bool DestroyTransferBuffer(int32_t id) override; | 52 PP_Bool DestroyTransferBuffer(int32_t id) override; |
53 gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, | 53 gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, |
54 int32_t end) override; | 54 int32_t end) override; |
55 gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, | 55 gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, |
56 int32_t end) override; | 56 int32_t end) override; |
57 void EnsureWorkVisible() override; | 57 void EnsureWorkVisible() override; |
| 58 void TakeFrontBuffer() override; |
58 | 59 |
59 private: | 60 private: |
60 // PPB_Graphics3D_Shared overrides. | 61 // PPB_Graphics3D_Shared overrides. |
61 gpu::CommandBuffer* GetCommandBuffer() override; | 62 gpu::CommandBuffer* GetCommandBuffer() override; |
62 gpu::GpuControl* GetGpuControl() override; | 63 gpu::GpuControl* GetGpuControl() override; |
63 int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) override; | 64 int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) override; |
64 | 65 |
65 std::unique_ptr<PpapiCommandBufferProxy> command_buffer_; | 66 std::unique_ptr<PpapiCommandBufferProxy> command_buffer_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(Graphics3D); | 68 DISALLOW_COPY_AND_ASSIGN(Graphics3D); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 bool* success); | 104 bool* success); |
104 void OnMsgAsyncFlush(const HostResource& context, int32_t put_offset); | 105 void OnMsgAsyncFlush(const HostResource& context, int32_t put_offset); |
105 void OnMsgCreateTransferBuffer( | 106 void OnMsgCreateTransferBuffer( |
106 const HostResource& context, | 107 const HostResource& context, |
107 uint32_t size, | 108 uint32_t size, |
108 int32_t* id, | 109 int32_t* id, |
109 ppapi::proxy::SerializedHandle* transfer_buffer); | 110 ppapi::proxy::SerializedHandle* transfer_buffer); |
110 void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id); | 111 void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id); |
111 void OnMsgSwapBuffers(const HostResource& context, | 112 void OnMsgSwapBuffers(const HostResource& context, |
112 const gpu::SyncToken& sync_token); | 113 const gpu::SyncToken& sync_token); |
| 114 void OnMsgTakeFrontBuffer(const HostResource& context); |
113 void OnMsgEnsureWorkVisible(const HostResource& context); | 115 void OnMsgEnsureWorkVisible(const HostResource& context); |
114 // Renderer->plugin message handlers. | 116 // Renderer->plugin message handlers. |
115 void OnMsgSwapBuffersACK(const HostResource& context, | 117 void OnMsgSwapBuffersACK(const HostResource& context, |
116 int32_t pp_error); | 118 int32_t pp_error); |
117 | 119 |
118 void SendSwapBuffersACKToPlugin(int32_t result, | 120 void SendSwapBuffersACKToPlugin(int32_t result, |
119 const HostResource& context); | 121 const HostResource& context); |
120 | 122 |
121 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; | 123 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); | 125 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace proxy | 128 } // namespace proxy |
127 } // namespace ppapi | 129 } // namespace ppapi |
128 | 130 |
129 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 131 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
130 | 132 |
OLD | NEW |