[cairo] [cairo-commit] 2 commits - src/cairo-rtree.c src/cairo-rtree-private.h src/cairo-xlib-surface.c

Carl Worth cworth at cworth.org
Mon Jul 27 14:09:24 PDT 2009


On Mon, 2009-07-27 at 14:53 -0400, Behdad Esfahbod wrote:
> On 07/27/2009 02:35 PM, Chris Wilson wrote:
> >   src/cairo-rtree-private.h |    1
> >   src/cairo-rtree.c         |   50 ++++++++++++++++++++++++++++++++++++++++++++--
> >   src/cairo-xlib-surface.c  |    6 +++++
> >   3 files changed, 55 insertions(+), 2 deletions(-)
> >
> > New commits:
> > commit cf15aed0c4e843e7297c5a1979ac0318f6df4947
> > Author: Chris Wilson<chris at chris-wilson.co.uk>
> > Date:   Mon Jul 27 19:18:21 2009 +0100
> >
> >      [xlib] Add a timely reminder to ensure that bugs are properly filed.
> >
> >      In a discussion on IRC, attention was drawn to a dubious comment in
> >      _cairo_xlib_show_glyphs() - the precise details of which have passed
> >      out of the collective memory.
> 
> Humm, care to elaborate?  I don't mind documenting _cairo_xlib_show_glyphs() more.

If you'd like to fix things, there is more than a comment clean-up
needed. Here's the problematic bit:

    /* Render <= 0.10 seems to have a bug with PictOpSrc and glyphs --          
     * the solid source seems to be multiplied by the glyph mask, and           
     * then the entire thing is copied to the destination surface,              
     * including the fully transparent "background" of the rectangular          
     * glyph surface. */
    if (op == CAIRO_OPERATOR_SOURCE &&
        ! CAIRO_SURFACE_RENDER_AT_LEAST(dst, 0, 11))
    {
        return UNSUPPORTED ("known bug in Render");
    }

Unlike the comment might lead one to believe, the described behavior
seems to be according to the Render specification. Or perhaps, this is
an under-specified part of Render. But either way, we don't expect the
behavior of Render to change.

And most worrying, Render recently changed to version 0.11 without any
change here, which suggests that cairo might very well start generating
incorrect results with new Render. So the fix is to remove the
dependence of this condition on the Render version.

Later in the function there's a workaround for Render PictOpClear. It
doesn't have the same Render-version problem, but it also has a comment
that's perhaps a little less clear than desirable.

-Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20090727/05828181/attachment.pgp 


More information about the cairo mailing list