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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698