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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Record initialization only after collecting the GPU info because that can | 134 // Record initialization only after collecting the GPU info because that can |
135 // take a significant amount of time. | 135 // take a significant amount of time. |
136 gpu_info_.initialization_time = base::Time::Now() - process_start_time_; | 136 gpu_info_.initialization_time = base::Time::Now() - process_start_time_; |
137 | 137 |
138 | 138 |
139 // Defer creation of the render thread. This is to prevent it from handling | 139 // Defer creation of the render thread. This is to prevent it from handling |
140 // IPC messages before the sandbox has been enabled and all other necessary | 140 // IPC messages before the sandbox has been enabled and all other necessary |
141 // initialization has succeeded. | 141 // initialization has succeeded. |
142 gpu_channel_manager_.reset(new GpuChannelManager( | 142 gpu_channel_manager_.reset(new GpuChannelManager( |
143 this, | 143 this, |
144 watchdog_thread_, | 144 watchdog_thread_.get(), |
145 ChildProcess::current()->io_message_loop_proxy(), | 145 ChildProcess::current()->io_message_loop_proxy(), |
146 ChildProcess::current()->GetShutDownEvent())); | 146 ChildProcess::current()->GetShutDownEvent())); |
147 | 147 |
148 #if defined(OS_LINUX) | 148 #if defined(OS_LINUX) |
149 // Ensure the browser process receives the GPU info before a reply to any | 149 // Ensure the browser process receives the GPU info before a reply to any |
150 // subsequent IPC it might send. | 150 // subsequent IPC it might send. |
151 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); | 151 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); |
152 #endif | 152 #endif |
153 } | 153 } |
154 | 154 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 thread->gpu_info_.dx_diagnostics = node; | 243 thread->gpu_info_.dx_diagnostics = node; |
244 thread->gpu_info_.finalized = true; | 244 thread->gpu_info_.finalized = true; |
245 thread->collecting_dx_diagnostics_ = false; | 245 thread->collecting_dx_diagnostics_ = false; |
246 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); | 246 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); |
247 } | 247 } |
248 | 248 |
249 #endif | 249 #endif |
250 | 250 |
251 } // namespace content | 251 } // namespace content |
252 | 252 |
OLD | NEW |