Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/gpu/gpu_channel_manager_unittest.cc ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/gpu/gpu_child_thread.h" 5 #include "content/gpu/gpu_child_thread.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/worker_pool.h" 9 #include "base/threading/worker_pool.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 #endif 171 #endif
172 172
173 // We don't need to pipe log messages if we are running the GPU thread in 173 // We don't need to pipe log messages if we are running the GPU thread in
174 // the browser process. 174 // the browser process.
175 if (!in_browser_process_) 175 if (!in_browser_process_)
176 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); 176 logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
177 177
178 // Defer creation of the render thread. This is to prevent it from handling 178 // Defer creation of the render thread. This is to prevent it from handling
179 // IPC messages before the sandbox has been enabled and all other necessary 179 // IPC messages before the sandbox has been enabled and all other necessary
180 // initialization has succeeded. 180 // initialization has succeeded.
181 gpu_channel_manager_.reset(new GpuChannelManager( 181 gpu_channel_manager_.reset(
182 GetRouter(), watchdog_thread_.get(), 182 new GpuChannelManager(GetRouter(), watchdog_thread_.get(),
183 ChildProcess::current()->io_task_runner(), 183 ChildProcess::current()->io_task_runner(),
184 ChildProcess::current()->GetShutDownEvent(), channel())); 184 ChildProcess::current()->GetShutDownEvent(),
185 channel(), GetAttachmentBroker()));
185 186
186 #if defined(USE_OZONE) 187 #if defined(USE_OZONE)
187 ui::OzonePlatform::GetInstance() 188 ui::OzonePlatform::GetInstance()
188 ->GetGpuPlatformSupport() 189 ->GetGpuPlatformSupport()
189 ->OnChannelEstablished(this); 190 ->OnChannelEstablished(this);
190 #endif 191 #endif
191 } 192 }
192 193
193 void GpuChildThread::StopWatchdog() { 194 void GpuChildThread::StopWatchdog() {
194 if (watchdog_thread_.get()) { 195 if (watchdog_thread_.get()) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 284 }
284 285
285 void GpuChildThread::OnGpuSwitched() { 286 void GpuChildThread::OnGpuSwitched() {
286 DVLOG(1) << "GPU: GPU has switched"; 287 DVLOG(1) << "GPU: GPU has switched";
287 // Notify observers in the GPU process. 288 // Notify observers in the GPU process.
288 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); 289 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched();
289 } 290 }
290 291
291 } // namespace content 292 } // namespace content
292 293
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager_unittest.cc ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698