summaryrefslogtreecommitdiffstats
path: root/chromecast
diff options
context:
space:
mode:
authorhalliwell <halliwell@chromium.org>2015-07-01 08:15:10 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-01 15:15:49 +0000
commit4261a351be92e315109dcc12134e0e55667ca4eb (patch)
tree94fcb920a07509745ef625d9842df1251a26f3a9 /chromecast
parent846dea256fbf77f226bc27317a5c9181c6dd3507 (diff)
downloadchromium_src-4261a351be92e315109dcc12134e0e55667ca4eb.zip
chromium_src-4261a351be92e315109dcc12134e0e55667ca4eb.tar.gz
chromium_src-4261a351be92e315109dcc12134e0e55667ca4eb.tar.bz2
Set Cast GL strings between GpuDataManager init and Gpu process startup
CastBrowserMainParts calls GpuDataManager::SetGLStrings in PreMainMessageLoopRun, in order to be after GpuDataManager initialisation. Unfortunately, this races against Gpu process creation, which runs on IO thread (task posted very soon after GpuDataManager init). So driver bug workarounds relying on these strings are applied flakily. BUG=505083 Review URL: https://codereview.chromium.org/1215703006 Cr-Commit-Position: refs/heads/master@{#337022}
Diffstat (limited to 'chromecast')
-rw-r--r--chromecast/browser/cast_browser_main_parts.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 32489fb..046e3ba 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -275,10 +275,7 @@ int CastBrowserMainParts::PreCreateThreads() {
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
aura::TestScreen::Create(gfx::Size(0, 0)));
#endif
- return 0;
-}
-void CastBrowserMainParts::PreMainMessageLoopRun() {
#if !defined(OS_ANDROID)
// Set GL strings so GPU config code can make correct feature blacklisting/
// whitelisting decisions.
@@ -289,6 +286,10 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
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(