Index: ui/compositor/compositor.h |
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h |
index 4ed4f4e5e9fda544ebc55af56ca1be618fb28db6..b49259116cf499373723a2190acb1061486d07c0 100644 |
--- a/ui/compositor/compositor.h |
+++ b/ui/compositor/compositor.h |
@@ -31,6 +31,7 @@ class RunLoop; |
namespace cc { |
class ContextProvider; |
+class FakeContextProvider; |
class Layer; |
class LayerTreeDebugState; |
class LayerTreeHost; |
@@ -80,10 +81,6 @@ class COMPOSITOR_EXPORT ContextFactory { |
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
Compositor* compositor) = 0; |
- // Creates a context used for offscreen rendering. This context can be shared |
- // with all compositors. |
- virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() = 0; |
- |
// Creates a reflector that copies the content of the |mirrored_compositor| |
// onto |mirroing_layer|. |
virtual scoped_refptr<Reflector> CreateReflector( |
@@ -110,8 +107,6 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory { |
// ContextFactory implementation |
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
Compositor* compositor) OVERRIDE; |
- virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() |
- OVERRIDE; |
virtual scoped_refptr<Reflector> CreateReflector( |
Compositor* compositor, |
@@ -127,14 +122,12 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory { |
bool Initialize(); |
private: |
- scoped_ptr<WebKit::WebGraphicsContext3D> CreateContextCommon( |
+ static scoped_ptr<WebKit::WebGraphicsContext3D> CreateContextCommon( |
Compositor* compositor, |
bool offscreen); |
- scoped_refptr<ContextProviderFromContextFactory> |
- offscreen_contexts_main_thread_; |
- scoped_refptr<ContextProviderFromContextFactory> |
- offscreen_contexts_compositor_thread_; |
+ scoped_refptr<cc::FakeContextProvider> offscreen_contexts_main_thread_; |
+ scoped_refptr<cc::FakeContextProvider> offscreen_contexts_compositor_thread_; |
DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory); |
}; |
@@ -148,8 +141,6 @@ class COMPOSITOR_EXPORT TestContextFactory : public ContextFactory { |
// ContextFactory implementation |
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
Compositor* compositor) OVERRIDE; |
- virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() |
- OVERRIDE; |
virtual scoped_refptr<Reflector> CreateReflector( |
Compositor* mirrored_compositor, |
@@ -163,10 +154,10 @@ class COMPOSITOR_EXPORT TestContextFactory : public ContextFactory { |
virtual void RemoveCompositor(Compositor* compositor) OVERRIDE; |
private: |
- scoped_refptr<ContextProviderFromContextFactory> |
- offscreen_contexts_main_thread_; |
- scoped_refptr<ContextProviderFromContextFactory> |
- offscreen_contexts_compositor_thread_; |
+ static scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext(); |
+ |
+ scoped_refptr<cc::FakeContextProvider> offscreen_contexts_main_thread_; |
+ scoped_refptr<cc::ContextProvider> offscreen_contexts_compositor_thread_; |
DISALLOW_COPY_AND_ASSIGN(TestContextFactory); |
}; |