| Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| index dd3d1c1d7612afef410902708162c8ce9448fb23..2942f73b7fcbbff2a9fe1256416d2d0c06817869 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| +++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| @@ -2284,8 +2284,8 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter(ScriptS
|
| return ScriptValue::createNull(scriptState);
|
| }
|
|
|
| - WebGLSharedObject* object = m_framebufferBinding->getAttachmentObject(attachment);
|
| - if (!object) {
|
| + WebGLSharedObject* attachmentObject = m_framebufferBinding->getAttachmentObject(attachment);
|
| + if (!attachmentObject) {
|
| if (pname == GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)
|
| return WebGLAny(scriptState, GL_NONE);
|
| // OpenGL ES 2.0 specifies INVALID_ENUM in this case, while desktop GL
|
| @@ -2294,13 +2294,13 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter(ScriptS
|
| return ScriptValue::createNull(scriptState);
|
| }
|
|
|
| - ASSERT(object->isTexture() || object->isRenderbuffer());
|
| - if (object->isTexture()) {
|
| + ASSERT(attachmentObject->isTexture() || attachmentObject->isRenderbuffer());
|
| + if (attachmentObject->isTexture()) {
|
| switch (pname) {
|
| case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
|
| return WebGLAny(scriptState, GL_TEXTURE);
|
| case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
|
| - return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(object));
|
| + return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(attachmentObject));
|
| case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
|
| case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
|
| {
|
| @@ -2309,10 +2309,10 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter(ScriptS
|
| return WebGLAny(scriptState, value);
|
| }
|
| case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:
|
| - if (extensionEnabled(EXTsRGBName) || isWebGL2OrHigher()) {
|
| + if (extensionEnabled(EXTsRGBName)) {
|
| GLint value = 0;
|
| webContext()->getFramebufferAttachmentParameteriv(target, attachment, pname, &value);
|
| - return WebGLAny(scriptState, value);
|
| + return WebGLAny(scriptState, static_cast<unsigned>(value));
|
| }
|
| synthesizeGLError(GL_INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name for renderbuffer attachment");
|
| return ScriptValue::createNull(scriptState);
|
| @@ -2325,7 +2325,7 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter(ScriptS
|
| case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
|
| return WebGLAny(scriptState, GL_RENDERBUFFER);
|
| case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
|
| - return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(object));
|
| + return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(attachmentObject));
|
| case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:
|
| if (extensionEnabled(EXTsRGBName) || isWebGL2OrHigher()) {
|
| GLint value = 0;
|
|
|