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 "content/common/child_thread.h" | 8 #include "content/common/child_thread.h" |
9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
| 10 #include "content/common/gpu/gpu_memory_manager.h" |
10 #include "content/common/gpu/gpu_messages.h" | 11 #include "content/common/gpu/gpu_messages.h" |
11 #include "content/common/gpu/gpu_memory_manager.h" | 12 #include "ui/gl/gl_share_group.h" |
12 #include "ui/gfx/gl/gl_share_group.h" | |
13 | 13 |
14 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, | 14 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, |
15 GpuWatchdog* watchdog, | 15 GpuWatchdog* watchdog, |
16 base::MessageLoopProxy* io_message_loop, | 16 base::MessageLoopProxy* io_message_loop, |
17 base::WaitableEvent* shutdown_event) | 17 base::WaitableEvent* shutdown_event) |
18 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), | 18 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), |
19 io_message_loop_(io_message_loop), | 19 io_message_loop_(io_message_loop), |
20 shutdown_event_(shutdown_event), | 20 shutdown_event_(shutdown_event), |
21 gpu_child_thread_(gpu_child_thread), | 21 gpu_child_thread_(gpu_child_thread), |
22 ALLOW_THIS_IN_INITIALIZER_LIST(gpu_memory_manager_(this, | 22 ALLOW_THIS_IN_INITIALIZER_LIST(gpu_memory_manager_(this, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void GpuChannelManager::LoseAllContexts() { | 145 void GpuChannelManager::LoseAllContexts() { |
146 MessageLoop::current()->PostTask( | 146 MessageLoop::current()->PostTask( |
147 FROM_HERE, | 147 FROM_HERE, |
148 base::Bind(&GpuChannelManager::OnLoseAllContexts, | 148 base::Bind(&GpuChannelManager::OnLoseAllContexts, |
149 weak_factory_.GetWeakPtr())); | 149 weak_factory_.GetWeakPtr())); |
150 } | 150 } |
151 | 151 |
152 void GpuChannelManager::OnLoseAllContexts() { | 152 void GpuChannelManager::OnLoseAllContexts() { |
153 gpu_channels_.clear(); | 153 gpu_channels_.clear(); |
154 } | 154 } |
OLD | NEW |