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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 namespace base { | 30 namespace base { |
31 class WaitableEvent; | 31 class WaitableEvent; |
32 } | 32 } |
33 | 33 |
34 namespace gl { | 34 namespace gl { |
35 class GLShareGroup; | 35 class GLShareGroup; |
36 } | 36 } |
37 | 37 |
38 namespace gpu { | 38 namespace gpu { |
| 39 class GpuDriverBugWorkarounds; |
39 struct GpuPreferences; | 40 struct GpuPreferences; |
40 class PreemptionFlag; | 41 class PreemptionFlag; |
41 class SyncPointClient; | 42 class SyncPointClient; |
42 class SyncPointManager; | 43 class SyncPointManager; |
43 struct SyncToken; | 44 struct SyncToken; |
44 namespace gles2 { | 45 namespace gles2 { |
45 class FramebufferCompletenessCache; | 46 class FramebufferCompletenessCache; |
46 class MailboxManager; | 47 class MailboxManager; |
47 class ProgramCache; | 48 class ProgramCache; |
48 class ShaderTranslatorCache; | 49 class ShaderTranslatorCache; |
49 } | 50 } |
50 } | 51 } |
51 | 52 |
52 namespace IPC { | 53 namespace IPC { |
53 struct ChannelHandle; | 54 struct ChannelHandle; |
54 } | 55 } |
55 | 56 |
56 namespace gpu { | 57 namespace gpu { |
57 class GpuChannel; | 58 class GpuChannel; |
58 class GpuChannelManagerDelegate; | 59 class GpuChannelManagerDelegate; |
59 class GpuMemoryBufferFactory; | 60 class GpuMemoryBufferFactory; |
60 class GpuWatchdogThread; | 61 class GpuWatchdogThread; |
61 | 62 |
62 // A GpuChannelManager is a thread responsible for issuing rendering commands | 63 // A GpuChannelManager is a thread responsible for issuing rendering commands |
63 // managing the lifetimes of GPU channels and forwarding IPC requests from the | 64 // managing the lifetimes of GPU channels and forwarding IPC requests from the |
64 // browser process to them based on the corresponding renderer ID. | 65 // browser process to them based on the corresponding renderer ID. |
65 class GPU_EXPORT GpuChannelManager { | 66 class GPU_EXPORT GpuChannelManager { |
66 public: | 67 public: |
67 GpuChannelManager(const GpuPreferences& gpu_preferences, | 68 GpuChannelManager(const GpuPreferences& gpu_preferences, |
| 69 const GpuDriverBugWorkarounds& workarounds, |
68 GpuChannelManagerDelegate* delegate, | 70 GpuChannelManagerDelegate* delegate, |
69 GpuWatchdogThread* watchdog, | 71 GpuWatchdogThread* watchdog, |
70 base::SingleThreadTaskRunner* task_runner, | 72 base::SingleThreadTaskRunner* task_runner, |
71 base::SingleThreadTaskRunner* io_task_runner, | 73 base::SingleThreadTaskRunner* io_task_runner, |
72 base::WaitableEvent* shutdown_event, | 74 base::WaitableEvent* shutdown_event, |
73 SyncPointManager* sync_point_manager, | 75 SyncPointManager* sync_point_manager, |
74 GpuMemoryBufferFactory* gpu_memory_buffer_factory); | 76 GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
75 virtual ~GpuChannelManager(); | 77 virtual ~GpuChannelManager(); |
76 | 78 |
77 GpuChannelManagerDelegate* delegate() const { return delegate_; } | 79 GpuChannelManagerDelegate* delegate() const { return delegate_; } |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // that any WeakPtrs to Controller are invalidated before its members | 208 // that any WeakPtrs to Controller are invalidated before its members |
207 // variable's destructors are executed, rendering them invalid. | 209 // variable's destructors are executed, rendering them invalid. |
208 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 210 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
209 | 211 |
210 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 212 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
211 }; | 213 }; |
212 | 214 |
213 } // namespace gpu | 215 } // namespace gpu |
214 | 216 |
215 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 217 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |