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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 namespace gpu { | 40 namespace gpu { |
41 class StreamTextureManagerInProcess; | 41 class StreamTextureManagerInProcess; |
42 } | 42 } |
43 #endif | 43 #endif |
44 | 44 |
45 namespace gpu { | 45 namespace gpu { |
46 | 46 |
47 namespace gles2 { | 47 namespace gles2 { |
48 class GLES2Decoder; | 48 class GLES2Decoder; |
| 49 class ShaderTranslatorCache; |
49 } | 50 } |
50 | 51 |
51 class CommandBufferServiceBase; | 52 class CommandBufferServiceBase; |
52 class GpuMemoryBufferFactory; | 53 class GpuMemoryBufferFactory; |
53 class GpuScheduler; | 54 class GpuScheduler; |
54 class TransferBufferManagerInterface; | 55 class TransferBufferManagerInterface; |
55 | 56 |
56 // This class provides a thread-safe interface to the global GPU service (for | 57 // This class provides a thread-safe interface to the global GPU service (for |
57 // example GPU thread) when being run in single process mode. | 58 // example GPU thread) when being run in single process mode. |
58 // However, the behavior for accessing one context (i.e. one instance of this | 59 // However, the behavior for accessing one context (i.e. one instance of this |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 virtual void Release() const = 0; | 123 virtual void Release() const = 0; |
123 | 124 |
124 // Queues a task to run as soon as possible. | 125 // Queues a task to run as soon as possible. |
125 virtual void ScheduleTask(const base::Closure& task) = 0; | 126 virtual void ScheduleTask(const base::Closure& task) = 0; |
126 | 127 |
127 // Schedules |callback| to run at an appropriate time for performing idle | 128 // Schedules |callback| to run at an appropriate time for performing idle |
128 // work. | 129 // work. |
129 virtual void ScheduleIdleWork(const base::Closure& task) = 0; | 130 virtual void ScheduleIdleWork(const base::Closure& task) = 0; |
130 | 131 |
131 virtual bool UseVirtualizedGLContexts() = 0; | 132 virtual bool UseVirtualizedGLContexts() = 0; |
| 133 virtual scoped_refptr<gles2::ShaderTranslatorCache> |
| 134 shader_translator_cache() = 0; |
132 }; | 135 }; |
133 | 136 |
134 #if defined(OS_ANDROID) | 137 #if defined(OS_ANDROID) |
135 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 138 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
136 uint32 stream_id); | 139 uint32 stream_id); |
137 #endif | 140 #endif |
138 | 141 |
139 private: | 142 private: |
140 struct InitializeOnGpuThreadParams { | 143 struct InitializeOnGpuThreadParams { |
141 bool is_offscreen; | 144 bool is_offscreen; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 222 |
220 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 223 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
221 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 224 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
222 | 225 |
223 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 226 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
224 }; | 227 }; |
225 | 228 |
226 } // namespace gpu | 229 } // namespace gpu |
227 | 230 |
228 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 231 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
OLD | NEW |