pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/cairo Update to 1.4.6:
details: https://anonhg.NetBSD.org/pkgsrc/rev/5a9438c2807d
branches: trunk
changeset: 529582:5a9438c2807d
user: wiz <wiz%pkgsrc.org@localhost>
date: Fri Jun 08 07:20:52 2007 +0000
description:
Update to 1.4.6:
Release 1.4.6 (2007-05-01 Carl Worth <cworth%cworth.org@localhost>)
=========================================================
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@localhost>)
=========================================================
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:
graphics/cairo/Makefile | 5 +-
graphics/cairo/PLIST | 4 +-
graphics/cairo/distinfo | 15 ++--
graphics/cairo/patches/patch-aa | 10 +-
graphics/cairo/patches/patch-ab | 14 ++--
graphics/cairo/patches/patch-ac | 33 ---------
graphics/cairo/patches/patch-ae | 134 ++++++++++++++++++++--------------------
7 files changed, 90 insertions(+), 125 deletions(-)
diffs (truncated from 369 to 300 lines):
diff -r 86cf0b97f6f0 -r 5a9438c2807d graphics/cairo/Makefile
--- a/graphics/cairo/Makefile Fri Jun 08 07:05:59 2007 +0000
+++ b/graphics/cairo/Makefile Fri Jun 08 07:20:52 2007 +0000
@@ -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 -r 86cf0b97f6f0 -r 5a9438c2807d graphics/cairo/PLIST
--- a/graphics/cairo/PLIST Fri Jun 08 07:05:59 2007 +0000
+++ b/graphics/cairo/PLIST Fri Jun 08 07:20:52 2007 +0000
@@ -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-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 -r 86cf0b97f6f0 -r 5a9438c2807d graphics/cairo/distinfo
--- a/graphics/cairo/distinfo Fri Jun 08 07:05:59 2007 +0000
+++ b/graphics/cairo/distinfo Fri Jun 08 07:20:52 2007 +0000
@@ -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 -r 86cf0b97f6f0 -r 5a9438c2807d graphics/cairo/patches/patch-aa
--- a/graphics/cairo/patches/patch-aa Fri Jun 08 07:05:59 2007 +0000
+++ b/graphics/cairo/patches/patch-aa Fri Jun 08 07:20:52 2007 +0000
@@ -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 @@
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 -r 86cf0b97f6f0 -r 5a9438c2807d graphics/cairo/patches/patch-ab
--- a/graphics/cairo/patches/patch-ab Fri Jun 08 07:05:59 2007 +0000
+++ b/graphics/cairo/patches/patch-ab Fri Jun 08 07:20:52 2007 +0000
@@ -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 -r 86cf0b97f6f0 -r 5a9438c2807d graphics/cairo/patches/patch-ac
--- a/graphics/cairo/patches/patch-ac Fri Jun 08 07:05:59 2007 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 86cf0b97f6f0 -r 5a9438c2807d graphics/cairo/patches/patch-ae
--- a/graphics/cairo/patches/patch-ae Fri Jun 08 07:05:59 2007 +0000
+++ b/graphics/cairo/patches/patch-ae Fri Jun 08 07:20:52 2007 +0000
@@ -1,31 +1,13 @@
-$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
-
- #define CAIRO_ASSUME_PIXMAP 20
-
-+struct clut_r3g3b2;
-+
- struct _cairo_xlib_surface {
- cairo_surface_t base;
+--- 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 @@
-@@ -127,6 +129,8 @@ struct _cairo_xlib_surface {
- int num_clip_rects;
-
- XRenderPictFormat *xrender_format;
-+
-+ struct clut_r3g3b2 *clut;
- };
-
- #define CAIRO_SURFACE_RENDER_AT_LEAST(surface, major, minor) \
-@@ -503,6 +507,82 @@ _swap_ximage_to_native (XImage *ximage)
- }
- }
+ typedef struct _cairo_xlib_surface cairo_xlib_surface_t;
+struct clut_r3g3b2 {
+ struct clut_r3g3b2 *next;
@@ -35,6 +17,24 @@
+ unsigned char ilut[256];
+};
+
+ struct _cairo_xlib_surface {
+ cairo_surface_t base;
+
+@@ -88,6 +96,8 @@ struct _cairo_xlib_surface {
+ cairo_filter_t filter;
+ int repeat;
+ XTransform xtransform;
++
++ struct clut_r3g3b2 *clut;
+ };
+
+ #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)
+ }
+ }
+
+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 @@
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 @@
+ 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 @@
+ 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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index