Index: Source/modules/webgl/WebGLRenderingContextBase.h |
diff --git a/Source/modules/webgl/WebGLRenderingContextBase.h b/Source/modules/webgl/WebGLRenderingContextBase.h |
index 5ed2149e18ef0711100e16f0de7f13656a3e2999..d86f384d7682ea1875d6f60246af9534d71d4029 100644 |
--- a/Source/modules/webgl/WebGLRenderingContextBase.h |
+++ b/Source/modules/webgl/WebGLRenderingContextBase.h |
@@ -570,6 +570,8 @@ protected: |
bool m_drawBuffersWebGLRequirementsChecked; |
bool m_drawBuffersSupported; |
+ GLenum m_readBufferOfDefaultFramebuffer; |
+ |
GLint m_packAlignment; |
GLint m_unpackAlignment; |
bool m_unpackFlipY; |
@@ -863,6 +865,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); |