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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 1542013005: Add a new driver bug workaround SANDBOX_START_EARLY Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some draft code to discuss about generalizing EarlySandbox for gpu process Created 4 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/gpu/gpu_data_manager_impl_private.h" 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 DCHECK(command_line); 680 DCHECK(command_line);
681 681
682 std::string use_gl = 682 std::string use_gl =
683 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 683 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
684 switches::kUseGL); 684 switches::kUseGL);
685 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end()) 685 if (gpu_driver_bugs_.find(gpu::DISABLE_D3D11) != gpu_driver_bugs_.end())
686 command_line->AppendSwitch(switches::kDisableD3D11); 686 command_line->AppendSwitch(switches::kDisableD3D11);
687 if (gpu_driver_bugs_.find(gpu::DISABLE_DIRECT_COMPOSITION) != 687 if (gpu_driver_bugs_.find(gpu::DISABLE_DIRECT_COMPOSITION) !=
688 gpu_driver_bugs_.end()) 688 gpu_driver_bugs_.end())
689 command_line->AppendSwitch(switches::kDisableDirectComposition); 689 command_line->AppendSwitch(switches::kDisableDirectComposition);
690 if (gpu_driver_bugs_.find(gpu::SANDBOX_START_EARLY) != gpu_driver_bugs_.end())
691 command_line->AppendSwitch(switches::kGpuSandboxStartEarly);
690 if (use_swiftshader_) { 692 if (use_swiftshader_) {
691 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader"); 693 command_line->AppendSwitchASCII(switches::kUseGL, "swiftshader");
692 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || 694 } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) ||
693 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) || 695 IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) ||
694 IsFeatureBlacklisted( 696 IsFeatureBlacklisted(
695 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) && 697 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) &&
696 (use_gl == "any")) { 698 (use_gl == "any")) {
697 command_line->AppendSwitchASCII( 699 command_line->AppendSwitchASCII(
698 switches::kUseGL, gfx::kGLImplementationOSMesaName); 700 switches::kUseGL, gfx::kGLImplementationOSMesaName);
699 } else if (!use_gl.empty()) { 701 } else if (!use_gl.empty()) {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1264 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1263 #if defined(OS_WIN) 1265 #if defined(OS_WIN)
1264 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1266 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1265 #endif 1267 #endif
1266 complete_gpu_info_already_requested_ = true; 1268 complete_gpu_info_already_requested_ = true;
1267 // Some observers might be waiting. 1269 // Some observers might be waiting.
1268 NotifyGpuInfoUpdate(); 1270 NotifyGpuInfoUpdate();
1269 } 1271 }
1270 1272
1271 } // namespace content 1273 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698