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

Uli Schlachter psychon at kemper.freedesktop.org
Fri Mar 22 10:24:14 PDT 2013


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

New commits:
commit be5eabb66a475720020211a6d37bfeb75fc3242c
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Mar 22 18:19:00 2013 +0100

    xcb: Clear temporary replay image in recording playback
    
    This gets rid of random noise that we got from the X11 server due to
    uninitialized memory.
    
    Fixes: pdf-surface-source, ps-surface-source, svg-surface-source
    
    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 cce95a1..7ea9dc8 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1101,10 +1101,11 @@ record_to_picture (cairo_surface_t *target,
 	return _cairo_xcb_transparent_picture ((cairo_xcb_surface_t *) target);
 
     /* Now draw the recording surface to an xcb surface */
-    tmp = _cairo_surface_create_similar_scratch (target,
-						 source->content,
-						 limit.width,
-						 limit.height);
+    tmp = _cairo_surface_create_similar_solid (target,
+					       source->content,
+					       limit.width,
+					       limit.height,
+					       CAIRO_COLOR_TRANSPARENT);
     if (tmp->status != CAIRO_STATUS_SUCCESS) {
 	return (cairo_xcb_picture_t *) tmp;
     }


More information about the cairo-commit mailing list