[webkit-dev] RGBA8 and BGRA8 formats in WebKit

Allan Sandfeld Jensen kde at carewolf.com
Tue Jan 22 07:47:56 PST 2013


On Monday 21 January 2013, Benjamin Poulain wrote:
> On Mon, Jan 21, 2013 at 7:00 AM, Zoltan Herczeg <zherczeg at webkit.org> wrote:
> > In WebKit both RGBA and BGRA formats are used for different purposes and
> > different platforms in WebKit. Do we have a policy which one we prefer?
> > It would be nice to reduce conversions between them in the future as it
> > seems costly on embedded systems.
> 
> The Web APIs use RGBA (E.g.
> http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/#canvas-pixel-array
> buffer )
> Using that internally will prevent conversion at the boundaries
> JS<->WebCore.
> 
> Internally, each port should be able to use any format. On some embedded
> systems, it can be advantageous to use 24 bits colors (or even 16 bits
> sometimes).
> 
> Where in WebKit do you experience problems with color conversion?
> 
Well, for one thing. The Color class and RGBA32 type are encoded as ARGB, not 
as RGBA which is needed for JavaScript.

`Allan


More information about the webkit-dev mailing list