Chromium Code Reviews| 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_ = |