[webkit-dev] RGBA8 and BGRA8 formats in WebKit

Benjamin Poulain benjamin at webkit.org
Tue Jan 22 13:28:44 PST 2013


On Tue, Jan 22, 2013 at 12:39 PM, Allan Sandfeld Jensen <kde at carewolf.com>wrote:

> memcpy is heavily optimized for different architectures and even
> subarchitectures. Unless you take the time to write several architecture
> specific BGRA<->RGBA conversions it will never be as fast as memcpy.
>

This is actually very little work.

To summarize, you can:
-change the color format of your rasterizer
-use extensions for the texture format
-use the fragment shader to convert the colors
-write an optimized conversion on the CPU, use it when you copy over the
data between processes

What you take really depends on what is available on your particular
platform/port.

Cheers,
Benjamin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130122/3b6bd0d7/attachment.html>


More information about the webkit-dev mailing list