| 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..20a085b180248c98cb9fac0fdd9234265515822c 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| +++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| @@ -1365,11 +1365,19 @@ void WebGLRenderingContextBase::bufferSubData(GLenum target, long long offset, D
|
| bufferSubDataImpl(target, offset, data->byteLength(), data->baseAddress());
|
| }
|
|
|
| +bool WebGLRenderingContextBase::validateFramebufferTarget(GLenum target)
|
| +{
|
| + if (target == GL_FRAMEBUFFER)
|
| + return true;
|
| + return false;
|
| +}
|
| +
|
| +
|
| GLenum WebGLRenderingContextBase::checkFramebufferStatus(GLenum target)
|
| {
|
| if (isContextLost())
|
| return GL_FRAMEBUFFER_UNSUPPORTED;
|
| - if (target != GL_FRAMEBUFFER) {
|
| + if (!validateFramebufferTarget(target)) {
|
| synthesizeGLError(GL_INVALID_ENUM, "checkFramebufferStatus", "invalid target");
|
| return 0;
|
| }
|
| @@ -5374,7 +5382,7 @@ void WebGLRenderingContextBase::printWarningToConsole(const String& message)
|
|
|
| bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* functionName, GLenum target, GLenum attachment)
|
| {
|
| - if (target != GL_FRAMEBUFFER) {
|
| + if (!validateFramebufferTarget(target)) {
|
| synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target");
|
| return false;
|
| }
|
|
|