[cairo-commit] 9 commits - NEWS src/cairo-xlib-display.c

Carl Worth cworth at kemper.freedesktop.org
Fri Nov 14 06:29:21 PST 2008


 NEWS                     |   55 ++++++++++++++++++++++++++++++++++++++---
 src/cairo-xlib-display.c |   63 ++++++++++++++++++++++++++++++++++-------------
 2 files changed, 98 insertions(+), 20 deletions(-)

New commits:
commit 456252a1c2b00685bee18c01bf27738d6125b4f8
Merge: 3b11997... ab61544...
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Nov 14 15:27:34 2008 +0100

    Merge branch '1.8'
    
    Conflicts:
    
    	NEWS
    	cairo-version.h

diff --cc NEWS
index a2965a0,5be426c..ec14701
--- a/NEWS
+++ b/NEWS
@@@ -1,44 -1,54 +1,93 @@@
- Release 1.9.2 (2008-11-08?)
- ===========================
- 
++Release 1.9.2 (2008-11-??)
++==========================
 +API additions:
 +
 +  cairo_surface_set_mime_data()
 +  cairo_surface_get_mime_data()
 +
 +    Associate an alternate, compressed, representation for a surface.
 +    Currently:
 +     "image/jpeg" is understood by PDF,PS,SVG,win32-printing.
 +     "image/png" is understood by SVG.
 +
 +New backend:
 +
 +   Simple DirectMedia Layer
 +
 +New utility:
 +
 +  cairo-trace
 +
 +    Generates a human-readable, replayable, compact representation of
 +    the sequences of drawing commands made by an application.
 +    Though currently the replay tools are out-of-tree -
 +      people.freedesktop.org:~ickle/cairo-script,
 +      people.freedesktop.org:~ickle/sphinx
 +
 +Test suite overhaul:
 +  The test suite is undergoing an overhaul, primarily to improve its speed
 +  and utility.
 +
 +Optimisations:
 +Tweaks to tessellator, allocations of patterns, delayed initialisation of
 +the xlib backend (reduce the cairo overhead of render_bench by ~80%).
 +
 +Bug fixes:
 +EXTEND_PAD.
 +Better handling of large scale-factors on image patterns.
 +Emit /Interpolate for PS,PDF images.
 +
+ Release 1.8.4 (2008-11-14 Carl Worth <cworth at cworth.org>)
+ =========================================================
+ The cairo community is pleased to announce the 1.8.4 release of the
+ cairo graphics library. This is the second update to cairo's stable
+ 1.8 series and contains a small number of bug fixes, (in particular a
+ few fixes for build failures of cairo 1.8.2 on various systems). This
+ is being released just over two weeks after cairo 1.8.2.
+ 
+ We recommend that everyone using cairo upgrade to 1.8.4.
+ 
+ -Carl
+ 
+ Build fixes
+ -----------
+ Fix build with older XRender that doesn't define RepeatNone:
+ 
+    Build of xlib backend fails against old XRender (RepeatNone undeclared)
+    https://bugs.freedesktop.org/show_bug.cgi?id=18385
+ 
+ Fix build with bash version <= 3.0:
+ 
+    doltlibtool broken on linux with bash 3.00.0
+    https://bugs.freedesktop.org/show_bug.cgi?id=18363
+ 
+ Bug fixes
+ ---------
+ Avoid triggering a bug in X.org server 6.9 resulting in a hung machine
+ requiring a reboot:
+ 
+     https://bugs.freedesktop.org/show_bug.cgi?id=15628#c2
+ 
+ Fix display of user fonts as exercised by proposed support for type3
+ fonts in poppler (unsigned promotion fixes):
+ 
+     Use cairo user-font for Type 3 fonts
+     http://lists.freedesktop.org/archives/poppler/2008-October/004181.html
+ 
+ Avoid miscomputing size of fallback images required when rendering
+ with CLEAR, IN, or SOURCE operator to vector surfaces, (PS, PDF, SVG,
+ etc.).
+ 
+ Be more tolerant of broken fonts when subsetting type1 fonts:
+ 
+    Error handling in cairo_type1_font_subset_get_glyph_names_and_widths
+    http://lists.cairographics.org/archives/cairo/2008-October/015569.html
+ 
+ Fix cairo_fill_extents, cairo_stroke_extents, cairo_path_extents, to
+ correctly allow NULL parameters as documented.
  
+ Fix potential crash on emitting a type3 glyph after having drawn text
+ paths from the same font, (for example with cairo_text_path).
  
  Release 1.8.2 (2008-10-29 Carl Worth <cworth at cworth.org>)
  =========================================================
commit ab61544b30406a49abc1f559d81129edce6d41ec
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Nov 14 13:17:01 2008 +0100

    Increment version to 1.8.5 after the 1.8.4 release.

diff --git a/cairo-version.h b/cairo-version.h
index 879ec71..e389760 100644
--- a/cairo-version.h
+++ b/cairo-version.h
@@ -3,6 +3,6 @@
 
 #define CAIRO_VERSION_MAJOR 1
 #define CAIRO_VERSION_MINOR 8
-#define CAIRO_VERSION_MICRO 4
+#define CAIRO_VERSION_MICRO 5
 
 #endif
commit 66e8f142e381501d114888c2d1fc1e7f6d6a9857
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Nov 14 11:08:40 2008 +0100

    Increment version to 1.8.4

diff --git a/cairo-version.h b/cairo-version.h
index 0a2f40a..879ec71 100644
--- a/cairo-version.h
+++ b/cairo-version.h
@@ -3,6 +3,6 @@
 
 #define CAIRO_VERSION_MAJOR 1
 #define CAIRO_VERSION_MINOR 8
-#define CAIRO_VERSION_MICRO 3
+#define CAIRO_VERSION_MICRO 4
 
 #endif
commit b9c1344ad82d38bb86fa85fbb565b2de64aa0e35
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Nov 14 11:07:10 2008 +0100

    NEWS: Add notes for cairo 1.8.4
    
    Just a few bug fixes here.

diff --git a/NEWS b/NEWS
index 7a9150e..5be426c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,55 @@
+Release 1.8.4 (2008-11-14 Carl Worth <cworth at cworth.org>)
+=========================================================
+The cairo community is pleased to announce the 1.8.4 release of the
+cairo graphics library. This is the second update to cairo's stable
+1.8 series and contains a small number of bug fixes, (in particular a
+few fixes for build failures of cairo 1.8.2 on various systems). This
+is being released just over two weeks after cairo 1.8.2.
+
+We recommend that everyone using cairo upgrade to 1.8.4.
+
+-Carl
+
+Build fixes
+-----------
+Fix build with older XRender that doesn't define RepeatNone:
+
+   Build of xlib backend fails against old XRender (RepeatNone undeclared)
+   https://bugs.freedesktop.org/show_bug.cgi?id=18385
+
+Fix build with bash version <= 3.0:
+
+   doltlibtool broken on linux with bash 3.00.0
+   https://bugs.freedesktop.org/show_bug.cgi?id=18363
+
+Bug fixes
+---------
+Avoid triggering a bug in X.org server 6.9 resulting in a hung machine
+requiring a reboot:
+
+    https://bugs.freedesktop.org/show_bug.cgi?id=15628#c2
+
+Fix display of user fonts as exercised by proposed support for type3
+fonts in poppler (unsigned promotion fixes):
+
+    Use cairo user-font for Type 3 fonts
+    http://lists.freedesktop.org/archives/poppler/2008-October/004181.html
+
+Avoid miscomputing size of fallback images required when rendering
+with CLEAR, IN, or SOURCE operator to vector surfaces, (PS, PDF, SVG,
+etc.).
+
+Be more tolerant of broken fonts when subsetting type1 fonts:
+
+   Error handling in cairo_type1_font_subset_get_glyph_names_and_widths
+   http://lists.cairographics.org/archives/cairo/2008-October/015569.html
+
+Fix cairo_fill_extents, cairo_stroke_extents, cairo_path_extents, to
+correctly allow NULL parameters as documented.
+
+Fix potential crash on emitting a type3 glyph after having drawn text
+paths from the same font, (for example with cairo_text_path).
+
 Release 1.8.2 (2008-10-29 Carl Worth <cworth at cworth.org>)
 =========================================================
 The cairo community is pleased to announce the 1.8.2 release of the
commit d654d528de16769932131da80f4b925151d50103
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Nov 13 16:45:15 2008 +0100

    Blacklist "X.Org" < 7.0 with the buggy_repeat workaround.
    
    This is in response to a report that a 6.9 server crashes with
    cairo's extend-reflect test:
    
    https://bugs.freedesktop.org/show_bug.cgi?id=15628#c2

diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index fae0f23..b2e2755 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -319,10 +319,17 @@ _cairo_xlib_display_get (Display *dpy)
      *    by using the same buggy_repeat workaround. Confirmed X
      *    servers with this bug include:
      *
-     *		"X.org" < 10400000 (new numbering scheme)
+     *		"X.org" == 60900000 (old versioning scheme)
+     *		"X.org"  < 10400000 (new numbering scheme)
+     *
+     *    For the old-versioning-scheme X servers we don't know
+     *    exactly when second the bug started, but since bug 1 is
+     *    present through 6.8.2 and bug 2 is present in 6.9.0 it seems
+     *    safest to just blacklist all old-versioning-scheme X servers,
+     *    (just using VendorRelase < 70000000), as buggy_repeat=TRUE.
      */
     if (strstr (ServerVendor (dpy), "X.Org") != NULL) {
-	if (VendorRelease (dpy) >= 60700000 && VendorRelease (dpy) <= 60802000)
+	if (VendorRelease (dpy) >= 60700000 && VendorRelease (dpy) < 70000000)
 	    display->buggy_repeat = TRUE;
 	if (VendorRelease (dpy) < 10400000)
 	    display->buggy_repeat = TRUE;
commit 35a1ba0ddc45f9cc785c6f8a37b6bb49c953e047
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Nov 13 16:36:20 2008 +0100

    Document the buggy_repeat workaround more carefully.
    
    It's a confusing condition, so let's be explicit about where
    the various numbers come from.

diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index 5e6dba1..fae0f23 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -283,25 +283,47 @@ _cairo_xlib_display_get (Display *dpy)
 	    sizeof (display->cached_xrender_formats));
 
     display->buggy_repeat = FALSE;
