Chromium Code Reviews| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 gpu::CollectInfoResult result = | 190 gpu::CollectInfoResult result = |
| 191 gpu::CollectContextGraphicsInfo(&gpu_info_); | 191 gpu::CollectContextGraphicsInfo(&gpu_info_); |
| 192 switch (result) { | 192 switch (result) { |
| 193 case gpu::kCollectInfoFatalFailure: | 193 case gpu::kCollectInfoFatalFailure: |
| 194 LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal)."; | 194 LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal)."; |
| 195 // TODO(piman): can we signal overall failure? | 195 // TODO(piman): can we signal overall failure? |
| 196 break; | 196 break; |
| 197 case gpu::kCollectInfoNonFatalFailure: | 197 case gpu::kCollectInfoNonFatalFailure: |
| 198 VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal)."; | 198 VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal)."; |
| 199 break; | 199 break; |
| 200 case gpu::kCollectInfoSuccess: | 200 default: |
|
piman
2014/09/03 00:50:55
nit: please enumerate all values and avoid the def
Zhenyao Mo
2014/09/03 01:31:23
Done.
| |
| 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_.finalized = true; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 256 // the future posting of tasks to the message loop. | 256 // the future posting of tasks to the message loop. |
| 257 if (watchdog_thread_->message_loop()) | 257 if (watchdog_thread_->message_loop()) |
| 258 watchdog_thread_->PostAcknowledge(); | 258 watchdog_thread_->PostAcknowledge(); |
| 259 // Prevent rearming. | 259 // Prevent rearming. |
| 260 watchdog_thread_->Stop(); | 260 watchdog_thread_->Stop(); |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace content | 264 } // namespace content |
| 265 | 265 |
| OLD | NEW |