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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2171023002: Revert of Add new gpu driver bug workaround DISABLE_TRANSPARENT_VISUALS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | content/test/gpu/page_sets/gpu_process_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index b26c59b3b3c371eb15ec95257c78c08f0cc64e4f..e0555b4f2f042020030eb15e15e8fca3789ac848 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -180,7 +180,6 @@
#endif
#if defined(USE_X11)
-#include "gpu/config/gpu_driver_bug_workaround_type.h"
#include "ui/base/x/x11_util_internal.h" // nogncheck
#include "ui/gfx/x/x11_connection.h" // nogncheck
#include "ui/gfx/x/x11_switches.h" // nogncheck
@@ -758,22 +757,6 @@
// CommandLine::ForCurrentProcess object after threads are created.
// 2) Must be after parts_->PreCreateThreads to pick up chrome://flags.
GpuDataManagerImpl::GetInstance()->Initialize();
-
-#if defined(USE_X11) && !defined(OS_CHROMEOS)
- // PreCreateThreads is called before CreateStartupTasks which starts the gpu
- // process.
- bool enable_transparent_visuals =
- !GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive(
- gpu::DISABLE_TRANSPARENT_VISUALS);
- Visual* visual = NULL;
- int depth = 0;
- ui::ChooseVisualForWindow(enable_transparent_visuals, &visual, &depth);
- DCHECK(depth > 0);
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kWindowDepth, base::IntToString(depth));
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kX11VisualID, base::UintToString(visual->visualid));
-#endif
#if !defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID)
// Single-process is an unsupported and not fully tested mode, so
@@ -1403,6 +1386,20 @@
LOG(ERROR) << "Unable to open X display.";
return false;
}
+
+#if !defined(OS_CHROMEOS)
+ // InitializeToolkit is called before CreateStartupTasks which one starts the
+ // gpu process.
+ Visual* visual = NULL;
+ int depth = 0;
+ ui::ChooseVisualForWindow(&visual, &depth);
+ DCHECK(depth > 0);
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kWindowDepth, base::IntToString(depth));
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kX11VisualID, base::UintToString(visual->visualid));
+#endif
+
#endif
// Env creates the compositor. Aura widgets need the compositor to be created
« no previous file with comments | « no previous file | content/test/gpu/page_sets/gpu_process_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698