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

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

Issue 1099853002: WebGL: add targets for WebGL 2 when check FBO targets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback: get the 'correct' framebuffer bound to give target 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
Index: Source/core/html/canvas/WebGL2RenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGL2RenderingContextBase.cpp b/Source/core/html/canvas/WebGL2RenderingContextBase.cpp
index 69707fb246fe37280a178e29f955d4af52f87d7a..456620398651d9d709b45b3426b687aea9050402 100644
--- a/Source/core/html/canvas/WebGL2RenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGL2RenderingContextBase.cpp
@@ -1461,6 +1461,25 @@ bool WebGL2RenderingContextBase::validateAndUpdateBufferBindTarget(const char* f
return true;
}
+bool WebGL2RenderingContextBase::validateFramebufferTarget(GLenum target)
+{
+ switch (target) {
+ case GL_FRAMEBUFFER:
+ case GL_READ_FRAMEBUFFER:
+ case GL_DRAW_FRAMEBUFFER:
+ return true;
+ default:
+ return false;
+ }
+}
+
+RefPtrWillBeMember<WebGLFramebuffer> WebGL2RenderingContextBase::getFramebufferBinding(GLenum target)
+{
+ if (target == GL_READ_FRAMEBUFFER)
+ return m_readFramebufferBinding;
+ return m_framebufferBinding;
+}
+
DEFINE_TRACE(WebGL2RenderingContextBase)
{
visitor->trace(m_readFramebufferBinding);

Powered by Google App Engine
This is Rietveld 408576698