| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 uint32 InsertSyncPoint() override; | 119 uint32 InsertSyncPoint() override; |
| 120 uint32 InsertFutureSyncPoint() override; | 120 uint32 InsertFutureSyncPoint() override; |
| 121 void RetireSyncPoint(uint32 sync_point) override; | 121 void RetireSyncPoint(uint32 sync_point) override; |
| 122 void SignalSyncPoint(uint32 sync_point, | 122 void SignalSyncPoint(uint32 sync_point, |
| 123 const base::Closure& callback) override; | 123 const base::Closure& callback) override; |
| 124 void SignalQuery(uint32 query_id, const base::Closure& callback) override; | 124 void SignalQuery(uint32 query_id, const base::Closure& callback) override; |
| 125 void SetSurfaceVisible(bool visible) override; | 125 void SetSurfaceVisible(bool visible) override; |
| 126 uint32 CreateStreamTexture(uint32 texture_id) override; | 126 uint32 CreateStreamTexture(uint32 texture_id) override; |
| 127 void SetLock(base::Lock*) override; | 127 void SetLock(base::Lock*) override; |
| 128 bool IsGpuChannelLost() override; | 128 bool IsGpuChannelLost() override; |
| 129 CommandBufferNamespace GetNamespaceID() const override; |
| 130 uint64_t GetCommandBufferID() const override; |
| 129 | 131 |
| 130 // The serializer interface to the GPU service (i.e. thread). | 132 // The serializer interface to the GPU service (i.e. thread). |
| 131 class Service { | 133 class Service { |
| 132 public: | 134 public: |
| 133 Service(); | 135 Service(); |
| 134 virtual ~Service(); | 136 virtual ~Service(); |
| 135 | 137 |
| 136 virtual void AddRef() const = 0; | 138 virtual void AddRef() const = 0; |
| 137 virtual void Release() const = 0; | 139 virtual void Release() const = 0; |
| 138 | 140 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 void DestroyImageOnGpuThread(int32 id); | 223 void DestroyImageOnGpuThread(int32 id); |
| 222 void SetGetBufferOnGpuThread(int32 shm_id, base::WaitableEvent* completion); | 224 void SetGetBufferOnGpuThread(int32 shm_id, base::WaitableEvent* completion); |
| 223 | 225 |
| 224 // Callbacks: | 226 // Callbacks: |
| 225 void OnContextLost(); | 227 void OnContextLost(); |
| 226 void OnResizeView(gfx::Size size, float scale_factor); | 228 void OnResizeView(gfx::Size size, float scale_factor); |
| 227 bool GetBufferChanged(int32 transfer_buffer_id); | 229 bool GetBufferChanged(int32 transfer_buffer_id); |
| 228 void PumpCommands(); | 230 void PumpCommands(); |
| 229 void PerformDelayedWork(); | 231 void PerformDelayedWork(); |
| 230 | 232 |
| 233 const uint64_t command_buffer_id_; |
| 234 |
| 231 // Members accessed on the gpu thread (possibly with the exception of | 235 // Members accessed on the gpu thread (possibly with the exception of |
| 232 // creation): | 236 // creation): |
| 233 bool context_lost_; | 237 bool context_lost_; |
| 234 scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_; | 238 scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_; |
| 235 scoped_ptr<GpuScheduler> gpu_scheduler_; | 239 scoped_ptr<GpuScheduler> gpu_scheduler_; |
| 236 scoped_ptr<gles2::GLES2Decoder> decoder_; | 240 scoped_ptr<gles2::GLES2Decoder> decoder_; |
| 237 scoped_refptr<gfx::GLContext> context_; | 241 scoped_refptr<gfx::GLContext> context_; |
| 238 scoped_refptr<gfx::GLSurface> surface_; | 242 scoped_refptr<gfx::GLSurface> surface_; |
| 239 base::Closure context_lost_callback_; | 243 base::Closure context_lost_callback_; |
| 240 bool delayed_work_pending_; // Used to throttle PerformDelayedWork. | 244 bool delayed_work_pending_; // Used to throttle PerformDelayedWork. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 SyncPointManager* sync_point_manager_; // Non-owning. | 300 SyncPointManager* sync_point_manager_; // Non-owning. |
| 297 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 301 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
| 298 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 302 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
| 299 framebuffer_completeness_cache_; | 303 framebuffer_completeness_cache_; |
| 300 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 304 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
| 301 }; | 305 }; |
| 302 | 306 |
| 303 } // namespace gpu | 307 } // namespace gpu |
| 304 | 308 |
| 305 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 309 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |