W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2009

[whatwg] Canvas pixel manipulation and performance

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 30 Nov 2009 00:01:46 -0500
Message-ID: <4B1351BA.90009@mit.edu>
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.

Received on Sunday, 29 November 2009 21:01:46 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC