diff options
Diffstat (limited to 'WebKit/chromium/public/WebGraphicsContext3D.h')
-rw-r--r-- | WebKit/chromium/public/WebGraphicsContext3D.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h index dc4f534..4378afb 100644 --- a/WebKit/chromium/public/WebGraphicsContext3D.h +++ b/WebKit/chromium/public/WebGraphicsContext3D.h @@ -40,6 +40,8 @@ namespace WebKit { // Typedef for server-side objects like OpenGL textures and program objects. typedef unsigned int WebGLId; +class WebView; + // This interface abstracts the operations performed by the // GraphicsContext3D in order to implement WebGL. Nearly all of the // methods exposed on this interface map directly to entry points in @@ -77,11 +79,11 @@ public: // Creates a "default" implementation of WebGraphicsContext3D which calls // OpenGL directly. - static WebGraphicsContext3D* createDefault(); + WEBKIT_API static WebGraphicsContext3D* createDefault(); // Initializes the graphics context; should be the first operation performed // on newly-constructed instances. Returns true on success. - virtual bool initialize(Attributes) = 0; + virtual bool initialize(Attributes, WebView*) = 0; // Makes the OpenGL context current on the current thread. Returns true on // success. @@ -108,6 +110,15 @@ public: // Returns true on success. virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize) = 0; + // Returns the id of the texture which is used for storing the contents of + // the framebuffer associated with this context. This texture is accessible + // by the gpu-based page compositor. + virtual unsigned getPlatformTextureId() = 0; + + // Copies the contents of the off-screen render target used by the WebGL + // context to the corresponding texture used by the compositor. + virtual void prepareTexture() = 0; + // Synthesizes an OpenGL error which will be returned from a // later call to getError. This is used to emulate OpenGL ES // 2.0 behavior on the desktop and to enforce additional error @@ -169,6 +180,8 @@ public: virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&) = 0; virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&) = 0; + virtual void getAttachedShaders(WebGLId program, int maxCount, int* count, unsigned int* shaders) = 0; + virtual int getAttribLocation(WebGLId program, const char* name) = 0; virtual void getBooleanv(unsigned long pname, unsigned char* value) = 0; |