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

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
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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::kCollectInfoNone:
201 NOTREACHED();
202 break;
200 case gpu::kCollectInfoSuccess: 203 case gpu::kCollectInfoSuccess:
201 break; 204 break;
202 } 205 }
203 GetContentClient()->SetGpuInfo(gpu_info_); 206 GetContentClient()->SetGpuInfo(gpu_info_);
204 207
205 #if defined(OS_WIN) 208 #if defined(OS_WIN)
206 // This is slow, but it's the only thing the unsandboxed GPU process does, 209 // This is slow, but it's the only thing the unsandboxed GPU process does,
207 // and GpuDataManager prevents us from sending multiple collecting requests, 210 // and GpuDataManager prevents us from sending multiple collecting requests,
208 // so it's OK to be blocking. 211 // so it's OK to be blocking.
209 gpu::GetDxDiagnostics(&gpu_info_.dx_diagnostics); 212 gpu::GetDxDiagnostics(&gpu_info_.dx_diagnostics);
210 gpu_info_.finalized = true; 213 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoSuccess;
211 #endif // OS_WIN 214 #endif // OS_WIN
212 215
213 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); 216 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
214 217
215 #if defined(OS_WIN) 218 #if defined(OS_WIN)
216 if (!in_browser_process_) { 219 if (!in_browser_process_) {
217 // The unsandboxed GPU process fulfilled its duty. Rest in peace. 220 // The unsandboxed GPU process fulfilled its duty. Rest in peace.
218 base::MessageLoop::current()->Quit(); 221 base::MessageLoop::current()->Quit();
219 } 222 }
220 #endif // OS_WIN 223 #endif // OS_WIN
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // the future posting of tasks to the message loop. 259 // the future posting of tasks to the message loop.
257 if (watchdog_thread_->message_loop()) 260 if (watchdog_thread_->message_loop())
258 watchdog_thread_->PostAcknowledge(); 261 watchdog_thread_->PostAcknowledge();
259 // Prevent rearming. 262 // Prevent rearming.
260 watchdog_thread_->Stop(); 263 watchdog_thread_->Stop();
261 } 264 }
262 } 265 }
263 266
264 } // namespace content 267 } // namespace content
265 268
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698