| 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 a8aed63c7af29974eac7a0594f9bd56dc5a03bfa..bee3831282470cbda91dc34994691d98a4cef68a 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -721,7 +721,9 @@ void GpuDataManagerImplPrivate::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) {
|
|
|
| void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
|
| const gpu::GpuFeatureInfo& gpu_feature_info) {
|
| - gpu_feature_info_ = gpu_feature_info;
|
| + if (!use_swiftshader_) {
|
| + gpu_feature_info_ = gpu_feature_info;
|
| + }
|
| }
|
|
|
| void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats(
|
| @@ -1277,11 +1279,21 @@ void GpuDataManagerImplPrivate::NotifyGpuInfoUpdate() {
|
|
|
| void GpuDataManagerImplPrivate::EnableSwiftShaderIfNecessary() {
|
| #if BUILDFLAG(ENABLE_SWIFTSHADER)
|
| - if (!GpuAccessAllowed(nullptr) ||
|
| - blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL)) {
|
| - if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kDisableSoftwareRasterizer))
|
| - use_swiftshader_ = true;
|
| + if ((!GpuAccessAllowed(nullptr) ||
|
| + blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL)) &&
|
| + !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableSoftwareRasterizer)) {
|
| + use_swiftshader_ = true;
|
| +
|
| + // Remove all previously recorded GPU info
|
| + gpu_info_ = gpu::GPUInfo();
|
| + // Set some basic info to identify the GPU as SwiftShader
|
| + gpu_info_.gl_vendor = "Google Inc.";
|
| + gpu_info_.gl_renderer = "Google SwiftShader";
|
| + gpu_info_.software_rendering = true;
|
| +
|
| + for (auto& status : gpu_feature_info_.status_values)
|
| + status = gpu::kGpuFeatureStatusBlacklisted;
|
| }
|
| #endif
|
| }
|
|
|