| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| 35 GpuChannelManager::GpuChannelManager( | 35 GpuChannelManager::GpuChannelManager( |
| 36 MessageRouter* router, | 36 MessageRouter* router, |
| 37 GpuWatchdog* watchdog, | 37 GpuWatchdog* watchdog, |
| 38 base::SingleThreadTaskRunner* io_task_runner, | 38 base::SingleThreadTaskRunner* io_task_runner, |
| 39 base::WaitableEvent* shutdown_event, | 39 base::WaitableEvent* shutdown_event, |
| 40 IPC::SyncChannel* channel, | 40 IPC::SyncChannel* channel, |
| 41 IPC::AttachmentBroker* broker, | 41 IPC::AttachmentBroker* broker, |
| 42 gpu::SyncPointManager* sync_point_manager, |
| 42 GpuMemoryBufferFactory* gpu_memory_buffer_factory) | 43 GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
| 43 : io_task_runner_(io_task_runner), | 44 : io_task_runner_(io_task_runner), |
| 44 shutdown_event_(shutdown_event), | 45 shutdown_event_(shutdown_event), |
| 45 router_(router), | 46 router_(router), |
| 46 gpu_memory_manager_( | 47 gpu_memory_manager_( |
| 47 this, | 48 this, |
| 48 GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), | 49 GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), |
| 49 watchdog_(watchdog), | 50 watchdog_(watchdog), |
| 50 sync_point_manager_(gpu::SyncPointManager::Create(false)), | 51 sync_point_manager_(sync_point_manager), |
| 51 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), | 52 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), |
| 52 channel_(channel), | 53 channel_(channel), |
| 53 relinquish_resources_pending_(false), | 54 relinquish_resources_pending_(false), |
| 54 attachment_broker_(broker), | 55 attachment_broker_(broker), |
| 55 weak_factory_(this) { | 56 weak_factory_(this) { |
| 56 DCHECK(router_); | 57 DCHECK(router_); |
| 57 DCHECK(io_task_runner); | 58 DCHECK(io_task_runner); |
| 58 DCHECK(shutdown_event); | 59 DCHECK(shutdown_event); |
| 59 } | 60 } |
| 60 | 61 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 OnResourcesRelinquished(); | 310 OnResourcesRelinquished(); |
| 310 #endif | 311 #endif |
| 311 } | 312 } |
| 312 } | 313 } |
| 313 | 314 |
| 314 void GpuChannelManager::OnResourcesRelinquished() { | 315 void GpuChannelManager::OnResourcesRelinquished() { |
| 315 Send(new GpuHostMsg_ResourcesRelinquished()); | 316 Send(new GpuHostMsg_ResourcesRelinquished()); |
| 316 } | 317 } |
| 317 | 318 |
| 318 } // namespace content | 319 } // namespace content |
| OLD | NEW |