Chromium Code Reviews| 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 bb8e0337f57c2a20f0e9ca5e00961204f1f58e62..6bfebecfd8d1c16cd8706b75bb34580035d7cae1 100644 |
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc |
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc |
| @@ -273,6 +273,10 @@ void GpuDataManagerImplPrivate::InitializeForTesting( |
| InitializeImpl(gpu_blacklist_json, std::string(), gpu_info); |
| } |
| +bool GpuDataManagerImplPrivate::IsInitialized() const { |
| + return finalized_; |
|
Zhenyao Mo
2016/01/11 23:23:32
You can't use finalized_. It has a very different
|
| +} |
| + |
| bool GpuDataManagerImplPrivate::IsFeatureBlacklisted(int feature) const { |
| #if defined(OS_CHROMEOS) |
| if (feature == gpu::GPU_FEATURE_TYPE_PANEL_FITTING && |
| @@ -558,6 +562,8 @@ void GpuDataManagerImplPrivate::Initialize() { |
| command_line->AppendSwitch(switches::kDisableGpuWatchdog); |
| AppendGpuCommandLine(command_line); |
| } |
| + |
| + finalized_ = true; |
| } |
| void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() { |
| @@ -707,14 +713,20 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine( |
| // info collection at GPU process startup, but we need gpu vendor_id, |
| // device_id, driver_vendor, driver_version for deciding whether we need to |
| // collect full info (on Linux) and for crash reporting purpose. |
| - command_line->AppendSwitchASCII(switches::kGpuVendorID, |
| - base::StringPrintf("0x%04x", gpu_info_.gpu.vendor_id)); |
| - command_line->AppendSwitchASCII(switches::kGpuDeviceID, |
| - base::StringPrintf("0x%04x", gpu_info_.gpu.device_id)); |
| - command_line->AppendSwitchASCII(switches::kGpuDriverVendor, |
| - gpu_info_.driver_vendor); |
| - command_line->AppendSwitchASCII(switches::kGpuDriverVersion, |
| - gpu_info_.driver_version); |
| + if (!command_line->HasSwitch(switches::kGpuVendorID)) |
| + command_line->AppendSwitchASCII( |
| + switches::kGpuVendorID, |
| + base::StringPrintf("0x%04x", gpu_info_.gpu.vendor_id)); |
| + if (!command_line->HasSwitch(switches::kGpuDeviceID)) |
| + command_line->AppendSwitchASCII( |
| + switches::kGpuDeviceID, |
| + base::StringPrintf("0x%04x", gpu_info_.gpu.device_id)); |
| + if (!command_line->HasSwitch(switches::kGpuDriverVendor)) |
| + command_line->AppendSwitchASCII(switches::kGpuDriverVendor, |
| + gpu_info_.driver_vendor); |
| + if (!command_line->HasSwitch(switches::kGpuDriverVersion)) |
| + command_line->AppendSwitchASCII(switches::kGpuDriverVersion, |
| + gpu_info_.driver_version); |
| if (ShouldUseWarp() && !command_line->HasSwitch(switches::kUseANGLE)) { |
| command_line->AppendSwitchASCII(switches::kUseANGLE, |