| Index: content/browser/gpu/gpu_data_manager_impl_private.cc
|
| diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| index 5bd58166d21c06128803323d55d75381bfd7dfc4..f9ec8e15bbc599cf857e0bf7ba428bb50aa28efb 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -933,8 +933,13 @@ void GpuDataManagerImplPrivate::DisableHardwareAcceleration() {
|
|
|
| card_blacklisted_ = true;
|
|
|
| - for (int i = 0; i < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++i)
|
| - blacklisted_features_.insert(i);
|
| + for (int i = 0; i < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++i) {
|
| + if ((i != gpu::GPU_FEATURE_TYPE_SWIFTSHADER) ||
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableSoftwareRasterizer)) {
|
| + blacklisted_features_.insert(i);
|
| + }
|
| + }
|
|
|
| EnableSwiftShaderIfNecessary();
|
| NotifyGpuInfoUpdate();
|
| @@ -1231,6 +1236,11 @@ void GpuDataManagerImplPrivate::UpdateBlacklistedFeatures(
|
| blacklisted_features_.insert(gpu::GPU_FEATURE_TYPE_WEBGL);
|
| }
|
|
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableSoftwareRasterizer)) {
|
| + blacklisted_features_.insert(gpu::GPU_FEATURE_TYPE_SWIFTSHADER);
|
| + }
|
| +
|
| EnableSwiftShaderIfNecessary();
|
| }
|
|
|
| @@ -1257,11 +1267,10 @@ void GpuDataManagerImplPrivate::NotifyGpuInfoUpdate() {
|
| }
|
|
|
| void GpuDataManagerImplPrivate::EnableSwiftShaderIfNecessary() {
|
| - if (!GpuAccessAllowed(NULL) ||
|
| + if (!GpuAccessAllowed(nullptr) ||
|
| blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_WEBGL)) {
|
| if (!swiftshader_path_.empty() &&
|
| - !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kDisableSoftwareRasterizer))
|
| + !blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_SWIFTSHADER))
|
| use_swiftshader_ = true;
|
| }
|
| }
|
|
|