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