[cairo] Idle thoughts on error propagation
vladimir at pobox.com
Thu May 1 15:29:30 PDT 2008
On May 1, 2008, at 3:14 PM, Behdad Esfahbod wrote:
> On Thu, 2008-05-01 at 15:13 -0700, Carl Worth wrote:
>> 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
> My answer to that is "Yes. A single error means that the surface does
> not contain the drawing that it's expected to have, so it should be in
> an error state."
I disagree here... The cairo_t has no foreknowledge of the contents
that are on the surface -- if the application wants to decide that
failing rendering on a cairo_t means that the surface is invalid, that
should be up to the app; it shouldn't be forced on them.
More information about the cairo