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

Unified Diff: ui/compositor/compositor.h

Issue 21026005: aura: Remove CreateOffscreenContext from ui::ContextFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offscreencontext: rebase Created 7 years, 5 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: 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);
};

Powered by Google App Engine
This is Rietveld 408576698