diff options
author | wiz <wiz@pkgsrc.org> | 2007-06-08 07:20:52 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2007-06-08 07:20:52 +0000 |
commit | 644bc53ece9c1967e3657280cf2fc83926d7964f (patch) | |
tree | 8c491cd8417b354b91c44976920b02738220e3df /graphics/cairo | |
parent | eafdbf4f3644de11d31bb8435dfa4077ba98c8da (diff) | |
download | pkgsrc-644bc53ece9c1967e3657280cf2fc83926d7964f.tar.gz |
Update to 1.4.6:
Release 1.4.6 (2007-05-01 Carl Worth <cworth@cworth.org>)
=========================================================
This is the third update in cairo's stable 1.4 series. It comes a
little less than three weeks since the 1.4.4 release. This release
fixes the broken mutex initialization that made cairo 1.4.4 unusable
on win32, OS/2, and BeOS systems. This release also adds significant
improvements to cairo's PDF backend, (native gradients!), and a couple
of performance optimizations, (one of which is very significant for
users of the xlib backend).
Release 1.4.4 (2007-04-13 Carl Worth <cworth@cworth.org>)
=========================================================
This is the second update release in cairo's stable 1.4 series. It
comes just less than a month after 1.4.2. The changes since 1.4.2
consist primarily of bug fixes, but also include at least one
optimization. See below for details.
There have been lots of individuals doing lots of great work on cairo,
but two efforts during the 1.4.4 series deserve particular mention:
Internal cleanup of error handling, (Chris Wilson)
--------------------------------------------------
Chris contributed a tremendous series of patches (74 patches!) to
improve cairo's handling of out-of-memory and other errors. He began
by adding gcc's warn_unused_attribute to as many functions as
possible, and then launched into the ambitious efforts of adding
correct code to quiet the dozens of resulting warnings.
Chris also wrote a custom valgrind skin to systematically inject
malloc failures into cairo, and did all the work necessary to verify
that cairo's performance test suite runs to completion without
crashing.
The end result is a much more robust implementation. Previously, many
error conditions would have gone unnoticed and would have led to
assertion failures, segmentation faults, or other harder-to-diagnose
problems. Now, more than ever, cairo should cleanly let the user know
of problems through cairo_status and other similar status
functions. Well done, Chris!
More malloc reduction, (Mathias Hasselmann)
-------------------------------------------
After 1.4.0, Behdad launched an effort to chase down excessive calls
to malloc within the implementation of cairo. He fixed a lot of
malloc-happy objects for 1.4.2, but one of the worst offenders,
(pixman regions), was left around. Mathias contributed an excellent
series of 15 patches to finish off this effort.
The end result is a cairo that calls malloc much less often than it
did before. Compared to 1.4.2, 55% of the calls to malloc have been
eliminate, (and 60% have been eliminated compared to 1.4.0). Well
done, Mathias!
Diffstat (limited to 'graphics/cairo')
-rw-r--r-- | graphics/cairo/Makefile | 5 | ||||
-rw-r--r-- | graphics/cairo/PLIST | 4 | ||||
-rw-r--r-- | graphics/cairo/distinfo | 15 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-aa | 10 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-ab | 14 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-ac | 33 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-ae | 128 |
7 files changed, 87 insertions, 122 deletions
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile index 0ec4a4c1144..f1ef38f8dff 100644 --- a/graphics/cairo/Makefile +++ b/graphics/cairo/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.54 2007/03/29 12:00:44 dmcmahill Exp $ +# $NetBSD: Makefile,v 1.55 2007/06/08 07:20:52 wiz Exp $ -DISTNAME= cairo-1.4.2 -PKGREVISION= 1 +DISTNAME= cairo-1.4.6 CATEGORIES= graphics MASTER_SITES= http://cairographics.org/releases/ diff --git a/graphics/cairo/PLIST b/graphics/cairo/PLIST index 4787a249d96..0e0063aa2ed 100644 --- a/graphics/cairo/PLIST +++ b/graphics/cairo/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.15 2007/03/20 15:29:18 drochner Exp $ +@comment $NetBSD: PLIST,v 1.16 2007/06/08 07:20:53 wiz Exp $ ${CARBON}include/cairo/cairo-atsui.h include/cairo/cairo-deprecated.h include/cairo/cairo-features.h @@ -36,7 +36,7 @@ share/gtk-doc/html/cairo/bindings-patterns.html share/gtk-doc/html/cairo/bindings-return-values.html share/gtk-doc/html/cairo/bindings-streams.html share/gtk-doc/html/cairo/bindings-surfaces.html -share/gtk-doc/html/cairo/cairo-Error-handling.html +share/gtk-doc/html/cairo/cairo-Error-Handling.html share/gtk-doc/html/cairo/cairo-Font-Options.html share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html share/gtk-doc/html/cairo/cairo-Image-Surfaces.html diff --git a/graphics/cairo/distinfo b/graphics/cairo/distinfo index aaa373c9206..d4d24679e0d 100644 --- a/graphics/cairo/distinfo +++ b/graphics/cairo/distinfo @@ -1,9 +1,8 @@ -$NetBSD: distinfo,v 1.33 2007/04/05 13:12:07 drochner Exp $ +$NetBSD: distinfo,v 1.34 2007/06/08 07:20:53 wiz Exp $ -SHA1 (cairo-1.4.2.tar.gz) = 9e7a323fc7d81d5011044d7eb22db3bf26ff7314 -RMD160 (cairo-1.4.2.tar.gz) = 53ad2e60507e181cb754991c1fe8f8de47f366a3 -Size (cairo-1.4.2.tar.gz) = 3081092 bytes -SHA1 (patch-aa) = a5bcc788ba51b1943b6f37678437491a46a7b45c -SHA1 (patch-ab) = 02ab6fef56431729db98691e9ed9c879c625f016 -SHA1 (patch-ac) = fc4a279c4a76fa66dc64718d152621b2e7a2e63c -SHA1 (patch-ae) = 55c4c5992059e96c96ac022028fe9fed811909fa +SHA1 (cairo-1.4.6.tar.gz) = bfd1532e10789fc4f87a196540c049d88c6ece42 +RMD160 (cairo-1.4.6.tar.gz) = 144ba5422c414070ceb691dcd59fa887f82697b1 +Size (cairo-1.4.6.tar.gz) = 3181592 bytes +SHA1 (patch-aa) = 79c04674fde56522e1f09e5896fcef4c6b6a0d36 +SHA1 (patch-ab) = 45e59cffeade4019b860e1e2e93a9b264324e961 +SHA1 (patch-ae) = 42d23551af85adcbb9645f26dbdee7f8b9d72fa9 diff --git a/graphics/cairo/patches/patch-aa b/graphics/cairo/patches/patch-aa index c068f5f888e..52e3b00e7ba 100644 --- a/graphics/cairo/patches/patch-aa +++ b/graphics/cairo/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.9 2007/03/20 15:29:18 drochner Exp $ +$NetBSD: patch-aa,v 1.10 2007/06/08 07:20:53 wiz Exp $ ---- src/Makefile.in.orig 2007-03-06 09:21:16.000000000 +0000 +--- src/Makefile.in.orig 2007-05-01 20:25:14.000000000 +0000 +++ src/Makefile.in -@@ -235,7 +235,7 @@ CAIRO_CAN_TEST_PDF_SURFACE_FALSE = @CAIR +@@ -244,7 +244,7 @@ CAIRO_CAN_TEST_PDF_SURFACE_FALSE = @CAIR CAIRO_CAN_TEST_PDF_SURFACE_TRUE = @CAIRO_CAN_TEST_PDF_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ @@ -11,10 +11,10 @@ $NetBSD: patch-aa,v 1.9 2007/03/20 15:29:18 drochner Exp $ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ CAIRO_HAS_BEOS_SURFACE_FALSE = @CAIRO_HAS_BEOS_SURFACE_FALSE@ -@@ -272,7 +272,7 @@ CAIRO_HAS_XLIB_SURFACE_FALSE = @CAIRO_HA - CAIRO_HAS_XLIB_SURFACE_TRUE = @CAIRO_HAS_XLIB_SURFACE_TRUE@ +@@ -282,7 +282,7 @@ CAIRO_HAS_XLIB_SURFACE_TRUE = @CAIRO_HAS CAIRO_HAS_XLIB_XRENDER_SURFACE_FALSE = @CAIRO_HAS_XLIB_XRENDER_SURFACE_FALSE@ CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE = @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ + CAIRO_LDADD = @CAIRO_LDADD@ -CAIRO_LIBS = @CAIRO_LIBS@ +CAIRO_LIBS = @CAIRO_LIBS@ ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} CAIRO_NONPKGCONFIG_CFLAGS = @CAIRO_NONPKGCONFIG_CFLAGS@ diff --git a/graphics/cairo/patches/patch-ab b/graphics/cairo/patches/patch-ab index bc3fa54375c..c5bfaed2708 100644 --- a/graphics/cairo/patches/patch-ab +++ b/graphics/cairo/patches/patch-ab @@ -1,13 +1,13 @@ -$NetBSD: patch-ab,v 1.6 2007/03/20 15:29:18 drochner Exp $ +$NetBSD: patch-ab,v 1.7 2007/06/08 07:20:53 wiz Exp $ ---- test/Makefile.in.orig 2007-03-06 09:21:17.000000000 +0000 +--- test/Makefile.in.orig 2007-05-01 20:25:15.000000000 +0000 +++ test/Makefile.in -@@ -50,7 +50,7 @@ host_triplet = @host@ - @CAIRO_HAS_XLIB_SURFACE_TRUE@am__append_6 = xlib-surface - @CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE@am__append_7 = multi-page +@@ -52,7 +52,7 @@ host_triplet = @host@ @CAIRO_HAS_PDF_SURFACE_TRUE@@CAIRO_HAS_PS_SURFACE_TRUE@@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_8 = fallback-resolution + EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_11) \ + $(am__EXEEXT_12) $(am__EXEEXT_15) -@HAVE_PTHREAD_TRUE@am__append_9 = -lpthread +@HAVE_PTHREAD_TRUE@am__append_9 = ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} @CAIRO_CAN_TEST_PDF_SURFACE_TRUE@am__append_10 = pdf2png$(EXEEXT) - @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@am__append_11 = svg2png$(EXEEXT) - EXTRA_PROGRAMS = $(am__EXEEXT_9) $(am__EXEEXT_12) + @CAIRO_CAN_TEST_PDF_SURFACE_TRUE@@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_11 = pdf2svg$(EXEEXT) + @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@am__append_12 = svg2png$(EXEEXT) diff --git a/graphics/cairo/patches/patch-ac b/graphics/cairo/patches/patch-ac deleted file mode 100644 index a4c71569fde..00000000000 --- a/graphics/cairo/patches/patch-ac +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-ac,v 1.6 2007/04/05 13:12:07 drochner Exp $ - -See https://bugs.freedesktop.org/show_bug.cgi?id=10441 -Instead of the patch there which relies on things like __hpux__ -we use the configure test results. - ---- test/pdiff/pdiff.c.orig 2007-03-19 21:08:04.000000000 +0100 -+++ test/pdiff/pdiff.c -@@ -20,7 +20,23 @@ - #include <math.h> - #include <stdio.h> - #include <stdlib.h> --#include <stdint.h> -+ -+#if HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#ifdef HAVE_STDINT_H -+# include <stdint.h> -+#else -+# ifdef HAVE_INTTYPES_H -+# include <inttypes.h> -+# else -+# ifdef HAVE_SYS_INT_TYPES_H -+# include <sys/int_types.h> -+# endif -+# endif -+#endif -+ - #include "pdiff.h" - - #ifndef M_PI diff --git a/graphics/cairo/patches/patch-ae b/graphics/cairo/patches/patch-ae index 18cdf7d1a79..6f61050e321 100644 --- a/graphics/cairo/patches/patch-ae +++ b/graphics/cairo/patches/patch-ae @@ -1,40 +1,40 @@ -$NetBSD: patch-ae,v 1.6 2007/03/20 15:29:22 drochner Exp $ +$NetBSD: patch-ae,v 1.7 2007/06/08 07:20:53 wiz Exp $ Fixes cairo on 8-bit pseudo color and other 8-bit displays. See https://bugs.freedesktop.org/show_bug.cgi?id=4945 ---- src/cairo-xlib-surface.c.orig 2007-03-02 01:04:59.000000000 +0000 -+++ src/cairo-xlib-surface.c -@@ -82,6 +82,8 @@ _cairo_xlib_surface_show_glyphs (void +--- src/cairo-xlib-surface-private.h-orig 2007-05-02 14:43:14.184165000 +0800 ++++ src/cairo-xlib-surface-private.h 2007-05-02 14:50:38.143706000 +0800 +@@ -39,6 +39,14 @@ - #define CAIRO_ASSUME_PIXMAP 20 + typedef struct _cairo_xlib_surface cairo_xlib_surface_t; -+struct clut_r3g3b2; ++struct clut_r3g3b2 { ++ struct clut_r3g3b2 *next; ++ Display *dpy; ++ Colormap cmap; ++ uint32_t clut[256]; ++ unsigned char ilut[256]; ++}; + struct _cairo_xlib_surface { cairo_surface_t base; -@@ -127,6 +129,8 @@ struct _cairo_xlib_surface { - int num_clip_rects; - - XRenderPictFormat *xrender_format; +@@ -88,6 +96,8 @@ struct _cairo_xlib_surface { + cairo_filter_t filter; + int repeat; + XTransform xtransform; + + struct clut_r3g3b2 *clut; }; - #define CAIRO_SURFACE_RENDER_AT_LEAST(surface, major, minor) \ -@@ -503,6 +507,82 @@ _swap_ximage_to_native (XImage *ximage) + #endif /* CAIRO_XLIB_SURFACE_PRIVATE_H */ +--- src/cairo-xlib-surface.c-orig 2007-05-02 14:55:09.281677000 +0800 ++++ src/cairo-xlib-surface.c 2007-05-02 14:53:31.401179000 +0800 +@@ -446,6 +446,74 @@ _swap_ximage_to_native (XImage *ximage) } } -+struct clut_r3g3b2 { -+ struct clut_r3g3b2 *next; -+ Display *dpy; -+ Colormap cmap; -+ uint32_t clut[256]; -+ unsigned char ilut[256]; -+}; -+ +static struct clut_r3g3b2 * _get_clut_r3g3b2(Display *dpy, Colormap cmap) { + static struct clut_r3g3b2 *first = NULL; + int i,j, min, d; @@ -106,12 +106,11 @@ See https://bugs.freedesktop.org/show_bug.cgi?id=4945 static cairo_status_t _get_image_surface (cairo_xlib_surface_t *surface, cairo_rectangle_int16_t *interest_rect, -@@ -656,6 +736,35 @@ _get_image_surface (cairo_xlib_surface_t +@@ -607,6 +675,36 @@ _get_image_surface (cairo_xlib_surface_t } else { -+ -+ if(surface->clut != NULL) { ++ if (surface->clut != NULL) { + + /* + * Otherwise, we construct a buffer containing RGB24 data @@ -122,7 +121,7 @@ See https://bugs.freedesktop.org/show_bug.cgi?id=4945 + int i,j; + + data = (uint32_t*)malloc(ximage->height * ximage->width * 4); -+ if(data == NULL) { ++ if (data == NULL) { + printf("Cannot allocate RGB buffer\n"); + goto FAIL; + } @@ -130,19 +129,21 @@ See https://bugs.freedesktop.org/show_bug.cgi?id=4945 + clut = surface->clut->clut; + src8 = (uint8_t*) ximage->data; + dst = data; -+ for(j = 0; j < ximage->height; j++) { -+ for(i = 0; i < ximage->width; i++) ++ for (j = 0; j < ximage->height; j++) { ++ for (i = 0; i < ximage->width; i++) + *dst++ = clut[src8[i]]; + src8 += ximage->bytes_per_line; + } + free(ximage->data); + image = (cairo_image_surface_t*) -+ cairo_image_surface_create_for_data((unsigned char *)data, CAIRO_FORMAT_RGB24, ximage->width, ximage->height, ximage->width*4); ++ cairo_image_surface_create_for_data ((unsigned char *)data, ++ CAIRO_FORMAT_RGB24, ximage->width, ximage->height, ++ ximage->width*4); + } else { /* * XXX This can't work. We must convert the data to one of the * supported pixman formats. Pixman needs another function -@@ -668,6 +777,8 @@ _get_image_surface (cairo_xlib_surface_t +@@ -619,6 +717,8 @@ _get_image_surface (cairo_xlib_surface_t ximage->width, ximage->height, ximage->bytes_per_line); @@ -151,11 +152,10 @@ See https://bugs.freedesktop.org/show_bug.cgi?id=4945 if (image->base.status) goto FAIL; } -@@ -742,6 +853,32 @@ _cairo_xlib_surface_ensure_gc (cairo_xli - _cairo_xlib_surface_set_gc_clip_rects (surface); +@@ -698,6 +798,31 @@ _cairo_xlib_surface_ensure_gc (cairo_xli + return CAIRO_STATUS_SUCCESS; } -+ +static int +_make_space_for(unsigned char ** buf, int *size, int *stride, int width, int height, int Bpp) +{ @@ -184,48 +184,48 @@ See https://bugs.freedesktop.org/show_bug.cgi?id=4945 static cairo_status_t _draw_image_surface (cairo_xlib_surface_t *surface, cairo_image_surface_t *image, -@@ -754,21 +891,54 @@ _draw_image_surface (cairo_xlib_surface_ +@@ -710,22 +835,54 @@ _draw_image_surface (cairo_xlib_surface_ { XImage ximage; unsigned int bpp, alpha, red, green, blue; + unsigned int depth = image->depth; + unsigned int stride = image->stride; int native_byte_order = _native_byte_order_lsb () ? LSBFirst : MSBFirst; + cairo_status_t status; pixman_format_get_masks (pixman_image_get_format (image->pixman_image), &bpp, &alpha, &red, &green, &blue); ++ if (surface->clut != NULL) { ++ static unsigned char *buf = NULL; ++ static int size = 0; ++ int i, j; ++ unsigned char *data, *ilut; ++ uint32_t *src; ++ uint8_t *dst8; + -+ if(surface->clut != NULL) { -+ static unsigned char *buf = NULL; -+ static int size = 0; -+ int i, j; -+ unsigned char *data, *ilut; -+ uint32_t *src; -+ uint8_t *dst8; -+ -+ if (_make_space_for(&buf, &size, &stride, image->width, image->height, 1)) ++ if (_make_space_for(&buf, &size, &stride, image->width, image->height, 1)) + return CAIRO_STATUS_NO_MEMORY; -+ data = buf; -+ src = (uint32_t*)image->data; -+ ilut = surface->clut->ilut; -+ for(j=0;j<image->height;j++) { ++ data = buf; ++ src = (uint32_t*)image->data; ++ ilut = surface->clut->ilut; ++ for (j=0;j<image->height;j++) { + dst8 = data + j * stride; -+ for(i=0;i<image->width;i++) { -+ dst8[i] = ilut[ ((*src >> 16) & 0xe0) | -+ ((*src >> 11) & 0x1c) | -+ ((*src >> 6) & 0x03) ]; -+ src++; ++ for (i=0;i<image->width;i++) { ++ dst8[i] = ilut[ ((*src >> 16) & 0xe0) | ++ ((*src >> 11) & 0x1c) | ++ ((*src >> 6) & 0x03) ]; ++ src++; + } -+ } -+ alpha = red = green = blue = 0; -+ depth = bpp = 8; -+ ximage.data = data; ++ } ++ alpha = red = green = blue = 0; ++ depth = bpp = 8; ++ ximage.data = data; + + } else { -+ ximage.data = (char *)image->data; ++ ximage.data = (char *)image->data; + } -+ ++ ximage.width = image->width; ximage.height = image->height; ximage.format = ZPixmap; @@ -242,17 +242,17 @@ See https://bugs.freedesktop.org/show_bug.cgi?id=4945 ximage.bits_per_pixel = bpp; ximage.red_mask = red; ximage.green_mask = green; -@@ -1899,7 +2069,13 @@ _cairo_xlib_surface_create_internal (Dis +@@ -1885,6 +2042,13 @@ _cairo_xlib_surface_create_internal (Dis surface->have_clip_rects = FALSE; - surface->clip_rects = NULL; + surface->clip_rects = surface->embedded_clip_rects; surface->num_clip_rects = 0; + surface->clut = NULL; - -+ if (xrender_format == NULL && -+ (visual->class == PseudoColor || visual->class == StaticColor)) { -+ surface->clut = _get_clut_r3g3b2(dpy, -+ DefaultColormapOfScreen(surface->screen)); ++ ++ if (xrender_format == NULL && ++ (visual->class == PseudoColor || visual->class == StaticColor)) { ++ surface->clut = _get_clut_r3g3b2(dpy, ++ DefaultColormapOfScreen(surface->screen)); + } + return (cairo_surface_t *) surface; } - |