+
+    /* This buggy_repeat condition is very complicated because there
+     * are multiple X server code bases (with multiple versioning
+     * schemes within a code base), and multiple bugs.
+     *
+     * The X servers:
+     *
+     *    1. The Vendor=="XFree86" code base with release numbers such
+     *    as 4.7.0 (VendorRelease==40700000).
+     *
+     *    2. The Vendor=="X.Org" code base (a descendant of the
+     *    XFree86 code base). It originally had things like
+     *    VendorRelease==60700000 for release 6.7.0 but then changed
+     *    its versioning scheme so that, for example,
+     *    VendorRelease==10400000 for the 1.4.0 X server within the
+     *    X.Org 7.3 release.
+     *
+     * The bugs:
+     *
+     *    1. The original bug that led to the buggy_repeat
+     *    workaround. This was a bug that Owen Taylor investigated,
+     *    understood well, and characterized against carious X
+     *    servers. Confirmed X servers with this bug include:
+     *
+     *		"XFree86" <= 40500000
+     *		"X.Org" <= 60802000 (only with old numbering >= 60700000)
+     *
+     *    2. A separate bug resulting in a crash of the X server when
+     *    using cairo's extend-reflect test case, (which, surprisingly
+     *    enough was not passing RepeatReflect to the X server, but
+     *    instead using RepeatNormal in a workaround). Nobody to date
+     *    has understood the bug well, but it appears to be gone as of
+     *    the X.Org 1.4.0 server. This bug is coincidentally avoided
+     *    by using the same buggy_repeat workaround. Confirmed X
+     *    servers with this bug include:
+     *
+     *		"X.org" < 10400000 (new numbering scheme)
+     */
     if (strstr (ServerVendor (dpy), "X.Org") != NULL) {
-	/* When modularized, the X.Org server VendorRelease was
-	 * bogusly reset to a very small number, without any change in
-	 * the ServerVendor string. We avoid considering the new
-	 * servers with the small number as buggy by restricting the
-	 * test to known bad releases. But there could be a problem
-	 * again in the future if X.Org server versions ever climb
-	 * back up to 6.7 or 6.8. */
 	if (VendorRelease (dpy) >= 60700000 && VendorRelease (dpy) <= 60802000)
 	    display->buggy_repeat = TRUE;
-
-	/* But even the new modular server has bugs, (bad enough to
-	 * crash the X server), that it so happens we can avoid with
-	 * the exact same buggy_repeat workaround. We've verified that
-	 * this bug exists as least as late as version 1.3.0.0, (which
-	 * is in Fedora 8), and is gone again in version 1.4.99.901
-	 * (from a Fedora 9 Beta). Versions between those are still
-	 * unknown, but until we learn more, we'll assume that any 1.3
-	 * version is buggy.  */
 	if (VendorRelease (dpy) < 10400000)
 	    display->buggy_repeat = TRUE;
     } else if (strstr (ServerVendor (dpy), "XFree86") != NULL) {
commit a1ab11df01962bea5752f5a5b53926a26a6f34ae
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Nov 5 11:50:20 2008 -0500

    Define RepeatNone, etc if the available Render version doesn't (#18385)

diff --git a/src/cairo-xlib-xrender-private.h b/src/cairo-xlib-xrender-private.h
index 329262c..eee585c 100644
--- a/src/cairo-xlib-xrender-private.h
+++ b/src/cairo-xlib-xrender-private.h
@@ -45,6 +45,24 @@
 #include <X11/extensions/Xrender.h>
 #include <X11/extensions/renderproto.h>
 
+/* We require Render >= 0.6.  The following defines were only added in
+ * 0.10.  Make sure they are defined.
+ */
+
+/* Filters included in 0.10 */
+#ifndef FilterConvolution
+#define FilterConvolution		    "convolution"
+#endif
+
+/* Extended repeat attributes included in 0.10 */
+#ifndef RepeatNone
+#define RepeatNone                          0
+#define RepeatNormal                        1
+#define RepeatPad                           2
+#define RepeatReflect                       3
+#endif
+
+
 #else /* !CAIRO_HAS_XLIB_XRENDER_SURFACE */
 
 /* Provide dummy symbols and macros to get it compile and take the fallback
commit 1d8ad69abb88f6e0283b6ce2aadc5d801b8e3722
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Nov 4 01:51:06 2008 -0500

    [aclocal.dolt.m4] Fix build with bash versions <= 3.0 (bug #18363)

diff --git a/build/aclocal.dolt.m4 b/build/aclocal.dolt.m4
index 8c75480..8f94582 100644
--- a/build/aclocal.dolt.m4
+++ b/build/aclocal.dolt.m4
@@ -157,7 +157,7 @@ for arg in "$[]@"; do
     case "$arg" in
         --mode=compile) modeok=true ;;
         --tag=CC|--tag=CXX) tagok=true ;;
-        *) args+=("$arg")
+        *) args@<:@${#args[@]}@:>@="$arg" ;;
     esac
 done
 if $modeok && $tagok ; then
commit 6434cddb899d750b815d71f8f51ae3e4568dd3c0
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Nov 2 11:42:33 2008 +1030

    type1-subset: return unsupported on FT errors
    
    and let type1-fallback handle it. This fixes the bug reported by
    Peter Weilbacher in
    http://lists.cairographics.org/archives/cairo/2008-October/015569.html

diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index ddc4ce7..bbff33d 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -553,18 +553,14 @@ cairo_type1_font_subset_get_glyph_names_and_widths (cairo_type1_font_subset_t *f
 	error = FT_Load_Glyph (font->face, i,
 			       FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING |
 			       FT_LOAD_NO_BITMAP | FT_LOAD_IGNORE_TRANSFORM);
-	if (error != 0) {
-	    printf ("could not load glyph %d\n", i);
-	    return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-	}
+	if (error != 0)
+	    return CAIRO_INT_STATUS_UNSUPPORTED;
 
 	font->glyphs[i].width = font->face->glyph->metrics.horiAdvance;
 
 	error = FT_Get_Glyph_Name(font->face, i, buffer, sizeof buffer);
-	if (error != 0) {
-	    printf ("could not get glyph name for glyph %d\n", i);
-	    return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-	}
+	if (error != 0)
+	    return CAIRO_INT_STATUS_UNSUPPORTED;
 
 	font->glyphs[i].name = strdup (buffer);
 	if (font->glyphs[i].name == NULL)


More information about the cairo-commit mailing list