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 #include "content/common/gpu/gpu_channel_manager.h" | 5 #include "content/common/gpu/gpu_channel_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 const int kMaxGpuIdleTimeMs = 40; | 35 const int kMaxGpuIdleTimeMs = 40; |
36 // Maximum amount of time we keep pinging the GPU waiting for the client to | 36 // Maximum amount of time we keep pinging the GPU waiting for the client to |
37 // draw. | 37 // draw. |
38 const int kMaxKeepAliveTimeMs = 200; | 38 const int kMaxKeepAliveTimeMs = 200; |
39 #endif | 39 #endif |
40 | 40 |
41 } | 41 } |
42 | 42 |
43 GpuChannelManager::GpuChannelManager( | 43 GpuChannelManager::GpuChannelManager( |
44 const gpu::GpuPreferences& gpu_preferences, | 44 const gpu::GpuPreferences& gpu_preferences, |
| 45 const gpu::GpuDriverBugWorkarounds& gpu_driver_bug_workarounds, |
45 GpuChannelManagerDelegate* delegate, | 46 GpuChannelManagerDelegate* delegate, |
46 GpuWatchdog* watchdog, | 47 GpuWatchdog* watchdog, |
47 base::SingleThreadTaskRunner* task_runner, | 48 base::SingleThreadTaskRunner* task_runner, |
48 base::SingleThreadTaskRunner* io_task_runner, | 49 base::SingleThreadTaskRunner* io_task_runner, |
49 base::WaitableEvent* shutdown_event, | 50 base::WaitableEvent* shutdown_event, |
50 gpu::SyncPointManager* sync_point_manager, | 51 gpu::SyncPointManager* sync_point_manager, |
51 GpuMemoryBufferFactory* gpu_memory_buffer_factory) | 52 GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
52 : task_runner_(task_runner), | 53 : task_runner_(task_runner), |
53 io_task_runner_(io_task_runner), | 54 io_task_runner_(io_task_runner), |
54 gpu_preferences_(gpu_preferences), | 55 gpu_preferences_(gpu_preferences), |
| 56 gpu_driver_bug_workarounds_(gpu_driver_bug_workarounds), |
55 delegate_(delegate), | 57 delegate_(delegate), |
56 watchdog_(watchdog), | 58 watchdog_(watchdog), |
57 shutdown_event_(shutdown_event), | 59 shutdown_event_(shutdown_event), |
58 share_group_(new gfx::GLShareGroup), | 60 share_group_(new gfx::GLShareGroup), |
59 mailbox_manager_(gpu::gles2::MailboxManager::Create(gpu_preferences)), | 61 mailbox_manager_(gpu::gles2::MailboxManager::Create(gpu_preferences)), |
60 gpu_memory_manager_(this), | 62 gpu_memory_manager_(this), |
61 sync_point_manager_(sync_point_manager), | 63 sync_point_manager_(sync_point_manager), |
62 sync_point_client_waiter_( | 64 sync_point_client_waiter_( |
63 sync_point_manager->CreateSyncPointClientWaiter()), | 65 sync_point_manager->CreateSyncPointClientWaiter()), |
64 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), | 66 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 302 } |
301 } | 303 } |
302 if (!stub || !stub->decoder()->MakeCurrent()) | 304 if (!stub || !stub->decoder()->MakeCurrent()) |
303 return; | 305 return; |
304 glFinish(); | 306 glFinish(); |
305 DidAccessGpu(); | 307 DidAccessGpu(); |
306 } | 308 } |
307 #endif | 309 #endif |
308 | 310 |
309 } // namespace content | 311 } // namespace content |
OLD | NEW |