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

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

Issue 981913002: update getFramebufferAttachmentParameter for WebGL 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback + rebased code Created 5 years, 8 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
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGL2RenderingContextBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGL2RenderingContextBase.h
diff --git a/Source/core/html/canvas/WebGL2RenderingContextBase.h b/Source/core/html/canvas/WebGL2RenderingContextBase.h
index 0ef78d83b14a7bb41f96833fbe7df3a6f6976b8c..9137ffe8a87807ed2b7e23f2dde2413bb2b42564 100644
--- a/Source/core/html/canvas/WebGL2RenderingContextBase.h
+++ b/Source/core/html/canvas/WebGL2RenderingContextBase.h
@@ -164,12 +164,17 @@ public:
void bindFramebuffer(GLenum target, WebGLFramebuffer*) override;
ScriptValue getParameter(ScriptState*, GLenum pname) override;
ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) override;
+ ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, GLenum attachment, GLenum pname) override;
DECLARE_VIRTUAL_TRACE();
protected:
WebGL2RenderingContextBase(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext3D>, const WebGLContextAttributes& requestedAttributes);
+ // Helper function to validate target and the attachment combination for getFramebufferAttachmentParameters.
+ // Generate GL error and return false if parameters are illegal.
+ bool validateGetFramebufferAttachmentParameterFunc(const char* functionName, GLenum target, GLenum attachment);
+
bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei length);
ScriptValue getInt64Parameter(ScriptState*, GLenum);
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGL2RenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698