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

[whatwg] Canvas feedback

From: Biju <bijumaillist@gmail.com>
Date: Thu, 26 Mar 2009 01:18:58 -0400
Message-ID: <4a27dd80903252218u6ad9c59dqc92a9f1336daf117@mail.gmail.com>
On Wed, Mar 25, 2009 at 3:11 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Sat, 14 Mar 2009, Biju wrote:
>>
>> Just like canvas.getImageData() and canvas.putImageData()
>>
>> Why canvas.getImageHSLData() and canvas.putImageHSLData() API are
>> not provide? Is it something discussed and planned not have?
>
> In practice user agents actually store image data as memory buffers of
> RGBA data, so handling RGBA data is (or at least can be) extremely
> efficient. HSLA data is not a native type, so it would be an inefficient
> type to provide native access to.
>
> In practice, if you need to work in the HSLA space, then you should
> convert the data to HSLA and back manually, which would highlight the
> performance bottleneck implied in such an approach. Alternatively, convert
> whatever algorithms you are using to work in the RGBA space.
As in both case the will be performance hit.
Isnt it better to take care that in C/Compiled code rather than in JavaScript .
code for converting from HSLA to RGBA will be already there in the browser code
so that need to be only exposed to JavaScript
Received on Wednesday, 25 March 2009 22:18:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT