diff options
Diffstat (limited to 'WebCore/html/canvas')
| -rw-r--r--[-rwxr-xr-x] | WebCore/html/canvas/CanvasRenderingContext2D.cpp | 2 | ||||
| -rw-r--r-- | WebCore/html/canvas/WebGLRenderingContext.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp index 338960c..0fb7ed5 100755..100644 --- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp +++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp @@ -659,7 +659,7 @@ void CanvasRenderingContext2D::closePath() FloatRect boundRect = m_path.boundingRect(); if (boundRect.width() || boundRect.height()) - m_path.closeCanvasSubpath(); + m_path.closeSubpath(); } void CanvasRenderingContext2D::moveTo(float x, float y) diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp index bda3569..68a6954 100644 --- a/WebCore/html/canvas/WebGLRenderingContext.cpp +++ b/WebCore/html/canvas/WebGLRenderingContext.cpp @@ -1756,7 +1756,7 @@ WebGLGetInfo WebGLRenderingContext::getVertexAttrib(unsigned long index, unsigne } switch (pname) { case GraphicsContext3D::VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: - if (!isGLES2Compliant() && !index && m_vertexAttribState[0].bufferBinding == m_vertexAttrib0Buffer + if ((!isGLES2Compliant() && !index && m_vertexAttribState[0].bufferBinding == m_vertexAttrib0Buffer) || index >= m_vertexAttribState.size() || !m_vertexAttribState[index].bufferBinding || !m_vertexAttribState[index].bufferBinding->object()) @@ -1943,8 +1943,8 @@ void WebGLRenderingContext::readPixels(long x, long y, long width, long height, return; } // Validate array type against pixel type. - if (type == GraphicsContext3D::UNSIGNED_BYTE && !pixels->isUnsignedByteArray() - || type != GraphicsContext3D::UNSIGNED_BYTE && !pixels->isUnsignedShortArray()) { + if ((type == GraphicsContext3D::UNSIGNED_BYTE && !pixels->isUnsignedByteArray()) + || (type != GraphicsContext3D::UNSIGNED_BYTE && !pixels->isUnsignedShortArray())) { m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); return; } @@ -2221,8 +2221,8 @@ void WebGLRenderingContext::texParameter(unsigned long target, unsigned long pna break; case GraphicsContext3D::TEXTURE_WRAP_S: case GraphicsContext3D::TEXTURE_WRAP_T: - if (isFloat && paramf != GraphicsContext3D::CLAMP_TO_EDGE && paramf != GraphicsContext3D::MIRRORED_REPEAT && paramf != GraphicsContext3D::REPEAT - || !isFloat && parami != GraphicsContext3D::CLAMP_TO_EDGE && parami != GraphicsContext3D::MIRRORED_REPEAT && parami != GraphicsContext3D::REPEAT) { + if ((isFloat && paramf != GraphicsContext3D::CLAMP_TO_EDGE && paramf != GraphicsContext3D::MIRRORED_REPEAT && paramf != GraphicsContext3D::REPEAT) + || (!isFloat && parami != GraphicsContext3D::CLAMP_TO_EDGE && parami != GraphicsContext3D::MIRRORED_REPEAT && parami != GraphicsContext3D::REPEAT)) { m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM); return; } @@ -3012,8 +3012,8 @@ void WebGLRenderingContext::handleNPOTTextures(bool prepareToDraw) { bool resetActiveUnit = false; for (unsigned ii = 0; ii < m_textureUnits.size(); ++ii) { - if (m_textureUnits[ii].m_texture2DBinding && m_textureUnits[ii].m_texture2DBinding->needToUseBlackTexture() - || m_textureUnits[ii].m_textureCubeMapBinding && m_textureUnits[ii].m_textureCubeMapBinding->needToUseBlackTexture()) { + if ((m_textureUnits[ii].m_texture2DBinding && m_textureUnits[ii].m_texture2DBinding->needToUseBlackTexture()) + || (m_textureUnits[ii].m_textureCubeMapBinding && m_textureUnits[ii].m_textureCubeMapBinding->needToUseBlackTexture())) { if (ii != m_activeTextureUnit) { m_context->activeTexture(ii); resetActiveUnit = true; |
