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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 16235005: Add ContextProvider overrides to SynchronousCompositorFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 5bb608c5964d0eada08d090b355c764e219ace47..a141f8fddb59d144449d45d599bbcdbdf0fc64f7 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1026,10 +1026,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_ =
@@ -1041,10 +1048,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_ =
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698