[whatwg] Canvas pixel manipulation and performance

Kenneth Russell kbr at google.com
Sat Nov 28 21:15:01 PST 2009


On Sat, Nov 28, 2009 at 9:00 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 11/28/09 11:42 PM, Kenneth Russell wrote:
>>
>> From a technical standpoint, it would be feasible to use the
>> "WebGLUnsignedIntArray" to access the Canvas's pixel data, and
>> assemble RGBA pixels into integer values using just JavaScript logical
>> operators.
>
> I assume you meant JS bitwise operators?  Do we have any indication that
> this would be faster than four array property sets?  The bitwise ops in JS
> are not necessarily particulary fast.

Yes, that's what I meant. I don't have any data on whether this would
currently be faster than the four separate byte stores.

-Ken



More information about the whatwg mailing list