[cairo-commit] src/cairo-xcb-surface-render.c

Uli Schlachter psychon at kemper.freedesktop.org
Thu Dec 8 13:45:24 PST 2011


 src/cairo-xcb-surface-render.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2a60e8deecd8f63671cd595012843a665187d695
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Dec 8 22:41:10 2011 +0100

    xcb: Fix invalid casts from cairo_content_t to cairo_format_t
    
    This was introduced in a69335a84e when the second argument of
    _cairo_xcb_surface_create_similar_image was changed from content to format.
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 662eb74..5a4f74b 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -3546,7 +3546,7 @@ _cairo_xcb_surface_render_stroke_via_mask (cairo_xcb_surface_t		*dst,
 
     x = extents->bounded.x;
     y = extents->bounded.y;
-    image = _cairo_xcb_surface_create_similar_image (dst, CAIRO_CONTENT_ALPHA,
+    image = _cairo_xcb_surface_create_similar_image (dst, CAIRO_FORMAT_A8,
 						     extents->bounded.width,
 						     extents->bounded.height);
     if (unlikely (image->status))
@@ -3687,8 +3687,7 @@ _cairo_xcb_surface_render_fill_via_mask (cairo_xcb_surface_t	*dst,
 
     x = extents->bounded.x;
     y = extents->bounded.y;
-    image = _cairo_xcb_surface_create_similar_image (dst,
-						     CAIRO_CONTENT_ALPHA,
+    image = _cairo_xcb_surface_create_similar_image (dst, CAIRO_FORMAT_A8,
 						     extents->bounded.width,
 						     extents->bounded.height);
     if (unlikely (image->status))
@@ -3798,7 +3797,8 @@ _cairo_xcb_surface_render_glyphs_via_mask (cairo_xcb_surface_t		*dst,
 
     x = extents->bounded.x;
     y = extents->bounded.y;
-    image = _cairo_xcb_surface_create_similar_image (dst, content,
+    image = _cairo_xcb_surface_create_similar_image (dst,
+						     _cairo_format_from_content (content),
 						     extents->bounded.width,
 						     extents->bounded.height);
     if (unlikely (image->status))


More information about the cairo-commit mailing list