| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 void RetireSyncPoint(uint32 sync_point) override; | 123 void RetireSyncPoint(uint32 sync_point) override; |
| 124 void SignalSyncPoint(uint32 sync_point, | 124 void SignalSyncPoint(uint32 sync_point, |
| 125 const base::Closure& callback) override; | 125 const base::Closure& callback) override; |
| 126 void SignalQuery(uint32 query_id, const base::Closure& callback) override; | 126 void SignalQuery(uint32 query_id, const base::Closure& callback) override; |
| 127 void SetSurfaceVisible(bool visible) override; | 127 void SetSurfaceVisible(bool visible) override; |
| 128 uint32 CreateStreamTexture(uint32 texture_id) override; | 128 uint32 CreateStreamTexture(uint32 texture_id) override; |
| 129 void SetLock(base::Lock*) override; | 129 void SetLock(base::Lock*) override; |
| 130 bool IsGpuChannelLost() override; | 130 bool IsGpuChannelLost() override; |
| 131 CommandBufferNamespace GetNamespaceID() const override; | 131 CommandBufferNamespace GetNamespaceID() const override; |
| 132 uint64_t GetCommandBufferID() const override; | 132 uint64_t GetCommandBufferID() const override; |
| 133 uint32_t GenerateFenceSyncRelease() override; |
| 134 bool IsFenceSyncRelease(uint32_t release) override; |
| 135 bool IsFenceSyncFlushed(uint32_t release) override; |
| 133 | 136 |
| 134 // The serializer interface to the GPU service (i.e. thread). | 137 // The serializer interface to the GPU service (i.e. thread). |
| 135 class Service { | 138 class Service { |
| 136 public: | 139 public: |
| 137 Service(); | 140 Service(); |
| 138 virtual ~Service(); | 141 virtual ~Service(); |
| 139 | 142 |
| 140 virtual void AddRef() const = 0; | 143 virtual void AddRef() const = 0; |
| 141 virtual void Release() const = 0; | 144 virtual void Release() const = 0; |
| 142 | 145 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 base::Closure context_lost_callback_; | 250 base::Closure context_lost_callback_; |
| 248 bool delayed_work_pending_; // Used to throttle PerformDelayedWork. | 251 bool delayed_work_pending_; // Used to throttle PerformDelayedWork. |
| 249 ImageFactory* image_factory_; | 252 ImageFactory* image_factory_; |
| 250 | 253 |
| 251 // Members accessed on the client thread: | 254 // Members accessed on the client thread: |
| 252 State last_state_; | 255 State last_state_; |
| 253 int32 last_put_offset_; | 256 int32 last_put_offset_; |
| 254 gpu::Capabilities capabilities_; | 257 gpu::Capabilities capabilities_; |
| 255 GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 258 GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 256 base::AtomicSequenceNumber next_image_id_; | 259 base::AtomicSequenceNumber next_image_id_; |
| 260 uint32_t next_fence_sync_release_; |
| 261 uint32_t flushed_fence_sync_release_; |
| 257 | 262 |
| 258 // Accessed on both threads: | 263 // Accessed on both threads: |
| 259 scoped_ptr<CommandBufferServiceBase> command_buffer_; | 264 scoped_ptr<CommandBufferServiceBase> command_buffer_; |
| 260 base::Lock command_buffer_lock_; | 265 base::Lock command_buffer_lock_; |
| 261 base::WaitableEvent flush_event_; | 266 base::WaitableEvent flush_event_; |
| 262 scoped_refptr<Service> service_; | 267 scoped_refptr<Service> service_; |
| 263 State state_after_last_flush_; | 268 State state_after_last_flush_; |
| 264 base::Lock state_after_last_flush_lock_; | 269 base::Lock state_after_last_flush_lock_; |
| 265 scoped_refptr<gfx::GLShareGroup> gl_share_group_; | 270 scoped_refptr<gfx::GLShareGroup> gl_share_group_; |
| 266 | 271 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 SyncPointManager* sync_point_manager_; // Non-owning. | 309 SyncPointManager* sync_point_manager_; // Non-owning. |
| 305 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 310 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
| 306 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 311 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
| 307 framebuffer_completeness_cache_; | 312 framebuffer_completeness_cache_; |
| 308 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 313 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
| 309 }; | 314 }; |
| 310 | 315 |
| 311 } // namespace gpu | 316 } // namespace gpu |
| 312 | 317 |
| 313 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 318 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |