diff options
author | halliwell <halliwell@chromium.org> | 2015-09-08 11:56:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-08 18:56:48 +0000 |
commit | dd6f440c02db9dbc45ea3e2113cf1781a83ac05a (patch) | |
tree | 60bd9d1b03f3edac829361ea80d0a88cb514d118 /chromecast | |
parent | 083d5077e04cadae4b3eab15038aa44535906419 (diff) | |
download | chromium_src-dd6f440c02db9dbc45ea3e2113cf1781a83ac05a.zip chromium_src-dd6f440c02db9dbc45ea3e2113cf1781a83ac05a.tar.gz chromium_src-dd6f440c02db9dbc45ea3e2113cf1781a83ac05a.tar.bz2 |
Fix for --ignore-gpu-blacklist not working from flags UI on Linux
This bug was caused by https://codereview.chromium.org/1215703006/:
chrome://flags sets --ignore-gpu-blacklist in PreCreateThreads, so
GpuDataManagerImpl must be initialized after that.
This is a revert of 4261a351be92e315109dcc12134e0e55667ca4eb plus
an alternative approach to the original CL's problem: we now defer
GPU process creation on Cast so that setting Cast GL strings in
GpuDataManager doesn't race against GPU process creation.
BUG=509336
Review URL: https://codereview.chromium.org/1320443014
Cr-Commit-Position: refs/heads/master@{#347755}
Diffstat (limited to 'chromecast')
-rw-r--r-- | chromecast/browser/cast_browser_main_parts.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc index c39b9d9..80e17d8 100644 --- a/chromecast/browser/cast_browser_main_parts.cc +++ b/chromecast/browser/cast_browser_main_parts.cc @@ -190,6 +190,11 @@ DefaultCommandLineSwitch g_default_switches[] = { // Needed to fix a bug where the raster thread doesn't get scheduled for a // substantial time (~5 seconds). See https://crbug.com/441895. { switches::kUseNormalPriorityForTileTaskWorkerThreads, "" }, + // Needed so that our call to GpuDataManager::SetGLStrings doesn't race + // against GPU process creation (which is otherwise triggered from + // BrowserThreadsStarted). The GPU process will be created as soon as a + // renderer needs it, which always happens after main loop starts. + { switches::kDisableGpuEarlyInit, "" }, { NULL, NULL }, // Termination }; @@ -279,7 +284,10 @@ int CastBrowserMainParts::PreCreateThreads() { gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, cast_browser_process_->cast_screen()); #endif + return 0; +} +void CastBrowserMainParts::PreMainMessageLoopRun() { #if !defined(OS_ANDROID) // Set GL strings so GPU config code can make correct feature blacklisting/ // whitelisting decisions. @@ -290,10 +298,6 @@ int CastBrowserMainParts::PreCreateThreads() { sys_info->GetGlVersion()); #endif // !defined(OS_ANDROID) - return 0; -} - -void CastBrowserMainParts::PreMainMessageLoopRun() { scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); metrics::RegisterPrefs(pref_registry.get()); cast_browser_process_->SetPrefService( |