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 "gpu/ipc/service/gpu_channel_manager.h" | 5 #include "gpu/ipc/service/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 28 matching lines...) Expand all Loading... |
39 const int kMaxGpuIdleTimeMs = 40; | 39 const int kMaxGpuIdleTimeMs = 40; |
40 // Maximum amount of time we keep pinging the GPU waiting for the client to | 40 // Maximum amount of time we keep pinging the GPU waiting for the client to |
41 // draw. | 41 // draw. |
42 const int kMaxKeepAliveTimeMs = 200; | 42 const int kMaxKeepAliveTimeMs = 200; |
43 #endif | 43 #endif |
44 | 44 |
45 } | 45 } |
46 | 46 |
47 GpuChannelManager::GpuChannelManager( | 47 GpuChannelManager::GpuChannelManager( |
48 const GpuPreferences& gpu_preferences, | 48 const GpuPreferences& gpu_preferences, |
| 49 const GpuDriverBugWorkarounds& workarounds, |
49 GpuChannelManagerDelegate* delegate, | 50 GpuChannelManagerDelegate* delegate, |
50 GpuWatchdogThread* watchdog, | 51 GpuWatchdogThread* watchdog, |
51 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 52 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
52 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 53 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
53 SyncPointManager* sync_point_manager, | 54 SyncPointManager* sync_point_manager, |
54 GpuMemoryBufferFactory* gpu_memory_buffer_factory, | 55 GpuMemoryBufferFactory* gpu_memory_buffer_factory, |
55 const GpuFeatureInfo& gpu_feature_info, | 56 const GpuFeatureInfo& gpu_feature_info, |
56 GpuProcessActivityFlags activity_flags) | 57 GpuProcessActivityFlags activity_flags) |
57 : task_runner_(task_runner), | 58 : task_runner_(task_runner), |
58 io_task_runner_(io_task_runner), | 59 io_task_runner_(io_task_runner), |
59 gpu_preferences_(gpu_preferences), | 60 gpu_preferences_(gpu_preferences), |
60 gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()), | 61 gpu_driver_bug_workarounds_(workarounds), |
61 delegate_(delegate), | 62 delegate_(delegate), |
62 watchdog_(watchdog), | 63 watchdog_(watchdog), |
63 share_group_(new gl::GLShareGroup()), | 64 share_group_(new gl::GLShareGroup()), |
64 mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)), | 65 mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)), |
65 gpu_memory_manager_(this), | 66 gpu_memory_manager_(this), |
66 sync_point_manager_(sync_point_manager), | 67 sync_point_manager_(sync_point_manager), |
67 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), | 68 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), |
68 gpu_feature_info_(gpu_feature_info), | 69 gpu_feature_info_(gpu_feature_info), |
69 exiting_for_lost_context_(false), | 70 exiting_for_lost_context_(false), |
70 activity_flags_(std::move(activity_flags)), | 71 activity_flags_(std::move(activity_flags)), |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 247 } |
247 } | 248 } |
248 if (!stub || !stub->decoder()->MakeCurrent()) | 249 if (!stub || !stub->decoder()->MakeCurrent()) |
249 return; | 250 return; |
250 glFinish(); | 251 glFinish(); |
251 DidAccessGpu(); | 252 DidAccessGpu(); |
252 } | 253 } |
253 #endif | 254 #endif |
254 | 255 |
255 } // namespace gpu | 256 } // namespace gpu |
OLD | NEW |