| Index: ui/compositor/compositor.h
|
| diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
| index 3b46189325efedce6a9072a133d9254f8dc1019a..1f263e200f9b1ed6da7c5cfcfd7ba8b9ce2baf49 100644
|
| --- a/ui/compositor/compositor.h
|
| +++ b/ui/compositor/compositor.h
|
| @@ -22,6 +22,7 @@
|
| class SkBitmap;
|
|
|
| namespace cc {
|
| +class ContextProvider;
|
| class Layer;
|
| class LayerTreeHost;
|
| }
|
| @@ -69,6 +70,11 @@ class COMPOSITOR_EXPORT ContextFactory {
|
| // with all compositors.
|
| virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() = 0;
|
|
|
| + virtual scoped_refptr<cc::ContextProvider>
|
| + OffscreenContextProviderForMainThread() = 0;
|
| + virtual scoped_refptr<cc::ContextProvider>
|
| + OffscreenContextProviderForCompositorThread() = 0;
|
| +
|
| // Destroys per-compositor data.
|
| virtual void RemoveCompositor(Compositor* compositor) = 0;
|
| };
|
| @@ -83,6 +89,10 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory {
|
| virtual cc::OutputSurface* CreateOutputSurface(
|
| Compositor* compositor) OVERRIDE;
|
| virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() OVERRIDE;
|
| + virtual scoped_refptr<cc::ContextProvider>
|
| + OffscreenContextProviderForMainThread() OVERRIDE;
|
| + virtual scoped_refptr<cc::ContextProvider>
|
| + OffscreenContextProviderForCompositorThread() OVERRIDE;
|
| virtual void RemoveCompositor(Compositor* compositor) OVERRIDE;
|
|
|
| bool Initialize();
|
| @@ -97,6 +107,9 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory {
|
| bool offscreen);
|
|
|
| scoped_refptr<gfx::GLShareGroup> share_group_;
|
| + class DefaultContextProvider;
|
| + scoped_refptr<DefaultContextProvider> offscreen_contexts_main_thread_;
|
| + scoped_refptr<DefaultContextProvider> offscreen_contexts_compositor_thread_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory);
|
| };
|
| @@ -273,7 +286,10 @@ class COMPOSITOR_EXPORT Compositor
|
| virtual void didCommitAndDrawFrame() OVERRIDE;
|
| virtual void didCompleteSwapBuffers() OVERRIDE;
|
| virtual void scheduleComposite() OVERRIDE;
|
| -
|
| + virtual scoped_refptr<cc::ContextProvider>
|
| + OffscreenContextProviderForMainThread() OVERRIDE;
|
| + virtual scoped_refptr<cc::ContextProvider>
|
| + OffscreenContextProviderForCompositorThread() OVERRIDE;
|
|
|
| int last_started_frame() { return last_started_frame_; }
|
| int last_ended_frame() { return last_ended_frame_; }
|
|
|