On 11/29/09 11:22 PM, Oliver Hunt wrote:
I don't know where you're getting that idea from -- the clamping semantics for CanvasPixelArray and WebGLUnsignedByteArray are identical.
Perhaps Kenneth included the rounding behavior (which seems to be different to me from a brief look at JavaScriptCore/wtf/ByteArray.h and WebCore/html/canvas/WebGLUnsignedByteArray.h) in "clamping semantics"? CanvasPixelArray, which uses ByteArray, rounds to nearest integer (ties rounded up), while WebGLUnsignedByteArray truncates.
Note that neither implements what the current spec draft calls for (which is round-to-nearest, ties-to-even behavior). No opinion on whether this _should_ be what the spec calls for.
-Boris