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 GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 // Cleans up and sends reply if OnInitialize failed. | 154 // Cleans up and sends reply if OnInitialize failed. |
155 void OnInitializeFailed(IPC::Message* reply_message); | 155 void OnInitializeFailed(IPC::Message* reply_message); |
156 | 156 |
157 scoped_refptr<gfx::GLSurface> CreateSurface(); | 157 scoped_refptr<gfx::GLSurface> CreateSurface(); |
158 | 158 |
159 // Message handlers: | 159 // Message handlers: |
160 void OnInitialize(base::SharedMemoryHandle shared_state_shm, | 160 void OnInitialize(base::SharedMemoryHandle shared_state_shm, |
161 IPC::Message* reply_message); | 161 IPC::Message* reply_message); |
162 void OnSetGetBuffer(int32_t shm_id, IPC::Message* reply_message); | 162 void OnSetGetBuffer(int32_t shm_id, IPC::Message* reply_message); |
163 void OnProduceFrontBuffer(const Mailbox& mailbox); | 163 void OnTakeFrontBuffer(const Mailbox& mailbox); |
| 164 void OnReturnFrontBuffer(const Mailbox& mailbox, |
| 165 bool is_lost); |
164 void OnGetState(IPC::Message* reply_message); | 166 void OnGetState(IPC::Message* reply_message); |
165 void OnWaitForTokenInRange(int32_t start, | 167 void OnWaitForTokenInRange(int32_t start, |
166 int32_t end, | 168 int32_t end, |
167 IPC::Message* reply_message); | 169 IPC::Message* reply_message); |
168 void OnWaitForGetOffsetInRange(int32_t start, | 170 void OnWaitForGetOffsetInRange(int32_t start, |
169 int32_t end, | 171 int32_t end, |
170 IPC::Message* reply_message); | 172 IPC::Message* reply_message); |
171 void OnAsyncFlush(int32_t put_offset, | 173 void OnAsyncFlush(int32_t put_offset, |
172 uint32_t flush_count, | 174 uint32_t flush_count, |
173 const std::vector<ui::LatencyInfo>& latency_info); | 175 const std::vector<ui::LatencyInfo>& latency_info); |
174 void OnRegisterTransferBuffer(int32_t id, | 176 void OnRegisterTransferBuffer(int32_t id, |
175 base::SharedMemoryHandle transfer_buffer, | 177 base::SharedMemoryHandle transfer_buffer, |
176 uint32_t size); | 178 uint32_t size); |
177 void OnDestroyTransferBuffer(int32_t id); | 179 void OnDestroyTransferBuffer(int32_t id); |
178 void OnGetTransferBuffer(int32_t id, IPC::Message* reply_message); | 180 void OnGetTransferBuffer(int32_t id, IPC::Message* reply_message); |
179 | 181 |
180 void OnEnsureBackbuffer(); | 182 void OnEnsureBackbuffer(); |
181 | 183 |
| 184 void OnWaitSyncToken(const SyncToken& sync_token); |
182 void OnSignalSyncToken(const SyncToken& sync_token, uint32_t id); | 185 void OnSignalSyncToken(const SyncToken& sync_token, uint32_t id); |
183 void OnSignalAck(uint32_t id); | 186 void OnSignalAck(uint32_t id); |
184 void OnSignalQuery(uint32_t query, uint32_t id); | 187 void OnSignalQuery(uint32_t query, uint32_t id); |
185 | 188 |
186 void OnFenceSyncRelease(uint64_t release); | 189 void OnFenceSyncRelease(uint64_t release); |
187 bool OnWaitFenceSync(CommandBufferNamespace namespace_id, | 190 bool OnWaitFenceSync(CommandBufferNamespace namespace_id, |
188 CommandBufferId command_buffer_id, | 191 CommandBufferId command_buffer_id, |
189 uint64_t release); | 192 uint64_t release); |
190 void OnWaitFenceSyncCompleted(CommandBufferNamespace namespace_id, | 193 void OnWaitFenceSyncCompleted(CommandBufferNamespace namespace_id, |
191 CommandBufferId command_buffer_id, | 194 CommandBufferId command_buffer_id, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 275 |
273 std::unique_ptr<WaitForCommandState> wait_for_token_; | 276 std::unique_ptr<WaitForCommandState> wait_for_token_; |
274 std::unique_ptr<WaitForCommandState> wait_for_get_offset_; | 277 std::unique_ptr<WaitForCommandState> wait_for_get_offset_; |
275 | 278 |
276 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 279 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
277 }; | 280 }; |
278 | 281 |
279 } // namespace gpu | 282 } // namespace gpu |
280 | 283 |
281 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 284 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |