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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2297933002: blimp: Set up the CompositorDependencies for blimp in Chrome. (Closed)
Patch Set: retry gpu process failures after crbug.com/643282 Created 4 years, 3 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: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 29d065317d6205c1db65ad59020e1263438e98d7..487e421bc7c742c433540ca09d657a47fd48723f 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -976,7 +976,6 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
#if defined(OS_ANDROID)
g_browser_main_loop_shutting_down = true;
- ui::ContextProviderFactory::SetInstance(nullptr);
#endif
if (RenderProcessHost::run_renderer_in_process())
@@ -1131,8 +1130,14 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
// it.
{
TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUChannelFactory");
- if (BrowserGpuChannelHostFactory::instance())
+ if (BrowserGpuChannelHostFactory::instance()) {
+#if defined(OS_ANDROID)
+ // Clean up the references to the factory before terminating it.
+ ui::ContextProviderFactory::SetInstance(nullptr);
+ ContextProviderFactoryImpl::Terminate();
+#endif
BrowserGpuChannelHostFactory::Terminate();
+ }
}
// Must happen after the I/O thread is shutdown since this class lives on the
@@ -1213,6 +1218,8 @@ int BrowserMainLoop::BrowserThreadsStarted() {
established_gpu_channel = false;
always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup();
BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
+ ContextProviderFactoryImpl::Initialize(
+ BrowserGpuChannelHostFactory::instance());
ui::ContextProviderFactory::SetInstance(
ContextProviderFactoryImpl::GetInstance());
#elif defined(USE_AURA) || defined(OS_MACOSX)

Powered by Google App Engine
This is Rietveld 408576698