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

Unified Diff: Source/modules/webgl/WebGLFramebuffer.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 kbr's feedback: reading from framebuffer with GL_NONE is invalid Created 5 years, 5 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 | « Source/modules/webgl/WebGL2RenderingContextBase.cpp ('k') | Source/modules/webgl/WebGLFramebuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGLFramebuffer.h
diff --git a/Source/modules/webgl/WebGLFramebuffer.h b/Source/modules/webgl/WebGLFramebuffer.h
index 9dd5ee170e36010458f9775f44c46448a7a2a26f..bdd3c7309e438dfc7a195cbc538ecfb0bdb76929 100644
--- a/Source/modules/webgl/WebGLFramebuffer.h
+++ b/Source/modules/webgl/WebGLFramebuffer.h
@@ -103,6 +103,10 @@ public:
GLenum getDrawBuffer(GLenum);
+ void readBuffer(const GLenum colorBuffer) { m_readBuffer = colorBuffer; }
+
+ GLenum getReadBuffer() const { return m_readBuffer; }
+
DECLARE_VIRTUAL_TRACE();
protected:
@@ -134,6 +138,8 @@ private:
Vector<GLenum> m_drawBuffers;
Vector<GLenum> m_filteredDrawBuffers;
+
+ GLenum m_readBuffer;
};
} // namespace blink
« no previous file with comments | « Source/modules/webgl/WebGL2RenderingContextBase.cpp ('k') | Source/modules/webgl/WebGLFramebuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698