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 "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
10 #include "content/common/gpu/gpu_memory_buffer_factory.h" | 10 #include "content/common/gpu/gpu_memory_buffer_factory.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 base::MessageLoopProxy* io_message_loop, | 88 base::MessageLoopProxy* io_message_loop, |
89 base::WaitableEvent* shutdown_event, | 89 base::WaitableEvent* shutdown_event, |
90 IPC::SyncChannel* channel) | 90 IPC::SyncChannel* channel) |
91 : io_message_loop_(io_message_loop), | 91 : io_message_loop_(io_message_loop), |
92 shutdown_event_(shutdown_event), | 92 shutdown_event_(shutdown_event), |
93 router_(router), | 93 router_(router), |
94 gpu_memory_manager_( | 94 gpu_memory_manager_( |
95 this, | 95 this, |
96 GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), | 96 GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), |
97 watchdog_(watchdog), | 97 watchdog_(watchdog), |
98 sync_point_manager_(new gpu::SyncPointManager), | 98 sync_point_manager_(gpu::SyncPointManager::Create(false)), |
99 gpu_memory_buffer_factory_( | 99 gpu_memory_buffer_factory_( |
100 GpuMemoryBufferFactory::Create(GetGpuMemoryBufferFactoryType())), | 100 GpuMemoryBufferFactory::Create(GetGpuMemoryBufferFactoryType())), |
101 channel_(channel), | 101 channel_(channel), |
102 filter_( | 102 filter_( |
103 new GpuChannelManagerMessageFilter(gpu_memory_buffer_factory_.get())), | 103 new GpuChannelManagerMessageFilter(gpu_memory_buffer_factory_.get())), |
104 relinquish_resources_pending_(false), | 104 relinquish_resources_pending_(false), |
105 weak_factory_(this) { | 105 weak_factory_(this) { |
106 DCHECK(router_); | 106 DCHECK(router_); |
107 DCHECK(io_message_loop); | 107 DCHECK(io_message_loop); |
108 DCHECK(shutdown_event); | 108 DCHECK(shutdown_event); |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 OnResourcesRelinquished(); | 363 OnResourcesRelinquished(); |
364 #endif | 364 #endif |
365 } | 365 } |
366 } | 366 } |
367 | 367 |
368 void GpuChannelManager::OnResourcesRelinquished() { | 368 void GpuChannelManager::OnResourcesRelinquished() { |
369 Send(new GpuHostMsg_ResourcesRelinquished()); | 369 Send(new GpuHostMsg_ResourcesRelinquished()); |
370 } | 370 } |
371 | 371 |
372 } // namespace content | 372 } // namespace content |
OLD | NEW |