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

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

Issue 540443002: Enable sync allocation of GpuMemoryBuffers from the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (!in_browser_process_) 156 if (!in_browser_process_)
157 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); 157 logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
158 158
159 // Defer creation of the render thread. This is to prevent it from handling 159 // Defer creation of the render thread. This is to prevent it from handling
160 // IPC messages before the sandbox has been enabled and all other necessary 160 // IPC messages before the sandbox has been enabled and all other necessary
161 // initialization has succeeded. 161 // initialization has succeeded.
162 gpu_channel_manager_.reset( 162 gpu_channel_manager_.reset(
163 new GpuChannelManager(GetRouter(), 163 new GpuChannelManager(GetRouter(),
164 watchdog_thread_.get(), 164 watchdog_thread_.get(),
165 ChildProcess::current()->io_message_loop_proxy(), 165 ChildProcess::current()->io_message_loop_proxy(),
166 ChildProcess::current()->GetShutDownEvent())); 166 ChildProcess::current()->GetShutDownEvent(),
167 channel()));
167 168
168 #if defined(USE_OZONE) 169 #if defined(USE_OZONE)
169 ui::OzonePlatform::GetInstance() 170 ui::OzonePlatform::GetInstance()
170 ->GetGpuPlatformSupport() 171 ->GetGpuPlatformSupport()
171 ->OnChannelEstablished(this); 172 ->OnChannelEstablished(this);
172 #endif 173 #endif
173 } 174 }
174 175
175 void GpuChildThread::StopWatchdog() { 176 void GpuChildThread::StopWatchdog() {
176 if (watchdog_thread_.get()) { 177 if (watchdog_thread_.get()) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // the future posting of tasks to the message loop. 257 // the future posting of tasks to the message loop.
257 if (watchdog_thread_->message_loop()) 258 if (watchdog_thread_->message_loop())
258 watchdog_thread_->PostAcknowledge(); 259 watchdog_thread_->PostAcknowledge();
259 // Prevent rearming. 260 // Prevent rearming.
260 watchdog_thread_->Stop(); 261 watchdog_thread_->Stop();
261 } 262 }
262 } 263 }
263 264
264 } // namespace content 265 } // namespace content
265 266
OLDNEW
« content/common/gpu/gpu_channel_manager.cc ('K') | « content/common/gpu/gpu_channel_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698