Skip to content

Commit

Permalink
Merge tag '1.12.8' into HEAD
Browse files Browse the repository at this point in the history
cairo 1.12.8 release

# gpg: error loading `iconv.dll': The specified module could not be found.
#
# gpg: please see http://www.gnupg.org/download/iconv.html for more information
# gpg: keyblock resource `c:/Users/Vincent Povirk/.gnupg\pubring.gpg': file open error
# gpg: Signature made 11/04/12 09:22:56 using DSA key ID 80193984
# gpg: Can't check signature: public key not found
  • Loading branch information
madewokherd committed Nov 16, 2012
2 parents 7c791b7 + cc16291 commit eb2fff7
Show file tree
Hide file tree
Showing 37 changed files with 857 additions and 231 deletions.
77 changes: 77 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,80 @@
Release 1.12.8 (2012-11-24 Chris Wilson <[email protected]>)
===================================================================
Another couple of weeks and a few more bugs have been found and fixed,
it is time to push the next point release. Many thanks to everyone who
reported their issues and helped us track down the bugs and helped
testing the fixes.

Bug fixes
---------

Expand the sanity checking for broken combinations of XSendEvent and
ShmCompletionEvent.

Notice that "The X.Org Foundation" sometimes also identifies itself
as "The Xorg Foundation".

Handle various ages of libXext and its Shm headers.

Fix the invalid clipping of the source drawable when using SHM
transport to upload images.
https://bugs.freedesktop.org/show_bug.cgi?id=56547

Handle all Type1 postscript operators for better font compatibility.
https://bugs.freedesktop.org/show_bug.cgi?id=56265

Fix a couple of memory leaks in Type1 font subsetting
https://bugs.freedesktop.org/show_bug.cgi?id=56566

Tighten the evaluation of the start/stop pen vertices, and catch a few
instances where we would use a fan instead of a bevel.
https://bugs.freedesktop.org/show_bug.cgi?id=56432

Fix assumption that geometric clipping always succeeds with the
span-compositor.
https://bugs.freedesktop.org/show_bug.cgi?id=56574

Fix call to spline intersection when evaluating whether a stoke is
visible.

Remember to copy inferior sources when using SHM to readback the
surface for use as a source.

Release 1.12.6 (2012-10-22 Chris Wilson <[email protected]>)
===================================================================
Thanks to everyone who download cairo-1.12.4 and gave us their feedback.
It truly was invaluable and has helped us to fix many portability issues
that crept in with some of the new features. This release aims to fix
those stability issues and run on a wider range of systems.

Bug fixes
---------

Fix the recording surface to actually snapshot the source and so fix
PDF drawing.

Calling XSendEvent with an XShmCompletionEvent is incompatabile with
older Xorg servers.

Reorder CloseDisplay chain so that XShm is not reinstantiated after
shutdown, causing a potential crash if the Display was immediately
recreated using the same memory address.

Make sure that the Xserver has attached to the SHM segment before
deleting it from the global namespace on systems that do not support
deferred deletion.

Type1 subsetting support for PDF (and PS) was once again improved to
work with a larger number of PDF readers.

GLESv2 build fixes and improved support for embedded GPUs.

Tweak the invisible pen detection for applications that are currently
using too large values for geometric tolerance.

A build fix for older freetype libraries.


Release 1.12.4 (2012-10-05 Chris Wilson <[email protected]>)
===================================================================
More bugs, and more importantly, more fixes. On the cairo-gl side, we
Expand Down
2 changes: 2 additions & 0 deletions build/aclocal.pkg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ fi[]dnl
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
# ACTION-IF-NOT-FOUND is not allowed to be empty, that trigger PKG_CONFIG_PATH error message.
# Use : or set a dummy variable to avoid that behavior.
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
Expand Down
11 changes: 7 additions & 4 deletions build/configure.ac.warnings
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ MAYBE_WARN="-Wall -Wextra \
-Wno-missing-field-initializers -Wno-unused-parameter \
-Wno-attributes -Wno-long-long -Winline"

# New -Wno options should be added here
# gcc-4.4 and later accept every -Wno- option but may complain later that this
# option is unknow each time another warning happen.
# -Wunused-but-set-variable is too noisy at present
NO_WARN="-Wno-unused-but-set-variable"
NO_WARN="unused-but-set-variable"

dnl Sun Studio 12 likes to rag at us for abusing enums like
dnl having cairo_status_t variables hold cairo_int_status_t
Expand All @@ -48,8 +51,6 @@ MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
dnl Also to turn various gcc/glibc-specific preprocessor checks
MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2"

