| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 gpu::Capabilities GetCapabilities() override; | 110 gpu::Capabilities GetCapabilities() override; |
| 111 int32_t CreateImage(ClientBuffer buffer, | 111 int32_t CreateImage(ClientBuffer buffer, |
| 112 size_t width, | 112 size_t width, |
| 113 size_t height, | 113 size_t height, |
| 114 unsigned internalformat) override; | 114 unsigned internalformat) override; |
| 115 void DestroyImage(int32_t id) override; | 115 void DestroyImage(int32_t id) override; |
| 116 int32_t CreateGpuMemoryBufferImage(size_t width, | 116 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 117 size_t height, | 117 size_t height, |
| 118 unsigned internalformat, | 118 unsigned internalformat, |
| 119 unsigned usage) override; | 119 unsigned usage) override; |
| 120 int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; |
| 120 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; | 121 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; |
| 121 void SetLock(base::Lock*) override; | 122 void SetLock(base::Lock*) override; |
| 122 void EnsureWorkVisible() override; | 123 void EnsureWorkVisible() override; |
| 123 CommandBufferNamespace GetNamespaceID() const override; | 124 CommandBufferNamespace GetNamespaceID() const override; |
| 124 CommandBufferId GetCommandBufferID() const override; | 125 CommandBufferId GetCommandBufferID() const override; |
| 125 int32_t GetExtraCommandBufferData() const override; | 126 int32_t GetExtraCommandBufferData() const override; |
| 126 uint64_t GenerateFenceSyncRelease() override; | 127 uint64_t GenerateFenceSyncRelease() override; |
| 127 bool IsFenceSyncRelease(uint64_t release) override; | 128 bool IsFenceSyncRelease(uint64_t release) override; |
| 128 bool IsFenceSyncFlushed(uint64_t release) override; | 129 bool IsFenceSyncFlushed(uint64_t release) override; |
| 129 bool IsFenceSyncFlushReceived(uint64_t release) override; | 130 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 scoped_refptr<Service> service_; | 271 scoped_refptr<Service> service_; |
| 271 State state_after_last_flush_; | 272 State state_after_last_flush_; |
| 272 base::Lock state_after_last_flush_lock_; | 273 base::Lock state_after_last_flush_lock_; |
| 273 scoped_refptr<gl::GLShareGroup> gl_share_group_; | 274 scoped_refptr<gl::GLShareGroup> gl_share_group_; |
| 274 base::WaitableEvent fence_sync_wait_event_; | 275 base::WaitableEvent fence_sync_wait_event_; |
| 275 | 276 |
| 276 // Only used with explicit scheduling and the gpu thread is the same as | 277 // Only used with explicit scheduling and the gpu thread is the same as |
| 277 // the client thread. | 278 // the client thread. |
| 278 std::unique_ptr<base::SequenceChecker> sequence_checker_; | 279 std::unique_ptr<base::SequenceChecker> sequence_checker_; |
| 279 | 280 |
| 281 // A map from image id to GpuMemoryBuffer id. |
| 282 std::map<int32_t, int32_t> image_gmb_ids_map_; |
| 283 |
| 280 base::WeakPtr<InProcessCommandBuffer> client_thread_weak_ptr_; | 284 base::WeakPtr<InProcessCommandBuffer> client_thread_weak_ptr_; |
| 281 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 285 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
| 282 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; | 286 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; |
| 283 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 287 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
| 284 | 288 |
| 285 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 289 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
| 286 }; | 290 }; |
| 287 | 291 |
| 288 // Default Service class when a null service is used. | 292 // Default Service class when a null service is used. |
| 289 class GPU_EXPORT GpuInProcessThread | 293 class GPU_EXPORT GpuInProcessThread |
| (...skipping 15 matching lines...) Expand all Loading... |
| 305 SyncPointManager* sync_point_manager() override; | 309 SyncPointManager* sync_point_manager() override; |
| 306 | 310 |
| 307 private: | 311 private: |
| 308 ~GpuInProcessThread() override; | 312 ~GpuInProcessThread() override; |
| 309 friend class base::RefCountedThreadSafe<GpuInProcessThread>; | 313 friend class base::RefCountedThreadSafe<GpuInProcessThread>; |
| 310 | 314 |
| 311 SyncPointManager* sync_point_manager_; // Non-owning. | 315 SyncPointManager* sync_point_manager_; // Non-owning. |
| 312 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 316 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
| 313 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 317 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
| 314 framebuffer_completeness_cache_; | 318 framebuffer_completeness_cache_; |
| 319 |
| 315 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 320 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
| 316 }; | 321 }; |
| 317 | 322 |
| 318 } // namespace gpu | 323 } // namespace gpu |
| 319 | 324 |
| 320 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 325 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |