[cairo] synchronize surface clip region with gstate

Carl Worth cworth at redhat.com
Mon Dec 20 09:24:41 PST 2004


On Mon, 20 Dec 2004 17:31:07 +0100, Alexander Larsson wrote:
> All state is not virtualized in gstate. The clip region is set on the
> surface, which is shared between gstates. This means if you set a clip
> region and then pop the gstate the new top gstate->surface has the old
> clip region. 

Good catch.

> Here is a fix:

Looks good in general. A couple comments:

> +/* Reset surface clip region to the one in the gstate */
> +cairo_status_t
> +_cairo_gstate_restore_surface_state (cairo_gstate_t *gstate)

I think we want a more general name here. Perhaps
_cairo_gstate_restore_external_state ?

> +extern cairo_status_t
> +_cairo_gstate_restore_surface_state (cairo_gstate_t *gstate);

Needs __internal_linkage.

Beyond that, add a ChangeLog and commit, please.

-Carl



More information about the cairo mailing list