Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 7a8d51d6b1764fe5c81e7a68376f70da0382f52a..3a0c0fd5e5ad7d0f5c3342fba55fad44fa3344e9 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -898,6 +898,8 @@ RenderThreadImpl::GetGpuFactories() { |
scoped_refptr<GpuChannelHost> gpu_channel_host = GetGpuChannel(); |
const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories; |
+ scoped_refptr<base::MessageLoopProxy> media_loop_proxy = |
+ GetMediaThreadMessageLoopProxy(); |
if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { |
if (!gpu_va_context_provider_ || |
gpu_va_context_provider_->DestroyedOnMainThread()) { |
@@ -913,11 +915,18 @@ RenderThreadImpl::GetGpuFactories() { |
GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"), |
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits())), |
"GPU-VideoAccelerator-Offscreen"); |
+ if (gpu_va_context_provider_) { |
+ media_loop_proxy->PostTask( |
+ FROM_HERE, |
+ base::Bind( |
+ base::IgnoreResult(&cc::ContextProvider::BindToCurrentThread), |
+ gpu_va_context_provider_)); |
+ } |
} |
} |
- if (gpu_channel_host) { |
+ if (gpu_va_context_provider_) { |
gpu_factories = new RendererGpuVideoAcceleratorFactories( |
- gpu_channel_host.get(), gpu_va_context_provider_); |
+ gpu_channel_host, media_loop_proxy, gpu_va_context_provider_); |
} |
return gpu_factories; |
} |