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

Side by Side Diff: gpu/config/gpu_info_collector_win.cc

Issue 2680423002: Introducing 2 usages for SwiftShader (Closed)
Patch Set: Added missing change to GpuDataManagerImplPrivate Created 3 years, 10 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 "gpu/config/gpu_info_collector.h" 5 #include "gpu/config/gpu_info_collector.h"
6 6
7 // This has to be included before windows.h. 7 // This has to be included before windows.h.
8 #include "third_party/re2/src/re2/re2.h" 8 #include "third_party/re2/src/re2/re2.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { 246 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) {
247 TRACE_EVENT0("gpu", "CollectGraphicsInfo"); 247 TRACE_EVENT0("gpu", "CollectGraphicsInfo");
248 248
249 DCHECK(gpu_info); 249 DCHECK(gpu_info);
250 250
251 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) { 251 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) {
252 std::string requested_implementation_name = 252 std::string requested_implementation_name =
253 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 253 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
254 switches::kUseGL); 254 switches::kUseGL);
255 if (requested_implementation_name == "swiftshader") { 255 if (requested_implementation_name ==
256 gl::kGLImplementationSwiftShaderForWebGLName) {
256 gpu_info->software_rendering = true; 257 gpu_info->software_rendering = true;
257 gpu_info->context_info_state = kCollectInfoNonFatalFailure; 258 gpu_info->context_info_state = kCollectInfoNonFatalFailure;
258 return kCollectInfoNonFatalFailure; 259 return kCollectInfoNonFatalFailure;
259 } 260 }
260 } 261 }
261 262
262 CollectInfoResult result = CollectGraphicsInfoGL(gpu_info); 263 CollectInfoResult result = CollectGraphicsInfoGL(gpu_info);
263 if (result != kCollectInfoSuccess) { 264 if (result != kCollectInfoSuccess) {
264 gpu_info->context_info_state = result; 265 gpu_info->context_info_state = result;
265 return result; 266 return result;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 429 }
429 430
430 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 431 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
431 432
432 basic_gpu_info->dx_diagnostics_info_state = 433 basic_gpu_info->dx_diagnostics_info_state =
433 context_gpu_info.dx_diagnostics_info_state; 434 context_gpu_info.dx_diagnostics_info_state;
434 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; 435 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
435 } 436 }
436 437
437 } // namespace gpu 438 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698