[cairo] Idle thoughts on error propagation
Carl Worth
cworth at cworth.org
Thu May 1 15:13:15 PDT 2008
On Thu, 01 May 2008 17:52:07 -0400, Behdad Esfahbod wrote:
> > @@ -116,6 +116,9 @@ _cairo_set_error (cairo_t *cr, cairo_status_t
> > status)
> > * error, which is the most significant. */
> > _cairo_status_set_error (&cr->status, status);
> >
> > + if (cr->gstate != NULL && cr->gstate->original_target != NULL)
> > + status = _cairo_surface_set_error
> > (cr->gstate->original_target, status);
> > +
> > status = _cairo_error (status);
> > }
> >
> > Just an idle thought. :-)
>
> Sounds like the right thing to do.
I can imagine a case where this could be wrong.
The cairo_t context is conceptually transient for what could be a
long-standing surface. For example, if I had an application creating a
new context for the same surface on every expose event, would it be
correct to force the surface to shutdown due to an error on the
context?
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080501/958c8c03/attachment.pgp
More information about the cairo
mailing list