Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index 25eccd4cdffc2d98e7e5a4fe46a013a8378650b6..c5571465cf600a8923c6e59587edaadd4de60d18 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -1120,7 +1120,7 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { |
} |
// Must happen after the IO thread is shutdown since this may be accessed from |
// it. |
- if (!shell::ShellIsRemote()) { |
+ { |
TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUChannelFactory"); |
if (BrowserGpuChannelHostFactory::instance()) |
BrowserGpuChannelHostFactory::Terminate(); |
@@ -1213,6 +1213,13 @@ int BrowserMainLoop::BrowserThreadsStarted() { |
} |
BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
piman
2016/08/08 15:36:30
Should we avoid doing this if we use the ContentCl
sadrul
2016/08/08 16:25:32
I initially did this, but BrowserGpuChannelHostFac
|
ImageTransportFactory::Initialize(); |
+ |
+ gpu::GpuChannelEstablishFactory* factory = |
+ GetContentClient()->browser()->GetGpuChannelEstablishFactory(); |
+ if (!factory) |
+ factory = BrowserGpuChannelHostFactory::instance(); |
+ DCHECK(factory); |
+ ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory); |
#if defined(USE_AURA) |
bool use_mus_in_renderer = base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kUseMusInRenderer); |