summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/chromium/GLES2Context.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/chromium/GLES2Context.h')
-rw-r--r--WebCore/platform/chromium/GLES2Context.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/WebCore/platform/chromium/GLES2Context.h b/WebCore/platform/chromium/GLES2Context.h
index 93a343c..b72329a 100644
--- a/WebCore/platform/chromium/GLES2Context.h
+++ b/WebCore/platform/chromium/GLES2Context.h
@@ -38,20 +38,32 @@
namespace WebCore {
class GLES2ContextInternal;
+class IntSize;
class Page;
class GLES2Context : public Noncopyable {
public:
- // If a Page is specified then the resulting GL ES context draws directly
- // to the window associated with the Page, otherwise an off-screen GL ES context is
- // created.
- static PassOwnPtr<GLES2Context> create(Page*);
+ // Creates a GL ES context that draws directly to the window associated with
+ // the Page.
+ static PassOwnPtr<GLES2Context> createOnscreen(Page*);
+
+ // Creates a GL ES context that renders offscreen, optionally as a child
+ // of the given parent if specified.
+ static PassOwnPtr<GLES2Context> createOffscreen(GLES2Context* parent);
+
~GLES2Context();
bool makeCurrent();
bool destroy();
bool swapBuffers();
+ // Only valid for offscreen contexts.
+ void resizeOffscreenContent(const IntSize&);
+
+ // Returns the ID of the texture used for offscreen rendering in the context of the parent.
+ // This texture is accessible by the GPU page compositor.
+ unsigned getOffscreenContentParentTextureId();
+
private:
friend class GLES2ContextInternal;
OwnPtr<GLES2ContextInternal> m_internal;