[cairo] Returning cached erroneous patterns
Behdad Esfahbod
behdad at behdad.org
Thu Mar 29 09:30:30 PDT 2007
On Thu, 2007-03-29 at 00:16 +0100, Chris Wilson wrote:
> Behdad Esfahbod (behdad at behdad.org) said:
> > On Thu, 2007-03-22 at 14:12 -0400, Baz wrote:
> > > All of this comes from patterns being mutable, for adding color stops,
> > > and setting user data. Should those operations should even be possible
> > > on patterns with more than one reference?
> >
> > Ok, thanks for raising the issue. The problem is that solid patterns
> > are not immutable as we expected. Giving away the same mutable object
> > multiple times is definitely wrong.
>
> Hmm, solid-patterns were not the only objects to be subjectable to this
> unrecoverable error condition. A similar happenstance also occurs with
> scaled fonts. :-(
Except that the user cannot put a scaled-font into an error state. It
just happens on real errors like out-of-memory. That's not a problem
IMO.
> For the time being I'm using this patch to continue testing malloc
> failures.
The patch looks like the right approach to me.
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list