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

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: Created 7 years, 7 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/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 24ac0d2f4fc3769f064cffcd2d1c5dea426f1367..152dc2a01af25694eab48a69383772bc64dfd2c2 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1001,10 +1001,17 @@ RenderThreadImpl::CreateOffscreenContext3d() {
GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d")));
}
-scoped_refptr<ContextProviderCommandBuffer>
+scoped_refptr<cc::ContextProvider>
RenderThreadImpl::OffscreenContextProviderForMainThread() {
DCHECK(IsMainThread());
+#if defined(OS_ANDROID)
joth 2013/06/02 19:08:55 (hmm at some point we may want to move Synchronous
+ if (SynchronousCompositorFactory* factory =
+ SynchronousCompositorFactory::GetInstance()) {
+ return factory->OffscreenContextProviderForMainThread();
+ }
+#endif
+
if (!shared_contexts_main_thread_ ||
shared_contexts_main_thread_->DestroyedOnMainThread()) {
shared_contexts_main_thread_ =
@@ -1016,10 +1023,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->OffscreenContextProviderForCompositorThread();
+ }
+#endif
joth 2013/06/02 19:08:55 this means shared_contexts_compositor_thread_ (and
boliu 2013/06/03 18:51:24 Yes, it needs to be the same one.
+
if (!shared_contexts_compositor_thread_ ||
shared_contexts_compositor_thread_->DestroyedOnMainThread()) {
shared_contexts_compositor_thread_ =

Powered by Google App Engine
This is Rietveld 408576698