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

Unified Diff: cc/layer_tree_host_client.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: Rename to GaneshContextProvider 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: cc/layer_tree_host_client.h
diff --git a/cc/layer_tree_host_client.h b/cc/layer_tree_host_client.h
index 6657f59a8f268e8e7e4004810d31d3a327f28e41..3fc39625b8834e8c3f428a195840bd3b4fc4e3b2 100644
--- a/cc/layer_tree_host_client.h
+++ b/cc/layer_tree_host_client.h
@@ -7,10 +7,16 @@
#include "base/memory/scoped_ptr.h"
+class GrContext;
+
namespace gfx {
class Vector2d;
}
+namespace WebKit {
+class WebGraphicsContext3D;
+}
+
namespace cc {
class FontAtlas;
class InputHandler;
@@ -26,6 +32,18 @@ public:
virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale) = 0;
virtual scoped_ptr<OutputSurface> createOutputSurface() = 0;
virtual void didRecreateOutputSurface(bool success) = 0;
+ // This method should create a context if needed, but only one context should
+ // ever be created by the client to return from this method.
+ virtual WebKit::WebGraphicsContext3D* OffscreenContext3dForMainThread() = 0;
+ // This method should create a context if needed, but only one context should
+ // ever be created by the client to return from this method.
+ virtual WebKit::WebGraphicsContext3D* OffscreenContext3dForCompositorThread() = 0;
+ // This method should create a context if needed, but only one context should
+ // ever be created by the client to return from this method.
+ virtual GrContext* OffscreenGrContextForMainThread() = 0;
+ // This method should create a context if needed, but only one context should
+ // ever be created by the client to return from this method.
+ virtual GrContext* OffscreenGrContextForCompositorThread() = 0;
virtual scoped_ptr<InputHandler> createInputHandler() = 0;
virtual void willCommit() = 0;
virtual void didCommit() = 0;
@@ -38,6 +56,9 @@ public:
// Creates a font atlas to use for debug visualizations.
virtual scoped_ptr<FontAtlas> createFontAtlas() = 0;
+ // This hook is for testing.
+ virtual void willRetryRecreateOutputSurface() {}
+
protected:
virtual ~LayerTreeHostClient() { }
};

Powered by Google App Engine
This is Rietveld 408576698