| 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 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 namespace gpu { | 42 namespace gpu { |
| 43 class StreamTextureManagerInProcess; | 43 class StreamTextureManagerInProcess; |
| 44 } | 44 } |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 namespace gpu { | 47 namespace gpu { |
| 48 | 48 |
| 49 namespace gles2 { | 49 namespace gles2 { |
| 50 class GLES2Decoder; | 50 class GLES2Decoder; |
| 51 class MailboxManager; |
| 51 class ShaderTranslatorCache; | 52 class ShaderTranslatorCache; |
| 52 } | 53 } |
| 53 | 54 |
| 54 class CommandBufferServiceBase; | 55 class CommandBufferServiceBase; |
| 55 class GpuScheduler; | 56 class GpuScheduler; |
| 56 class TransferBufferManagerInterface; | 57 class TransferBufferManagerInterface; |
| 57 | 58 |
| 58 // TODO(reveman): Remove this interface when InProcessCommandBuffer doesn't need | 59 // TODO(reveman): Remove this interface when InProcessCommandBuffer doesn't need |
| 59 // a custom factory interface and android_webview implementation of GPU memory | 60 // a custom factory interface and android_webview implementation of GPU memory |
| 60 // buffers can use the same mechanism for buffer allocation as what's used for | 61 // buffers can use the same mechanism for buffer allocation as what's used for |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Queues a task to run as soon as possible. | 147 // Queues a task to run as soon as possible. |
| 147 virtual void ScheduleTask(const base::Closure& task) = 0; | 148 virtual void ScheduleTask(const base::Closure& task) = 0; |
| 148 | 149 |
| 149 // Schedules |callback| to run at an appropriate time for performing idle | 150 // Schedules |callback| to run at an appropriate time for performing idle |
| 150 // work. | 151 // work. |
| 151 virtual void ScheduleIdleWork(const base::Closure& task) = 0; | 152 virtual void ScheduleIdleWork(const base::Closure& task) = 0; |
| 152 | 153 |
| 153 virtual bool UseVirtualizedGLContexts() = 0; | 154 virtual bool UseVirtualizedGLContexts() = 0; |
| 154 virtual scoped_refptr<gles2::ShaderTranslatorCache> | 155 virtual scoped_refptr<gles2::ShaderTranslatorCache> |
| 155 shader_translator_cache() = 0; | 156 shader_translator_cache() = 0; |
| 157 scoped_refptr<gles2::MailboxManager> mailbox_manager(); |
| 158 |
| 159 private: |
| 160 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
| 156 }; | 161 }; |
| 157 | 162 |
| 158 #if defined(OS_ANDROID) | 163 #if defined(OS_ANDROID) |
| 159 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 164 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
| 160 uint32 stream_id); | 165 uint32 stream_id); |
| 161 #endif | 166 #endif |
| 162 | 167 |
| 163 private: | 168 private: |
| 164 struct InitializeOnGpuThreadParams { | 169 struct InitializeOnGpuThreadParams { |
| 165 bool is_offscreen; | 170 bool is_offscreen; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 261 |
| 257 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 262 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
| 258 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 263 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
| 259 | 264 |
| 260 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 265 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
| 261 }; | 266 }; |
| 262 | 267 |
| 263 } // namespace gpu | 268 } // namespace gpu |
| 264 | 269 |
| 265 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 270 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |