Chromium Code Reviews| Index: content/browser/android/in_process/synchronous_compositor_impl.cc |
| diff --git a/content/browser/android/in_process/synchronous_compositor_impl.cc b/content/browser/android/in_process/synchronous_compositor_impl.cc |
| index 4b70c9b455256ea72c1591beb3dc358d60782cc5..ed077a86bebe92d527c9878e6f5732440849c28b 100644 |
| --- a/content/browser/android/in_process/synchronous_compositor_impl.cc |
| +++ b/content/browser/android/in_process/synchronous_compositor_impl.cc |
| @@ -11,6 +11,7 @@ |
| #include "content/public/browser/render_process_host.h" |
| #include "content/public/browser/render_view_host.h" |
| #include "content/renderer/android/synchronous_compositor_factory.h" |
| +#include "webkit/common/gpu/context_provider_in_process.h" |
| namespace content { |
| @@ -49,6 +50,25 @@ class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory { |
| new SynchronousCompositorOutputSurface(routing_id)); |
| return output_surface.PassAs<cc::OutputSurface>(); |
| } |
| + |
| + virtual scoped_refptr<cc::ContextProvider> |
| + GetOffscreenContextProviderForMainThread() OVERRIDE { |
| + // Synchronous compositor does not support main thread context yet. |
|
joth
2013/06/07 17:41:18
NOTIMPLEMENTED() ?
|
| + return scoped_refptr<cc::ContextProvider>(); |
| + } |
| + |
| + virtual scoped_refptr<cc::ContextProvider> |
| + GetOffscreenContextProviderForCompositorThread() OVERRIDE { |
| + if (!offscreen_context_for_compositor_thread_ || |
| + offscreen_context_for_compositor_thread_->DestroyedOnMainThread()) { |
| + offscreen_context_for_compositor_thread_ = |
| + webkit::gpu::ContextProviderInProcess::Create(); |
| + } |
| + return offscreen_context_for_compositor_thread_; |
| + } |
| + |
| + private: |
| + scoped_refptr<cc::ContextProvider> offscreen_context_for_compositor_thread_; |
| }; |
| base::LazyInstance<SynchronousCompositorFactoryImpl>::Leaky g_factory = |