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> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/containers/scoped_ptr_hash_map.h" | 15 #include "base/containers/scoped_ptr_hash_map.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
20 #include "gpu/command_buffer/common/constants.h" | 20 #include "gpu/command_buffer/common/constants.h" |
| 21 #include "gpu/command_buffer/service/gpu_preferences.h" |
21 #include "gpu/config/gpu_driver_bug_workarounds.h" | 22 #include "gpu/config/gpu_driver_bug_workarounds.h" |
22 #include "gpu/gpu_export.h" | 23 #include "gpu/gpu_export.h" |
23 #include "gpu/ipc/service/gpu_memory_manager.h" | 24 #include "gpu/ipc/service/gpu_memory_manager.h" |
24 #include "ui/gfx/gpu_memory_buffer.h" | 25 #include "ui/gfx/gpu_memory_buffer.h" |
25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
26 #include "ui/gl/gl_surface.h" | 27 #include "ui/gl/gl_surface.h" |
27 #include "url/gurl.h" | 28 #include "url/gurl.h" |
28 | 29 |
29 namespace base { | 30 namespace base { |
30 class WaitableEvent; | 31 class WaitableEvent; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 163 |
163 private: | 164 private: |
164 void InternalDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id); | 165 void InternalDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id); |
165 void InternalDestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, | 166 void InternalDestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, |
166 int client_id); | 167 int client_id); |
167 #if defined(OS_ANDROID) | 168 #if defined(OS_ANDROID) |
168 void ScheduleWakeUpGpu(); | 169 void ScheduleWakeUpGpu(); |
169 void DoWakeUpGpu(); | 170 void DoWakeUpGpu(); |
170 #endif | 171 #endif |
171 | 172 |
172 const GpuPreferences& gpu_preferences_; | 173 const GpuPreferences gpu_preferences_; |
173 GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; | 174 GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; |
174 | 175 |
175 GpuChannelManagerDelegate* const delegate_; | 176 GpuChannelManagerDelegate* const delegate_; |
176 | 177 |
177 GpuWatchdogThread* watchdog_; | 178 GpuWatchdogThread* watchdog_; |
178 | 179 |
179 base::WaitableEvent* shutdown_event_; | 180 base::WaitableEvent* shutdown_event_; |
180 | 181 |
181 scoped_refptr<gl::GLShareGroup> share_group_; | 182 scoped_refptr<gl::GLShareGroup> share_group_; |
182 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 183 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
(...skipping 22 matching lines...) Expand all Loading... |
205 // that any WeakPtrs to Controller are invalidated before its members | 206 // that any WeakPtrs to Controller are invalidated before its members |
206 // variable's destructors are executed, rendering them invalid. | 207 // variable's destructors are executed, rendering them invalid. |
207 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 208 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
208 | 209 |
209 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 210 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
210 }; | 211 }; |
211 | 212 |
212 } // namespace gpu | 213 } // namespace gpu |
213 | 214 |
214 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 215 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |