OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 // If |surface| is not null, use it directly; in this case, the command | 81 // If |surface| is not null, use it directly; in this case, the command |
82 // buffer gpu thread must be the same as the client thread. Otherwise create | 82 // buffer gpu thread must be the same as the client thread. Otherwise create |
83 // a new GLSurface. | 83 // a new GLSurface. |
84 bool Initialize(scoped_refptr<gl::GLSurface> surface, | 84 bool Initialize(scoped_refptr<gl::GLSurface> surface, |
85 bool is_offscreen, | 85 bool is_offscreen, |
86 gfx::AcceleratedWidget window, | 86 gfx::AcceleratedWidget window, |
87 const gles2::ContextCreationAttribHelper& attribs, | 87 const gles2::ContextCreationAttribHelper& attribs, |
88 InProcessCommandBuffer* share_group, | 88 InProcessCommandBuffer* share_group, |
89 GpuMemoryBufferManager* gpu_memory_buffer_manager, | 89 GpuMemoryBufferManager* gpu_memory_buffer_manager, |
90 ImageFactory* image_factory); | 90 ImageFactory* image_factory, |
| 91 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
91 | 92 |
92 // CommandBuffer implementation: | 93 // CommandBuffer implementation: |
93 State GetLastState() override; | 94 State GetLastState() override; |
94 int32_t GetLastToken() override; | 95 int32_t GetLastToken() override; |
95 void Flush(int32_t put_offset) override; | 96 void Flush(int32_t put_offset) override; |
96 void OrderingBarrier(int32_t put_offset) override; | 97 void OrderingBarrier(int32_t put_offset) override; |
97 void WaitForTokenInRange(int32_t start, int32_t end) override; | 98 void WaitForTokenInRange(int32_t start, int32_t end) override; |
98 void WaitForGetOffsetInRange(int32_t start, int32_t end) override; | 99 void WaitForGetOffsetInRange(int32_t start, int32_t end) override; |
99 void SetGetBuffer(int32_t shm_id) override; | 100 void SetGetBuffer(int32_t shm_id) override; |
100 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 101 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 SyncPointManager* sync_point_manager_; // Non-owning. | 306 SyncPointManager* sync_point_manager_; // Non-owning. |
306 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 307 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
307 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 308 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
308 framebuffer_completeness_cache_; | 309 framebuffer_completeness_cache_; |
309 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 310 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
310 }; | 311 }; |
311 | 312 |
312 } // namespace gpu | 313 } // namespace gpu |
313 | 314 |
314 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 315 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
OLD | NEW |