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

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

Issue 2034763002: Make multi-gpu tests independent of intermittent display changes on OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oups ofcourse negate the previous condition Created 4 years, 7 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 | « no previous file | no next file » | 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 84cfed33ef9a375cc8cecaac53287d5e2dd17369..0bfa651cbe006f3da6c3cb703140cc90370a8d32 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -932,6 +932,16 @@ void GpuDataManagerImplPrivate::HandleGpuSwitch() {
bool GpuDataManagerImplPrivate::UpdateActiveGpu(uint32_t vendor_id,
uint32_t device_id) {
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
+
+ // For tests, only the gpu process is allowed to detect the active gpu device
+ // using information on the actual loaded GL driver.
+ if (command_line->HasSwitch(switches::kGpuTestingVendorId) &&
+ command_line->HasSwitch(switches::kGpuTestingDeviceId)) {
+ return false;
+ }
+
if (gpu_info_.gpu.vendor_id == vendor_id &&
gpu_info_.gpu.device_id == device_id) {
// The primary GPU is active.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698