[cairo-bugs] [Bug 30003] surface change serial

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 28 15:23:16 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30003

--- Comment #4 from Havoc Pennington <hp at pobox.com> 2010-09-28 15:23:13 PDT ---
After thinking about this for a bit I like the idea of a damage API on surface,
if you have a Damage object per subscriber then each subscriber gets their own
damage region and the only overhead in cairo_surface_t could be one pointer for
the head of a list of Damage objects. Also you avoid worrying about generic
signals (callback lists) since each Damage object could just support a single
notifier function.

For cairo_context_t it seems like you'd get into what "counts" as a change ?
Maybe you end up wanting the equivalent of a damage object:

 CairoContextChanges { 
    unsigned int matrix_changed : 1;
    unsigned int font_changed : 1;
    // ... etc. 
 }

cairo_context_changes_t* changes_create();
changes_reset()
changes_get_matrix_changed() // changed since reset
changes_get_font_changed()

and just like surface damage object, have a changes_set_notify().

Maybe both surface and context "change trackers" should be named the same,
cairo_surface_changes_t
cairo_context_changes_t

or

cairo_surface_damage_t
cairo_context_damage_t

just thinking out loud.

But yeah, the change serial is definitely a lot simpler and gives you a global
"are caches invalid?" flag that's already useful.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list