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

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.h

Issue 1120953002: WebGL 2: add read/write framebuffer binding points to related APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback Created 5 years, 7 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: Source/core/html/canvas/WebGLRenderingContextBase.h
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.h b/Source/core/html/canvas/WebGLRenderingContextBase.h
index 66f4187b4f059c5b02e20c26e7df8dbc047c269d..1195e519c30e3f20a0305d34c27d891de89fbd90 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.h
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.h
@@ -166,7 +166,7 @@ public:
void cullFace(GLenum mode);
void deleteBuffer(WebGLBuffer*);
- void deleteFramebuffer(WebGLFramebuffer*);
+ virtual void deleteFramebuffer(WebGLFramebuffer*);
void deleteProgram(WebGLProgram*);
void deleteRenderbuffer(WebGLRenderbuffer*);
void deleteShader(WebGLShader*);
@@ -780,7 +780,7 @@ protected:
bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat, GLenum colorBufferFormat);
// Helper function to get the bound framebuffer's color buffer format.
- GLenum boundFramebufferColorFormat();
+ virtual GLenum boundFramebufferColorFormat();
// Helper function to verify limits on the length of uniform and attribute locations.
bool validateLocationLength(const char* functionName, const String&);
@@ -895,6 +895,10 @@ protected:
// Generate GL error if parameters are illegal.
bool validateFramebufferFuncParameters(const char* functionName, GLenum target, GLenum attachment);
+ // Helper function to get draw Framebuffer target. Return GL_FRAMEBUFFER for
+ // WebGLRenderingContext. Return GL_DRAW_FRAMEBUFFER for WebGL2RenderingContext.
+ virtual GLenum getDrawFramebufferTarget();
+
// Helper function to validate blend equation mode.
bool validateBlendEquation(const char* functionName, GLenum);
@@ -990,7 +994,7 @@ protected:
void setBackDrawBuffer(GLenum);
void setFramebuffer(GLenum, WebGLFramebuffer*);
- void restoreCurrentFramebuffer();
+ virtual void restoreCurrentFramebuffer();
void restoreCurrentTexture2D();
virtual void multisamplingChanged(bool) override;

Powered by Google App Engine
This is Rietveld 408576698