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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move for loop post_init_tasks_ from Initialize to InitializeImpl. And add a cc unit test. 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
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 75c02f40be55161b7908bf3e24eabbb957a4b6dd..5620487ed758759bd47dcb22f7ef67aea22ebef3 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -874,6 +874,20 @@ int ChromeBrowserMainParts::PreCreateThreads() {
chrome_extra_parts_[i]->PreCreateThreads();
}
+ // It is important to call gl_string_manager()->Initialize() before starting
+ // the gpu process. Internally it properly setup the black listed features.
+ // Which it is used to decide whether to start or not the gpu process from
+ // BrowserMainLoop::BrowserThreadsStarted.
+
+ // Retrieve cached GL strings from local state and use them for GPU
+ // blacklist decisions.
+
+ if (g_browser_process->gl_string_manager())
+ g_browser_process->gl_string_manager()->Initialize();
+
+ // Create an instance of GpuModeManager to watch gpu mode pref change.
+ g_browser_process->gpu_mode_manager();
+
return result_code_;
}
@@ -1486,14 +1500,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// (requires supporting early exit).
PostProfileInit();
- // Retrieve cached GL strings from local state and use them for GPU
- // blacklist decisions.
- if (g_browser_process->gl_string_manager())
- g_browser_process->gl_string_manager()->Initialize();
-
- // Create an instance of GpuModeManager to watch gpu mode pref change.
- g_browser_process->gpu_mode_manager();
-
#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
// Show the First Run UI if this is the first time Chrome has been run on
// this computer, or we're being compelled to do so by a command line flag.
« no previous file with comments | « no previous file | chrome/browser/gpu/gl_string_manager.cc » ('j') | chromecast/browser/cast_browser_main_parts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698