[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo-commit
Subject:    [cairo-commit] src/cairo-xlib-surface.c
From:       jinghua () kemper ! freedesktop ! org (ç½æ¶å Jinghua Luo)
Date:       2007-05-27 9:11:21
Message-ID: 20070527091121.584CF10096 () kemper ! freedesktop ! org
[Download RAW message or body]

 src/cairo-xlib-surface.c |    1 +
 1 files changed, 1 insertion(+)

New commits:
diff-tree 4da50dfa02d7c03c32ee20c15f8304eafa0844e0 (from 69bf823db1b256f19487d2f002e7b0811859e58e)
Author: Luo jinghua <sunmoon1997@gmail.com>
Date:   Sun May 27 17:09:49 2007 +0800

    [cairo-xlib-surface]: flush work queue before sending glyphs to X server.
    
      After introducing a work queue for deferred destruction of X resource
    my firefox crashes over and over again because XRenderFreeGlyphs is trying
    to free a non-exist glyph (already freed). The problematic call sequence is
    something like below:
      XRenderAddGlyphs (20990204, 20069)
      XRenderAddGlyphs (20990204, 20069)
      XRenderFreeGlyphs (20990204, 20069)
      XRenderFreeGlyphs (20990204, 20069)
    You can see the two add/free glyphs is interlaced. And obviously, we'll crash
    at the last one. To fix this bug, we must be ensure here's no pending work
    to free the glyph that we want to sent.

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 103757b..db5c155 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -2887,6 +2887,7 @@ _cairo_xlib_surface_emit_glyphs (cairo_x
     int request_size = 0;
 
     _cairo_xlib_surface_ensure_dst_picture (dst);
+    _cairo_xlib_display_notify (dst->screen_info->display);
 
     for (i = 0; i < num_glyphs; i++) {
 	int this_x, this_y;
_______________________________________________
cairo-commit mailing list
cairo-commit@cairographics.org
http://cairographics.org/cgi-bin/mailman/listinfo/cairo-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic