| 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 68d497434ece97cac7f60b6124f0d1cbf8150b80..84581c1b1564c690fd477bb8f25e3091aade01a2 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -489,6 +489,16 @@ void GpuDataManagerImplPrivate::GetGLStrings(std::string* gl_vendor,
|
| *gl_version = gpu_info_.gl_version;
|
| }
|
|
|
| +void GpuDataManagerImplPrivate::SetGpuDeviceName(const std::string& vendor,
|
| + const std::string& device) {
|
| + if (!gpu_info_.gpu.vendor_string.empty() ||
|
| + !gpu_info_.gpu.device_string.empty())
|
| + return;
|
| +
|
| + gpu_info_.gpu.vendor_string = vendor;
|
| + gpu_info_.gpu.device_string = device;
|
| +}
|
| +
|
| void GpuDataManagerImplPrivate::Initialize() {
|
| TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize");
|
| if (finalized_) {
|
| @@ -678,6 +688,12 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine(
|
| gpu_info_.driver_vendor);
|
| command_line->AppendSwitchASCII(switches::kGpuDriverVersion,
|
| gpu_info_.driver_version);
|
| + if (!gpu_info_.gpu.vendor_string.empty())
|
| + command_line->AppendSwitchASCII(switches::kGpuVendorString,
|
| + gpu_info_.gpu.vendor_string);
|
| + if (!gpu_info_.gpu.device_string.empty())
|
| + command_line->AppendSwitchASCII(switches::kGpuDeviceString,
|
| + gpu_info_.gpu.device_string);
|
|
|
| if (ShouldUseWarp())
|
| command_line->AppendSwitch(switches::kUseWarp);
|
| @@ -972,7 +988,17 @@ void GpuDataManagerImplPrivate::InitializeImpl(
|
| DCHECK(success);
|
| }
|
|
|
| + // Don't lose gpu vendor, device if set externally
|
| + std::string gpu_vendor_string = gpu_info_.gpu.vendor_string;
|
| + std::string gpu_device_string = gpu_info_.gpu.device_string;
|
| +
|
| gpu_info_ = gpu_info;
|
| +
|
| + if (!gpu_vendor_string.empty())
|
| + gpu_info_.gpu.vendor_string = gpu_vendor_string;
|
| + if (!gpu_device_string.empty())
|
| + gpu_info_.gpu.device_string = gpu_device_string;
|
| +
|
| UpdateGpuInfo(gpu_info);
|
| UpdateGpuSwitchingManager(gpu_info);
|
| UpdatePreliminaryBlacklistedFeatures();
|
|
|