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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 case gpu::kCollectInfoSuccess: | 200 case gpu::kCollectInfoSuccess: |
201 break; | 201 break; |
202 } | 202 } |
203 GetContentClient()->SetGpuInfo(gpu_info_); | 203 GetContentClient()->SetGpuInfo(gpu_info_); |
204 | 204 |
205 #if defined(OS_WIN) | 205 #if defined(OS_WIN) |
206 // This is slow, but it's the only thing the unsandboxed GPU process does, | 206 // This is slow, but it's the only thing the unsandboxed GPU process does, |
207 // and GpuDataManager prevents us from sending multiple collecting requests, | 207 // and GpuDataManager prevents us from sending multiple collecting requests, |
208 // so it's OK to be blocking. | 208 // so it's OK to be blocking. |
209 gpu::GetDxDiagnostics(&gpu_info_.dx_diagnostics); | 209 gpu::GetDxDiagnostics(&gpu_info_.dx_diagnostics); |
210 gpu_info_.finalized = true; | 210 gpu_info_.collection_states.SetState( |
| 211 gpu::kGPUInfoExtra, gpu::kCollectInfoSuccess); |
211 #endif // OS_WIN | 212 #endif // OS_WIN |
212 | 213 |
213 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); | 214 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); |
214 | 215 |
215 #if defined(OS_WIN) | 216 #if defined(OS_WIN) |
216 if (!in_browser_process_) { | 217 if (!in_browser_process_) { |
217 // The unsandboxed GPU process fulfilled its duty. Rest in peace. | 218 // The unsandboxed GPU process fulfilled its duty. Rest in peace. |
218 base::MessageLoop::current()->Quit(); | 219 base::MessageLoop::current()->Quit(); |
219 } | 220 } |
220 #endif // OS_WIN | 221 #endif // OS_WIN |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // the future posting of tasks to the message loop. | 257 // the future posting of tasks to the message loop. |
257 if (watchdog_thread_->message_loop()) | 258 if (watchdog_thread_->message_loop()) |
258 watchdog_thread_->PostAcknowledge(); | 259 watchdog_thread_->PostAcknowledge(); |
259 // Prevent rearming. | 260 // Prevent rearming. |
260 watchdog_thread_->Stop(); | 261 watchdog_thread_->Stop(); |
261 } | 262 } |
262 } | 263 } |
263 | 264 |
264 } // namespace content | 265 } // namespace content |
265 | 266 |
OLD | NEW |