[cairo] [cairo-commit] 7 commits - src/cairo.c src/cairo-color.c src/cairo-gl-glyphs.c src/cairo-gl-private.h src/cairo-gl-surface.c src/cairo-gstate.c src/cairo-image-surface.c test/Makefile.sources test/zero-mask.c test/zero-mask.ref.png test/zero-mask.rgb24.ref.png

Chris Wilson chris at chris-wilson.co.uk
Thu May 13 04:00:26 PDT 2010


On Thu, 13 May 2010 03:14:23 -0700 (PDT), company at kemper.freedesktop.org (Benjamin Otte) wrote:
>  src/cairo-color.c            |   10 +-
>  src/cairo-gl-glyphs.c        |   36 +------
>  src/cairo-gl-private.h       |    1 
>  src/cairo-gl-surface.c       |    4 
>  src/cairo-gstate.c           |   15 +++
>  src/cairo-image-surface.c    |    2 
>  src/cairo.c                  |    3 
>  test/Makefile.sources        |    3 
>  test/zero-mask.c             |  199 +++++++++++++++++++++++++++++++++++++++++++
>  test/zero-mask.ref.png       |binary
>  test/zero-mask.rgb24.ref.png |binary
>  11 files changed, 239 insertions(+), 34 deletions(-)
> 
> New commits:
> commit c69143e3f9c95ab3937a7efb8e4de170c4edb648
> Author: Benjamin Otte <otte at redhat.com>
> Date:   Wed May 12 21:14:36 2010 +0200
> 
>     gl: Don't keep a temporary surface in the device
>     
>     We get circular references that way.
>     If it turns out later such a cache is critical, we'll need to invent a
>     way to avoid circling references. For now, just pretend it's not
>     important.

Eric thinks this a necessary as creating surfaces in GL is not cheap. The
canonical place to clean up caches and break circular-references is in
cairo_device_finish().

> commit 18c963824ebbb0e7054e682ecb5664a282a58552
> Author: Benjamin Otte <otte at redhat.com>
> Date:   Thu May 13 11:56:22 2010 +0200
> 
>     Make _cairo_color_equal() work for unmultiplied colors, too
>     
>     Color stop colors are unmultiplied, and we use it there.

cairo_color_stop_t is now a separate type, can you add this nice short-cut
there as well.

> +
> +mask_func_t mask_funcs[] = {
^^^ needs to be static in case we every a second test with mask_funcs[].

> +  paint_with_alpha,
> +  mask_with_solid,
> +  mask_with_empty_gradient,
> +  mask_with_gradient,
> +  mask_with_surface,
> +  mask_with_alpha_surface,
> +  mask_with_nonclear_surface,
> +  mask_with_0x0_surface,
> +  mask_with_extend_none
> +};
> +
> +cairo_operator_t operators[] = {
^^^ static again.
> +  CAIRO_OPERATOR_CLEAR,
> +  CAIRO_OPERATOR_SOURCE,
> +  CAIRO_OPERATOR_OVER,
> +  CAIRO_OPERATOR_IN,
> +  CAIRO_OPERATOR_DEST_ATOP,
> +  CAIRO_OPERATOR_SATURATE,
> +  CAIRO_OPERATOR_MULTIPLY
> +};

Thanks Benjamin, more bugs found and squashed, including some very old
ones!
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list