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 24 matching lines...) Expand all Loading... |
35 public: | 35 public: |
36 explicit Graphics3D(const HostResource& resource); | 36 explicit Graphics3D(const HostResource& resource); |
37 virtual ~Graphics3D(); | 37 virtual ~Graphics3D(); |
38 | 38 |
39 bool Init(gpu::gles2::GLES2Implementation* share_gles2, | 39 bool Init(gpu::gles2::GLES2Implementation* share_gles2, |
40 const gpu::Capabilities& capabilities, | 40 const gpu::Capabilities& capabilities, |
41 const SerializedHandle& shared_state); | 41 const SerializedHandle& shared_state); |
42 | 42 |
43 // Graphics3DTrusted API. These are not implemented in the proxy. | 43 // Graphics3DTrusted API. These are not implemented in the proxy. |
44 virtual PP_Bool SetGetBuffer(int32_t shm_id) override; | 44 virtual PP_Bool SetGetBuffer(int32_t shm_id) override; |
45 virtual PP_Bool Flush(int32_t put_offset) override; | 45 virtual PP_Bool Flush(int32_t put_offset, |
| 46 const std::vector<uint32_t>& sync_points) override; |
46 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, | 47 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, |
47 int32* id) override; | 48 int32* id) override; |
48 virtual PP_Bool DestroyTransferBuffer(int32_t id) override; | 49 virtual PP_Bool DestroyTransferBuffer(int32_t id) override; |
49 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, | 50 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, |
50 int32_t end) override; | 51 int32_t end) override; |
51 virtual gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, | 52 virtual gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, |
52 int32_t end) | 53 int32_t end) |
53 override; | 54 override; |
54 virtual uint32_t InsertSyncPoint() override; | 55 virtual uint32_t InsertSyncPoint() override; |
55 virtual uint32_t InsertFutureSyncPoint() override; | 56 virtual uint32_t InsertFutureSyncPoint() override; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 void OnMsgWaitForTokenInRange(const HostResource& context, | 94 void OnMsgWaitForTokenInRange(const HostResource& context, |
94 int32 start, | 95 int32 start, |
95 int32 end, | 96 int32 end, |
96 gpu::CommandBuffer::State* state, | 97 gpu::CommandBuffer::State* state, |
97 bool* success); | 98 bool* success); |
98 void OnMsgWaitForGetOffsetInRange(const HostResource& context, | 99 void OnMsgWaitForGetOffsetInRange(const HostResource& context, |
99 int32 start, | 100 int32 start, |
100 int32 end, | 101 int32 end, |
101 gpu::CommandBuffer::State* state, | 102 gpu::CommandBuffer::State* state, |
102 bool* success); | 103 bool* success); |
103 void OnMsgAsyncFlush(const HostResource& context, int32 put_offset); | 104 void OnMsgAsyncFlush(const HostResource& context, |
| 105 int32 put_offset, |
| 106 const std::vector<uint32>& sync_points); |
104 void OnMsgCreateTransferBuffer( | 107 void OnMsgCreateTransferBuffer( |
105 const HostResource& context, | 108 const HostResource& context, |
106 uint32 size, | 109 uint32 size, |
107 int32* id, | 110 int32* id, |
108 ppapi::proxy::SerializedHandle* transfer_buffer); | 111 ppapi::proxy::SerializedHandle* transfer_buffer); |
109 void OnMsgDestroyTransferBuffer(const HostResource& context, | 112 void OnMsgDestroyTransferBuffer(const HostResource& context, |
110 int32 id); | 113 int32 id); |
111 void OnMsgSwapBuffers(const HostResource& context); | 114 void OnMsgSwapBuffers(const HostResource& context); |
112 void OnMsgInsertSyncPoint(const HostResource& context, uint32* sync_point); | 115 void OnMsgInsertSyncPoint(const HostResource& context, uint32* sync_point); |
113 void OnMsgInsertFutureSyncPoint(const HostResource& context, | 116 void OnMsgInsertFutureSyncPoint(const HostResource& context, |
114 uint32* sync_point); | 117 uint32* sync_point); |
115 void OnMsgRetireSyncPoint(const HostResource& context, uint32 sync_point); | 118 void OnMsgRetireSyncPoint(const HostResource& context, uint32 sync_point); |
116 // Renderer->plugin message handlers. | 119 // Renderer->plugin message handlers. |
117 void OnMsgSwapBuffersACK(const HostResource& context, | 120 void OnMsgSwapBuffersACK(const HostResource& context, |
118 int32_t pp_error); | 121 int32_t pp_error); |
119 | 122 |
120 void SendSwapBuffersACKToPlugin(int32_t result, | 123 void SendSwapBuffersACKToPlugin(int32_t result, |
121 const HostResource& context); | 124 const HostResource& context); |
122 | 125 |
123 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; | 126 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; |
124 | 127 |
125 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); | 128 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); |
126 }; | 129 }; |
127 | 130 |
128 } // namespace proxy | 131 } // namespace proxy |
129 } // namespace ppapi | 132 } // namespace ppapi |
130 | 133 |
131 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 134 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
132 | 135 |
OLD | NEW |