[cairo] [PATCH] gl: Add BGRA download support for GLES2

Martin Robinson mrobinson at igalia.com
Mon Dec 10 01:09:30 PST 2012


On 12/09/2012 01:25 PM, Chris Wilson wrote:
> {
>    /* Desktop GL always supports BGRA formats, but for ES we have to
>     * look for a specific extension, and that only matches with cairo's
>     * byte packing for litte-endian machines.
>     */
>    if (gl_flavor == CAIRO_GL_FLAVOR_DESKTOP)
>       return true;
>
>    if (gl_flavor != CAIRO_GL_FLAVOR_ES)
>       return false;
>
>    if (!_cairo_is_little_endian()
>       return flse;
>
>    return _cairo_gl_has_extension ("EXT_read_format_bgra"));

Thanks for the comments! I'll land the patch with your suggestion.

--Martin


More information about the cairo mailing list