| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/win/scoped_com_initializer.h" | 10 #include "app/win/scoped_com_initializer.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 void GpuChildThread::Init(const base::Time& process_start_time) { | 83 void GpuChildThread::Init(const base::Time& process_start_time) { |
| 84 process_start_time_ = process_start_time; | 84 process_start_time_ = process_start_time; |
| 85 } | 85 } |
| 86 | 86 |
| 87 bool GpuChildThread::Send(IPC::Message* msg) { | 87 bool GpuChildThread::Send(IPC::Message* msg) { |
| 88 // The GPU process must never send a synchronous IPC message to the browser | 88 // The GPU process must never send a synchronous IPC message to the browser |
| 89 // process. This could result in deadlock. Unfortunately linux does this for | 89 // process. This could result in deadlock. Unfortunately linux does this for |
| 90 // GpuHostMsg_ResizeXID. TODO(apatrick): fix this before issuing any GL calls | 90 // GpuHostMsg_ResizeXID. TODO(apatrick): fix this before issuing any GL calls |
| 91 // on the browser process' GPU thread. | 91 // on the browser process' GPU thread. |
| 92 #if !defined(OS_LINUX) | 92 #if !defined(TOOLKIT_USES_GTK) |
| 93 DCHECK(!msg->is_sync()); | 93 DCHECK(!msg->is_sync()); |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 return ChildThread::Send(msg); | 96 return ChildThread::Send(msg); |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) { | 99 bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) { |
| 100 bool msg_is_ok = true; | 100 bool msg_is_ok = true; |
| 101 bool handled = true; | 101 bool handled = true; |
| 102 IPC_BEGIN_MESSAGE_MAP_EX(GpuChildThread, msg, msg_is_ok) | 102 IPC_BEGIN_MESSAGE_MAP_EX(GpuChildThread, msg, msg_is_ok) |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // Runs on the main thread. | 276 // Runs on the main thread. |
| 277 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread, | 277 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread, |
| 278 const DxDiagNode& node) { | 278 const DxDiagNode& node) { |
| 279 thread->gpu_info_.dx_diagnostics = node; | 279 thread->gpu_info_.dx_diagnostics = node; |
| 280 thread->gpu_info_.finalized = true; | 280 thread->gpu_info_.finalized = true; |
| 281 thread->collecting_dx_diagnostics_ = false; | 281 thread->collecting_dx_diagnostics_ = false; |
| 282 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); | 282 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); |
| 283 } | 283 } |
| 284 | 284 |
| 285 #endif | 285 #endif |
| OLD | NEW |