Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 534043002: Add bits to indicate which parts of GPUInfo are collected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698