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

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

Issue 1205573003: WebGL 2: validate read buffer attachment when reading from FBO (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed zmo@'s feedback: translate GL_COLOR_ATTACHMENT0 to GL_BACK in getter for default fb Created 5 years, 6 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 0f6d7275e4c260c67cdaff6525afe92277df88d8..59fec9afc0334264d7215e5a1680f38a8f96941c 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.h
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.h
@@ -569,6 +569,8 @@ protected:
bool m_drawBuffersWebGLRequirementsChecked;
bool m_drawBuffersSupported;
+ GLenum m_readbufferOfFBO;
Zhenyao Mo 2015/07/01 15:21:27 Now from our discussion, this should be part of th
Ken Russell (switch to Gerrit) 2015/07/01 17:24:06 Right. Thanks Mo for finding this. Yunchao, could
yunchao 2015/07/02 15:24:53 Ken, I updated the patch locally, found that cachi
yunchao 2015/07/02 15:24:53 Acknowledged.
+
GLint m_packAlignment;
GLint m_unpackAlignment;
bool m_unpackFlipY;
@@ -862,6 +864,10 @@ protected:
// the given format.
bool validateCompressedTexSubDimensions(const char* functionName, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, WebGLTexture*);
+ // Helper function to validate that the image is attached to read buffer
+ // when reading from FBO (readPixels/copyTexImage2D/copyTexSubImage2D).
+ bool validateReadBufferAttachment(const char* functionName, const WebGLFramebuffer* readFramebufferBinding);
+
// Helper function to validate mode for draw{Arrays/Elements}.
bool validateDrawMode(const char* functionName, GLenum);
« no previous file with comments | « Source/core/html/canvas/WebGL2RenderingContextBase.cpp ('k') | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698