diff -Nru cairo-1.12.3+git20120521.aed94a5b/aclocal.m4 cairo-1.12.3+git20120530.25317dbd/aclocal.m4 --- cairo-1.12.3+git20120521.aed94a5b/aclocal.m4 2012-05-22 11:06:24.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/aclocal.m4 2012-05-31 07:31:29.000000000 +0000 @@ -14,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -Nru cairo-1.12.3+git20120521.aed94a5b/autogen.sh cairo-1.12.3+git20120530.25317dbd/autogen.sh --- cairo-1.12.3+git20120521.aed94a5b/autogen.sh 2012-04-15 08:25:49.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/autogen.sh 2012-05-27 08:23:45.000000000 +0000 @@ -15,8 +15,9 @@ GTKDOCIZE=`which gtkdocize` if test -z $GTKDOCIZE; then - echo "*** No GTK-Doc found, please install it ***" - exit 1 + echo "*** No GTK-Doc found, documentation won't be generated ***" +else + gtkdocize || exit $? fi # create dummy */Makefile.am.features and ChangeLog to make automake happy @@ -24,8 +25,7 @@ > src/Makefile.am.features touch ChangeLog -gtkdocize || exit $? -autoreconf --force --install --verbose || exit $? +autoreconf --install --verbose || exit $? cd $ORIGDIR test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" diff -Nru cairo-1.12.3+git20120521.aed94a5b/boilerplate/Makefile.in cairo-1.12.3+git20120530.25317dbd/boilerplate/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/boilerplate/Makefile.in 2012-05-22 11:07:49.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/boilerplate/Makefile.in 2012-05-31 07:32:54.000000000 +0000 @@ -1047,9 +1047,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu boilerplate/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign boilerplate/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu boilerplate/Makefile + $(AUTOMAKE) --foreign boilerplate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/build/install-sh cairo-1.12.3+git20120530.25317dbd/build/install-sh --- cairo-1.12.3+git20120521.aed94a5b/build/install-sh 2012-05-22 11:06:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/build/install-sh 2012-05-31 07:31:25.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,10 +156,6 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac shift;; -T) no_target_directory=true;; @@ -190,10 +186,6 @@ fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac done fi @@ -208,11 +200,7 @@ fi if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 + trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -240,9 +228,9 @@ for src do - # Protect names problematic for `test' and other utilities. + # Protect names starting with `-'. case $src in - -* | [=\(\)!]) src=./$src;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -264,7 +252,12 @@ echo "$0: no destination specified." >&2 exit 1 fi + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -392,7 +385,7 @@ case $dstdir in /*) prefix='/';; - [-=\(\)!]*) prefix='./';; + -*) prefix='./';; *) prefix='';; esac @@ -410,7 +403,7 @@ for d do - test X"$d" = X && continue + test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then diff -Nru cairo-1.12.3+git20120521.aed94a5b/ChangeLog cairo-1.12.3+git20120530.25317dbd/ChangeLog --- cairo-1.12.3+git20120521.aed94a5b/ChangeLog 2012-05-22 11:09:40.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/ChangeLog 2012-05-31 07:34:46.000000000 +0000 @@ -1,5 +1,421 @@ # Generated by configure. Do not edit. +commit 25317dbd88e96bb49fa760b50fe705a6a79ee2ec +Author: Yuanhan Liu +Date: Wed May 30 20:55:22 2012 +0800 + + configure.ac: remove annoying change of INSTALL file + + Every time we run ./autogen.sh, the INSTALL file would be replace by + /usr/share/automake-1.11/INSTALL, which changes the file. This is very + annoying since it messes up the result of 'git diff' and git always + wants to commit it. + + Declare it as foreign would fix this annoying issue. Since it's not a + GNU project, it makes sense to do so. + + Signed-off-by: Yuanhan Liu + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f3a1ee5edd1a46e3c316d8555262bce556bc1480 +Author: Chris Wilson +Date: Wed May 30 11:10:34 2012 +0100 + + gl: Do no access ctx after release during map-to-image + + Based on a patch by Yuanhan Liu. + + Signed-off-by: Chris Wilson + + src/cairo-gl-surface.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit 9340fcd965dedf714f658c6ad441787d75c05e59 +Author: Yuanhan Liu +Date: Wed May 30 15:13:46 2012 +0800 + + gl: use _cairo_gl_operand_copy to fix unblanced reference count + + Use _cairo_gl_operand_copy to do the operand copy instead of by + something like *operand = surface->operand. + + This would fix a crash introduced by operator-source test case, which + forgot to do reference while copying operand but did dereference while + destroying surface at combine_clip_as_traps(). + + Signed-off-by: Yuanhan Liu + [ickle: drop the extra reference for the owned surface] + Signed-off-by: Chris Wilson + + src/cairo-gl-operand.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f3ae8302072dbcee38be4e0a9397e5aaa4084ecf +Author: Adrian Johnson +Date: Sun May 27 22:59:13 2012 +0930 + + pdf: merge _emit_recording_surface and _emit_recording_subsurface into the one function + + src/cairo-pdf-surface.c | 112 +++++++++++------------------------------------ + 1 file changed, 26 insertions(+), 86 deletions(-) + +commit 5dd119c1fef0c30bc71311ca9ccacf1f6e8017cf +Author: Adrian Johnson +Date: Sun May 27 22:32:41 2012 +0930 + + ps: check if EXTEND_PAD group can be painted with EXTEND_NONE + + src/cairo-ps-surface.c | 31 +++++++++++++++++++++++++------ + 1 file changed, 25 insertions(+), 6 deletions(-) + +commit fcfa45c9f79ccd855d0a16ee1b0f0fa3b4da7809 +Author: Adrian Johnson +Date: Sun May 27 11:53:43 2012 +0930 + + pdf: fix smask gradient bbox + + src/cairo-pdf-surface.c | 29 ++++++++++++++++++++++++++--- + 1 file changed, 26 insertions(+), 3 deletions(-) + +commit 29a42ae6827dd17d002304aba552ffb83d3f8a2f +Author: Chris Wilson +Date: Sat May 26 15:16:13 2012 +0100 + + surface: Kill imagesurf temporary variable + + The local alias to &image->base is more confusing that the code it + replaces. + + Signed-off-by: Chris Wilson + + src/cairo-surface.c | 19 +++++-------------- + 1 file changed, 5 insertions(+), 14 deletions(-) + +commit 11e276753f0d335027a7727bf17006d612b4e4c2 +Author: Chris Wilson +Date: Sat May 26 15:20:56 2012 +0100 + + image: Propagate errors from clone_subimage + + Signed-off-by: Chris Wilson + + src/cairo-image-surface.c | 26 +++++++++++++++++++------- + 1 file changed, 19 insertions(+), 7 deletions(-) + +commit fc33cc3c3af1fc616ae445a15d2b146a29090b0f +Author: Andrea Canciani +Date: Fri Jan 6 19:47:08 2012 +0100 + + quartz: Provide a valid implementation of map_to_image + + and reuse it to implement acquire_source. + + Fixes + + cairo-quartz-surface.c: In function '_cairo_quartz_surface_map_to_image': + cairo-quartz-surface.c:1568: warning: return from incompatible pointer type + cairo-quartz-surface.c:1576: warning: return from incompatible pointer type + + src/cairo-quartz-surface.c | 203 ++++++++++++++++---------------------------- + 1 file changed, 71 insertions(+), 132 deletions(-) + +commit a8a4a8dfd450a8ce97998b5e5e09971d07a957f4 +Author: Andrea Canciani +Date: Fri Jan 6 20:13:39 2012 +0100 + + quartz: Mark surfaces created clear as is_clear + + This might provide a speedup when clearing an already clear surface + and is required by cairo_surface_create_similar(). + + Fixes zero-mask. + + src/cairo-quartz-surface.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 3735881e38d2bee941128725b8cdde6779d60a30 +Author: Andrea Canciani +Date: Tue Apr 10 22:58:18 2012 +0200 + + quartz: Silence warning + + cairo-quartz-surface.c:177: warning: enumeration value + 'CAIRO_FORMAT_RGB30' not handled in switch + + src/cairo-quartz-surface.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 13b7364836e14b811bbeb3ba0849e6d6c0fb1dd3 +Author: Andrea Canciani +Date: Wed Jan 11 17:17:29 2012 +0100 + + surface: Use the internal map/unmap + + In many places Cairo maps/unmaps surfaces to perform operations on the + raw image, but it doesn't care about the format being invalid. All of + these are appropriate users of _cairo_surface_map_to_image(). + + src/cairo-fallback-compositor.c | 56 ++++++++++++++++++++++----------------- + src/cairo-gl-operand.c | 8 +++--- + src/cairo-surface-observer.c | 6 ++--- + src/cairo-surface.c | 2 -- + src/cairo-xlib-source.c | 16 +++++------ + src/cairoint.h | 2 -- + 6 files changed, 46 insertions(+), 44 deletions(-) + +commit 37c5c2dbe55f64ee84ab248eb0072d5d7c5145cc +Author: Andrea Canciani +Date: Wed Jan 11 20:51:29 2012 +0100 + + surface: Only use non-NULL extents for internal mapping + + _cairo_surface_map_to_image() requires the input extents to be + non-NULL. + + src/cairo-gl-operand.c | 5 ++++- + src/cairo-xlib-source.c | 13 ++++++++++--- + 2 files changed, 14 insertions(+), 4 deletions(-) + +commit d6fb8d2134c989d2ad455ec37ce4f623d4769c46 +Author: Andrea Canciani +Date: Wed Jan 11 17:17:15 2012 +0100 + + surface: Make backend-specific map/unmap functions symmetric + + Map allocates a surface. Symmetrically, unmap should destroy it. + + src/cairo-gl-surface.c | 17 ++++++++++++----- + src/cairo-image-surface.c | 3 +++ + src/cairo-os2-surface.c | 1 + + src/cairo-quartz-image-surface.c | 7 ++----- + src/cairo-quartz-surface.c | 1 + + src/cairo-surface-observer.c | 12 ++---------- + src/cairo-surface-subsurface.c | 12 ++---------- + src/cairo-surface.c | 2 +- + src/cairo-xcb-surface.c | 13 ++++++++++--- + src/cairo-xlib-surface.c | 17 ++++++++++++----- + src/cairo-xlib-xcb-surface.c | 10 ++-------- + 11 files changed, 48 insertions(+), 47 deletions(-) + +commit df7829e2cca07c3bfcddda1c66ca56280edceaf4 +Author: Andrea Canciani +Date: Tue Apr 10 20:15:04 2012 +0200 + + surface: Make map_to_image return cairo_image_surface_t* + + This makes it easier to check that the funciton is returning the + correct type of surfaces. + + src/cairo-directfb-surface.c | 13 +++++++------ + src/cairo-gl-surface.c | 16 ++++++++-------- + src/cairo-image-surface-inline.h | 6 ++++++ + src/cairo-image-surface-private.h | 2 +- + src/cairo-image-surface.c | 4 ++-- + src/cairo-os2-surface.c | 2 +- + src/cairo-quartz-image-surface.c | 2 +- + src/cairo-quartz-surface.c | 2 +- + src/cairo-surface-backend-private.h | 2 +- + src/cairo-surface-observer.c | 2 +- + src/cairo-surface-subsurface.c | 2 +- + src/cairo-surface.c | 2 +- + src/cairo-xcb-surface.c | 18 +++++++++++------- + src/cairo-xlib-surface.c | 4 ++-- + src/cairo-xlib-xcb-surface.c | 2 +- + src/skia/cairo-skia-surface.cpp | 3 ++- + src/win32/cairo-win32-display-surface.c | 8 ++++---- + 17 files changed, 51 insertions(+), 39 deletions(-) + +commit 10c0a1c68c34677273d2f48c5d5a6c1c15a320c0 +Author: Andrea Canciani +Date: Sun Jan 8 15:30:03 2012 +0100 + + surface: Define private map/unmap functions + + Cairo backends often need to map/unmap to a raster surface but they + don't care about the pixel format, as Pixman will be doing the format + handling. + + Cairo users cannot know how to access the raw data if the format is + invalid. + + The two different scenarios call for different guarantees on the + returned surface. + + The private map/unmap functions also makes it possible to simply + return the status upon unmapping. + + src/cairo-image-surface-private.h | 7 ++ + src/cairo-image-surface.c | 41 +++++++ + src/cairo-surface.c | 239 ++++++++++++++++++++++++++----------- + src/cairoint.h | 8 ++ + 4 files changed, 222 insertions(+), 73 deletions(-) + +commit 3e9895e95100ced3a6fcbedcba75e50ca450b4f0 +Author: Andrea Canciani +Date: Mon May 7 19:05:05 2012 +0200 + + png: Implement conversion of CAIRO_FORMAT_RGB30 to string + + Fixes + + png.c:55: warning: enumeration value ‘CAIRO_FORMAT_RGB30’ not handled + in switch + + test/png.c | 1 + + 1 file changed, 1 insertion(+) + +commit afcbb7a2c5c8a05d11e054e09c8c4e53b571a435 +Author: Andrea Canciani +Date: Mon May 14 10:44:31 2012 +0200 + + build: Do not replace existing files + + The existing INSTALL file is currently being replaced at every + autogen.sh run with the default one. + + This is not desired, because INSTALL contains some cairo-specific + information. + + autogen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 38d03ea7488097f2b1194f546bd1331af189b809 +Author: Andrea Canciani +Date: Mon May 14 10:40:49 2012 +0200 + + build: Allow autogen-eration on systems without GTK-doc + + The autogen.sh script fails if it cannot run gtkdocize. The absence of + this command should not cause cairo builds to fail, it should only + prevent the build of its documentation. + + Fixes: + *** No GTK-Doc found, please install it *** + + on systems without gtkdoc tools. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=50356 + + autogen.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 465319ce828f922edce46b6e7628da543b20d5e4 +Author: Chris Wilson +Date: Thu May 24 20:39:34 2012 +0100 + + gl: Use core GL_STENCIL8_DEPTH24 for gl_flavor=desktop + + Jesse complained that --enable-gl --enable-glesv2 wasn't pulling in the + right headers, and in particular GL_STENCIL8_DEPTH24_OES was undefined + but being used. In this case we can simply use the identical + GL_STENCIL8_DEPTH24 instead. + + Reported-by: Jesse Barnes + Signed-off-by: Chris Wilson + + src/cairo-gl-device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 52b7622a6c28193e4259293591b0c78070839f6c +Author: Martin Robinson +Date: Wed May 23 13:59:02 2012 -0700 + + gl: Fix compilation failure for flush cleanup. + + src/cairo-gl-composite.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit bf9c295953fbe86434a8beefa6994c7a07e723fc +Author: Martin Robinson +Date: Wed May 23 11:46:25 2012 -0700 + + gl: Simplify switching between primitive types + + Simplify the code that switches between primitive types by adding + a new member to the context which tracks the currently active + primitive type. + + src/cairo-gl-composite.c | 67 +++++++++++++++++++++++----------------------- + src/cairo-gl-device.c | 1 + + src/cairo-gl-private.h | 7 +++++ + 3 files changed, 41 insertions(+), 34 deletions(-) + +commit f78696249f13c56a1a738b4645d8e2978d67d5ce +Author: Chris Wilson +Date: Wed May 23 12:45:54 2012 +0100 + + test: Increase surface size for get-path-extents + + Whilst generating a glyph run from a string, any glyphs that are far + outside the surface (including a substantial guard region) are culled. + This affects the path extents. Workaround this by increasing the surface + size. + + Signed-off-by: Chris Wilson + + test/get-path-extents.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3ae8bce832cbd21831a26aeb4ac0d808900711f5 +Author: Chris Wilson +Date: Wed May 23 12:26:50 2012 +0100 + + test/record90: Rotate the reference so that it is wholly visible + + Signed-off-by: Chris Wilson + + test/record90.c | 2 +- + test/reference/record90-self-intersecting.argb32.ref.png | Bin 167 -> 0 bytes + test/reference/record90-self-intersecting.ref.png | Bin 0 -> 244 bytes + test/reference/record90-self-intersecting.rgb24.ref.png | Bin 167 -> 0 bytes + 4 files changed, 1 insertion(+), 1 deletion(-) + +commit e73830915b508efa587c6b706d7501a674fdec94 +Author: Chris Wilson +Date: Wed May 23 12:20:50 2012 +0100 + + test: Refresh unbounded-operator + + Apparently this too suffered from bug-bo-collins and is fixed by + (bo-rectangular: Emit subsummed boxes for overlapping edges). + + Signed-off-by: Chris Wilson + + test/reference/unbounded-operator.argb32.ref.png | Bin 2666 -> 2781 bytes + test/reference/unbounded-operator.rgb24.ref.png | Bin 1300 -> 1333 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) + +commit c09be681123388d562822d677db631101a8faa07 +Author: Chris Wilson +Date: Wed May 23 11:38:07 2012 +0100 + + bo-rectangular: Emit subsummed boxes for overlapping edges + + Fixes bug-bo-collins + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49446 + Signed-off-by: Chris Wilson + + src/cairo-bentley-ottmann-rectangular.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 7b2f787d1999bcc351b2e2904322020732939f5f +Author: Chris Wilson +Date: Wed May 23 11:48:30 2012 +0100 + + test: Exercise rectangular bo bug + + Reported-by: S. Christian Collins + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49446 + Signed-off-by: Chris Wilson + + test/Makefile.sources | 1 + + test/bug-bo-collins.c | 76 +++++++++++++++++++++++++++++++++ + test/reference/bug-bo-collins.ref.png | Bin 0 -> 248 bytes + 3 files changed, 77 insertions(+) + commit aed94a5bc650f579368b4b814a8729570c32147e Author: Chris Wilson Date: Sat May 19 10:20:20 2012 +0100 diff -Nru cairo-1.12.3+git20120521.aed94a5b/config.h.in cairo-1.12.3+git20120530.25317dbd/config.h.in --- cairo-1.12.3+git20120521.aed94a5b/config.h.in 2012-05-22 11:06:28.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/config.h.in 2012-05-31 07:31:32.000000000 +0000 @@ -364,6 +364,11 @@ /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff -Nru cairo-1.12.3+git20120521.aed94a5b/configure cairo-1.12.3+git20120530.25317dbd/configure --- cairo-1.12.3+git20120521.aed94a5b/configure 2012-05-22 11:06:26.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/configure 2012-05-31 07:31:31.000000000 +0000 @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for cairo 1.12.3. +# Generated by GNU Autoconf 2.69 for cairo 1.12.3. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -222,21 +246,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -340,6 +368,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -461,6 +497,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -495,16 +535,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -516,28 +556,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1542,8 +1562,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -2023,9 +2041,9 @@ if $ac_init_version; then cat <<\_ACEOF cairo configure 1.12.3 -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2302,7 +2320,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2490,7 +2508,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2526,7 +2544,8 @@ main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2542,7 +2561,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2568,7 +2588,8 @@ main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2584,7 +2605,8 @@ main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2618,7 +2640,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2802,7 +2825,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by cairo $as_me 1.12.3, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3201,7 +3224,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3241,7 +3264,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3294,7 +3317,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3335,7 +3358,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3393,7 +3416,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3437,7 +3460,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3883,8 +3906,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4124,7 +4146,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4190,7 +4212,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4397,8 +4419,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -4471,7 +4493,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -4640,7 +4662,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4680,7 +4702,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4731,7 +4753,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -4784,7 +4806,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5321,7 +5343,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5400,7 +5422,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5656,7 +5678,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5700,7 +5722,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6124,7 +6146,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6164,7 +6186,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6467,7 +6489,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6507,7 +6529,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6607,7 +6629,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6651,7 +6673,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6776,7 +6798,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6816,7 +6838,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6875,7 +6897,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6915,7 +6937,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7564,7 +7586,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7604,7 +7626,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7684,7 +7706,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7724,7 +7746,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7776,7 +7798,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7816,7 +7838,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7868,7 +7890,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7908,7 +7930,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7960,7 +7982,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8000,7 +8022,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8052,7 +8074,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8092,7 +8114,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8330,7 +8352,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8370,7 +8392,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8422,7 +8444,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8462,7 +8484,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8514,7 +8536,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8554,7 +8576,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12650,7 +12672,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12693,7 +12715,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12765,7 +12787,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12807,7 +12829,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12851,7 +12873,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13257,6 +13279,8 @@ esac rm -rf conftest* fi + + fi @@ -13303,7 +13327,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13343,7 +13367,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13388,7 +13412,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13428,7 +13452,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13481,7 +13505,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13522,7 +13546,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -13580,7 +13604,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13624,7 +13648,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13820,8 +13844,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -14071,7 +14094,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14115,7 +14138,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17833,7 +17856,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17876,7 +17899,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -19713,7 +19736,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_SHTOOL="shtool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -19760,7 +19783,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LTP="lcov" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -19797,7 +19820,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LTP_GENHTML="genhtml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -24710,7 +24733,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GS="gs" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -29439,7 +29462,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FREETYPE_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -30376,7 +30399,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GS="gs" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -35379,16 +35402,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -35448,28 +35471,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -35491,7 +35502,7 @@ # values after options handling. ac_log=" This file was extended by cairo $as_me 1.12.3, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -35558,10 +35569,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ cairo config.status 1.12.3 -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -35652,7 +35663,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' diff -Nru cairo-1.12.3+git20120521.aed94a5b/configure.ac cairo-1.12.3+git20120530.25317dbd/configure.ac --- cairo-1.12.3+git20120521.aed94a5b/configure.ac 2012-04-15 08:25:49.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/configure.ac 2012-05-30 20:53:04.000000000 +0000 @@ -11,7 +11,7 @@ AC_CONFIG_SRCDIR(src/cairo.h) AC_CONFIG_HEADERS(config.h) -AM_INIT_AUTOMAKE([1.11 -Wall no-define no-dist-gzip dist-xz]) +AM_INIT_AUTOMAKE([1.11 foreign -Wall no-define no-dist-gzip dist-xz]) AM_SILENT_RULES([yes]) # Initialize libtool diff -Nru cairo-1.12.3+git20120521.aed94a5b/debian/changelog cairo-1.12.3+git20120530.25317dbd/debian/changelog --- cairo-1.12.3+git20120521.aed94a5b/debian/changelog 2012-05-22 12:32:25.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/debian/changelog 2012-05-31 07:53:18.000000000 +0000 @@ -1,8 +1,8 @@ -cairo (1.12.3+git20120521.aed94a5b-0ubuntu0ricotz~precise0) precise; urgency=medium +cairo (1.12.3+git20120530.25317dbd-0ubuntu0ricotz~precise0) precise; urgency=medium * New git snapshot - -- Rico Tzschichholz Tue, 22 May 2012 14:32:25 +0200 + -- Rico Tzschichholz Thu, 31 May 2012 09:53:18 +0200 cairo (1.12.2-1ubuntu1) quantal; urgency=low diff -Nru cairo-1.12.3+git20120521.aed94a5b/debian/patches/02_am-maintainer-mode.patch cairo-1.12.3+git20120530.25317dbd/debian/patches/02_am-maintainer-mode.patch --- cairo-1.12.3+git20120521.aed94a5b/debian/patches/02_am-maintainer-mode.patch 2012-05-22 12:32:25.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/debian/patches/02_am-maintainer-mode.patch 2012-05-31 07:53:18.000000000 +0000 @@ -5,7 +5,7 @@ @@ -12,6 +12,7 @@ AC_CONFIG_HEADERS(config.h) - AM_INIT_AUTOMAKE([1.11 -Wall no-define no-dist-gzip dist-xz]) + AM_INIT_AUTOMAKE([1.11 foreign -Wall no-define no-dist-gzip dist-xz]) +AM_MAINTAINER_MODE AM_SILENT_RULES([yes]) diff -Nru cairo-1.12.3+git20120521.aed94a5b/doc/Makefile.in cairo-1.12.3+git20120530.25317dbd/doc/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/doc/Makefile.in 2012-05-22 11:06:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/doc/Makefile.in 2012-05-31 07:31:32.000000000 +0000 @@ -375,9 +375,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/Makefile + $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/doc/public/html/cairo-cairo-surface-t.html cairo-1.12.3+git20120530.25317dbd/doc/public/html/cairo-cairo-surface-t.html --- cairo-1.12.3+git20120521.aed94a5b/doc/public/html/cairo-cairo-surface-t.html 2012-05-22 11:08:38.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/doc/public/html/cairo-cairo-surface-t.html 2012-05-31 07:33:44.000000000 +0000 @@ -136,7 +136,7 @@ you must use cairo_surface_mark_dirty() after modifying it.

