Commit dbff04db authored by levin@chromium.org's avatar levin@chromium.org
Browse files

Incorrect code in WebGLRenderingContext.cpp

https://bugs.webkit.org/show_bug.cgi?id=32046

Reviewed by Eric Seidel.

Fix incorrect code that happened to work. != has higher precendence than &.
The simplest fix is to remove the "!= 0" which violates WebKit style
guidelines anyway.

Also added periods to few comments in the same function.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateIndexArray):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0dd54ad2
2009-12-01 David Levin <levin@chromium.org>
Reviewed by Eric Seidel.
Incorrect code in WebGLRenderingContext.cpp
https://bugs.webkit.org/show_bug.cgi?id=32046
Fix incorrect code that happened to work. != has higher precendence than &.
The simplest fix is to remove the "!= 0" which violates WebKit style
guidelines anyway.
Also added periods to few comments in the same function.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateIndexArray):
2009-12-01 Kent Tamura <tkent@chromium.org>
 
Reviewed by Darin Adler.
......@@ -577,11 +577,11 @@ bool WebGLRenderingContext::validateIndexArray(unsigned long count, unsigned lon
unsigned long uoffset = static_cast<unsigned long>(offset);
if (type == GraphicsContext3D::UNSIGNED_SHORT) {
// For an unsigned short array, offset must be divisible by 2 for alignment reasons
if (uoffset & 1 != 0)
// For an unsigned short array, offset must be divisible by 2 for alignment reasons.
if (uoffset & 1)
return false;
// Make uoffset an element offset
// Make uoffset an element offset.
uoffset /= 2;
unsigned long n = m_boundElementArrayBuffer->byteLength(GraphicsContext3D::ELEMENT_ARRAY_BUFFER) / 2;
......@@ -607,7 +607,7 @@ bool WebGLRenderingContext::validateIndexArray(unsigned long count, unsigned lon
}
}
// Then set the last index in the index array and make sure it is valid
// Then set the last index in the index array and make sure it is valid.
numElements = lastIndex + 1;
return numElements > 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment