Chromium Code Reviews| Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| index 6c7ef4a61200aa725abc1486c827a51c0fb337a0..77af9c3aa9afec5b8f13b049b4299f64fa1c0956 100644 |
| --- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| +++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| @@ -1369,7 +1369,7 @@ GLenum WebGLRenderingContextBase::checkFramebufferStatus(GLenum target) |
| { |
| if (isContextLost()) |
| return GL_FRAMEBUFFER_UNSUPPORTED; |
| - if (target != GL_FRAMEBUFFER) { |
| + if ((target != GL_FRAMEBUFFER && !isWebGL2OrHigher()) || (target != GL_READ_FRAMEBUFFER && target != GL_DRAW_FRAMEBUFFER)) { |
|
Zhenyao Mo
2015/04/22 22:39:43
This is incorrect.
GL_FRAMEBUFFER is also a valid
yunchao
2015/04/23 06:46:46
Yeah. But I made a mistake by this logic.
|
| synthesizeGLError(GL_INVALID_ENUM, "checkFramebufferStatus", "invalid target"); |
| return 0; |
| } |
| @@ -5374,7 +5374,7 @@ void WebGLRenderingContextBase::printWarningToConsole(const String& message) |
| bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* functionName, GLenum target, GLenum attachment) |
| { |
| - if (target != GL_FRAMEBUFFER) { |
| + if ((target != GL_FRAMEBUFFER && !isWebGL2OrHigher()) || (target != GL_READ_FRAMEBUFFER && target != GL_DRAW_FRAMEBUFFER)) { |
|
Zhenyao Mo
2015/04/22 22:39:43
Ditto.
yunchao
2015/04/23 06:46:46
Done.
|
| synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); |
| return false; |
| } |