[cairo] [cairo-commit] 2 commits - src/cairo-image-surface.c test/operator-source.c test/operator-source.image16.ref.png test/operator-source.pdf.rgb24.ref.png test/operator-source.quartz.argb32.ref.png test/operator-source.quartz.rgb24.ref.png t
ranma42 at gmail.com
Sat Apr 2 15:45:36 PDT 2011
On Sat, Apr 2, 2011 at 9:25 PM, Uli Schlachter <psychon at znc.in> wrote:
> On 02.04.2011 21:03, Soeren Sandmann wrote:
> > The patch:
> > + /* The below code breaks for operator source. This can best be seen with
> > + * multiple boxes where black is drawn to dst outside of the boxes. */
> > + if (op == CAIRO_OPERATOR_SOURCE)
> > + return CAIRO_INT_STATUS_UNSUPPORTED;
> > looks a little suspicious to me: Should it really check for SOURCE, or
> > should it check for bounded operators that are unbounded in pixman?
> > SOURCE is one such operator, but there are others.
CAIRO_OPERATOR_CLEAR and CAIRO_OPERATOR_SOURCE are the only
two operators whose behavior does not match pixman operators
(cfr. http://cairographics.org/operators/ ).
cairo-image implements CAIRO_OPERATOR_CLEAR as a DEST_OUT with
opaque source (when it needs a mask), but SOURCE is harder to express
(iirc LERP was proposed to address this issue).
> The original test case that was sent to the mailing list causes two boxes which
> look like the letter "L" to be filled. The "background" is first painted red and
> the L is then filled with green.
> I tested this code with all cairo operators and only "source" painted something
> outside of the boxes in the area of the L's extents. I don't think I checked
> whether _composite_unaligned_boxes() was used, but all other operators had the
> area outside of the L unaffected.
> So, it might be that _composite_unaligned_boxes() has bugs with other operators,
> too, but I didn't manage to hit them.
> Which other operators should cause similar problems?
> - Buck, when, exactly, did you lose your mind?
> - Three months ago. I woke up one morning married to a pineapple.
> An ugly pineapple... But I loved her.
> cairo mailing list
> cairo at cairographics.org
More information about the cairo