Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 4748d1737a4594409023e4e7f7be69a97e9e6596..dee3676feec9cb7ce470070aeea326e7305751c5 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -1011,10 +1011,17 @@ RenderThreadImpl::CreateOffscreenContext3d() { |
GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"))); |
} |
-scoped_refptr<ContextProviderCommandBuffer> |
+scoped_refptr<cc::ContextProvider> |
RenderThreadImpl::OffscreenContextProviderForMainThread() { |
DCHECK(IsMainThread()); |
+#if defined(OS_ANDROID) |
+ if (SynchronousCompositorFactory* factory = |
+ SynchronousCompositorFactory::GetInstance()) { |
+ return factory->GetOffscreenContextProviderForMainThread(); |
+ } |
+#endif |
+ |
if (!shared_contexts_main_thread_.get() || |
shared_contexts_main_thread_->DestroyedOnMainThread()) { |
shared_contexts_main_thread_ = |
@@ -1026,10 +1033,17 @@ RenderThreadImpl::OffscreenContextProviderForMainThread() { |
return shared_contexts_main_thread_; |
} |
-scoped_refptr<ContextProviderCommandBuffer> |
+scoped_refptr<cc::ContextProvider> |
RenderThreadImpl::OffscreenContextProviderForCompositorThread() { |
DCHECK(IsMainThread()); |
+#if defined(OS_ANDROID) |
+ if (SynchronousCompositorFactory* factory = |
+ SynchronousCompositorFactory::GetInstance()) { |
+ return factory->GetOffscreenContextProviderForCompositorThread(); |
+ } |
+#endif |
+ |
if (!shared_contexts_compositor_thread_.get() || |
shared_contexts_compositor_thread_->DestroyedOnMainThread()) { |
shared_contexts_compositor_thread_ = |