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