-

Example 1. Directly modifying an image surface

+

Example 1. Directly modifying an image surface

 void
 modify_image_surface (cairo_surface_t *surface)
@@ -1445,10 +1445,13 @@
 may be limited to the extents or NULL for the whole surface
 

-Note, the use of the original surface as a target or source whilst it is -mapped is undefined. The result of mapping the surface multiple times is -undefined. Calling cairo_surface_destroy() or cairo_surface_finish() on the -resulting image surface results in undefined behavior. +Note, the use of the original surface as a target or source whilst +it is mapped is undefined. The result of mapping the surface +multiple times is undefined. Calling cairo_surface_destroy() or +cairo_surface_finish() on the resulting image surface results in +undefined behavior. Changing the device transform of the image +surface or of surface before the image surface is unmapped results +in undefined behavior.

@@ -1467,7 +1470,9 @@ must use cairo_surface_unmap_image() to destroy this image surface. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state -or any other error occurs. +or any other error occurs. If the returned pointer does not have an +error status, it is guaranteed to be an image surface whose format +is not CAIRO_FORMAT_INVALID.
diff -Nru cairo-1.12.3+git20120521.aed94a5b/doc/public/Makefile.in cairo-1.12.3+git20120530.25317dbd/doc/public/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/doc/public/Makefile.in 2012-05-22 11:07:30.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/doc/public/Makefile.in 2012-05-31 07:32:35.000000000 +0000 @@ -1163,9 +1163,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/public/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/public/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/public/Makefile + $(AUTOMAKE) --foreign doc/public/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/doc/public/xml/cairo-surface.xml cairo-1.12.3+git20120530.25317dbd/doc/public/xml/cairo-surface.xml --- cairo-1.12.3+git20120521.aed94a5b/doc/public/xml/cairo-surface.xml 2012-05-22 11:08:37.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/doc/public/xml/cairo-surface.xml 2012-05-31 07:33:43.000000000 +0000 @@ -1051,10 +1051,13 @@ may be limited to the extents or NULL for the whole surface -Note, the use of the original surface as a target or source whilst it is -mapped is undefined. The result of mapping the surface multiple times is -undefined. Calling cairo_surface_destroy() or cairo_surface_finish() on the -resulting image surface results in undefined behavior. +Note, the use of the original surface as a target or source whilst +it is mapped is undefined. The result of mapping the surface +multiple times is undefined. Calling cairo_surface_destroy() or +cairo_surface_finish() on the resulting image surface results in +undefined behavior. Changing the device transform of the image +surface or of surface before the image surface is unmapped results +in undefined behavior. surface : an existing surface used to extract the image from @@ -1064,7 +1067,9 @@ must use cairo_surface_unmap_image() to destroy this image surface. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state -or any other error occurs. +or any other error occurs. If the returned pointer does not have an +error status, it is guaranteed to be an image surface whose format +is not CAIRO_FORMAT_INVALID. Since 1.12 cairo_surface_unmap_image () diff -Nru cairo-1.12.3+git20120521.aed94a5b/INSTALL cairo-1.12.3+git20120530.25317dbd/INSTALL --- cairo-1.12.3+git20120521.aed94a5b/INSTALL 2012-05-22 11:06:32.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/INSTALL 2012-05-22 11:10:45.000000000 +0000 @@ -1,370 +1,184 @@ -Installation Instructions -************************* +Quick-start build instructions +------------------------------ +1) Configure the package: -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, -Inc. + ./configure - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - HP-UX `make' updates targets which have the same time stamps as -their prerequisites, which makes it generally unusable when shipped -generated files such as `configure' are involved. Use GNU `make' -instead. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. +2) Compile it: -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. + make +3) Install it: + + make install + +This final step may require temporary root access (eg. with sudo) if +you don't have write permission to the directory in which cairo will +be installed. + +NOTE: If you are working with source from git/cvs rather than from a tar +file, then you should use ./autogen.sh in place of ./configure +anywhere it is mentioned in these instructions. + +More detailed build instructions +-------------------------------- +1) Configure the package + + The first step in building cairo is to configure the package by + running the configure script. [Note: if you don't have a configure + script, skip down below to the Extremely detailed build + instructions.] + + The configure script attempts to automatically detect as much as + possible about your system. So, you should primarily just accept + its defaults by running: + + ./configure + + The configure script does accept a large number of options for + fine-tuning its behavior. See "./configure --help" for a complete + list. The most commonly used options are discussed here. + + --prefix=PREFIX + + This option specifies the directory under which the software + should be installed. By default configure will choose a + directory such as /usr/local. If you would like to install + cairo to some other location, pass the director to configure + with the --prefix option. For example: + + ./configure --prefix=/opt/cairo + + would install cairo into the /opt/cairo directory. You could + also choose a prefix directory within your home directory if + you don't have write access to any system-wide directory. + + After installing into a custom prefix, you will need to set + some environment variables to allow the software to be + found. Assuming the /opt/cairo prefix and assuming you are + using the bash shell, the following environment variables + should be set: + + PKG_CONFIG_PATH=/opt/cairo/lib/pkgconfig + LD_LIBRARY_PATH=/opt/cairo/lib + export PKG_CONFIG_PATH LD_LIBRARY_PATH + + (NOTE: On Mac OS X, at least, use DYLD_LIBRARY_PATH in place + of LD_LIBRARY_PATH above.) + + --enable-XYZ + --enable-XYZ=yes + --enable-XYZ=auto + --enable-XYZ=no + --disable-XYZ + + Cairo's various font and surface backends and other features can be + enabled or disabled at configure time. Features can be divided into + three categories based on their default state: + + * default=yes: These are the recommended features like PNG functions + and PS/PDF/SVG backends. It is highly recommended to not disable + these features but if that's really what one wants, they can be + disabled using --disable-XYZ. + + * default=auto: These are the "native" features, that is, they are + platform specific, like the Xlib surface backend. You probably + want one or two of these. They will be automatically enabled if + all their required facilities are available. Or you can use + --enable-XYZ or --disable-XYZ to make your desire clear, and then + cairo errs during configure if your intention cannot be followed. + + * default=no: These are the "experimental" features, and hence by + default off. Use --enabled-XYZ to enable them. + + The list of all features and their default state can be seen in the + output of ./configure --help. + +2) Compile the package: + + This step is very simple. Just: + + make + + The Makefiles included with cairo are designed to work on as many + different systems as possible. + + When cairo is compiled, you can also run some automated tests of + cairo with: + + make check + + NOTE: Some versions of X servers will cause the -xlib tests to + report failures in make check even when cairo is working just + fine. If you see failures in nothing but -xlib tests, please + examine the corresponding -xlib-out.png images and compare them to + the -ref.png reference images (the -xlib-diff.png images might also + be useful). If the results seem "close enough" please do not report + a bug against cairo as the "failures" you are seeing are just due + to subtle variations in X server implementations. + +3) Install the package: + + The final step is to install the package with: + + make install + + If you are installing to a system-wide location you may need to + temporarily acquire root access in order to perform this + operation. A good way to do this is to use the sudo program: + + sudo make install + +Extremely detailed build instructions +------------------------------------- +So you want to build cairo but it didn't come with a configure +script. This is probably because you have checked out the latest +in-development code via git. If you need to be on the bleeding edge, +(for example, because you're wanting to develop some aspect of cairo +itself), then you're in the right place and should read on. + +However, if you don't need such a bleeding-edge version of cairo, then +you might prefer to start by building the latest stable cairo release: + + http://cairographics.org/releases + +or perhaps the latest (unstable) development snapshot: + + http://cairographics.org/snapshots + +There you'll find nicely packaged tar files that include a configure +script so you can go back the the simpler instructions above. + +But you're still reading, so you're someone that loves to +learn. Excellent! We hope you'll learn enough to make some excellent +contributions to cairo. Since you're not using a packaged tar file, +you're going to need some additional tools beyond just a C compiler in +order to compile cairo. Specifically, you need the following utilities: + + automake + autoconf + autoheader + aclocal + libtoolize + pkg-config [at least version 0.16] + gtk-doc (recommended) + +Hopefully your platform of choice has packages readily available so +that you can easily install things with your system's package +management tool, (such as "apt-get install automake" on Debian or "yum +install automake" on Fedora, etc.). Note that Mac OS X ships with +glibtoolize instead of libtoolize. + +Once you have all of those packages installed, the next step is to run +the autogen.sh script. That can be as simple as: + + ./autogen.sh + +But before you run that command, note that the autogen.sh script +accepts all the same arguments as the configure script, (and in fact, +will generate the configure script and run it with the arguments you +provide). So go back up to step (1) above and see what additional +arguments you might want to pass, (such as prefix). Then continue with +the instructions, simply using ./autogen.sh in place of ./configure. + +Happy hacking! diff -Nru cairo-1.12.3+git20120521.aed94a5b/Makefile.in cairo-1.12.3+git20120530.25317dbd/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/Makefile.in 2012-05-22 11:06:32.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/Makefile.in 2012-05-31 07:31:36.000000000 +0000 @@ -488,15 +488,15 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/perf/Makefile.in cairo-1.12.3+git20120530.25317dbd/perf/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/perf/Makefile.in 2012-05-22 11:06:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/perf/Makefile.in 2012-05-31 07:31:33.000000000 +0000 @@ -590,9 +590,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu perf/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign perf/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu perf/Makefile + $(AUTOMAKE) --foreign perf/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/perf/micro/Makefile.in cairo-1.12.3+git20120530.25317dbd/perf/micro/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/perf/micro/Makefile.in 2012-05-22 11:06:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/perf/micro/Makefile.in 2012-05-31 07:31:33.000000000 +0000 @@ -443,9 +443,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu perf/micro/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign perf/micro/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu perf/micro/Makefile + $(AUTOMAKE) --foreign perf/micro/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-bentley-ottmann-rectangular.c cairo-1.12.3+git20120530.25317dbd/src/cairo-bentley-ottmann-rectangular.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-bentley-ottmann-rectangular.c 2012-04-19 15:28:24.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-bentley-ottmann-rectangular.c 2012-05-24 06:37:16.000000000 +0000 @@ -487,6 +487,8 @@ } if (winding == 0) { + if (left->right != NULL) + edge_end_box (sweep, left, top); pos = right; continue; } @@ -557,7 +559,7 @@ } static inline cairo_bool_t -sweep_line_delete (sweep_line_t *sweep, rectangle_t *rectangle) +sweep_line_delete (sweep_line_t *sweep, rectangle_t *rectangle) { cairo_bool_t update; @@ -651,7 +653,6 @@ active_edges_to_traps (&sweep_line); update = FALSE; } - sweep_line.current_y = rectangle->bottom; } diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-directfb-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-directfb-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-directfb-surface.c 2012-03-22 22:31:51.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-directfb-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -40,7 +40,7 @@ #include "cairo-compositor-private.h" #include "cairo-default-context-private.h" #include "cairo-error-private.h" -#include "cairo-image-surface-private.h" +#include "cairo-image-surface-inline.h" #include "cairo-pattern-private.h" #include "cairo-surface-backend-private.h" #include "cairo-surface-fallback-private.h" @@ -171,7 +171,7 @@ return _cairo_image_surface_finish (abstract_surface); } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_dfb_surface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { @@ -184,7 +184,7 @@ int pitch; if (buffer->Lock (buffer, DSLF_READ | DSLF_WRITE, &data, &pitch)) - return _cairo_surface_create_in_error(_cairo_error (CAIRO_STATUS_NO_MEMORY)); + return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); image = pixman_image_create_bits (surface->image.pixman_format, surface->image.width, @@ -192,19 +192,20 @@ data, pitch); if (image == NULL) { buffer->Unlock (buffer); - return _cairo_surface_create_in_error(_cairo_error (CAIRO_STATUS_NO_MEMORY)); + return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } _cairo_image_surface_init (&surface->image, image, surface->image.pixman_format); } - return _cairo_image_surface_map_to_image (&surface->image, extents); + return _cairo_surface_map_to_image (&surface->image.base, extents); } static cairo_int_status_t _cairo_dfb_surface_unmap_image (void *abstract_surface, cairo_image_surface_t *image) { - return CAIRO_INT_STATUS_SUCCESS; + cairo_dfb_surface_t *surface = abstract_surface; + return _cairo_surface_unmap_image (&surface->image.base, image); } static cairo_status_t diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-fallback-compositor.c cairo-1.12.3+git20120530.25317dbd/src/cairo-fallback-compositor.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-fallback-compositor.c 2012-03-01 20:07:54.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-fallback-compositor.c 2012-05-27 08:23:45.000000000 +0000 @@ -42,6 +42,7 @@ #include "cairoint.h" #include "cairo-compositor-private.h" +#include "cairo-image-surface-private.h" #include "cairo-surface-offset-private.h" /* high-level compositor interface */ @@ -50,41 +51,43 @@ _cairo_fallback_compositor_paint (const cairo_compositor_t *_compositor, cairo_composite_rectangles_t *extents) { - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); - image = cairo_surface_map_to_image (extents->surface, &extents->unbounded); - status = _cairo_surface_offset_paint (image, + + image = _cairo_surface_map_to_image (extents->surface, &extents->unbounded); + + status = _cairo_surface_offset_paint (&image->base, extents->unbounded.x, extents->unbounded.y, extents->op, &extents->source_pattern.base, extents->clip); - cairo_surface_unmap_image (extents->surface, image); - return status; + return _cairo_surface_unmap_image (extents->surface, image); } static cairo_int_status_t _cairo_fallback_compositor_mask (const cairo_compositor_t *_compositor, cairo_composite_rectangles_t *extents) { - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); - image = cairo_surface_map_to_image (extents->surface, &extents->unbounded); - status = _cairo_surface_offset_mask (image, + + image = _cairo_surface_map_to_image (extents->surface, &extents->unbounded); + + status = _cairo_surface_offset_mask (&image->base, extents->unbounded.x, extents->unbounded.y, extents->op, &extents->source_pattern.base, &extents->mask_pattern.base, extents->clip); - cairo_surface_unmap_image (extents->surface, image); - return status; + return _cairo_surface_unmap_image (extents->surface, image); } static cairo_int_status_t @@ -97,12 +100,14 @@ double tolerance, cairo_antialias_t antialias) { - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); - image = cairo_surface_map_to_image (extents->surface, &extents->unbounded); - status = _cairo_surface_offset_stroke (image, + + image = _cairo_surface_map_to_image (extents->surface, &extents->unbounded); + + status = _cairo_surface_offset_stroke (&image->base, extents->unbounded.x, extents->unbounded.y, extents->op, @@ -112,9 +117,8 @@ tolerance, antialias, extents->clip); - cairo_surface_unmap_image (extents->surface, image); - return status; + return _cairo_surface_unmap_image (extents->surface, image); } static cairo_int_status_t @@ -125,12 +129,14 @@ double tolerance, cairo_antialias_t antialias) { - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); - image = cairo_surface_map_to_image (extents->surface, &extents->unbounded); - status = _cairo_surface_offset_fill (image, + + image = _cairo_surface_map_to_image (extents->surface, &extents->unbounded); + + status = _cairo_surface_offset_fill (&image->base, extents->unbounded.x, extents->unbounded.y, extents->op, @@ -138,9 +144,8 @@ path, fill_rule, tolerance, antialias, extents->clip); - cairo_surface_unmap_image (extents->surface, image); - return status; + return _cairo_surface_unmap_image (extents->surface, image); } static cairo_int_status_t @@ -151,21 +156,22 @@ int num_glyphs, cairo_bool_t overlap) { - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); - image = cairo_surface_map_to_image (extents->surface, &extents->unbounded); - status = _cairo_surface_offset_glyphs (image, + + image = _cairo_surface_map_to_image (extents->surface, &extents->unbounded); + + status = _cairo_surface_offset_glyphs (&image->base, extents->unbounded.x, extents->unbounded.y, extents->op, &extents->source_pattern.base, scaled_font, glyphs, num_glyphs, extents->clip); - cairo_surface_unmap_image (extents->surface, image); - return status; + return _cairo_surface_unmap_image (extents->surface, image); } const cairo_compositor_t _cairo_fallback_compositor = { diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-composite.c cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-composite.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-composite.c 2012-05-22 10:04:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-composite.c 2012-05-24 06:37:16.000000000 +0000 @@ -707,7 +707,6 @@ cairo_array_t* indices = &ctx->tristrip_indices; const unsigned short *indices_array = _cairo_array_index_const (indices, 0); - if (ctx->pre_shader) { cairo_gl_shader_t *prev_shader = ctx->current_shader; @@ -724,8 +723,8 @@ } static inline void -_cairo_gl_composite_draw (cairo_gl_context_t *ctx, - unsigned int count) +_cairo_gl_composite_draw_triangles (cairo_gl_context_t *ctx, + unsigned int count) { if (! ctx->pre_shader) { glDrawArrays (GL_TRIANGLES, 0, count); @@ -743,6 +742,27 @@ } static void +_cairo_gl_composite_draw_triangles_with_clip_region (cairo_gl_context_t *ctx, + unsigned int count) +{ + int i, num_rectangles; + + if (!ctx->clip_region) { + _cairo_gl_composite_draw_triangles (ctx, count); + return; + } + + num_rectangles = cairo_region_num_rectangles (ctx->clip_region); + for (i = 0; i < num_rectangles; i++) { + cairo_rectangle_int_t rect; + cairo_region_get_rectangle (ctx->clip_region, i, &rect); + + glScissor (rect.x, rect.y, rect.width, rect.height); + _cairo_gl_composite_draw_triangles (ctx, count); + } +} + +static void _cairo_gl_composite_unmap_vertex_buffer (cairo_gl_context_t *ctx) { ctx->vb_offset = 0; @@ -760,46 +780,25 @@ count = ctx->vb_offset / ctx->vertex_size; _cairo_gl_composite_unmap_vertex_buffer (ctx); - if ( _cairo_array_num_elements (&ctx->tristrip_indices) > 0) { + if (ctx->primitive_type == CAIRO_GL_PRIMITIVE_TYPE_TRISTRIPS) { _cairo_gl_composite_draw_tristrip (ctx); - } else if (ctx->clip_region) { - int i, num_rectangles = cairo_region_num_rectangles (ctx->clip_region); - - for (i = 0; i < num_rectangles; i++) { - cairo_rectangle_int_t rect; - - cairo_region_get_rectangle (ctx->clip_region, i, &rect); - - glScissor (rect.x, rect.y, rect.width, rect.height); - _cairo_gl_composite_draw (ctx, count); - } } else { - _cairo_gl_composite_draw (ctx, count); + assert (ctx->primitive_type == CAIRO_GL_PRIMITIVE_TYPE_TRIANGLES); + _cairo_gl_composite_draw_triangles_with_clip_region (ctx, count); } for (i = 0; i < ARRAY_LENGTH (&ctx->glyph_cache); i++) _cairo_gl_glyph_cache_unlock (&ctx->glyph_cache[i]); } -typedef enum cairo_gl_geometry { - CAIRO_GL_GEOMETRY_TYPE_TRIANGLES, - CAIRO_GL_GEOMETRY_TYPE_TRISTRIPS -} cairo_gl_geometry_t; - static void _cairo_gl_composite_prepare_buffer (cairo_gl_context_t *ctx, unsigned int n_vertices, - cairo_gl_geometry_t geometry_type) + cairo_gl_primitive_type_t primitive_type) { - cairo_gl_dispatch_t *dispatch = &ctx->dispatch; - - size_t tristrip_indices =_cairo_array_num_elements (&ctx->tristrip_indices); - if (geometry_type == CAIRO_GL_GEOMETRY_TYPE_TRIANGLES && - tristrip_indices != 0) { - _cairo_gl_composite_flush (ctx); - } else if (geometry_type == CAIRO_GL_GEOMETRY_TYPE_TRISTRIPS && - ! _cairo_gl_context_is_flushed (ctx) && tristrip_indices == 0) { + if (ctx->primitive_type != primitive_type) { _cairo_gl_composite_flush (ctx); + ctx->primitive_type = primitive_type; } if (ctx->vb_offset + n_vertices * ctx->vertex_size > CAIRO_GL_VBO_SIZE) @@ -856,7 +855,7 @@ uint8_t alpha) { _cairo_gl_composite_prepare_buffer (ctx, 6, - CAIRO_GL_GEOMETRY_TYPE_TRIANGLES); + CAIRO_GL_PRIMITIVE_TYPE_TRIANGLES); _cairo_gl_composite_emit_vertex (ctx, x1, y1, alpha); _cairo_gl_composite_emit_vertex (ctx, x2, y1, alpha); @@ -899,7 +898,7 @@ GLfloat glyph_y2) { _cairo_gl_composite_prepare_buffer (ctx, 6, - CAIRO_GL_GEOMETRY_TYPE_TRIANGLES); + CAIRO_GL_PRIMITIVE_TYPE_TRIANGLES); _cairo_gl_composite_emit_glyph_vertex (ctx, x1, y1, glyph_x1, glyph_y1); _cairo_gl_composite_emit_glyph_vertex (ctx, x2, y1, glyph_x2, glyph_y1); @@ -987,7 +986,7 @@ const cairo_point_t quad[4]) { _cairo_gl_composite_prepare_buffer (ctx, 4, - CAIRO_GL_GEOMETRY_TYPE_TRISTRIPS); + CAIRO_GL_PRIMITIVE_TYPE_TRISTRIPS); _cairo_gl_composite_emit_point (ctx, &quad[0], 0); _cairo_gl_composite_emit_point (ctx, &quad[1], 0); @@ -1007,7 +1006,7 @@ const cairo_point_t triangle[3]) { _cairo_gl_composite_prepare_buffer (ctx, 3, - CAIRO_GL_GEOMETRY_TYPE_TRISTRIPS); + CAIRO_GL_PRIMITIVE_TYPE_TRISTRIPS); _cairo_gl_composite_emit_point (ctx, &triangle[0], 0); _cairo_gl_composite_emit_point (ctx, &triangle[1], 0); diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-device.c cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-device.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-device.c 2012-05-22 10:04:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-device.c 2012-05-25 04:40:54.000000000 +0000 @@ -273,6 +273,7 @@ return _cairo_error (CAIRO_STATUS_NO_MEMORY); } + ctx->primitive_type = CAIRO_GL_PRIMITIVE_TYPE_TRIANGLES; _cairo_array_init (&ctx->tristrip_indices, sizeof (unsigned short)); /* PBO for any sort of texture upload */ @@ -318,7 +319,7 @@ #if CAIRO_HAS_GLESV2_SURFACE if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP) - return GL_DEPTH24_STENCIL8_OES; + return GL_DEPTH24_STENCIL8; #endif #if CAIRO_HAS_GL_SURFACE diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-operand.c cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-operand.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-operand.c 2012-05-22 10:04:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-operand.c 2012-05-30 20:53:04.000000000 +0000 @@ -223,7 +223,7 @@ * (unnormalized src -> unnormalized src) to * (unnormalized dst -> unnormalized src) */ - *operand = surface->operand; + _cairo_gl_operand_copy(operand, &surface->operand); attributes = &operand->texture.attributes; attributes->matrix = src->base.matrix; @@ -270,7 +270,7 @@ if (unlikely (status)) return status; - *operand = surface->operand; + _cairo_gl_operand_copy(operand, &surface->operand); attributes = &operand->texture.attributes; cairo_matrix_multiply (&attributes->matrix, @@ -292,8 +292,9 @@ cairo_status_t status; cairo_gl_surface_t *surface; cairo_gl_context_t *ctx; - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_bool_t src_is_gl_surface = FALSE; + cairo_rectangle_int_t map_extents; if (_src->type == CAIRO_PATTERN_TYPE_SURFACE) { cairo_surface_t* src_surface = ((cairo_surface_pattern_t *) _src)->surface; @@ -308,7 +309,9 @@ _cairo_gl_surface_create_scratch (ctx, CAIRO_CONTENT_COLOR_ALPHA, extents->width, extents->height); - image = cairo_surface_map_to_image (&surface->base, NULL); + map_extents = *extents; + map_extents.x = map_extents.y = 0; + image = _cairo_surface_map_to_image (&surface->base, &map_extents); /* If the pattern is a GL surface, it belongs to some other GL context, so we need to release this device while we paint it to the image. */ @@ -318,7 +321,7 @@ goto fail; } - status = _cairo_surface_offset_paint (image, extents->x, extents->y, + status = _cairo_surface_offset_paint (&image->base, extents->x, extents->y, CAIRO_OPERATOR_SOURCE, _src, NULL); if (src_is_gl_surface) { @@ -327,7 +330,7 @@ goto fail; } - cairo_surface_unmap_image (&surface->base, image); + status = _cairo_surface_unmap_image (&surface->base, image); status = _cairo_gl_context_release (ctx, status); if (unlikely (status)) goto fail; diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-private.h cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-private.h --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-private.h 2012-05-22 10:04:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-private.h 2012-05-24 06:37:16.000000000 +0000 @@ -213,6 +213,11 @@ CAIRO_GL_VAR_TEXCOORDS, } cairo_gl_var_type_t; +typedef enum cairo_gl_primitive_type { + CAIRO_GL_PRIMITIVE_TYPE_TRIANGLES, + CAIRO_GL_PRIMITIVE_TYPE_TRISTRIPS +} cairo_gl_primitive_type_t; + #define cairo_gl_var_type_hash(src,mask,spans,dest) ((spans) << 3) | ((mask) << 2 | (src << 1) | (dest)) #define CAIRO_GL_VAR_TYPE_MAX ((CAIRO_GL_VAR_TEXCOORDS << 3) | (CAIRO_GL_VAR_TEXCOORDS << 2) | (CAIRO_GL_VAR_TEXCOORDS << 1) | CAIRO_GL_VAR_TEXCOORDS) @@ -334,6 +339,8 @@ unsigned int vertex_size; cairo_region_t *clip_region; cairo_clip_t *clip; + + cairo_gl_primitive_type_t primitive_type; cairo_array_t tristrip_indices; cairo_bool_t has_mesa_pack_invert; diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-gl-surface.c 2012-05-22 10:04:29.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-gl-surface.c 2012-05-30 20:53:04.000000000 +0000 @@ -46,7 +46,7 @@ #include "cairo-compositor-private.h" #include "cairo-default-context-private.h" #include "cairo-error-private.h" -#include "cairo-image-surface-private.h" +#include "cairo-image-surface-inline.h" #include "cairo-surface-backend-private.h" static const cairo_surface_backend_t _cairo_gl_surface_backend; @@ -985,7 +985,7 @@ return _cairo_gl_context_release (ctx, status); } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_gl_surface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { @@ -995,7 +995,7 @@ GLenum format, type; pixman_format_code_t pixman_format; unsigned int cpp; - cairo_bool_t invert; + cairo_bool_t flipped, mesa_invert; cairo_status_t status; int y; @@ -1050,15 +1050,15 @@ extents->height, -1); if (unlikely (image->base.status)) - return &image->base; + return image; if (surface->base.serial == 0) - return &image->base; + return image; status = _cairo_gl_context_acquire (surface->base.device, &ctx); if (unlikely (status)) { cairo_surface_destroy (&image->base); - return _cairo_surface_create_in_error (status); + return _cairo_image_surface_create_in_error (status); } cairo_surface_set_device_offset (&image->base, -extents->x, -extents->y); @@ -1070,42 +1070,42 @@ _cairo_gl_composite_flush (ctx); _cairo_gl_context_set_destination (ctx, surface, FALSE); - invert = ! _cairo_gl_surface_is_texture (surface) && - ctx->has_mesa_pack_invert; + flipped = ! _cairo_gl_surface_is_texture (surface); + mesa_invert = flipped && ctx->has_mesa_pack_invert; glPixelStorei (GL_PACK_ALIGNMENT, 4); if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP) glPixelStorei (GL_PACK_ROW_LENGTH, image->stride / cpp); - if (invert) + if (mesa_invert) glPixelStorei (GL_PACK_INVERT_MESA, 1); y = extents->y; - if (! _cairo_gl_surface_is_texture (surface)) + if (flipped) y = surface->height - extents->y - extents->height; glReadPixels (extents->x, y, extents->width, extents->height, format, type, image->data); - if (invert) + if (mesa_invert) glPixelStorei (GL_PACK_INVERT_MESA, 0); status = _cairo_gl_context_release (ctx, status); if (unlikely (status)) { cairo_surface_destroy (&image->base); - return _cairo_surface_create_in_error (status); + return _cairo_image_surface_create_in_error (status); } /* We must invert the image manualy if we lack GL_MESA_pack_invert */ - if (! ctx->has_mesa_pack_invert && ! _cairo_gl_surface_is_texture (surface)) { + if (flipped && ! mesa_invert) { uint8_t stack[1024], *row = stack; uint8_t *top = image->data; uint8_t *bot = image->data + (image->height-1)*image->stride; - if (image->stride > sizeof(stack)) { + if (image->stride > (int)sizeof(stack)) { row = malloc (image->stride); if (unlikely (row == NULL)) { cairo_surface_destroy (&image->base); - return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); + return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } } @@ -1121,7 +1121,7 @@ free(row); } - return &image->base; + return image; } static cairo_surface_t * @@ -1170,11 +1170,18 @@ _cairo_gl_surface_unmap_image (void *abstract_surface, cairo_image_surface_t *image) { - return _cairo_gl_surface_draw_image (abstract_surface, image, - 0, 0, - image->width, image->height, - image->base.device_transform_inverse.x0, - image->base.device_transform_inverse.y0); + cairo_int_status_t status; + + status = _cairo_gl_surface_draw_image (abstract_surface, image, + 0, 0, + image->width, image->height, + image->base.device_transform_inverse.x0, + image->base.device_transform_inverse.y0); + + cairo_surface_finish (&image->base); + cairo_surface_destroy (&image->base); + + return status; } static cairo_bool_t diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-image-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-image-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-image-surface.c 2012-04-28 06:19:25.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-image-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -794,7 +794,7 @@ return &clone->base; } -cairo_surface_t * +cairo_image_surface_t * _cairo_image_surface_map_to_image (void *abstract_other, const cairo_rectangle_int_t *extents) { @@ -814,13 +814,16 @@ other->stride); cairo_surface_set_device_offset (surface, -extents->x, -extents->y); - return surface; + return (cairo_image_surface_t *) surface; } cairo_int_status_t _cairo_image_surface_unmap_image (void *abstract_surface, cairo_image_surface_t *image) { + cairo_surface_finish (&image->base); + cairo_surface_destroy (&image->base); + return CAIRO_INT_STATUS_SUCCESS; } @@ -1202,3 +1205,56 @@ return image->color = CAIRO_IMAGE_IS_COLOR; } + +static const cairo_user_data_key_t clone_key; + +cairo_image_surface_t * +_cairo_image_surface_clone_subimage (cairo_surface_t *surface, + const cairo_rectangle_int_t *extents) +{ + cairo_surface_t *image; + cairo_surface_pattern_t pattern; + cairo_status_t status; + + image = cairo_surface_create_similar_image (surface, + _cairo_format_from_content (surface->content), + extents->width, + extents->height); + if (image->status) + return to_image_surface (image); + + /* TODO: check me with non-identity device_transform. Should we + * clone the scaling, too? */ + cairo_surface_set_device_offset (image, + -extents->x, + -extents->y); + + _cairo_pattern_init_for_surface (&pattern, surface); + pattern.base.filter = CAIRO_FILTER_NEAREST; + + status = _cairo_surface_paint (image, + CAIRO_OPERATOR_SOURCE, + &pattern.base, + NULL); + + _cairo_pattern_fini (&pattern.base); + + if (unlikely (status)) + goto error; + + status = cairo_surface_set_user_data (image, &clone_key, surface, NULL); + if (unlikely (status)) + goto error; + + return to_image_surface (image); + +error: + cairo_surface_destroy (image); + return to_image_surface (_cairo_surface_create_in_error (status)); +} + +cairo_bool_t +_cairo_image_surface_is_clone (cairo_image_surface_t *image) +{ + return cairo_surface_get_user_data (&image->base, &clone_key) != NULL; +} diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-image-surface-inline.h cairo-1.12.3+git20120530.25317dbd/src/cairo-image-surface-inline.h --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-image-surface-inline.h 2012-04-19 15:28:24.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-image-surface-inline.h 2012-05-27 08:23:45.000000000 +0000 @@ -42,6 +42,12 @@ CAIRO_BEGIN_DECLS +static inline cairo_image_surface_t * +_cairo_image_surface_create_in_error (cairo_status_t status) +{ + return (cairo_image_surface_t *) _cairo_surface_create_in_error (status); +} + static inline void _cairo_image_surface_set_parent (cairo_image_surface_t *image, cairo_surface_t *parent) diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-image-surface-private.h cairo-1.12.3+git20120530.25317dbd/src/cairo-image-surface-private.h --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-image-surface-private.h 2012-04-19 15:28:24.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-image-surface-private.h 2012-05-27 08:23:45.000000000 +0000 @@ -151,7 +151,7 @@ pixman_image_t *pixman_image, pixman_format_code_t pixman_format); -cairo_private cairo_surface_t * +cairo_private cairo_image_surface_t * _cairo_image_surface_map_to_image (void *abstract_other, const cairo_rectangle_int_t *extents); @@ -216,6 +216,13 @@ int dst_x, int dst_y, cairo_tristrip_t *strip); +cairo_private cairo_image_surface_t * +_cairo_image_surface_clone_subimage (cairo_surface_t *surface, + const cairo_rectangle_int_t *extents); + +cairo_private cairo_bool_t +_cairo_image_surface_is_clone (cairo_image_surface_t *surface); + CAIRO_END_DECLS #endif /* CAIRO_IMAGE_SURFACE_PRIVATE_H */ diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairoint.h cairo-1.12.3+git20120530.25317dbd/src/cairoint.h --- cairo-1.12.3+git20120521.aed94a5b/src/cairoint.h 2012-05-15 05:39:20.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairoint.h 2012-05-27 08:23:45.000000000 +0000 @@ -1304,6 +1304,14 @@ const cairo_pattern_t *source, const cairo_clip_t *clip); +cairo_private cairo_image_surface_t * +_cairo_surface_map_to_image (cairo_surface_t *surface, + const cairo_rectangle_int_t *extents); + +cairo_private cairo_int_status_t +_cairo_surface_unmap_image (cairo_surface_t *surface, + cairo_image_surface_t *image); + cairo_private cairo_status_t _cairo_surface_mask (cairo_surface_t *surface, cairo_operator_t op, @@ -1914,7 +1922,6 @@ slim_hidden_proto (cairo_surface_get_mime_data); slim_hidden_proto (cairo_surface_get_type); slim_hidden_proto (cairo_surface_has_show_text_glyphs); -slim_hidden_proto (cairo_surface_map_to_image); slim_hidden_proto (cairo_surface_mark_dirty); slim_hidden_proto (cairo_surface_mark_dirty_rectangle); slim_hidden_proto_no_warn (cairo_surface_reference); @@ -1924,7 +1931,6 @@ slim_hidden_proto (cairo_surface_show_page); slim_hidden_proto (cairo_surface_status); slim_hidden_proto (cairo_surface_supports_mime_type); -slim_hidden_proto (cairo_surface_unmap_image); slim_hidden_proto (cairo_text_cluster_allocate); slim_hidden_proto (cairo_text_cluster_free); slim_hidden_proto (cairo_toy_font_face_create); diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-os2-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-os2-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-os2-surface.c 2012-03-10 11:28:21.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-os2-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -585,7 +585,7 @@ DosReleaseMutexSem (surface->hmtx_use_private_fields); } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_os2_surface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { @@ -596,6 +596,7 @@ surface->pixel_array_lend_count++; DosReleaseMutexSem (local_os2_surface->hmtx_use_private_fields); + /* XXX: BROKEN! */ *image_out = _cairo_surface_create_for_rectangle_int (surface->image_surface, extents); diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-pdf-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-pdf-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-pdf-surface.c 2012-05-17 20:03:14.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-pdf-surface.c 2012-05-27 15:18:55.000000000 +0000 @@ -2681,11 +2681,28 @@ int alpha = 0; cairo_surface_t *free_me = NULL; cairo_surface_t *source; + const cairo_rectangle_int_t *extents; + int width; + int height; + cairo_bool_t is_subsurface; assert (pdf_source->type == CAIRO_PATTERN_TYPE_SURFACE); + extents = &pdf_source->hash_entry->extents; + width = pdf_source->hash_entry->width; + height = pdf_source->hash_entry->height; + is_subsurface = FALSE; source = pdf_source->surface; - if (_cairo_surface_is_snapshot (source)) + if (_cairo_surface_is_snapshot (source)) { free_me = source = _cairo_surface_snapshot_get_target (source); + } else if (source->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) { + cairo_surface_subsurface_t *sub = (cairo_surface_subsurface_t *) source; + + source = sub->target; + extents = &sub->extents; + width = extents->width; + height = extents->height; + is_subsurface = TRUE; + } old_width = surface->width; old_height = surface->height; @@ -2694,16 +2711,15 @@ _cairo_surface_clipper_init (&surface->clipper, _cairo_pdf_surface_clipper_intersect_clip_path); - _cairo_pdf_surface_set_size_internal (surface, - pdf_source->hash_entry->width, - pdf_source->hash_entry->height); + _cairo_pdf_surface_set_size_internal (surface, width, height); + /* Patterns are emitted after fallback images. The paginated mode * needs to be set to _RENDER while the recording surface is replayed * back to this surface. */ surface->paginated_mode = CAIRO_PAGINATED_MODE_RENDER; _cairo_pdf_group_resources_clear (&surface->resources); - _get_bbox_from_extents (pdf_source->hash_entry->height, &pdf_source->hash_entry->extents, &bbox); + _get_bbox_from_extents (height, extents, &bbox); status = _cairo_pdf_surface_open_content_stream (surface, &bbox, &pdf_source->hash_entry->surface_res, TRUE); if (unlikely (status)) goto err; @@ -2721,7 +2737,7 @@ } status = _cairo_recording_surface_replay_region (source, - NULL, + is_subsurface ? extents : NULL, &surface->base, CAIRO_RECORDING_REGION_NATIVE); assert (status != CAIRO_INT_STATUS_UNSUPPORTED); @@ -2743,89 +2759,13 @@ } static cairo_status_t -_cairo_pdf_surface_emit_recording_subsurface (cairo_pdf_surface_t *surface, - cairo_surface_t *recording_surface, - const cairo_rectangle_int_t *extents, - cairo_pdf_resource_t resource) -{ - double old_width, old_height; - cairo_paginated_mode_t old_paginated_mode; - cairo_surface_clipper_t old_clipper; - cairo_box_double_t bbox; - cairo_int_status_t status; - int alpha = 0; - - old_width = surface->width; - old_height = surface->height; - old_paginated_mode = surface->paginated_mode; - old_clipper = surface->clipper; - _cairo_surface_clipper_init (&surface->clipper, - _cairo_pdf_surface_clipper_intersect_clip_path); - - _cairo_pdf_surface_set_size_internal (surface, - extents->width, - extents->height); - /* Patterns are emitted after fallback images. The paginated mode - * needs to be set to _RENDER while the recording surface is replayed - * back to this surface. - */ - surface->paginated_mode = CAIRO_PAGINATED_MODE_RENDER; - _cairo_pdf_group_resources_clear (&surface->resources); - _get_bbox_from_extents (extents->height, extents, &bbox); - status = _cairo_pdf_surface_open_content_stream (surface, &bbox, &resource, TRUE); - if (unlikely (status)) - return status; - - if (cairo_surface_get_content (recording_surface) == CAIRO_CONTENT_COLOR) { - status = _cairo_pdf_surface_add_alpha (surface, 1.0, &alpha); - if (unlikely (status)) - return status; - - _cairo_output_stream_printf (surface->output, - "q /a%d gs 0 0 0 rg 0 0 %f %f re f Q\n", - alpha, - surface->width, - surface->height); - } - - status = _cairo_recording_surface_replay_region (recording_surface, - extents, - &surface->base, - CAIRO_RECORDING_REGION_NATIVE); - assert (status != CAIRO_INT_STATUS_UNSUPPORTED); - if (unlikely (status)) - return status; - - status = _cairo_pdf_surface_close_content_stream (surface); - - _cairo_surface_clipper_reset (&surface->clipper); - surface->clipper = old_clipper; - _cairo_pdf_surface_set_size_internal (surface, - old_width, - old_height); - surface->paginated_mode = old_paginated_mode; - - return status; -} - -static cairo_status_t _cairo_pdf_surface_emit_surface (cairo_pdf_surface_t *surface, cairo_pdf_source_surface_t *src_surface) { - if (src_surface->type == CAIRO_PATTERN_TYPE_SURFACE) { - if (src_surface->surface->type == CAIRO_SURFACE_TYPE_RECORDING) { - if (src_surface->surface->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) { - cairo_surface_subsurface_t *sub = (cairo_surface_subsurface_t *) src_surface->surface; - return _cairo_pdf_surface_emit_recording_subsurface (surface, - sub->target, - &sub->extents, - src_surface->hash_entry->surface_res); - } else { - return _cairo_pdf_surface_emit_recording_surface (surface, - src_surface); - } - } - } + if (src_surface->type == CAIRO_PATTERN_TYPE_SURFACE && + src_surface->surface->type == CAIRO_SURFACE_TYPE_RECORDING) + return _cairo_pdf_surface_emit_recording_surface (surface, src_surface); + return _cairo_pdf_surface_emit_image_surface (surface, src_surface); } @@ -3442,6 +3382,7 @@ cairo_pdf_resource_t smask_resource; cairo_status_t status; char buf[100]; + double x1, y1, x2, y2; if (pdf_pattern->is_shading) { snprintf(buf, sizeof(buf), @@ -3457,13 +3398,36 @@ gradient_mask.id); } + if (pdf_pattern->is_shading) { + cairo_box_t box; + + /* When emitting a shading operator we are in cairo pattern + * coordinates. _cairo_pdf_surface_paint_gradient has set the + * ctm to the pattern matrix (including the convertion from + * pdf to cairo coordinates) */ + _cairo_box_from_rectangle (&box, &pdf_pattern->extents); + _cairo_box_to_doubles (&box, &x1, &y1, &x2, &y2); + _cairo_matrix_transform_bounding_box (&pdf_pattern->pattern->matrix, &x1, &y1, &x2, &y2, NULL); + } else { + cairo_box_double_t box; + + /* When emitting a shading pattern we are in pdf page + * coordinates. The color and alpha shading patterns painted + * in the XObject below contain the cairo pattern to pdf page + * matrix in the /Matrix entry of the pattern. */ + _get_bbox_from_extents (pdf_pattern->height, &pdf_pattern->extents, &box); + x1 = box.p1.x; + y1 = box.p1.y; + x2 = box.p2.x; + y2 = box.p2.y; + } status = _cairo_pdf_surface_open_stream (surface, NULL, surface->compress_content, " /Type /XObject\n" " /Subtype /Form\n" " /FormType 1\n" - " /BBox [ 0 0 %f %f ]\n" + " /BBox [ %f %f %f %f ]\n" " /Resources\n" " << /ExtGState\n" " << /a0 << /ca 1 /CA 1 >>" @@ -3476,8 +3440,7 @@ " /I true\n" " /CS /DeviceGray\n" " >>\n", - surface->width, - surface->height, + x1,y1,x2,y2, buf); if (unlikely (status)) return status; diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-ps-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-ps-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-ps-surface.c 2012-04-27 18:29:27.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-ps-surface.c 2012-05-27 15:18:55.000000000 +0000 @@ -2033,10 +2033,28 @@ cairo_surface_pattern_t *surface_pattern = (cairo_surface_pattern_t *) pattern; if (surface_pattern->surface->type == CAIRO_SURFACE_TYPE_RECORDING) { - if (pattern->extend == CAIRO_EXTEND_PAD) - return CAIRO_INT_STATUS_UNSUPPORTED; - else - return CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN; + if (pattern->extend == CAIRO_EXTEND_PAD) { + cairo_box_t box; + cairo_rectangle_int_t rect; + cairo_rectangle_int_t rec_extents; + + /* get the operation extents in pattern space */ + _cairo_box_from_rectangle (&box, extents); + _cairo_matrix_transform_bounding_box_fixed (&pattern->matrix, &box, NULL); + _cairo_box_round_to_rectangle (&box, &rect); + + /* Check if surface needs padding to fill extents */ + if (_cairo_surface_get_extents (surface_pattern->surface, &rec_extents)) { + if (_cairo_fixed_integer_ceil(box.p1.x) < rec_extents.x || + _cairo_fixed_integer_ceil(box.p1.y) < rec_extents.y || + _cairo_fixed_integer_floor(box.p2.y) > rec_extents.x + rec_extents.width || + _cairo_fixed_integer_floor(box.p2.y) > rec_extents.y + rec_extents.height) + { + return CAIRO_INT_STATUS_UNSUPPORTED; + } + } + } + return CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN; } } @@ -3158,10 +3176,11 @@ if (unlikely (status)) return status; - if (pattern->extend == CAIRO_EXTEND_PAD) { + if (pattern->extend == CAIRO_EXTEND_PAD && + pattern->type == CAIRO_PATTERN_TYPE_SURFACE && + ((cairo_surface_pattern_t *)pattern)->surface->type == CAIRO_SURFACE_TYPE_IMAGE) { cairo_image_surface_t *img; - assert (source->type == CAIRO_SURFACE_TYPE_IMAGE); img = (cairo_image_surface_t *) source; status = _cairo_ps_surface_create_padded_image_from_image (surface, img, diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-quartz-image-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-quartz-image-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-quartz-image-surface.c 2012-03-29 15:36:05.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-quartz-image-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -107,13 +107,12 @@ return CAIRO_STATUS_SUCCESS; } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_quartz_image_surface_map_to_image (void *asurface, const cairo_rectangle_int_t *extents) { cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t *) asurface; - - return cairo_surface_map_to_image (&surface->imageSurface->base, extents); + return _cairo_surface_map_to_image (&surface->imageSurface->base, extents); } static cairo_int_status_t @@ -121,9 +120,7 @@ cairo_image_surface_t *image) { cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t *) asurface; - - cairo_surface_unmap_image (&surface->imageSurface->base, &image->base); - return cairo_surface_status (&surface->imageSurface->base); + return _cairo_surface_unmap_image (&surface->imageSurface->base, image); } static cairo_bool_t diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-quartz-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-quartz-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-quartz-surface.c 2012-03-29 15:36:05.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-quartz-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -43,7 +43,7 @@ #include "cairo-compositor-private.h" #include "cairo-default-context-private.h" #include "cairo-error-private.h" -#include "cairo-image-surface-private.h" +#include "cairo-image-surface-inline.h" #include "cairo-pattern-private.h" #include "cairo-surface-backend-private.h" #include "cairo-surface-clipper-private.h" @@ -203,8 +203,9 @@ break; #endif - case CAIRO_FORMAT_RGB16_565: - case CAIRO_FORMAT_INVALID: + case CAIRO_FORMAT_RGB30: + case CAIRO_FORMAT_RGB16_565: + case CAIRO_FORMAT_INVALID: default: return NULL; } @@ -1385,96 +1386,82 @@ } } -/* - * get source/dest image implementation - */ - -/* Read the image from the surface's front buffer */ -static cairo_int_status_t -_cairo_quartz_get_image (cairo_quartz_surface_t *surface, - cairo_image_surface_t **image_out) +static cairo_image_surface_t * +_cairo_quartz_surface_map_to_image (void *abstract_surface, + const cairo_rectangle_int_t *extents) { - unsigned char *imageData; - cairo_image_surface_t *isurf; + cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface; + unsigned int stride, bitinfo, bpp, color_comps; + CGColorSpaceRef colorspace; + void *imageData; + cairo_format_t format; - if (IS_EMPTY (surface)) { - *image_out = (cairo_image_surface_t*) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0); - return CAIRO_STATUS_SUCCESS; - } + if (surface->imageSurfaceEquiv) + return _cairo_surface_map_to_image (surface->imageSurfaceEquiv, extents); - if (surface->imageSurfaceEquiv) { - *image_out = (cairo_image_surface_t*) cairo_surface_reference (surface->imageSurfaceEquiv); - return CAIRO_STATUS_SUCCESS; - } + if (IS_EMPTY (surface)) + return (cairo_image_surface_t *) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0); - if (_cairo_quartz_is_cgcontext_bitmap_context (surface->cgContext)) { - unsigned int stride; - unsigned int bitinfo; - unsigned int bpc, bpp; - CGColorSpaceRef colorspace; - unsigned int color_comps; - - imageData = (unsigned char *) CGBitmapContextGetData (surface->cgContext); - - bitinfo = CGBitmapContextGetBitmapInfo (surface->cgContext); - stride = CGBitmapContextGetBytesPerRow (surface->cgContext); - bpp = CGBitmapContextGetBitsPerPixel (surface->cgContext); - bpc = CGBitmapContextGetBitsPerComponent (surface->cgContext); - - // let's hope they don't add YUV under us - colorspace = CGBitmapContextGetColorSpace (surface->cgContext); - color_comps = CGColorSpaceGetNumberOfComponents (colorspace); - - // XXX TODO: We can handle all of these by converting to - // pixman masks, including non-native-endian masks - if (bpc != 8) - return CAIRO_INT_STATUS_UNSUPPORTED; + if (! _cairo_quartz_is_cgcontext_bitmap_context (surface->cgContext)) + return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); - if (bpp != 32 && bpp != 8) - return CAIRO_INT_STATUS_UNSUPPORTED; + bitinfo = CGBitmapContextGetBitmapInfo (surface->cgContext); + bpp = CGBitmapContextGetBitsPerPixel (surface->cgContext); - if (color_comps != 3 && color_comps != 1) - return CAIRO_INT_STATUS_UNSUPPORTED; + // let's hope they don't add YUV under us + colorspace = CGBitmapContextGetColorSpace (surface->cgContext); + color_comps = CGColorSpaceGetNumberOfComponents (colorspace); - if (bpp == 32 && color_comps == 3 && - (bitinfo & kCGBitmapAlphaInfoMask) == kCGImageAlphaPremultipliedFirst && - (bitinfo & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host) - { - isurf = (cairo_image_surface_t *) - cairo_image_surface_create_for_data (imageData, - CAIRO_FORMAT_ARGB32, - surface->extents.width, - surface->extents.height, - stride); - } else if (bpp == 32 && color_comps == 3 && - (bitinfo & kCGBitmapAlphaInfoMask) == kCGImageAlphaNoneSkipFirst && - (bitinfo & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host) - { - isurf = (cairo_image_surface_t *) - cairo_image_surface_create_for_data (imageData, - CAIRO_FORMAT_RGB24, - surface->extents.width, - surface->extents.height, - stride); - } else if (bpp == 8 && color_comps == 1) - { - isurf = (cairo_image_surface_t *) - cairo_image_surface_create_for_data (imageData, - CAIRO_FORMAT_A8, - surface->extents.width, - surface->extents.height, - stride); - } else { - return CAIRO_INT_STATUS_UNSUPPORTED; - } - } else { - return CAIRO_INT_STATUS_UNSUPPORTED; + /* XXX TODO: We can handle many more data formats by + * converting to pixman_format_t */ + + if (bpp == 32 && color_comps == 3 && + (bitinfo & kCGBitmapAlphaInfoMask) == kCGImageAlphaPremultipliedFirst && + (bitinfo & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host) + { + format = CAIRO_FORMAT_ARGB32; + } + else if (bpp == 32 && color_comps == 3 && + (bitinfo & kCGBitmapAlphaInfoMask) == kCGImageAlphaNoneSkipFirst && + (bitinfo & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host) + { + format = CAIRO_FORMAT_RGB24; + } + else if (bpp == 8 && color_comps == 1) + { + format = CAIRO_FORMAT_A1; } + else + { + return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); + } + + imageData = CGBitmapContextGetData (surface->cgContext); + stride = CGBitmapContextGetBytesPerRow (surface->cgContext); + + return (cairo_image_surface_t *) cairo_image_surface_create_for_data (imageData, + format, + extents->width, + extents->height, + stride); +} + +static cairo_int_status_t +_cairo_quartz_surface_unmap_image (void *abstract_surface, + cairo_image_surface_t *image) +{ + cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface; + + if (surface->imageSurfaceEquiv) + return _cairo_surface_unmap_image (surface->imageSurfaceEquiv, image); + + cairo_surface_finish (&image->base); + cairo_surface_destroy (&image->base); - *image_out = isurf; return CAIRO_STATUS_SUCCESS; } + /* * Cairo surface backend implementations */ @@ -1513,35 +1500,20 @@ cairo_image_surface_t **image_out, void **image_extra) { - cairo_int_status_t status; cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface; //ND ((stderr, "%p _cairo_quartz_surface_acquire_source_image\n", surface)); - status = _cairo_quartz_get_image (surface, image_out); - if (unlikely (status)) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - *image_extra = NULL; - return CAIRO_STATUS_SUCCESS; -} - -static cairo_surface_t * -_cairo_quartz_surface_snapshot (void *abstract_surface) -{ - cairo_int_status_t status; - cairo_quartz_surface_t *surface = abstract_surface; - cairo_image_surface_t *image; - - if (surface->imageSurfaceEquiv) - return NULL; - - status = _cairo_quartz_get_image (surface, &image); - if (unlikely (status)) - return _cairo_surface_create_in_error (CAIRO_STATUS_NO_MEMORY); + *image_out = _cairo_quartz_surface_map_to_image (surface, &surface->extents); + if (unlikely (cairo_surface_status(&(*image_out)->base))) { + cairo_surface_destroy (&(*image_out)->base); + *image_out = NULL; + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } - return &image->base; + return CAIRO_STATUS_SUCCESS; } static void @@ -1549,38 +1521,7 @@ cairo_image_surface_t *image, void *image_extra) { - cairo_surface_destroy (&image->base); -} - - -static cairo_surface_t * -_cairo_quartz_surface_map_to_image (void *abstract_surface, - const cairo_rectangle_int_t *extents) -{ - cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface; - cairo_image_surface_t *image; - cairo_surface_t *subsurface; - cairo_status_t status; - - status = _cairo_quartz_get_image (surface, &image); - if (unlikely (status)) - return _cairo_surface_create_in_error (status); - - /* Is this legitimate? shouldn't it return an image surface? */ - - subsurface = _cairo_surface_create_for_rectangle_int (&image->base, extents); - cairo_surface_destroy (&image->base); - - return subsurface; -} - -static cairo_int_status_t -_cairo_quartz_surface_unmap_image (void *abstract_surface, - cairo_image_surface_t *image) -{ - cairo_surface_destroy (&image->base); - - return CAIRO_STATUS_SUCCESS; + _cairo_quartz_surface_unmap_image (abstract_surface, image); } static cairo_surface_t * @@ -2219,7 +2160,7 @@ _cairo_surface_default_source, _cairo_quartz_surface_acquire_source_image, _cairo_quartz_surface_release_source_image, - _cairo_quartz_surface_snapshot, + NULL, /* snapshot */ NULL, /* copy_page */ NULL, /* show_page */ @@ -2273,6 +2214,7 @@ surface->cgContext = NULL; surface->cgContextBaseCTM = CGAffineTransformIdentity; surface->imageData = NULL; + surface->base.is_clear = TRUE; return surface; } @@ -2436,6 +2378,8 @@ return &surf->base; } + surf->base.is_clear = TRUE; + surf->imageData = imageData; surf->imageSurfaceEquiv = cairo_image_surface_create_for_data (imageData, format, width, height, stride); diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface-backend-private.h cairo-1.12.3+git20120530.25317dbd/src/cairo-surface-backend-private.h --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface-backend-private.h 2012-02-15 17:20:00.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-surface-backend-private.h 2012-05-27 08:23:45.000000000 +0000 @@ -63,7 +63,7 @@ int width, int height); - cairo_surface_t * + cairo_image_surface_t * (*map_to_image) (void *surface, const cairo_rectangle_int_t *extents); cairo_int_status_t diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface.c 2012-05-10 06:40:11.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -599,6 +599,135 @@ slim_hidden_def (cairo_surface_create_similar_image); /** + * _cairo_surface_map_to_image: + * @surface: an existing surface used to extract the image from + * @extents: limit the extraction to an rectangular region + * + * Returns an image surface that is the most efficient mechanism for + * modifying the backing store of the target surface. The region + * retrieved is limited to @extents. + * + * Note, the use of the original surface as a target or source whilst + * it is mapped is undefined. The result of mapping the surface + * multiple times is undefined. Calling cairo_surface_destroy() or + * cairo_surface_finish() on the resulting image surface results in + * undefined behavior. Changing the device transform of the image + * surface or of @surface before the image surface is unmapped results + * in undefined behavior. + * + * Assumes that @surface is valid (CAIRO_STATUS_SUCCESS, + * non-finished). + * + * Return value: a pointer to the newly allocated image surface. The + * caller must use _cairo_surface_unmap_image() to destroy this image + * surface. + * + * This function always returns a valid pointer, but it will return a + * pointer to a "nil" surface if @other is already in an error state + * or any other error occurs. + * + * The returned image might have a %CAIRO_FORMAT_INVALID format. + **/ +cairo_image_surface_t * +_cairo_surface_map_to_image (cairo_surface_t *surface, + const cairo_rectangle_int_t *extents) +{ + cairo_image_surface_t *image = NULL; + + assert (extents != NULL); + + /* TODO: require map_to_image != NULL */ + if (surface->backend->map_to_image) + image = surface->backend->map_to_image (surface, extents); + + if (image == NULL) + image = _cairo_image_surface_clone_subimage (surface, extents); + + return image; +} + +/** + * _cairo_surface_unmap_image: + * @surface: the surface passed to _cairo_surface_map_to_image(). + * @image: the currently mapped image + * + * Unmaps the image surface as returned from + * _cairo_surface_map_to_image(). + * + * The content of the image will be uploaded to the target surface. + * Afterwards, the image is destroyed. + * + * Using an image surface which wasn't returned by + * _cairo_surface_map_to_image() results in undefined behavior. + * + * An image surface in error status can be passed to + * _cairo_surface_unmap_image(). + * + * Return value: the unmap status. + * + * Even if the unmap status is not successful, @image is destroyed. + **/ +cairo_int_status_t +_cairo_surface_unmap_image (cairo_surface_t *surface, + cairo_image_surface_t *image) +{ + cairo_surface_pattern_t pattern; + cairo_rectangle_int_t extents; + cairo_clip_t *clip; + cairo_int_status_t status; + + /* map_to_image can return error surfaces */ + if (unlikely (image->base.status)) { + status = image->base.status; + goto destroy; + } + + /* If the image is untouched just skip the update */ + if (image->base.serial == 0) { + status = CAIRO_STATUS_SUCCESS; + goto destroy; + } + + /* TODO: require unmap_image != NULL */ + if (surface->backend->unmap_image && + ! _cairo_image_surface_is_clone (image)) + { + status = surface->backend->unmap_image (surface, image); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; + } + + _cairo_pattern_init_for_surface (&pattern, &image->base); + pattern.base.filter = CAIRO_FILTER_NEAREST; + + /* We have to apply the translate from map_to_image's extents.x and .y */ + cairo_matrix_init_translate (&pattern.base.matrix, + image->base.device_transform.x0, + image->base.device_transform.y0); + + /* And we also have to clip the operation to the image's extents */ + extents.x = image->base.device_transform_inverse.x0; + extents.y = image->base.device_transform_inverse.y0; + extents.width = image->width; + extents.height = image->height; + clip = _cairo_clip_intersect_rectangle (NULL, &extents); + + status = _cairo_surface_paint (surface, + CAIRO_OPERATOR_SOURCE, + &pattern.base, + clip); + + _cairo_pattern_fini (&pattern.base); + _cairo_clip_destroy (clip); + +destroy: + cairo_surface_finish (&image->base); + cairo_surface_destroy (&image->base); + + return status; +} + +/** * cairo_surface_map_to_image: * @surface: an existing surface used to extract the image from * @extents: limit the extraction to an rectangular region @@ -607,17 +736,22 @@ * modifying the backing store of the target surface. The region retrieved * may be limited to the @extents or %NULL for the whole surface * - * Note, the use of the original surface as a target or source whilst it is - * mapped is undefined. The result of mapping the surface multiple times is - * undefined. Calling cairo_surface_destroy() or cairo_surface_finish() on the - * resulting image surface results in undefined behavior. + * Note, the use of the original surface as a target or source whilst + * it is mapped is undefined. The result of mapping the surface + * multiple times is undefined. Calling cairo_surface_destroy() or + * cairo_surface_finish() on the resulting image surface results in + * undefined behavior. Changing the device transform of the image + * surface or of @surface before the image surface is unmapped results + * in undefined behavior. * * Return value: a pointer to the newly allocated image surface. The caller * must use cairo_surface_unmap_image() to destroy this image surface. * * This function always returns a valid pointer, but it will return a * pointer to a "nil" surface if @other is already in an error state - * or any other error occurs. + * or any other error occurs. If the returned pointer does not have an + * error status, it is guaranteed to be an image surface whose format + * is not %CAIRO_FORMAT_INVALID. * * Since: 1.12 **/ @@ -626,7 +760,8 @@ const cairo_rectangle_int_t *extents) { cairo_rectangle_int_t rect; - cairo_surface_t *image; + cairo_image_surface_t *image; + cairo_status_t status; if (unlikely (surface->status)) return _cairo_surface_create_in_error (surface->status); @@ -649,39 +784,21 @@ } } - image = NULL; - if (surface->backend->map_to_image) - image = surface->backend->map_to_image (surface, extents); + image = _cairo_surface_map_to_image (surface, extents); - if (image == NULL) { - cairo_surface_pattern_t pattern; - cairo_status_t status; - - image = cairo_surface_create_similar_image (surface, - _cairo_format_from_content (surface->content), - extents->width, - extents->height); - cairo_surface_set_device_offset (image, -extents->x, -extents->y); - - _cairo_pattern_init_for_surface (&pattern, surface); - pattern.base.filter = CAIRO_FILTER_NEAREST; - - status = _cairo_surface_paint (image, - CAIRO_OPERATOR_SOURCE, - &pattern.base, - NULL); - - _cairo_pattern_fini (&pattern.base); - - if (unlikely (status)) { - cairo_surface_destroy (image); - image = _cairo_surface_create_in_error (status); - } + status = image->base.status; + if (unlikely (status)) { + cairo_surface_destroy (&image->base); + return _cairo_surface_create_in_error (status); } - return image; + if (image->format == CAIRO_FORMAT_INVALID) { + cairo_surface_destroy (&image->base); + image = _cairo_image_surface_clone_subimage (surface, extents); + } + + return &image->base; } -slim_hidden_def (cairo_surface_map_to_image); /** * cairo_surface_unmap_image: @@ -702,7 +819,7 @@ cairo_surface_unmap_image (cairo_surface_t *surface, cairo_surface_t *image) { - cairo_int_status_t status; + cairo_int_status_t status = CAIRO_STATUS_SUCCESS; if (unlikely (surface->status)) { status = surface->status; @@ -712,7 +829,6 @@ status = _cairo_error (CAIRO_STATUS_SURFACE_FINISHED); goto error; } - if (unlikely (image->status)) { status = image->status; goto error; @@ -726,52 +842,18 @@ goto error; } - /* If the image is untouched just skip the update */ - if (image->serial == 0) { - status = CAIRO_STATUS_SUCCESS; - goto error; - } - - status = CAIRO_INT_STATUS_UNSUPPORTED; - if (surface->backend->unmap_image) - status = surface->backend->unmap_image (surface, (cairo_image_surface_t *) image); - if (status == CAIRO_INT_STATUS_UNSUPPORTED) { - cairo_image_surface_t *img = (cairo_image_surface_t *) image; - cairo_surface_pattern_t pattern; - cairo_clip_t *clip; - cairo_rectangle_int_t extents; - - _cairo_pattern_init_for_surface (&pattern, image); - pattern.base.filter = CAIRO_FILTER_NEAREST; - - /* We have to apply the translate from map_to_image's extents.x and .y */ - cairo_matrix_init_translate (&pattern.base.matrix, - image->device_transform.x0, - image->device_transform.y0); - - /* And we also have to clip the operation to the image's extents */ - extents.x = image->device_transform_inverse.x0; - extents.y = image->device_transform_inverse.y0; - extents.width = img->width; - extents.height = img->height; - clip = _cairo_clip_intersect_rectangle (NULL, &extents); - - status = _cairo_surface_paint (surface, - CAIRO_OPERATOR_SOURCE, - &pattern.base, - clip); + status = _cairo_surface_unmap_image (surface, + (cairo_image_surface_t *) image); + if (unlikely (status)) + _cairo_surface_set_error (surface, status); - _cairo_pattern_fini (&pattern.base); - _cairo_clip_destroy (clip); - } + return; error: + _cairo_surface_set_error (surface, status); cairo_surface_finish (image); cairo_surface_destroy (image); - if (status) - _cairo_surface_set_error (surface, status); } -slim_hidden_def (cairo_surface_unmap_image); cairo_surface_t * _cairo_surface_create_similar_solid (cairo_surface_t *other, diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface-observer.c cairo-1.12.3+git20120530.25317dbd/src/cairo-surface-observer.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface-observer.c 2012-04-19 15:28:24.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-surface-observer.c 2012-05-27 08:23:45.000000000 +0000 @@ -474,16 +474,12 @@ return NULL; } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_surface_observer_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { cairo_surface_observer_t *surface = abstract_surface; - - if (surface->target->backend->map_to_image == NULL) - return NULL; - - return surface->target->backend->map_to_image (surface->target, extents); + return _cairo_surface_map_to_image (surface->target, extents); } static cairo_int_status_t @@ -491,11 +487,7 @@ cairo_image_surface_t *image) { cairo_surface_observer_t *surface = abstract_surface; - - if (surface->target->backend->unmap_image == NULL) - return CAIRO_INT_STATUS_UNSUPPORTED; - - return surface->target->backend->unmap_image (surface->target, image); + return _cairo_surface_unmap_image (surface->target, image); } static void @@ -670,9 +662,9 @@ extents.width = 1; extents.height = 1; - cairo_surface_unmap_image (target, - cairo_surface_map_to_image (target, - &extents)); + _cairo_surface_unmap_image (target, + _cairo_surface_map_to_image (target, + &extents)); } static void diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface-subsurface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-surface-subsurface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-surface-subsurface.c 2012-04-27 18:29:27.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-surface-subsurface.c 2012-05-27 08:23:45.000000000 +0000 @@ -84,23 +84,19 @@ width, height); } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_surface_subsurface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { cairo_surface_subsurface_t *surface = abstract_surface; cairo_rectangle_int_t target_extents; - if (surface->target->backend->map_to_image == NULL) - return NULL; - target_extents.x = extents->x + surface->extents.x; target_extents.y = extents->y + surface->extents.y; target_extents.width = extents->width; target_extents.height = extents->height; - return surface->target->backend->map_to_image (surface->target, - &target_extents); + return _cairo_surface_map_to_image (surface->target, &target_extents); } static cairo_int_status_t @@ -108,11 +104,7 @@ cairo_image_surface_t *image) { cairo_surface_subsurface_t *surface = abstract_surface; - - if (surface->target->backend->unmap_image == NULL) - return CAIRO_INT_STATUS_UNSUPPORTED; - - return surface->target->backend->unmap_image (surface->target, image); + return _cairo_surface_unmap_image (surface->target, image); } static cairo_int_status_t diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-xcb-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-xcb-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-xcb-surface.c 2012-04-28 06:19:25.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-xcb-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -45,8 +45,8 @@ #include "cairo-composite-rectangles-private.h" #include "cairo-default-context-private.h" +#include "cairo-image-surface-inline.h" #include "cairo-list-inline.h" -#include "cairo-image-surface-private.h" #include "cairo-surface-backend-private.h" #if CAIRO_HAS_XLIB_XCB_FUNCTIONS @@ -755,21 +755,25 @@ return status; } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_xcb_surface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { cairo_xcb_surface_t *surface = abstract_surface; cairo_surface_t *image; + cairo_status_t status; if (surface->fallback) - return surface->fallback->base.backend->map_to_image (&surface->fallback->base, extents); + return _cairo_surface_map_to_image (&surface->fallback->base, extents); image = _get_image (surface, TRUE, extents->x, extents->y, extents->width, extents->height); - if (unlikely (image->status)) - return image; + status = cairo_surface_status (image); + if (unlikely (status)) { + cairo_surface_destroy(image); + return _cairo_image_surface_create_in_error (status); + } /* Do we have a deferred clear and this image surface does NOT cover the * whole xcb surface? Have to apply the clear in that case, else @@ -778,16 +782,16 @@ if (surface->deferred_clear && ! (extents->width == surface->width && extents->height == surface->height)) { - cairo_status_t status = _cairo_xcb_surface_clear (surface); + status = _cairo_xcb_surface_clear (surface); if (unlikely (status)) { cairo_surface_destroy(image); - return _cairo_surface_create_in_error (status); + return _cairo_image_surface_create_in_error (status); } } surface->deferred_clear = FALSE; cairo_surface_set_device_offset (image, -extents->x, -extents->y); - return image; + return (cairo_image_surface_t *) image; } static cairo_int_status_t @@ -795,10 +799,17 @@ cairo_image_surface_t *image) { cairo_xcb_surface_t *surface = abstract_surface; + cairo_int_status_t status; if (surface->fallback) - return surface->fallback->base.backend->unmap_image (&surface->fallback->base, image); - return _put_image (abstract_surface, image); + return _cairo_surface_unmap_image (&surface->fallback->base, image); + + status = _put_image (abstract_surface, image); + + cairo_surface_finish (&image->base); + cairo_surface_destroy (&image->base); + + return status; } static cairo_surface_t * diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-xlib-source.c cairo-1.12.3+git20120530.25317dbd/src/cairo-xlib-source.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-xlib-source.c 2012-04-19 15:28:24.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-xlib-source.c 2012-05-27 08:23:45.000000000 +0000 @@ -259,8 +259,9 @@ { Display *dpy = dst->display->display; cairo_xlib_surface_t *src; - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_status_t status; + cairo_rectangle_int_t map_extents; src = (cairo_xlib_surface_t *) _cairo_surface_create_similar_scratch (&dst->base, @@ -272,11 +273,14 @@ return None; } - image = cairo_surface_map_to_image (&src->base, NULL); - status = _cairo_surface_offset_paint (image, extents->x, extents->y, + map_extents = *extents; + map_extents.x = map_extents.y = 0; + + image = _cairo_surface_map_to_image (&src->base, &map_extents); + status = _cairo_surface_offset_paint (&image->base, extents->x, extents->y, CAIRO_OPERATOR_SOURCE, pattern, NULL); - cairo_surface_unmap_image (&src->base, image); + status = _cairo_surface_unmap_image (&src->base, image); if (unlikely (status)) { cairo_surface_destroy (&src->base); return _cairo_surface_create_in_error (status); @@ -909,10 +913,10 @@ int *src_x, int *src_y) { cairo_xlib_surface_t *src; - cairo_surface_t *image; + cairo_image_surface_t *image; cairo_surface_pattern_t local_pattern; cairo_status_t status; - cairo_rectangle_int_t upload, limit; + cairo_rectangle_int_t upload, limit, map_extents; cairo_matrix_t m; upload = *sample; @@ -939,12 +943,15 @@ cairo_matrix_init_translate (&local_pattern.base.matrix, upload.x, upload.y); - image = cairo_surface_map_to_image (&src->base, NULL); - status = _cairo_surface_paint (image, + map_extents = upload; + map_extents.x = map_extents.y = 0; + + image = _cairo_surface_map_to_image (&src->base, &map_extents); + status = _cairo_surface_paint (&image->base, CAIRO_OPERATOR_SOURCE, &local_pattern.base, NULL); - cairo_surface_unmap_image (&src->base, image); + status = _cairo_surface_unmap_image (&src->base, image); _cairo_pattern_fini (&local_pattern.base); if (unlikely (status)) { diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-xlib-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-xlib-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-xlib-surface.c 2012-04-28 06:19:25.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-xlib-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -1278,7 +1278,7 @@ cairo_surface_destroy (&image->base); } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_xlib_surface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { @@ -1287,18 +1287,25 @@ image = _get_image_surface (abstract_surface, extents); cairo_surface_set_device_offset (image, -extents->x, -extents->y); - return image; + return (cairo_image_surface_t *) image; } static cairo_int_status_t _cairo_xlib_surface_unmap_image (void *abstract_surface, cairo_image_surface_t *image) { - return _cairo_xlib_surface_draw_image (abstract_surface, image, - 0, 0, - image->width, image->height, - image->base.device_transform_inverse.x0, - image->base.device_transform_inverse.y0); + cairo_int_status_t status; + + status = _cairo_xlib_surface_draw_image (abstract_surface, image, + 0, 0, + image->width, image->height, + image->base.device_transform_inverse.x0, + image->base.device_transform_inverse.y0); + + cairo_surface_finish (&image->base); + cairo_surface_destroy (&image->base); + + return status; } static cairo_bool_t diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/cairo-xlib-xcb-surface.c cairo-1.12.3+git20120530.25317dbd/src/cairo-xlib-xcb-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/cairo-xlib-xcb-surface.c 2012-04-19 15:28:24.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/cairo-xlib-xcb-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -116,12 +116,12 @@ return cairo_surface_create_similar_image (&surface->xcb->base, format, width, height); } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_xlib_xcb_surface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { cairo_xlib_xcb_surface_t *surface = abstract_surface; - return cairo_surface_map_to_image (&surface->xcb->base, extents); + return _cairo_surface_map_to_image (&surface->xcb->base, extents); } static cairo_int_status_t @@ -129,13 +129,7 @@ cairo_image_surface_t *image) { cairo_xlib_xcb_surface_t *surface = abstract_surface; - - /* cairo_surface_unmap_image destroys the surface, so get a new reference - * for it to destroy. - */ - cairo_surface_reference (&image->base); - cairo_surface_unmap_image (&surface->xcb->base, &image->base); - return cairo_surface_status (&surface->xcb->base); + return _cairo_surface_unmap_image (&surface->xcb->base, image); } static cairo_surface_t * diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/Makefile.in cairo-1.12.3+git20120530.25317dbd/src/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/src/Makefile.in 2012-05-22 11:06:54.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/Makefile.in 2012-05-31 07:32:00.000000000 +0000 @@ -1704,9 +1704,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/skia/cairo-skia-surface.cpp cairo-1.12.3+git20120530.25317dbd/src/skia/cairo-skia-surface.cpp --- cairo-1.12.3+git20120521.aed94a5b/src/skia/cairo-skia-surface.cpp 2012-03-10 11:28:21.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/skia/cairo-skia-surface.cpp 2012-05-27 08:23:45.000000000 +0000 @@ -90,7 +90,7 @@ return CAIRO_STATUS_SUCCESS; } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_skia_surface_map_to_image (void *asurface, const cairo_rectangle_int_t *extents) { @@ -98,6 +98,7 @@ surface->bitmap->lockPixels (); + /* XXX: Broken! */ if (extents->width < surface->image.width || extents->height < surface->image.height) { diff -Nru cairo-1.12.3+git20120521.aed94a5b/src/win32/cairo-win32-display-surface.c cairo-1.12.3+git20120530.25317dbd/src/win32/cairo-win32-display-surface.c --- cairo-1.12.3+git20120521.aed94a5b/src/win32/cairo-win32-display-surface.c 2012-04-24 06:57:50.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/src/win32/cairo-win32-display-surface.c 2012-05-27 08:23:45.000000000 +0000 @@ -427,7 +427,7 @@ return CAIRO_STATUS_SUCCESS; } -static cairo_surface_t * +static cairo_image_surface_t * _cairo_win32_display_surface_map_to_image (void *abstract_surface, const cairo_rectangle_int_t *extents) { @@ -464,13 +464,13 @@ surface = to_win32_display_surface (surface->fallback); done: GdiFlush(); - return _cairo_image_surface_map_to_image (surface->image, extents); + return _cairo_surface_map_to_image (&surface->image->base, extents); err: cairo_surface_destroy (surface->fallback); surface->fallback = NULL; - return _cairo_surface_create_in_error (status); + return _cairo_image_surface_create_in_error (status); } static cairo_int_status_t @@ -499,7 +499,7 @@ _cairo_damage_add_rectangle (surface->fallback->damage, &r); } - return CAIRO_INT_STATUS_SUCCESS; + return _cairo_surface_unmap_image (&surface->image->base, image); } static cairo_status_t diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/bug-bo-collins.c cairo-1.12.3+git20120530.25317dbd/test/bug-bo-collins.c --- cairo-1.12.3+git20120521.aed94a5b/test/bug-bo-collins.c 1970-01-01 00:00:00.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/bug-bo-collins.c 2012-05-24 06:37:16.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright © 2012 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Author: Chris Wilson + */ + +#include "cairo-test.h" + +static cairo_test_status_t +draw (cairo_t *cr, int width, int height) +{ + cairo_set_source_rgb (cr, 1, 1, 1); + cairo_paint (cr); + cairo_set_source_rgb (cr, 0, 0, 0); + + cairo_translate (cr, 0, 0); + cairo_save (cr); + cairo_rectangle (cr, 10, 10, 20, 20); + cairo_rectangle (cr, 20, 10, -10, 10); + cairo_clip (cr); + cairo_paint (cr); + cairo_restore (cr); + + cairo_translate (cr, 40, 0); + cairo_save (cr); + cairo_rectangle (cr, 10, 10, 20, 20); + cairo_rectangle (cr, 30, 10, -10, 10); + cairo_clip (cr); + cairo_paint (cr); + cairo_restore (cr); + + cairo_translate (cr, 0, 40); + cairo_save (cr); + cairo_rectangle (cr, 10, 10, 20, 20); + cairo_rectangle (cr, 30, 20, -10, 10); + cairo_clip (cr); + cairo_paint (cr); + cairo_restore (cr); + + cairo_translate (cr, -40, 0); + cairo_save (cr); + cairo_rectangle (cr, 10, 10, 20, 20); + cairo_rectangle (cr, 20, 20, -10, 10); + cairo_clip (cr); + cairo_paint (cr); + cairo_restore (cr); + + return CAIRO_TEST_SUCCESS; +} + +CAIRO_TEST (bug_bo_collins, + "Exercises a bug discovered by S. Christian Collins", + "clip, rectangular", /* keywords */ + NULL, /* requirements */ + 80, 80, + NULL, draw) diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/cairo-test-constructors.c cairo-1.12.3+git20120530.25317dbd/test/cairo-test-constructors.c --- cairo-1.12.3+git20120521.aed94a5b/test/cairo-test-constructors.c 2012-05-22 11:07:51.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/cairo-test-constructors.c 2012-05-31 07:32:56.000000000 +0000 @@ -34,6 +34,7 @@ extern void _register_bilevel_image (void); extern void _register_bug_40410 (void); extern void _register_bug_bo_rectangular (void); +extern void _register_bug_bo_collins (void); extern void _register_bug_bo_ricotz (void); extern void _register_bug_source_cu (void); extern void _register_bug_extents (void); @@ -546,6 +547,7 @@ _register_bilevel_image (); _register_bug_40410 (); _register_bug_bo_rectangular (); + _register_bug_bo_collins (); _register_bug_bo_ricotz (); _register_bug_source_cu (); _register_bug_extents (); diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/get-path-extents.c cairo-1.12.3+git20120530.25317dbd/test/get-path-extents.c --- cairo-1.12.3+git20120521.aed94a5b/test/get-path-extents.c 2011-08-07 07:51:39.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/get-path-extents.c 2012-05-24 06:37:16.000000000 +0000 @@ -110,7 +110,7 @@ int errors = 0; surface = cairo_surface_create_similar (cairo_get_group_target (cr), - CAIRO_CONTENT_COLOR, 100, 100); + CAIRO_CONTENT_COLOR, 1000, 1000); /* don't use cr accidentally */ cr = NULL; cr2 = cairo_create (surface); diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/Makefile.in cairo-1.12.3+git20120530.25317dbd/test/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/test/Makefile.in 2012-05-22 11:06:31.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/Makefile.in 2012-05-31 07:31:35.000000000 +0000 @@ -149,12 +149,12 @@ arc-looping-dash.c api-special-cases.c big-line.c \ big-empty-box.c big-empty-triangle.c big-little-box.c \ big-little-triangle.c big-trap.c bilevel-image.c bug-40410.c \ - bug-bo-rectangular.c bug-bo-ricotz.c bug-source-cu.c \ - bug-extents.c bug-seams.c caps.c checkerboard.c caps-joins.c \ - caps-joins-alpha.c caps-joins-curve.c caps-tails-curve.c \ - caps-sub-paths.c clear.c clear-source.c clip-all.c \ - clip-contexts.c clip-complex-shape.c clip-disjoint.c \ - clip-disjoint-hatching.c clip-device-offset.c \ + bug-bo-rectangular.c bug-bo-collins.c bug-bo-ricotz.c \ + bug-source-cu.c bug-extents.c bug-seams.c caps.c \ + checkerboard.c caps-joins.c caps-joins-alpha.c \ + caps-joins-curve.c caps-tails-curve.c caps-sub-paths.c clear.c \ + clear-source.c clip-all.c clip-contexts.c clip-complex-shape.c \ + clip-disjoint.c clip-disjoint-hatching.c clip-device-offset.c \ clip-double-free.c clip-draw-unbounded.c clip-empty.c \ clip-empty-group.c clip-empty-save.c clip-fill.c \ clip-fill-no-op.c clip-fill-rule.c \ @@ -358,6 +358,7 @@ cairo_test_suite-bilevel-image.$(OBJEXT) \ cairo_test_suite-bug-40410.$(OBJEXT) \ cairo_test_suite-bug-bo-rectangular.$(OBJEXT) \ + cairo_test_suite-bug-bo-collins.$(OBJEXT) \ cairo_test_suite-bug-bo-ricotz.$(OBJEXT) \ cairo_test_suite-bug-source-cu.$(OBJEXT) \ cairo_test_suite-bug-extents.$(OBJEXT) \ @@ -1069,12 +1070,12 @@ arc-looping-dash.c api-special-cases.c big-line.c \ big-empty-box.c big-empty-triangle.c big-little-box.c \ big-little-triangle.c big-trap.c bilevel-image.c bug-40410.c \ - bug-bo-rectangular.c bug-bo-ricotz.c bug-source-cu.c \ - bug-extents.c bug-seams.c caps.c checkerboard.c caps-joins.c \ - caps-joins-alpha.c caps-joins-curve.c caps-tails-curve.c \ - caps-sub-paths.c clear.c clear-source.c clip-all.c \ - clip-contexts.c clip-complex-shape.c clip-disjoint.c \ - clip-disjoint-hatching.c clip-device-offset.c \ + bug-bo-rectangular.c bug-bo-collins.c bug-bo-ricotz.c \ + bug-source-cu.c bug-extents.c bug-seams.c caps.c \ + checkerboard.c caps-joins.c caps-joins-alpha.c \ + caps-joins-curve.c caps-tails-curve.c caps-sub-paths.c clear.c \ + clear-source.c clip-all.c clip-contexts.c clip-complex-shape.c \ + clip-disjoint.c clip-disjoint-hatching.c clip-device-offset.c \ clip-double-free.c clip-draw-unbounded.c clip-empty.c \ clip-empty-group.c clip-empty-save.c clip-fill.c \ clip-fill-no-op.c clip-fill-rule.c \ @@ -1417,9 +1418,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu test/Makefile + $(AUTOMAKE) --foreign test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -1517,6 +1518,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_test_suite-bitmap-font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_test_suite-buffer-diff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_test_suite-bug-40410.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_test_suite-bug-bo-collins.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_test_suite-bug-bo-rectangular.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_test_suite-bug-bo-ricotz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_test_suite-bug-extents.Po@am__quote@ @@ -2337,6 +2339,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_test_suite_CFLAGS) $(CFLAGS) -c -o cairo_test_suite-bug-bo-rectangular.obj `if test -f 'bug-bo-rectangular.c'; then $(CYGPATH_W) 'bug-bo-rectangular.c'; else $(CYGPATH_W) '$(srcdir)/bug-bo-rectangular.c'; fi` +cairo_test_suite-bug-bo-collins.o: bug-bo-collins.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_test_suite_CFLAGS) $(CFLAGS) -MT cairo_test_suite-bug-bo-collins.o -MD -MP -MF $(DEPDIR)/cairo_test_suite-bug-bo-collins.Tpo -c -o cairo_test_suite-bug-bo-collins.o `test -f 'bug-bo-collins.c' || echo '$(srcdir)/'`bug-bo-collins.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cairo_test_suite-bug-bo-collins.Tpo $(DEPDIR)/cairo_test_suite-bug-bo-collins.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bug-bo-collins.c' object='cairo_test_suite-bug-bo-collins.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_test_suite_CFLAGS) $(CFLAGS) -c -o cairo_test_suite-bug-bo-collins.o `test -f 'bug-bo-collins.c' || echo '$(srcdir)/'`bug-bo-collins.c + +cairo_test_suite-bug-bo-collins.obj: bug-bo-collins.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_test_suite_CFLAGS) $(CFLAGS) -MT cairo_test_suite-bug-bo-collins.obj -MD -MP -MF $(DEPDIR)/cairo_test_suite-bug-bo-collins.Tpo -c -o cairo_test_suite-bug-bo-collins.obj `if test -f 'bug-bo-collins.c'; then $(CYGPATH_W) 'bug-bo-collins.c'; else $(CYGPATH_W) '$(srcdir)/bug-bo-collins.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cairo_test_suite-bug-bo-collins.Tpo $(DEPDIR)/cairo_test_suite-bug-bo-collins.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bug-bo-collins.c' object='cairo_test_suite-bug-bo-collins.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_test_suite_CFLAGS) $(CFLAGS) -c -o cairo_test_suite-bug-bo-collins.obj `if test -f 'bug-bo-collins.c'; then $(CYGPATH_W) 'bug-bo-collins.c'; else $(CYGPATH_W) '$(srcdir)/bug-bo-collins.c'; fi` + cairo_test_suite-bug-bo-ricotz.o: bug-bo-ricotz.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_test_suite_CFLAGS) $(CFLAGS) -MT cairo_test_suite-bug-bo-ricotz.o -MD -MP -MF $(DEPDIR)/cairo_test_suite-bug-bo-ricotz.Tpo -c -o cairo_test_suite-bug-bo-ricotz.o `test -f 'bug-bo-ricotz.c' || echo '$(srcdir)/'`bug-bo-ricotz.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cairo_test_suite-bug-bo-ricotz.Tpo $(DEPDIR)/cairo_test_suite-bug-bo-ricotz.Po diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/Makefile.sources cairo-1.12.3+git20120530.25317dbd/test/Makefile.sources --- cairo-1.12.3+git20120521.aed94a5b/test/Makefile.sources 2012-04-29 17:31:45.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/Makefile.sources 2012-05-24 06:37:16.000000000 +0000 @@ -25,6 +25,7 @@ bilevel-image.c \ bug-40410.c \ bug-bo-rectangular.c \ + bug-bo-collins.c \ bug-bo-ricotz.c \ bug-source-cu.c \ bug-extents.c \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/pdiff/Makefile.in cairo-1.12.3+git20120530.25317dbd/test/pdiff/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/test/pdiff/Makefile.in 2012-05-22 11:06:31.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/pdiff/Makefile.in 2012-05-31 07:31:35.000000000 +0000 @@ -384,9 +384,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/pdiff/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/pdiff/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu test/pdiff/Makefile + $(AUTOMAKE) --foreign test/pdiff/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/png.c cairo-1.12.3+git20120530.25317dbd/test/png.c --- cairo-1.12.3+git20120521.aed94a5b/test/png.c 2011-08-07 07:51:39.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/png.c 2012-05-27 08:23:45.000000000 +0000 @@ -57,6 +57,7 @@ case CAIRO_FORMAT_A8: return "a8"; case CAIRO_FORMAT_RGB16_565: return "rgb16"; case CAIRO_FORMAT_RGB24: return "rgb24"; + case CAIRO_FORMAT_RGB30: return "rgb30"; case CAIRO_FORMAT_ARGB32: return "argb32"; case CAIRO_FORMAT_INVALID: default: return "???"; diff -Nru cairo-1.12.3+git20120521.aed94a5b/test/record90.c cairo-1.12.3+git20120530.25317dbd/test/record90.c --- cairo-1.12.3+git20120521.aed94a5b/test/record90.c 2012-02-29 07:30:35.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/test/record90.c 2012-05-24 06:37:16.000000000 +0000 @@ -485,7 +485,7 @@ "Test strokes of self-intersecting paths", "record, stroke, trap", /* keywords */ NULL, /* requirements */ - 10, 20, + 20, 10, NULL, record_self_intersecting) CAIRO_TEST (record90_text_transform, "Test various applications of the font matrix", Binary files /tmp/2xOM3AoseI/cairo-1.12.3+git20120521.aed94a5b/test/reference/bug-bo-collins.ref.png and /tmp/cV9cC4I1DO/cairo-1.12.3+git20120530.25317dbd/test/reference/bug-bo-collins.ref.png differ Binary files /tmp/2xOM3AoseI/cairo-1.12.3+git20120521.aed94a5b/test/reference/record90-self-intersecting.argb32.ref.png and /tmp/cV9cC4I1DO/cairo-1.12.3+git20120530.25317dbd/test/reference/record90-self-intersecting.argb32.ref.png differ Binary files /tmp/2xOM3AoseI/cairo-1.12.3+git20120521.aed94a5b/test/reference/record90-self-intersecting.ref.png and /tmp/cV9cC4I1DO/cairo-1.12.3+git20120530.25317dbd/test/reference/record90-self-intersecting.ref.png differ Binary files /tmp/2xOM3AoseI/cairo-1.12.3+git20120521.aed94a5b/test/reference/record90-self-intersecting.rgb24.ref.png and /tmp/cV9cC4I1DO/cairo-1.12.3+git20120530.25317dbd/test/reference/record90-self-intersecting.rgb24.ref.png differ Binary files /tmp/2xOM3AoseI/cairo-1.12.3+git20120521.aed94a5b/test/reference/unbounded-operator.argb32.ref.png and /tmp/cV9cC4I1DO/cairo-1.12.3+git20120530.25317dbd/test/reference/unbounded-operator.argb32.ref.png differ Binary files /tmp/2xOM3AoseI/cairo-1.12.3+git20120521.aed94a5b/test/reference/unbounded-operator.rgb24.ref.png and /tmp/cV9cC4I1DO/cairo-1.12.3+git20120530.25317dbd/test/reference/unbounded-operator.rgb24.ref.png differ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/cairo-fdr/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/cairo-fdr/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/cairo-fdr/Makefile.in 2012-05-22 11:06:31.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/cairo-fdr/Makefile.in 2012-05-31 07:31:35.000000000 +0000 @@ -394,9 +394,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/cairo-fdr/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/cairo-fdr/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/cairo-fdr/Makefile + $(AUTOMAKE) --foreign util/cairo-fdr/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/cairo-gobject/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/cairo-gobject/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/cairo-gobject/Makefile.in 2012-05-22 11:06:31.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/cairo-gobject/Makefile.in 2012-05-31 07:31:35.000000000 +0000 @@ -402,9 +402,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/cairo-gobject/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/cairo-gobject/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/cairo-gobject/Makefile + $(AUTOMAKE) --foreign util/cairo-gobject/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/cairo-missing/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/cairo-missing/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/cairo-missing/Makefile.in 2012-05-22 11:06:31.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/cairo-missing/Makefile.in 2012-05-31 07:31:35.000000000 +0000 @@ -370,9 +370,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/cairo-missing/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/cairo-missing/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/cairo-missing/Makefile + $(AUTOMAKE) --foreign util/cairo-missing/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/cairo-script/examples/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/cairo-script/examples/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/cairo-script/examples/Makefile.in 2012-05-22 11:06:32.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/cairo-script/examples/Makefile.in 2012-05-31 07:31:36.000000000 +0000 @@ -331,9 +331,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/cairo-script/examples/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/cairo-script/examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/cairo-script/examples/Makefile + $(AUTOMAKE) --foreign util/cairo-script/examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/cairo-script/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/cairo-script/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/cairo-script/Makefile.in 2012-05-22 11:06:32.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/cairo-script/Makefile.in 2012-05-31 07:31:36.000000000 +0000 @@ -503,9 +503,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/cairo-script/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/cairo-script/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/cairo-script/Makefile + $(AUTOMAKE) --foreign util/cairo-script/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/cairo-sphinx/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/cairo-sphinx/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/cairo-sphinx/Makefile.in 2012-05-22 11:06:32.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/cairo-sphinx/Makefile.in 2012-05-31 07:31:36.000000000 +0000 @@ -421,9 +421,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/cairo-sphinx/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/cairo-sphinx/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/cairo-sphinx/Makefile + $(AUTOMAKE) --foreign util/cairo-sphinx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/cairo-trace/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/cairo-trace/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/cairo-trace/Makefile.in 2012-05-22 11:06:32.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/cairo-trace/Makefile.in 2012-05-31 07:31:36.000000000 +0000 @@ -420,9 +420,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/cairo-trace/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/cairo-trace/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/cairo-trace/Makefile + $(AUTOMAKE) --foreign util/cairo-trace/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru cairo-1.12.3+git20120521.aed94a5b/util/Makefile.in cairo-1.12.3+git20120530.25317dbd/util/Makefile.in --- cairo-1.12.3+git20120521.aed94a5b/util/Makefile.in 2012-05-22 11:06:31.000000000 +0000 +++ cairo-1.12.3+git20120530.25317dbd/util/Makefile.in 2012-05-31 07:31:35.000000000 +0000 @@ -507,9 +507,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu util/Makefile + $(AUTOMAKE) --foreign util/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \