| 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/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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 if (!gfx::GLSurface::InitializeOneOff()) { | 70 if (!gfx::GLSurface::InitializeOneOff()) { |
| 71 VLOG(1) << "gfx::GLSurface::InitializeOneOff()"; | 71 VLOG(1) << "gfx::GLSurface::InitializeOneOff()"; |
| 72 } | 72 } |
| 73 g_thread_safe_sender.Get() = thread_safe_sender(); | 73 g_thread_safe_sender.Get() = thread_safe_sender(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 GpuChildThread::~GpuChildThread() { | 76 GpuChildThread::~GpuChildThread() { |
| 77 } | 77 } |
| 78 | 78 |
| 79 void GpuChildThread::Shutdown() { | 79 void GpuChildThread::Shutdown() { |
| 80 ChildThread::Shutdown(); |
| 80 logging::SetLogMessageHandler(NULL); | 81 logging::SetLogMessageHandler(NULL); |
| 81 } | 82 } |
| 82 | 83 |
| 83 void GpuChildThread::Init(const base::Time& process_start_time) { | 84 void GpuChildThread::Init(const base::Time& process_start_time) { |
| 84 process_start_time_ = process_start_time; | 85 process_start_time_ = process_start_time; |
| 85 } | 86 } |
| 86 | 87 |
| 87 bool GpuChildThread::Send(IPC::Message* msg) { | 88 bool GpuChildThread::Send(IPC::Message* msg) { |
| 88 // The GPU process must never send a synchronous IPC message to the browser | 89 // The GPU process must never send a synchronous IPC message to the browser |
| 89 // process. This could result in deadlock. | 90 // process. This could result in deadlock. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // the future posting of tasks to the message loop. | 231 // the future posting of tasks to the message loop. |
| 231 if (watchdog_thread_->message_loop()) | 232 if (watchdog_thread_->message_loop()) |
| 232 watchdog_thread_->PostAcknowledge(); | 233 watchdog_thread_->PostAcknowledge(); |
| 233 // Prevent rearming. | 234 // Prevent rearming. |
| 234 watchdog_thread_->Stop(); | 235 watchdog_thread_->Stop(); |
| 235 } | 236 } |
| 236 } | 237 } |
| 237 | 238 |
| 238 } // namespace content | 239 } // namespace content |
| 239 | 240 |
| OLD | NEW |