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

Unified Diff: chrome/browser/gpu/gl_string_manager.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Execute todo, send IPC directly from gpu_benchmarking_extension.cc and fixes variable names. Created 4 years, 10 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 | « chrome/browser/chrome_browser_main.cc ('k') | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gpu/gl_string_manager.cc
diff --git a/chrome/browser/gpu/gl_string_manager.cc b/chrome/browser/gpu/gl_string_manager.cc
index 4d03eea94f226e343b70839ddfd2cfe9661f85c4..5b8ce274c7ce7fde39caf4efc88610c9ca49e145 100644
--- a/chrome/browser/gpu/gl_string_manager.cc
+++ b/chrome/browser/gpu/gl_string_manager.cc
@@ -4,12 +4,14 @@
#include "chrome/browser/gpu/gl_string_manager.h"
+#include "base/command_line.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/gpu_data_manager.h"
+#include "gpu/config/gpu_switches.h"
// static
void GLStringManager::RegisterPrefs(PrefRegistrySimple* registry) {
@@ -38,6 +40,23 @@ void GLStringManager::Initialize() {
gl_renderer_ = local_state->GetString(prefs::kGLRendererString);
gl_version_ = local_state->GetString(prefs::kGLVersionString);
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+
+ if (command_line->HasSwitch(switches::kGpuTestingGLVendor)) {
+ gl_vendor_ =
+ command_line->GetSwitchValueASCII(switches::kGpuTestingGLVendor);
+ }
+
+ if (command_line->HasSwitch(switches::kGpuTestingGLRenderer)) {
+ gl_renderer_ =
+ command_line->GetSwitchValueASCII(switches::kGpuTestingGLRenderer);
+ }
+
+ if (command_line->HasSwitch(switches::kGpuTestingGLVersion)) {
+ gl_version_ =
+ command_line->GetSwitchValueASCII(switches::kGpuTestingGLVersion);
+ }
+
if (!gl_vendor_.empty() || !gl_renderer_.empty() || !gl_version_.empty()) {
content::GpuDataManager::GetInstance()->SetGLStrings(
gl_vendor_, gl_renderer_, gl_version_);
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698