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 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 base::WaitableEvent* shutdown_event, | 49 base::WaitableEvent* shutdown_event, |
50 gpu::SyncPointManager* sync_point_manager, | 50 gpu::SyncPointManager* sync_point_manager, |
51 GpuMemoryBufferFactory* gpu_memory_buffer_factory) | 51 GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
52 : task_runner_(task_runner), | 52 : task_runner_(task_runner), |
53 io_task_runner_(io_task_runner), | 53 io_task_runner_(io_task_runner), |
54 channel_(channel), | 54 channel_(channel), |
55 watchdog_(watchdog), | 55 watchdog_(watchdog), |
56 shutdown_event_(shutdown_event), | 56 shutdown_event_(shutdown_event), |
57 share_group_(new gfx::GLShareGroup), | 57 share_group_(new gfx::GLShareGroup), |
58 mailbox_manager_(gpu::gles2::MailboxManager::Create()), | 58 mailbox_manager_(gpu::gles2::MailboxManager::Create()), |
59 gpu_memory_manager_( | 59 gpu_memory_manager_(this), |
60 this, | |
61 GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), | |
62 sync_point_manager_(sync_point_manager), | 60 sync_point_manager_(sync_point_manager), |
63 sync_point_client_waiter_(new gpu::SyncPointClientWaiter), | 61 sync_point_client_waiter_(new gpu::SyncPointClientWaiter), |
64 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), | 62 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), |
65 weak_factory_(this) { | 63 weak_factory_(this) { |
66 DCHECK(task_runner); | 64 DCHECK(task_runner); |
67 DCHECK(io_task_runner); | 65 DCHECK(io_task_runner); |
68 const base::CommandLine* command_line = | 66 const base::CommandLine* command_line = |
69 base::CommandLine::ForCurrentProcess(); | 67 base::CommandLine::ForCurrentProcess(); |
70 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess)) | 68 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess)) |
71 preemption_flag_ = new gpu::PreemptionFlag; | 69 preemption_flag_ = new gpu::PreemptionFlag; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 } | 338 } |
341 } | 339 } |
342 if (!stub || !stub->decoder()->MakeCurrent()) | 340 if (!stub || !stub->decoder()->MakeCurrent()) |
343 return; | 341 return; |
344 glFinish(); | 342 glFinish(); |
345 DidAccessGpu(); | 343 DidAccessGpu(); |
346 } | 344 } |
347 #endif | 345 #endif |
348 | 346 |
349 } // namespace content | 347 } // namespace content |
OLD | NEW |