| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 watchdog_thread_ = new GpuWatchdogThread(kGpuTimeout); | 186 watchdog_thread_ = new GpuWatchdogThread(kGpuTimeout); |
| 187 watchdog_thread_->Start(); | 187 watchdog_thread_->Start(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 // Defer creation of the render thread. This is to prevent it from handling | 190 // Defer creation of the render thread. This is to prevent it from handling |
| 191 // IPC messages before the sandbox has been enabled and all other necessary | 191 // IPC messages before the sandbox has been enabled and all other necessary |
| 192 // initialization has succeeded. | 192 // initialization has succeeded. |
| 193 gpu_channel_manager_.reset(new GpuChannelManager( | 193 gpu_channel_manager_.reset(new GpuChannelManager( |
| 194 this, | 194 this, |
| 195 watchdog_thread_, | 195 watchdog_thread_, |
| 196 ChildProcess::current()->io_message_loop(), | 196 ChildProcess::current()->io_message_loop_proxy(), |
| 197 ChildProcess::current()->GetShutDownEvent())); | 197 ChildProcess::current()->GetShutDownEvent())); |
| 198 | 198 |
| 199 // Ensure the browser process receives the GPU info before a reply to any | 199 // Ensure the browser process receives the GPU info before a reply to any |
| 200 // subsequent IPC it might send. | 200 // subsequent IPC it might send. |
| 201 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); | 201 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void GpuChildThread::StopWatchdog() { | 204 void GpuChildThread::StopWatchdog() { |
| 205 if (watchdog_thread_.get()) { | 205 if (watchdog_thread_.get()) { |
| 206 watchdog_thread_->Stop(); | 206 watchdog_thread_->Stop(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // Runs on the main thread. | 265 // Runs on the main thread. |
| 266 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread, | 266 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread, |
| 267 const DxDiagNode& node) { | 267 const DxDiagNode& node) { |
| 268 thread->gpu_info_.dx_diagnostics = node; | 268 thread->gpu_info_.dx_diagnostics = node; |
| 269 thread->gpu_info_.finalized = true; | 269 thread->gpu_info_.finalized = true; |
| 270 thread->collecting_dx_diagnostics_ = false; | 270 thread->collecting_dx_diagnostics_ = false; |
| 271 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); | 271 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); |
| 272 } | 272 } |
| 273 | 273 |
| 274 #endif | 274 #endif |
| OLD | NEW |