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 GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
6 #define GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 namespace IPC { | 51 namespace IPC { |
52 struct ChannelHandle; | 52 struct ChannelHandle; |
53 } | 53 } |
54 | 54 |
55 namespace gpu { | 55 namespace gpu { |
56 class GpuChannel; | 56 class GpuChannel; |
57 class GpuChannelManagerDelegate; | 57 class GpuChannelManagerDelegate; |
58 class GpuMemoryBufferFactory; | 58 class GpuMemoryBufferFactory; |
59 class GpuWatchdog; | 59 class GpuWatchdogThread; |
60 | 60 |
61 // A GpuChannelManager is a thread responsible for issuing rendering commands | 61 // A GpuChannelManager is a thread responsible for issuing rendering commands |
62 // managing the lifetimes of GPU channels and forwarding IPC requests from the | 62 // managing the lifetimes of GPU channels and forwarding IPC requests from the |
63 // browser process to them based on the corresponding renderer ID. | 63 // browser process to them based on the corresponding renderer ID. |
64 class GPU_EXPORT GpuChannelManager { | 64 class GPU_EXPORT GpuChannelManager { |
65 public: | 65 public: |
66 GpuChannelManager(const GpuPreferences& gpu_preferences, | 66 GpuChannelManager(const GpuPreferences& gpu_preferences, |
67 GpuChannelManagerDelegate* delegate, | 67 GpuChannelManagerDelegate* delegate, |
68 GpuWatchdog* watchdog, | 68 GpuWatchdogThread* watchdog, |
69 base::SingleThreadTaskRunner* task_runner, | 69 base::SingleThreadTaskRunner* task_runner, |
70 base::SingleThreadTaskRunner* io_task_runner, | 70 base::SingleThreadTaskRunner* io_task_runner, |
71 base::WaitableEvent* shutdown_event, | 71 base::WaitableEvent* shutdown_event, |
72 SyncPointManager* sync_point_manager, | 72 SyncPointManager* sync_point_manager, |
73 GpuMemoryBufferFactory* gpu_memory_buffer_factory); | 73 GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
74 virtual ~GpuChannelManager(); | 74 virtual ~GpuChannelManager(); |
75 | 75 |
76 GpuChannelManagerDelegate* delegate() const { return delegate_; } | 76 GpuChannelManagerDelegate* delegate() const { return delegate_; } |
77 | 77 |
78 IPC::ChannelHandle EstablishChannel(int client_id, | 78 IPC::ChannelHandle EstablishChannel(int client_id, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 #if defined(OS_ANDROID) | 167 #if defined(OS_ANDROID) |
168 void ScheduleWakeUpGpu(); | 168 void ScheduleWakeUpGpu(); |
169 void DoWakeUpGpu(); | 169 void DoWakeUpGpu(); |
170 #endif | 170 #endif |
171 | 171 |
172 const GpuPreferences& gpu_preferences_; | 172 const GpuPreferences& gpu_preferences_; |
173 GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; | 173 GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; |
174 | 174 |
175 GpuChannelManagerDelegate* const delegate_; | 175 GpuChannelManagerDelegate* const delegate_; |
176 | 176 |
177 GpuWatchdog* watchdog_; | 177 GpuWatchdogThread* watchdog_; |
178 | 178 |
179 base::WaitableEvent* shutdown_event_; | 179 base::WaitableEvent* shutdown_event_; |
180 | 180 |
181 scoped_refptr<gl::GLShareGroup> share_group_; | 181 scoped_refptr<gl::GLShareGroup> share_group_; |
182 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 182 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
183 scoped_refptr<PreemptionFlag> preemption_flag_; | 183 scoped_refptr<PreemptionFlag> preemption_flag_; |
184 GpuMemoryManager gpu_memory_manager_; | 184 GpuMemoryManager gpu_memory_manager_; |
185 // SyncPointManager guaranteed to outlive running MessageLoop. | 185 // SyncPointManager guaranteed to outlive running MessageLoop. |
186 SyncPointManager* sync_point_manager_; | 186 SyncPointManager* sync_point_manager_; |
187 std::unique_ptr<SyncPointClient> sync_point_client_waiter_; | 187 std::unique_ptr<SyncPointClient> sync_point_client_waiter_; |
(...skipping 17 matching lines...) Expand all Loading... |
205 // that any WeakPtrs to Controller are invalidated before its members | 205 // that any WeakPtrs to Controller are invalidated before its members |
206 // variable's destructors are executed, rendering them invalid. | 206 // variable's destructors are executed, rendering them invalid. |
207 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 207 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
208 | 208 |
209 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 209 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
210 }; | 210 }; |
211 | 211 |
212 } // namespace gpu | 212 } // namespace gpu |
213 | 213 |
214 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 214 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |