| 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 CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 void OnEnsureBackbuffer(); | 197 void OnEnsureBackbuffer(); |
| 198 | 198 |
| 199 void OnRetireSyncPoint(uint32 sync_point); | 199 void OnRetireSyncPoint(uint32 sync_point); |
| 200 bool OnWaitSyncPoint(uint32 sync_point); | 200 bool OnWaitSyncPoint(uint32 sync_point); |
| 201 void OnWaitSyncPointCompleted(uint32 sync_point); | 201 void OnWaitSyncPointCompleted(uint32 sync_point); |
| 202 void OnSignalSyncPoint(uint32 sync_point, uint32 id); | 202 void OnSignalSyncPoint(uint32 sync_point, uint32 id); |
| 203 void OnSignalSyncPointAck(uint32 id); | 203 void OnSignalSyncPointAck(uint32 id); |
| 204 void OnSignalQuery(uint32 query, uint32 id); | 204 void OnSignalQuery(uint32 query, uint32 id); |
| 205 | 205 |
| 206 void OnFenceSyncRelease(uint64_t release); |
| 207 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, |
| 208 uint64_t command_buffer_id, |
| 209 uint64_t release); |
| 210 void OnWaitFenceSyncCompleted(gpu::CommandBufferNamespace namespace_id, |
| 211 uint64_t command_buffer_id, |
| 212 uint64_t release); |
| 213 |
| 206 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); | 214 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); |
| 207 | 215 |
| 208 void OnCreateImage(int32 id, | 216 void OnCreateImage(int32 id, |
| 209 gfx::GpuMemoryBufferHandle handle, | 217 gfx::GpuMemoryBufferHandle handle, |
| 210 gfx::Size size, | 218 gfx::Size size, |
| 211 gfx::BufferFormat format, | 219 gfx::BufferFormat format, |
| 212 uint32 internalformat); | 220 uint32 internalformat); |
| 213 void OnDestroyImage(int32 id); | 221 void OnDestroyImage(int32 id); |
| 214 void OnCreateStreamTexture(uint32 texture_id, | 222 void OnCreateStreamTexture(uint32 texture_id, |
| 215 int32 stream_id, | 223 int32 stream_id, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 229 void PerformWork(); | 237 void PerformWork(); |
| 230 | 238 |
| 231 // Schedule processing of delayed work. This updates the time at which | 239 // Schedule processing of delayed work. This updates the time at which |
| 232 // delayed work should be processed. |process_delayed_work_time_| is | 240 // delayed work should be processed. |process_delayed_work_time_| is |
| 233 // updated to current time + delay. Call this after processing some amount | 241 // updated to current time + delay. Call this after processing some amount |
| 234 // of delayed work. | 242 // of delayed work. |
| 235 void ScheduleDelayedWork(base::TimeDelta delay); | 243 void ScheduleDelayedWork(base::TimeDelta delay); |
| 236 | 244 |
| 237 bool CheckContextLost(); | 245 bool CheckContextLost(); |
| 238 void CheckCompleteWaits(); | 246 void CheckCompleteWaits(); |
| 239 void PullTextureUpdates(uint32 sync_point); | 247 void PullTextureUpdates(gpu::CommandBufferNamespace namespace_id, |
| 248 uint64_t command_buffer_id, |
| 249 uint32_t release); |
| 250 |
| 240 | 251 |
| 241 // The lifetime of objects of this class is managed by a GpuChannel. The | 252 // The lifetime of objects of this class is managed by a GpuChannel. The |
| 242 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they | 253 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they |
| 243 // are destroyed. So a raw pointer is safe. | 254 // are destroyed. So a raw pointer is safe. |
| 244 GpuChannel* channel_; | 255 GpuChannel* channel_; |
| 245 | 256 |
| 246 // Task runner for main thread. | 257 // Task runner for main thread. |
| 247 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 258 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 248 | 259 |
| 249 // The group of contexts that share namespaces with this context. | 260 // The group of contexts that share namespaces with this context. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 size_t total_gpu_memory_; | 307 size_t total_gpu_memory_; |
| 297 scoped_ptr<WaitForCommandState> wait_for_token_; | 308 scoped_ptr<WaitForCommandState> wait_for_token_; |
| 298 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 309 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
| 299 | 310 |
| 300 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 311 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 301 }; | 312 }; |
| 302 | 313 |
| 303 } // namespace content | 314 } // namespace content |
| 304 | 315 |
| 305 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 316 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |