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

List:       cairo
Subject:    [cairo] scaled_font mutex locking cleanup
From:       Behdad Esfahbod <behdad () behdad ! org>
Date:       2008-06-22 19:23:44
Message-ID: 1214162624.1272.117.camel () behdad ! behdad ! org
[Download RAW message or body]

Hi,

Currently we acquire/release the scaled-font mutex in
_cairo_surface_show_glyphs() and_cairo_mutex_glyph_path().  Also means
that wrapping surfaces like paginated have to unlock/lock the mutex
around the recursive _cairo_surface_show_glyphs() call.

Ideally all the locking should be done by cairo-scaled-font.c itself.  I
noticed that you need the locking exactly when you need the scaled-font
glyph cache release.  So how about moving the lock/unlock pair into
cache_freeze/unfreeze()?  While grepping I also noticed that only xlib,
xcb, and glitz backends freeze the cache in their show glyphs.  Which
means all the others are subject to race conditions of glyphs being
evicted from under their feet.


-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759

_______________________________________________
cairo mailing list
cairo@cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo
[prev in list] [next in list] [prev in thread] [next in thread] 

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