| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 #endif | 46 #endif |
| 47 | 47 |
| 48 namespace gpu { | 48 namespace gpu { |
| 49 class ValueStateMap; | 49 class ValueStateMap; |
| 50 | 50 |
| 51 namespace gles2 { | 51 namespace gles2 { |
| 52 class GLES2Decoder; | 52 class GLES2Decoder; |
| 53 class MailboxManager; | 53 class MailboxManager; |
| 54 class ShaderTranslatorCache; | 54 class ShaderTranslatorCache; |
| 55 class SubscriptionRefSet; |
| 55 } | 56 } |
| 56 | 57 |
| 57 class CommandBufferServiceBase; | 58 class CommandBufferServiceBase; |
| 58 class GpuMemoryBufferManager; | 59 class GpuMemoryBufferManager; |
| 59 class GpuScheduler; | 60 class GpuScheduler; |
| 60 class ImageFactory; | 61 class ImageFactory; |
| 61 class TransferBufferManagerInterface; | 62 class TransferBufferManagerInterface; |
| 62 | 63 |
| 63 // This class provides a thread-safe interface to the global GPU service (for | 64 // This class provides a thread-safe interface to the global GPU service (for |
| 64 // example GPU thread) when being run in single process mode. | 65 // example GPU thread) when being run in single process mode. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 virtual void ScheduleTask(const base::Closure& task) = 0; | 133 virtual void ScheduleTask(const base::Closure& task) = 0; |
| 133 | 134 |
| 134 // Schedules |callback| to run at an appropriate time for performing idle | 135 // Schedules |callback| to run at an appropriate time for performing idle |
| 135 // work. | 136 // work. |
| 136 virtual void ScheduleIdleWork(const base::Closure& task) = 0; | 137 virtual void ScheduleIdleWork(const base::Closure& task) = 0; |
| 137 | 138 |
| 138 virtual bool UseVirtualizedGLContexts() = 0; | 139 virtual bool UseVirtualizedGLContexts() = 0; |
| 139 virtual scoped_refptr<gles2::ShaderTranslatorCache> | 140 virtual scoped_refptr<gles2::ShaderTranslatorCache> |
| 140 shader_translator_cache() = 0; | 141 shader_translator_cache() = 0; |
| 141 scoped_refptr<gles2::MailboxManager> mailbox_manager(); | 142 scoped_refptr<gles2::MailboxManager> mailbox_manager(); |
| 143 scoped_refptr<gles2::SubscriptionRefSet> subscription_ref_set(); |
| 142 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state(); | 144 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state(); |
| 143 | 145 |
| 144 private: | 146 private: |
| 145 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 147 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
| 148 scoped_refptr<gles2::SubscriptionRefSet> subscription_ref_set_; |
| 146 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; | 149 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; |
| 147 }; | 150 }; |
| 148 | 151 |
| 149 #if defined(OS_ANDROID) | 152 #if defined(OS_ANDROID) |
| 150 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 153 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
| 151 uint32 stream_id); | 154 uint32 stream_id); |
| 152 #endif | 155 #endif |
| 153 | 156 |
| 154 private: | 157 private: |
| 155 struct InitializeOnGpuThreadParams { | 158 struct InitializeOnGpuThreadParams { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 251 |
| 249 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 252 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
| 250 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 253 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
| 251 | 254 |
| 252 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 255 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
| 253 }; | 256 }; |
| 254 | 257 |
| 255 } // namespace gpu | 258 } // namespace gpu |
| 256 | 259 |
| 257 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 260 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |