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

Unified Diff: ui/compositor/compositor.h

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restart with GrContext owned in cc Created 7 years, 10 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 aa773b25e7c330e3ad10c1908666fe60ed8e61e5..038233d291bb94be38436e53bf1079d3cf2c581a 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -67,6 +67,10 @@ class COMPOSITOR_EXPORT ContextFactory {
// with all compositors.
virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() = 0;
+ virtual WebKit::WebGraphicsContext3D* OffscreenContextForMainThread() = 0;
+ virtual WebKit::WebGraphicsContext3D*
+ OffscreenContextForCompositorThread() = 0;
+
// Destroys per-compositor data.
virtual void RemoveCompositor(Compositor* compositor) = 0;
};
@@ -81,6 +85,10 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory {
virtual cc::OutputSurface* CreateOutputSurface(
Compositor* compositor) OVERRIDE;
virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() OVERRIDE;
+ virtual WebKit::WebGraphicsContext3D* OffscreenContextForMainThread()
+ OVERRIDE;
+ virtual WebKit::WebGraphicsContext3D* OffscreenContextForCompositorThread()
+ OVERRIDE;
virtual void RemoveCompositor(Compositor* compositor) OVERRIDE;
bool Initialize();
@@ -95,6 +103,9 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory {
bool offscreen);
scoped_refptr<gfx::GLShareGroup> share_group_;
+ scoped_ptr<WebKit::WebGraphicsContext3D> test_offscreen_context_main_thread_;
+ scoped_ptr<WebKit::WebGraphicsContext3D>
+ test_offscreen_context_compositor_thread_;
DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory);
};
@@ -261,6 +272,10 @@ class COMPOSITOR_EXPORT Compositor
virtual scoped_ptr<cc::OutputSurface>
createOutputSurface() OVERRIDE;
virtual void didRecreateOutputSurface(bool success) OVERRIDE;
+ virtual WebKit::WebGraphicsContext3D*
+ OffscreenContext3dForMainThread() OVERRIDE;
+ virtual WebKit::WebGraphicsContext3D*
+ OffscreenContext3dForCompositorThread() OVERRIDE;
virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE;
virtual void willCommit() OVERRIDE;
virtual void didCommit() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698