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

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: 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 | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_browser_main_extra_parts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index b264d2070d447470b61e36a69f4a7a746825b9c2..ce74ff896d8e9ebc41634a7c53795b2566982eca 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1132,6 +1132,23 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
return content::RESULT_CODE_NORMAL_EXIT;
}
+void ChromeBrowserMainParts::PreCreateThreadsEnd() {
+ // GpuDataManagerImpl::GetInstance()->Initialize(); is called at the end of
+ // BrowserMainLoop::PreCreateThreads() so it is wrong to call the 2 following
+ // function in this->PreCreateThreads(). Otherwise it will access the gpu
+ // data manager before initializing it.
+ // Alternatively we could ensure that content::GpuDataManager::GetInstance()
Zhenyao Mo 2016/01/05 18:04:44 No, we want to be explicit where and when Initiali
+ // internally calls GpuDataManagerImpl::GetInstance()->Initialize().
+
+ // 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();
+}
+
void ChromeBrowserMainParts::PreMainMessageLoopRun() {
TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun");
TRACK_SCOPED_REGION(
@@ -1502,14 +1519,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 | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_browser_main_extra_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698