OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 namespace IPC { | 52 namespace IPC { |
53 struct ChannelHandle; | 53 struct ChannelHandle; |
54 class SyncChannel; | 54 class SyncChannel; |
55 } | 55 } |
56 | 56 |
57 struct GPUCreateCommandBufferConfig; | 57 struct GPUCreateCommandBufferConfig; |
58 struct GpuMsg_EstablishChannel_Params; | 58 struct GpuMsg_EstablishChannel_Params; |
59 | 59 |
60 namespace content { | 60 namespace content { |
61 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
| 62 namespace arc { |
62 class GpuArcVideoService; | 63 class GpuArcVideoService; |
| 64 } // namespace arc |
63 #endif | 65 #endif |
64 class GpuChannel; | 66 class GpuChannel; |
65 class GpuMemoryBufferFactory; | 67 class GpuMemoryBufferFactory; |
66 class GpuWatchdog; | 68 class GpuWatchdog; |
67 | 69 |
68 // A GpuChannelManager is a thread responsible for issuing rendering commands | 70 // A GpuChannelManager is a thread responsible for issuing rendering commands |
69 // managing the lifetimes of GPU channels and forwarding IPC requests from the | 71 // managing the lifetimes of GPU channels and forwarding IPC requests from the |
70 // browser process to them based on the corresponding renderer ID. | 72 // browser process to them based on the corresponding renderer ID. |
71 class CONTENT_EXPORT GpuChannelManager : public IPC::Listener, | 73 class CONTENT_EXPORT GpuChannelManager : public IPC::Listener, |
72 public IPC::Sender { | 74 public IPC::Sender { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 GpuMemoryManager gpu_memory_manager_; | 199 GpuMemoryManager gpu_memory_manager_; |
198 // SyncPointManager guaranteed to outlive running MessageLoop. | 200 // SyncPointManager guaranteed to outlive running MessageLoop. |
199 gpu::SyncPointManager* sync_point_manager_; | 201 gpu::SyncPointManager* sync_point_manager_; |
200 scoped_ptr<gpu::SyncPointClient> sync_point_client_waiter_; | 202 scoped_ptr<gpu::SyncPointClient> sync_point_client_waiter_; |
201 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; | 203 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; |
202 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 204 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
203 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 205 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
204 framebuffer_completeness_cache_; | 206 framebuffer_completeness_cache_; |
205 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; | 207 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; |
206 #if defined(OS_CHROMEOS) | 208 #if defined(OS_CHROMEOS) |
207 scoped_ptr<GpuArcVideoService> gpu_arc_video_service_; | 209 scoped_ptr<arc::GpuArcVideoService> gpu_arc_video_service_; |
208 #endif | 210 #endif |
209 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 211 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
210 #if defined(OS_ANDROID) | 212 #if defined(OS_ANDROID) |
211 // Last time we know the GPU was powered on. Global for tracking across all | 213 // Last time we know the GPU was powered on. Global for tracking across all |
212 // transport surfaces. | 214 // transport surfaces. |
213 base::TimeTicks last_gpu_access_time_; | 215 base::TimeTicks last_gpu_access_time_; |
214 base::TimeTicks begin_wake_up_time_; | 216 base::TimeTicks begin_wake_up_time_; |
215 #endif | 217 #endif |
216 | 218 |
217 // Member variables should appear before the WeakPtrFactory, to ensure | 219 // Member variables should appear before the WeakPtrFactory, to ensure |
218 // that any WeakPtrs to Controller are invalidated before its members | 220 // that any WeakPtrs to Controller are invalidated before its members |
219 // variable's destructors are executed, rendering them invalid. | 221 // variable's destructors are executed, rendering them invalid. |
220 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 222 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
221 | 223 |
222 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 224 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
223 }; | 225 }; |
224 | 226 |
225 } // namespace content | 227 } // namespace content |
226 | 228 |
227 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 229 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |