| 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 <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 const base::Closure& context_lost_callback, | 83 const base::Closure& context_lost_callback, |
| 84 InProcessCommandBuffer* share_group, | 84 InProcessCommandBuffer* share_group, |
| 85 GpuMemoryBufferManager* gpu_memory_buffer_manager, | 85 GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 86 ImageFactory* image_factory); | 86 ImageFactory* image_factory); |
| 87 void Destroy(); | 87 void Destroy(); |
| 88 | 88 |
| 89 // CommandBuffer implementation: | 89 // CommandBuffer implementation: |
| 90 bool Initialize() override; | 90 bool Initialize() override; |
| 91 State GetLastState() override; | 91 State GetLastState() override; |
| 92 int32 GetLastToken() override; | 92 int32 GetLastToken() override; |
| 93 void Flush(int32 put_offset) override; | 93 void Flush(int32 put_offset, const std::vector<uint32>& sync_points) override; |
| 94 void WaitForTokenInRange(int32 start, int32 end) override; | 94 void WaitForTokenInRange(int32 start, int32 end) override; |
| 95 void WaitForGetOffsetInRange(int32 start, int32 end) override; | 95 void WaitForGetOffsetInRange(int32 start, int32 end) override; |
| 96 void SetGetBuffer(int32 shm_id) override; | 96 void SetGetBuffer(int32 shm_id) override; |
| 97 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 97 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
| 98 int32* id) override; | 98 int32* id) override; |
| 99 void DestroyTransferBuffer(int32 id) override; | 99 void DestroyTransferBuffer(int32 id) override; |
| 100 gpu::error::Error GetLastError() override; | 100 gpu::error::Error GetLastError() override; |
| 101 | 101 |
| 102 // GpuControl implementation: | 102 // GpuControl implementation: |
| 103 gpu::Capabilities GetCapabilities() override; | 103 gpu::Capabilities GetCapabilities() override; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 size(size), | 175 size(size), |
| 176 attribs(attribs), | 176 attribs(attribs), |
| 177 gpu_preference(gpu_preference), | 177 gpu_preference(gpu_preference), |
| 178 capabilities(capabilities), | 178 capabilities(capabilities), |
| 179 context_group(share_group), | 179 context_group(share_group), |
| 180 image_factory(image_factory) {} | 180 image_factory(image_factory) {} |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); | 183 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); |
| 184 bool DestroyOnGpuThread(); | 184 bool DestroyOnGpuThread(); |
| 185 void FlushOnGpuThread(int32 put_offset); | 185 void FlushOnGpuThread(int32 put_offset, |
| 186 const std::vector<uint32>& sync_points); |
| 186 void ScheduleIdleWorkOnGpuThread(); | 187 void ScheduleIdleWorkOnGpuThread(); |
| 187 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); | 188 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); |
| 188 bool MakeCurrent(); | 189 bool MakeCurrent(); |
| 189 base::Closure WrapCallback(const base::Closure& callback); | 190 base::Closure WrapCallback(const base::Closure& callback); |
| 190 State GetStateFast(); | 191 State GetStateFast(); |
| 191 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); } | 192 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); } |
| 192 void CheckSequencedThread(); | 193 void CheckSequencedThread(); |
| 193 void RetireSyncPointOnGpuThread(uint32 sync_point); | 194 void RetireSyncPointOnGpuThread(uint32 sync_point); |
| 194 void SignalSyncPointOnGpuThread(uint32 sync_point, | 195 void SignalSyncPointOnGpuThread(uint32 sync_point, |
| 195 const base::Closure& callback); | 196 const base::Closure& callback); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 249 |
| 249 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 250 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
| 250 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 251 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
| 251 | 252 |
| 252 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 253 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
| 253 }; | 254 }; |
| 254 | 255 |
| 255 } // namespace gpu | 256 } // namespace gpu |
| 256 | 257 |
| 257 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 258 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |