[cairo] API proposal: Damage Tracking

Benjamin Otte otte at gnome.org
Thu Dec 11 01:34:37 PST 2008


On Thu, Dec 11, 2008 at 10:23 AM, Soeren Sandmann <sandmann at daimi.au.dk> wrote:
> At the summit, Carl suggested that we could make cairo_region_t
> public, then have API like this:
>
>    cairo_tracking_id_t
>    cairo_begin_tracking (cairo_t *cr,
>                          tracking_type_t type,
>                          cairo_region_t *region);
>
>    void
>    cairo_end_tracking (cairo_tracking_id_t id);
>
I have one problem with this API, namely attaching to a cairo_t as
opposed to attaching to a cairo_surface_t.
Using a cairo_t is fine if you're the only user, but I think libraries
that want to make use of damage tracking internally (take double
buffering with gdk_window_begin/end_paint for example) would want to
keep track of the surface they use for that purpose. Otherwise they
could only really make use of damage tracking if they only exported
cairo_t objects, which sounds very suboptimal to me.

Is there any reason to not track damage on surfaces instead?

Cheers,
Benjamin


More information about the cairo mailing list