MAYBE_WARN="$MAYBE_WARN $NO_WARN"

# invalidate cached value if MAYBE_WARN has changed
if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then
unset cairo_cv_warn_cflags
Expand All @@ -72,7 +73,9 @@ AC_CACHE_CHECK([for supported warning flags], cairo_cv_warn_cflags, [
for W in $MAYBE_WARN; do
CAIRO_CC_TRY_FLAG([$W],, [WARN_CFLAGS="$WARN_CFLAGS $W"])
done

for W in $NO_WARN; do
CAIRO_CC_TRY_FLAG([-W$W -Wno-$W],, [WARN_CFLAGS="$WARN_CFLAGS -Wno-$W"])
done
cairo_cv_warn_cflags=$WARN_CFLAGS
cairo_cv_warn_maybe=$MAYBE_WARN

Expand Down
2 changes: 1 addition & 1 deletion cairo-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

#define CAIRO_VERSION_MAJOR 1
#define CAIRO_VERSION_MINOR 12
#define CAIRO_VERSION_MICRO 4
#define CAIRO_VERSION_MICRO 8

#endif
79 changes: 54 additions & 25 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,50 @@ dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
xlib_REQUIRES="x11 xext"
PKG_CHECK_MODULES(xlib, $xlib_REQUIRES, ,
[AC_MSG_RESULT(no)
xlib_REQUIRES=""
[xlib_REQUIRES=""
AC_PATH_XTRA
if test "x$no_x" = xyes; then
use_xlib="no (requires X development libraries)"
else
xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
fi])
AC_CHECK_HEADER(sys/ipc.h)
AC_CHECK_HEADER(sys/shm.h)
if test "$ac_cv_header_sys_ipc_h" = "yes" -a "$ac_cv_header_sys_shm_h" = "yes"; then
AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int main()
{
char *shmaddr;
int id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
if (id == -1) return 2;
shmaddr = shmat (id, 0, 0);
shmctl (id, IPC_RMID, 0);
if ((char*) shmat (id, 0, 0) == (char*) -1) {
shmdt (shmaddr);
return 1;
}
shmdt (shmaddr);
shmdt (shmaddr);
return 0;
}
],
AC_DEFINE(IPC_RMID_DEFERRED_RELEASE, 1,
[Define to 1 if shared memory segments are released deferred.])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no),
AC_MSG_RESULT(assuming no))
fi
AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [],
[#include <X11/Xlibint.h>
#include <X11/Xproto.h>])
])

CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
Expand All @@ -84,8 +119,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
xlib_xrender_BASE=cairo-xlib
xlib_xrender_REQUIRES="xrender >= 0.6"
PKG_CHECK_MODULES(xlib_xrender, $xlib_xrender_REQUIRES, ,
[AC_MSG_RESULT(no)
xlib_xrender_REQUIRES=""
[xlib_xrender_REQUIRES=""
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $xlib_CFLAGS $xlib_NONPKGCONFIG_CFLAGS"
AC_CHECK_HEADER(X11/extensions/Xrender.h,
Expand All @@ -110,16 +144,14 @@ dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(xcb, XCB, auto, [
xcb_REQUIRES="xcb >= 1.6 xcb-render >= 1.6"
PKG_CHECK_MODULES(xcb, $xcb_REQUIRES, ,
[AC_MSG_RESULT(no)
use_xcb="no (requires $xcb_REQUIRES http://xcb.freedesktop.org)"])
[use_xcb="no (requires $xcb_REQUIRES http://xcb.freedesktop.org)"])
])

CAIRO_ENABLE_FUNCTIONS(xlib_xcb, Xlib/XCB, no, [
if test "x$use_xcb" = "xyes" -a "x$use_xlib" = "xyes"; then
xlib_xcb_REQUIRES="x11-xcb"
PKG_CHECK_MODULES(xlib_xcb, $xlib_xcb_REQUIRES, ,
[AC_MSG_RESULT(no)
use_xlib_xcb="no (requires $xlib_xcb_REQUIRES http://xcb.freedesktop.org)"])
[use_xlib_xcb="no (requires $xlib_xcb_REQUIRES http://xcb.freedesktop.org)"])
else
use_xlib_xcb="no (requires both --enable-xlib and --enable-xcb)"
fi
Expand All @@ -129,8 +161,7 @@ CAIRO_ENABLE_FUNCTIONS(xcb_shm, XCB/SHM, auto, [
if test "x$use_xcb" = "xyes"; then
xcb_shm_REQUIRES="xcb-shm"
PKG_CHECK_MODULES(xcb_shm, $xcb_shm_REQUIRES, ,
[AC_MSG_RESULT(no)
use_xcb_shm="no (requires $xcb_shm http://xcb.freedesktop.org)"])
[use_xcb_shm="no (requires $xcb_shm http://xcb.freedesktop.org)"])
else
use_xcb_shm="no (requires --enable-xcb)"
fi
Expand All @@ -141,8 +172,7 @@ dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(qt, Qt, no, [
qt_REQUIRES="QtGui >= 4.4.0"
PKG_CHECK_MODULES(qt, $qt_REQUIRES, ,
[AC_MSG_RESULT(no)
qt_REQUIRES=""
[qt_REQUIRES=""
use_qt="no (requires Qt4 development libraries)"
])
])
Expand Down Expand Up @@ -250,8 +280,8 @@ dnl ===========================================================================

CAIRO_ENABLE_SURFACE_BACKEND(drm, DRM, no, [
drm_REQUIRES="libudev >= 136"
PKG_CHECK_MODULES(drm, $drm_REQUIRES, , [AC_MSG_RESULT(no)
use_drm="no (requires $drm_REQUIRES, udev is available from git://git.kernel.org/pub/scm/linux/hotplug/udev.git)"])
PKG_CHECK_MODULES(drm, $drm_REQUIRES, ,
[use_drm="no (requires $drm_REQUIRES, udev is available from git://git.kernel.org/pub/scm/linux/hotplug/udev.git)"])
])

CAIRO_ENABLE_SURFACE_BACKEND(gallium, Gallium3D, no, [
Expand Down Expand Up @@ -290,7 +320,7 @@ CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
fi
if test "x$use_png" = "xyes" ; then
PKG_CHECK_MODULES(png, $png_REQUIRES, , AC_MSG_RESULT(no))
PKG_CHECK_MODULES(png, $png_REQUIRES, , : )
else
AC_MSG_WARN([Could not find libpng in the pkg-config search path])
fi
Expand Down Expand Up @@ -344,7 +374,7 @@ dnl ===========================================================================

CAIRO_ENABLE_SURFACE_BACKEND(directfb, directfb, no, [
directfb_REQUIRES=directfb
PKG_CHECK_MODULES(directfb, $directfb_REQUIRES, , AC_MSG_RESULT(no)
PKG_CHECK_MODULES(directfb, $directfb_REQUIRES, ,
[use_directfb="no (requires $directfb_REQUIRES http://www.directfb.org)"])
])

Expand Down Expand Up @@ -447,8 +477,7 @@ CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION,
[freetype_pkgconfig=yes],
[AC_MSG_RESULT(no)
freetype_pkgconfig=no])
[freetype_pkgconfig=no])
if test "x$freetype_pkgconfig" = "xyes"; then
ft_REQUIRES="freetype2 >= $FREETYPE_MIN_VERSION $ft_REQUIRES"
Expand Down Expand Up @@ -482,7 +511,7 @@ CAIRO_ENABLE_FONT_BACKEND(fc, Fontconfig, auto, [
if test "x$use_fc" = "xyes"; then
fc_REQUIRES="fontconfig >= $FONTCONFIG_MIN_VERSION"
PKG_CHECK_MODULES(FONTCONFIG, $fc_REQUIRES,,
[AC_MSG_RESULT(no); use_fc="no (requires $fc_REQUIRES)"])
[use_fc="no (requires $fc_REQUIRES)"])
fi
fc_CFLAGS="$FONTCONFIG_CFLAGS"
fc_LIBS="$FONTCONFIG_LIBS"
Expand All @@ -501,7 +530,7 @@ if test "x$use_ft" = "xyes"; then
AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
[FT_Bitmap_Size structure includes y_ppem field])

AC_CHECK_FUNCS(FT_GlyphSlot_Embolden FT_GlyphSlot_Oblique FT_Load_Sfnt_Table FT_Library_SetLcdFilter)
AC_CHECK_FUNCS(FT_Get_X11_Font_Format FT_GlyphSlot_Embolden FT_GlyphSlot_Oblique FT_Load_Sfnt_Table FT_Library_SetLcdFilter)

LIBS="$_save_libs"
CFLAGS="$_save_cflags"
Expand Down Expand Up @@ -620,8 +649,8 @@ dnl ===========================================================================

CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
pixman_REQUIRES="pixman-1 >= 0.22.0"
PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, , [AC_MSG_RESULT(no)
use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"])
PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, ,
[use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"])
image_REQUIRES=$pixman_REQUIRES
image_CFLAGS=$pixman_CFLAGS
image_LIBS=$pixman_LIBS
Expand Down Expand Up @@ -668,13 +697,13 @@ dnl Build gobject integration library

CAIRO_ENABLE_FUNCTIONS(gobject, gobject, auto, [
gobject_REQUIRES="gobject-2.0 glib-2.0"
PKG_CHECK_MODULES(GOBJECT, $gobject_REQUIRES, , [AC_MSG_RESULT(no)
use_gobject="no (requires $gobject_REQUIRES http://download.gnome.org/pub/GNOME/sources/glib/)"])
PKG_CHECK_MODULES(GOBJECT, $gobject_REQUIRES, ,
[use_gobject="no (requires $gobject_REQUIRES http://download.gnome.org/pub/GNOME/sources/glib/)"])
gobject_NONPKGCONFIG_EXTRA_LIBS="-L\${libdir} -lcairo-gobject"
])
dnl I'm too lazy to fix the caching properly
if test "x$use_gobject" = "xyes"; then
PKG_CHECK_MODULES(GOBJECT, $gobject_REQUIRES)
PKG_CHECK_MODULES(GOBJECT, $gobject_REQUIRES, : )
fi

dnl ===========================================================================
Expand Down
6 changes: 3 additions & 3 deletions src/cairo-cff-subset.c
Original file line number Diff line number Diff line change
Expand Up @@ -2787,7 +2787,7 @@ _cairo_cff_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
if (backend->is_synthetic && backend->is_synthetic (scaled_font_subset->scaled_font))
return CAIRO_INT_STATUS_UNSUPPORTED;

font = malloc (sizeof (cairo_cff_font_t));
font = calloc (1, sizeof (cairo_cff_font_t));
if (unlikely (font == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);

Expand Down Expand Up @@ -2862,11 +2862,11 @@ _cairo_cff_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
fail3:
free (font->subset_font_name);
fail2:
free (font->data);
free (font->font_name);
free (font->ps_name);
_cairo_array_fini (&font->output);
fail1:
free (font->data);
free (font->font_name);
free (font);

return status;
Expand Down
7 changes: 7 additions & 0 deletions src/cairo-composite-rectangles.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,13 @@ _cairo_composite_rectangles_init_for_glyphs (cairo_composite_rectangles_t *exten
if (unlikely (status))
return status;

if (overlap && *overlap &&
scaled_font->options.antialias == CAIRO_ANTIALIAS_NONE &&
_cairo_pattern_is_opaque_solid (&extents->source_pattern.base))
{
*overlap = FALSE;
}

return _cairo_composite_rectangles_intersect (extents, clip);
}

Expand Down
23 changes: 17 additions & 6 deletions src/cairo-ft-font.c
Original file line number Diff line number Diff line change
Expand Up @@ -2521,6 +2521,22 @@ _cairo_index_to_glyph_name (void *abstract_font,
return CAIRO_INT_STATUS_UNSUPPORTED;
}

static cairo_bool_t
_ft_is_type1 (FT_Face face)
{
#if HAVE_FT_GET_X11_FONT_FORMAT
const char *font_format = FT_Get_X11_Font_Format (face);
if (font_format &&
(strcmp (font_format, "Type 1") == 0 ||
strcmp (font_format, "CFF") == 0))
{
return TRUE;
}
#endif

return FALSE;
}

static cairo_int_status_t
_cairo_ft_load_type1_data (void *abstract_font,
long offset,
Expand All @@ -2533,7 +2549,6 @@ _cairo_ft_load_type1_data (void *abstract_font,
cairo_status_t status = CAIRO_STATUS_SUCCESS;
unsigned long available_length;
unsigned long ret;
const char *font_format;

assert (length != NULL);

Expand All @@ -2551,11 +2566,7 @@ _cairo_ft_load_type1_data (void *abstract_font,
}
#endif

font_format = FT_Get_X11_Font_Format (face);
if (!font_format ||
!(strcmp (font_format, "Type 1") == 0 ||
strcmp (font_format, "CFF") == 0))
{
if (! _ft_is_type1 (face)) {
status = CAIRO_INT_STATUS_UNSUPPORTED;
goto unlock;
}
Expand Down
Loading

0 comments on commit eb2fff7

Please sign in to comment.