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

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: add a new commandline switch to prevent full gpu info collection in the test 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
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 81bbef48cfb27be9817da82d8f10dc33bc4d4d4c..0e7cc3cdb5140337c0b1a9ffb672dea4d4b85dd3 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -855,8 +855,8 @@ void ChromeBrowserMainParts::PostMainMessageLoopStart() {
chrome_extra_parts_[i]->PostMainMessageLoopStart();
}
-int ChromeBrowserMainParts::PreCreateThreads() {
- TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreads");
+int ChromeBrowserMainParts::PreCreateThreadsBegin() {
+ TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreadsBegin");
result_code_ = PreCreateThreadsImpl();
if (result_code_ == content::RESULT_CODE_NORMAL_EXIT) {
@@ -866,7 +866,7 @@ int ChromeBrowserMainParts::PreCreateThreads() {
DCHECK(browser_creator_.get());
#endif // !defined(OS_ANDROID)
for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
- chrome_extra_parts_[i]->PreCreateThreads();
+ chrome_extra_parts_[i]->PreCreateThreadsBegin();
}
return result_code_;
@@ -1112,6 +1112,21 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
return content::RESULT_CODE_NORMAL_EXIT;
}
+void ChromeBrowserMainParts::PreCreateThreadsEnd() {
+ // 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();
+}
+
void ChromeBrowserMainParts::PreMainMessageLoopRun() {
TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun");
TRACK_SCOPED_REGION(
@@ -1469,14 +1484,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.

Powered by Google App Engine
This is Rietveld 408576698