summaryrefslogtreecommitdiffstats
path: root/content/gpu/gpu_child_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/gpu/gpu_child_thread.cc')
-rw-r--r--content/gpu/gpu_child_thread.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 8612a66..d3e6e94 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -116,7 +116,11 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
}
void GpuChildThread::OnInitialize() {
- logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
+ // We don't need to pipe log messages if we are running the GPU thread in
+ // the browser process.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU))
+ logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
// Load the GL implementation and locate the bindings before starting the GPU
// watchdog because this can take a lot of time and the GPU watchdog might