diff options
author | Daniel Stone <daniel@fooishbar.org> | 2012-08-16 18:23:41 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-16 20:11:44 +0100 |
commit | 140fafed89508c4685f3a464c9dbe8df769f2411 (patch) | |
tree | c9e57755d2787bb8382b5384220b0ba92f22e5a8 /src/cairo-xlib-display.c | |
parent | 95b7f4fe3a5deea6766538d843c75626e4bb68cf (diff) | |
download | cairo-140fafed89508c4685f3a464c9dbe8df769f2411.tar.gz |
Fix broken XRender ARGB32 formats
46d79228 did indeed silence the compilation warning, but did so by never
creating an ARGB32 format, as PictStandardARGB32 is defined to 0. Fix
this by using PictStandardNUM as our canary value instead.
This fixes GEdit and Chromium for me, both of which were only rendering
backgrounds and text in their GTK+ sections.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'src/cairo-xlib-display.c')
-rw-r--r-- | src/cairo-xlib-display.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c index d806bfd50..06242ff16 100644 --- a/src/cairo-xlib-display.c +++ b/src/cairo-xlib-display.c @@ -492,7 +492,7 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display, xrender_format = display->cached_xrender_formats[format]; if (xrender_format == NULL) { - int pict_format = 0; + int pict_format = PictStandardNUM; switch (format) { case CAIRO_FORMAT_A1: @@ -515,10 +515,9 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display, case CAIRO_FORMAT_ARGB32: pict_format = PictStandardARGB32; break; } - if (pict_format) { + if (pict_format != PictStandardNUM) xrender_format = XRenderFindStandardFormat (display->display, pict_format); - } display->cached_xrender_formats[format] = xrender_format; } |