# HG changeset patch # User Aleksej Bobylev # Date 1467201724 -10800 # Node ID b34e3540f205842f863c9437190ef4a49408a46f # Parent faaf4f7a0acc3bdec79901cd015d27c04f03014b Split "cairo-tools" from "cairo"; split "cairo-gl-tools" from "cairo-gl"; check dependencies. diff -r faaf4f7a0acc -r b34e3540f205 cairo-dev/receipt --- a/cairo-dev/receipt Wed Jun 29 13:38:09 2016 +0200 +++ b/cairo-dev/receipt Wed Jun 29 15:02:04 2016 +0300 @@ -3,15 +3,17 @@ PACKAGE="cairo-dev" VERSION="1.14.4" CATEGORY="development" -SHORT_DESC="2D graphics library devel files." +SHORT_DESC="2D graphics library, development files" MAINTAINER="pankso@slitaz.org" LICENSE="MPL LGPL2.1" -WEB_SITE="http://www.cairographics.org/" -WANTED="cairo" +WEB_SITE="https://www.cairographics.org/" HOST_ARCH="i486 arm" -DEPENDS="pixman-dev xorg-libXrender-dev xorg-libXext-dev glib-dev libxcb-dev \ -xcb-util-dev cairo fontconfig-dev freetype-dev libpng-dev expat-dev pkg-config" +WANTED="cairo" +DEPENDS="cairo cairo-tools bzip2 fontconfig-dev freetype-dev glib-dev \ +harfbuzz-dev libffi-dev libpng-dev libxcb-dev libxml2-dev pcre-dev pixman-dev \ +xorg-libX11-dev xorg-libXau-dev xorg-libXdmcp-dev xorg-libXext-dev \ +xorg-libXrender-dev" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() diff -r faaf4f7a0acc -r b34e3540f205 cairo-gl-dev/receipt --- a/cairo-gl-dev/receipt Wed Jun 29 13:38:09 2016 +0200 +++ b/cairo-gl-dev/receipt Wed Jun 29 15:02:04 2016 +0300 @@ -3,16 +3,18 @@ PACKAGE="cairo-gl-dev" VERSION="1.14.4" CATEGORY="development" -SHORT_DESC="2D graphics library devel files with GL support." +SHORT_DESC="2D graphics library with GL support, development files" MAINTAINER="pankso@slitaz.org" LICENSE="MPL LGPL2.1" -WEB_SITE="http://www.cairographics.org/" -WANTED="cairo-gl" +WEB_SITE="https://www.cairographics.org/" HOST_ARCH="i486" -DEPENDS="pixman-dev xorg-libXrender-dev glib-dev libxcb-dev xcb-util-dev \ -cairo fontconfig-dev freetype-dev libpng-dev expat-dev pkg-config \ -mesa-wayland-dev" +WANTED="cairo-gl" +DEPENDS="cairo-gl cairo-gl-tools fontconfig-dev freetype-dev glib-dev \ +harfbuzz-dev libdrm-dev libffi-dev libpng-dev libxcb-dev libxml2-dev \ +mesa-wayland-dev pcre-dev pixman-dev udev-dev wayland-dev xorg-libX11-dev \ +xorg-libXau-dev xorg-libXdamage-dev xorg-libXdmcp-dev xorg-libXext-dev \ +xorg-libXfixes-dev xorg-libXrender-dev xorg-libXxf86vm-dev" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() diff -r faaf4f7a0acc -r b34e3540f205 cairo-gl-tools/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cairo-gl-tools/receipt Wed Jun 29 15:02:04 2016 +0300 @@ -0,0 +1,21 @@ +# SliTaz package receipt. + +PACKAGE="cairo-gl-tools" +VERSION="1.14.4" +CATEGORY="development" +SHORT_DESC="2D graphics library, development tools" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MPL LGPL2.1" +WEB_SITE="https://www.cairographics.org/" +HOST_ARCH="i486 arm" + +WANTED="cairo-gl" +DEPENDS="cairo-gl libbfd wayland" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib/cairo + cp -a $install/usr/bin $fs/usr + cp -a $install/usr/lib/cairo/*.so* $fs/usr/lib/cairo +} diff -r faaf4f7a0acc -r b34e3540f205 cairo-gl/receipt --- a/cairo-gl/receipt Wed Jun 29 13:38:09 2016 +0200 +++ b/cairo-gl/receipt Wed Jun 29 15:02:04 2016 +0300 @@ -3,21 +3,25 @@ PACKAGE="cairo-gl" VERSION="1.14.4" CATEGORY="x-window" -SHORT_DESC="2D graphics library with GL support." +SHORT_DESC="2D graphics library with GL support" MAINTAINER="pankso@slitaz.org" LICENSE="MPL LGPL2.1" SOURCE="cairo" TARBALL="$SOURCE-$VERSION.tar.xz" -WEB_SITE="http://www.cairographics.org/" -WGET_URL="http://cairographics.org/releases/$TARBALL" +WEB_SITE="https://www.cairographics.org/" +WGET_URL="${WEB_SITE}releases/$TARBALL" #HOST_ARCH="arm i486" -DEPENDS="glib pixman libpng zlib expat fontconfig freetype xorg-libX11 \ -xorg-libXau xorg-libXdmcp xorg-libXrender xcb-util libxcb mesa-wayland" +DEPENDS="bzlib fontconfig freetype glib glibc-base harfbuzz libdrm libffi \ +libpng libxcb libxml2 mesa mesa-wayland pcre pixman udev xorg-libX11 \ +xorg-libXau xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \ +xorg-libXrender xorg-libXxf86vm zlib" BUILD_DEPENDS="pkg-config glib-dev libpng-dev zlib-dev fontconfig-dev \ freetype-dev xorg-libX11-dev pixman-dev xorg-libXau-dev xorg-libXdmcp-dev \ xorg-libXrender-dev xcb-util-dev libxcb-dev expat-dev libxml2-dev \ mesa-wayland-dev wayland-dev udev-dev xorg-libXxf86vm-dev libdrm-dev" +SPLIT="cairo-gl-tools" +SIBLINGS="cairo" # Handle cross compilation case "$ARCH" in @@ -27,17 +31,14 @@ # Rules to configure and make the package. compile_rules() { - patch -Np1 -i $stuff/cairo-1.10.0-buggy_gradients.patch - # https://bugs.freedesktop.org/show_bug.cgi?id=50852 - patch -Np1 -i $stuff/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch ./configure \ --prefix=/usr \ - --with-html-dir=/usr/share/doc \ --enable-xcb \ + --enable-xlib-xcb \ --enable-tee \ --enable-gl \ --disable-static \ - $CONFIGURE_ARGS && + $CONFIGURE_ARGS && make $MAKEFLAGS && make DESTDIR=$DESTDIR install } @@ -48,4 +49,3 @@ mkdir -p $fs/usr/lib cp -a $install/usr/lib/*.so* $fs/usr/lib } - diff -r faaf4f7a0acc -r b34e3540f205 cairo-gl/stuff/cairo-1.10.0-buggy_gradients.patch --- a/cairo-gl/stuff/cairo-1.10.0-buggy_gradients.patch Wed Jun 29 13:38:09 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ ---- a/src/cairo-xlib-display.c.ubuntu 2010-08-04 11:57:49.000000000 +0200 -+++ b/src/cairo-xlib-display.c 2010-08-04 11:58:28.000000000 +0200 -@@ -353,11 +353,7 @@ - /* Prior to Render 0.10, there is no protocol support for gradients and - * we call function stubs instead, which would silently consume the drawing. - */ --#if RENDER_MAJOR == 0 && RENDER_MINOR < 10 - display->buggy_gradients = TRUE; --#else -- display->buggy_gradients = FALSE; --#endif - display->buggy_pad_reflect = FALSE; - display->buggy_repeat = FALSE; diff -r faaf4f7a0acc -r b34e3540f205 cairo-gl/stuff/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch --- a/cairo-gl/stuff/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch Wed Jun 29 13:38:09 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,275 +0,0 @@ -From f228769dfe5a8b5d73c49a41e95e31ed73a77fb3 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Fri, 08 Jun 2012 16:22:41 +0000 -Subject: polygon-reduce: Reduce broken stopped-edge continuation - -This is hopefully a lesser used path and the attempted optimisation to -continue a stopped edge with a colinear stopped edge highly unlikely and -lost in the noise of the general inefficiency of the routine. As it was -broken, rather than attempt to rectify the "optimisation" remove it. - -Reported-by: Evangelos Foutras -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50852 -Signed-off-by: Chris Wilson ---- -diff --git a/src/cairo-polygon-reduce.c b/src/cairo-polygon-reduce.c -index 8758070..ea457fe 100644 ---- a/src/cairo-polygon-reduce.c -+++ b/src/cairo-polygon-reduce.c -@@ -42,6 +42,8 @@ - #include "cairo-freelist-private.h" - #include "cairo-combsort-inline.h" - -+#define DEBUG_POLYGON 0 -+ - typedef cairo_point_t cairo_bo_point32_t; - - typedef struct _cairo_bo_intersect_ordinate { -@@ -114,7 +116,6 @@ typedef struct _cairo_bo_event_queue { - - typedef struct _cairo_bo_sweep_line { - cairo_bo_edge_t *head; -- cairo_bo_edge_t *stopped; - int32_t current_y; - cairo_bo_edge_t *current_edge; - } cairo_bo_sweep_line_t; -@@ -476,8 +477,8 @@ edges_compare_x_for_y (const cairo_bo_edge_t *a, - static inline int - _line_equal (const cairo_line_t *a, const cairo_line_t *b) - { -- return a->p1.x == b->p1.x && a->p1.y == b->p1.y && -- a->p2.x == b->p2.x && a->p2.y == b->p2.y; -+ return (a->p1.x == b->p1.x && a->p1.y == b->p1.y && -+ a->p2.x == b->p2.x && a->p2.y == b->p2.y); - } - - static int -@@ -1024,7 +1025,6 @@ static void - _cairo_bo_sweep_line_init (cairo_bo_sweep_line_t *sweep_line) - { - sweep_line->head = NULL; -- sweep_line->stopped = NULL; - sweep_line->current_y = INT32_MIN; - sweep_line->current_edge = NULL; - } -@@ -1139,6 +1139,8 @@ edges_colinear (const cairo_bo_edge_t *a, const cairo_bo_edge_t *b) - */ - if (a->edge.line.p1.y == b->edge.line.p1.y) { - return a->edge.line.p1.x == b->edge.line.p1.x; -+ } else if (a->edge.line.p2.y == b->edge.line.p2.y) { -+ return a->edge.line.p2.x == b->edge.line.p2.x; - } else if (a->edge.line.p1.y < b->edge.line.p1.y) { - return edge_compare_for_y_against_x (b, - a->edge.line.p1.y, -@@ -1205,82 +1207,48 @@ _active_edges_to_polygon (cairo_bo_edge_t *left, - cairo_polygon_t *polygon) - { - cairo_bo_edge_t *right; -+ unsigned int mask; - -- if (fill_rule == CAIRO_FILL_RULE_WINDING) { -- while (left != NULL) { -- int in_out = left->edge.dir; -- -- right = left->next; -- if (left->deferred.right == NULL) { -- while (right != NULL && right->deferred.right == NULL) -- right = right->next; -- -- if (right != NULL && edges_colinear (left, right)) { -- /* continuation on left */ -- left->deferred = right->deferred; -- right->deferred.right = NULL; -- } -- } -- -- right = left->next; -- while (right != NULL) { -- if (right->deferred.right != NULL) -- _cairo_bo_edge_end (right, top, polygon); -- -- in_out += right->edge.dir; -- if (in_out == 0) { -- cairo_bo_edge_t *next; -- cairo_bool_t skip = FALSE; -- -- /* skip co-linear edges */ -- next = right->next; -- if (next != NULL) -- skip = edges_colinear (right, next); -+ if (fill_rule == CAIRO_FILL_RULE_WINDING) -+ mask = ~0; -+ else -+ mask = 1; - -- if (! skip) -- break; -- } -+ while (left != NULL) { -+ int in_out = left->edge.dir; - -+ right = left->next; -+ if (left->deferred.right == NULL) { -+ while (right != NULL && right->deferred.right == NULL) - right = right->next; -- } -- -- _cairo_bo_edge_start_or_continue (left, right, top, polygon); - -- left = right; -- if (left != NULL) -- left = left->next; -+ if (right != NULL && edges_colinear (left, right)) { -+ /* continuation on left */ -+ left->deferred = right->deferred; -+ right->deferred.right = NULL; -+ } - } -- } else { -- while (left != NULL) { -- int in_out = 0; - -- right = left->next; -- while (right != NULL) { -- if (right->deferred.right != NULL) -- _cairo_bo_edge_end (right, top, polygon); -+ right = left->next; -+ while (right != NULL) { -+ if (right->deferred.right != NULL) -+ _cairo_bo_edge_end (right, top, polygon); - -- if ((in_out++ & 1) == 0) { -- cairo_bo_edge_t *next; -- cairo_bool_t skip = FALSE; -- -- /* skip co-linear edges */ -- next = right->next; -- if (next != NULL) -- skip = edges_colinear (right, next); -- -- if (! skip) -- break; -- } -- -- right = right->next; -+ in_out += right->edge.dir; -+ if ((in_out & mask) == 0) { -+ /* skip co-linear edges */ -+ if (right->next == NULL || !edges_colinear (right, right->next)) -+ break; - } - -- _cairo_bo_edge_start_or_continue (left, right, top, polygon); -- -- left = right; -- if (left != NULL) -- left = left->next; -+ right = right->next; - } -+ -+ _cairo_bo_edge_start_or_continue (left, right, top, polygon); -+ -+ left = right; -+ if (left != NULL) -+ left = left->next; - } - } - -@@ -1303,12 +1271,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - - while ((event = _cairo_bo_event_dequeue (&event_queue))) { - if (event->point.y != sweep_line.current_y) { -- for (e1 = sweep_line.stopped; e1; e1 = e1->next) { -- if (e1->deferred.right != NULL) -- _cairo_bo_edge_end (e1, e1->edge.bottom, polygon); -- } -- sweep_line.stopped = NULL; -- - _active_edges_to_polygon (sweep_line.head, - sweep_line.current_y, - fill_rule, polygon); -@@ -1328,23 +1290,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - if (unlikely (status)) - goto unwind; - -- /* check to see if this is a continuation of a stopped edge */ -- /* XXX change to an infinitesimal lengthening rule */ -- for (left = sweep_line.stopped; left; left = left->next) { -- if (e1->edge.top <= left->edge.bottom && -- edges_colinear (e1, left)) -- { -- e1->deferred = left->deferred; -- if (left->prev != NULL) -- left->prev = left->next; -- else -- sweep_line.stopped = left->next; -- if (left->next != NULL) -- left->next->prev = left->prev; -- break; -- } -- } -- - left = e1->prev; - right = e1->next; - -@@ -1371,14 +1316,8 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - - _cairo_bo_sweep_line_delete (&sweep_line, e1); - -- /* first, check to see if we have a continuation via a fresh edge */ -- if (e1->deferred.right != NULL) { -- e1->next = sweep_line.stopped; -- if (sweep_line.stopped != NULL) -- sweep_line.stopped->prev = e1; -- sweep_line.stopped = e1; -- e1->prev = NULL; -- } -+ if (e1->deferred.right != NULL) -+ _cairo_bo_edge_end (e1, e1->edge.bottom, polygon); - - if (left != NULL && right != NULL) { - status = _cairo_bo_event_queue_insert_if_intersect_below_current_y (&event_queue, left, right); -@@ -1420,10 +1359,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - } - } - -- for (e1 = sweep_line.stopped; e1; e1 = e1->next) { -- if (e1->deferred.right != NULL) -- _cairo_bo_edge_end (e1, e1->edge.bottom, polygon); -- } - unwind: - _cairo_bo_event_queue_fini (&event_queue); - -@@ -1447,6 +1382,12 @@ _cairo_polygon_reduce (cairo_polygon_t *polygon, - if (unlikely (0 == num_events)) - return CAIRO_STATUS_SUCCESS; - -+ if (DEBUG_POLYGON) { -+ FILE *file = fopen ("reduce_in.txt", "w"); -+ _cairo_debug_print_polygon (file, polygon); -+ fclose (file); -+ } -+ - events = stack_events; - event_ptrs = stack_event_ptrs; - if (num_events > ARRAY_LENGTH (stack_events)) { -@@ -1482,10 +1423,16 @@ _cairo_polygon_reduce (cairo_polygon_t *polygon, - num_events, - fill_rule, - polygon); -- polygon->num_limits = num_limits; -+ polygon->num_limits = num_limits; - - if (events != stack_events) - free (events); - -+ if (DEBUG_POLYGON) { -+ FILE *file = fopen ("reduce_out.txt", "w"); -+ _cairo_debug_print_polygon (file, polygon); -+ fclose (file); -+ } -+ - return status; - } --- -cgit v0.9.0.2-2-gbebe diff -r faaf4f7a0acc -r b34e3540f205 cairo-gl/stuff/cairo-respect-fontconfig.patch --- a/cairo-gl/stuff/cairo-respect-fontconfig.patch Wed Jun 29 13:38:09 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -diff -Nur cairo-1.8.6.orig/src/cairo-ft-font.c cairo-1.8.6/src/cairo-ft-font.c ---- cairo-1.8.6.orig/src/cairo-ft-font.c 2008-12-12 20:48:04.000000000 +0800 -+++ cairo-1.8.6/src/cairo-ft-font.c 2009-02-20 14:56:57.000000000 +0800 -@@ -1448,8 +1448,15 @@ - if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT) - options->base.hint_style = other->base.hint_style; - -- if (other->base.hint_style == CAIRO_HINT_STYLE_NONE) -- options->base.hint_style = CAIRO_HINT_STYLE_NONE; -+ //if (other->base.hint_style == CAIRO_HINT_STYLE_NONE) -+ //options->base.hint_style = CAIRO_HINT_STYLE_NONE; -+ -+ if (other->base.hint_style == CAIRO_HINT_STYLE_NONE || -+ other->base.hint_style == CAIRO_HINT_STYLE_SLIGHT || -+ other->base.hint_style == CAIRO_HINT_STYLE_MEDIUM || -+ other->base.hint_style == CAIRO_HINT_STYLE_FULL) { -+ options->base.hint_style = other->base.hint_style; -+ } - - if (options->base.antialias == CAIRO_ANTIALIAS_NONE) { - if (options->base.hint_style == CAIRO_HINT_STYLE_NONE) diff -r faaf4f7a0acc -r b34e3540f205 cairo-tools/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cairo-tools/receipt Wed Jun 29 15:02:04 2016 +0300 @@ -0,0 +1,21 @@ +# SliTaz package receipt. + +PACKAGE="cairo-tools" +VERSION="1.14.4" +CATEGORY="development" +SHORT_DESC="2D graphics library, development tools" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MPL LGPL2.1" +WEB_SITE="https://www.cairographics.org/" +HOST_ARCH="i486 arm" + +WANTED="cairo" +DEPENDS="cairo libbfd" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib/cairo + cp -a $install/usr/bin $fs/usr + cp -a $install/usr/lib/cairo/*.so* $fs/usr/lib/cairo +} diff -r faaf4f7a0acc -r b34e3540f205 cairo/receipt --- a/cairo/receipt Wed Jun 29 13:38:09 2016 +0200 +++ b/cairo/receipt Wed Jun 29 15:02:04 2016 +0300 @@ -3,19 +3,22 @@ PACKAGE="cairo" VERSION="1.14.4" CATEGORY="x-window" -SHORT_DESC="2D graphics library." +SHORT_DESC="2D graphics library" MAINTAINER="pankso@slitaz.org" LICENSE="MPL LGPL2.1" TARBALL="$PACKAGE-$VERSION.tar.xz" -WEB_SITE="http://www.cairographics.org/" -WGET_URL="http://cairographics.org/releases/$TARBALL" +WEB_SITE="https://www.cairographics.org/" +WGET_URL="${WEB_SITE}releases/$TARBALL" HOST_ARCH="i486 arm" -DEPENDS="glib pixman libpng zlib expat fontconfig freetype xorg-libX11 \ -xorg-libXau xorg-libXdmcp xorg-libXrender xcb-util libxcb" +DEPENDS="bzlib fontconfig freetype glib glibc-base harfbuzz libffi libpng \ +libxcb libxml2 pcre pixman xorg-libX11 xorg-libXau xorg-libXdmcp xorg-libXext \ +xorg-libXrender zlib" BUILD_DEPENDS="pkg-config glib-dev libpng-dev zlib-dev fontconfig-dev \ freetype-dev xorg-libX11-dev pixman-dev xorg-libXau-dev xorg-libXdmcp-dev \ xorg-libXrender-dev xcb-util-dev libxcb-dev expat-dev libxml2-dev" +SPLIT="cairo-tools" +SIBLINGS="cairo-gl" # Handle cross compilation case "$ARCH" in @@ -25,15 +28,13 @@ # Rules to configure and make the package. compile_rules() { - cd $src ./configure \ --prefix=/usr \ - --mandir=/usr/share/man \ - --with-html-dir=/usr/share/doc \ --enable-xcb \ + --enable-xlib-xcb \ --enable-tee \ --disable-static \ - $CONFIGURE_ARGS && + $CONFIGURE_ARGS && make $MAKEFLAGS && make DESTDIR=$DESTDIR install } @@ -41,8 +42,6 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/lib/cairo - cp -a $install/usr/bin $fs/usr + mkdir -p $fs/usr/lib cp -a $install/usr/lib/*.so* $fs/usr/lib - cp -a $install/usr/lib/cairo/*.so* $fs/usr/lib/cairo } diff -r faaf4f7a0acc -r b34e3540f205 cairo/stuff/cairo-1.10.0-buggy_gradients.patch --- a/cairo/stuff/cairo-1.10.0-buggy_gradients.patch Wed Jun 29 13:38:09 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ ---- a/src/cairo-xlib-display.c.ubuntu 2010-08-04 11:57:49.000000000 +0200 -+++ b/src/cairo-xlib-display.c 2010-08-04 11:58:28.000000000 +0200 -@@ -353,11 +353,7 @@ - /* Prior to Render 0.10, there is no protocol support for gradients and - * we call function stubs instead, which would silently consume the drawing. - */ --#if RENDER_MAJOR == 0 && RENDER_MINOR < 10 - display->buggy_gradients = TRUE; --#else -- display->buggy_gradients = FALSE; --#endif - display->buggy_pad_reflect = FALSE; - display->buggy_repeat = FALSE; diff -r faaf4f7a0acc -r b34e3540f205 cairo/stuff/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch --- a/cairo/stuff/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch Wed Jun 29 13:38:09 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,275 +0,0 @@ -From f228769dfe5a8b5d73c49a41e95e31ed73a77fb3 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Fri, 08 Jun 2012 16:22:41 +0000 -Subject: polygon-reduce: Reduce broken stopped-edge continuation - -This is hopefully a lesser used path and the attempted optimisation to -continue a stopped edge with a colinear stopped edge highly unlikely and -lost in the noise of the general inefficiency of the routine. As it was -broken, rather than attempt to rectify the "optimisation" remove it. - -Reported-by: Evangelos Foutras -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50852 -Signed-off-by: Chris Wilson ---- -diff --git a/src/cairo-polygon-reduce.c b/src/cairo-polygon-reduce.c -index 8758070..ea457fe 100644 ---- a/src/cairo-polygon-reduce.c -+++ b/src/cairo-polygon-reduce.c -@@ -42,6 +42,8 @@ - #include "cairo-freelist-private.h" - #include "cairo-combsort-inline.h" - -+#define DEBUG_POLYGON 0 -+ - typedef cairo_point_t cairo_bo_point32_t; - - typedef struct _cairo_bo_intersect_ordinate { -@@ -114,7 +116,6 @@ typedef struct _cairo_bo_event_queue { - - typedef struct _cairo_bo_sweep_line { - cairo_bo_edge_t *head; -- cairo_bo_edge_t *stopped; - int32_t current_y; - cairo_bo_edge_t *current_edge; - } cairo_bo_sweep_line_t; -@@ -476,8 +477,8 @@ edges_compare_x_for_y (const cairo_bo_edge_t *a, - static inline int - _line_equal (const cairo_line_t *a, const cairo_line_t *b) - { -- return a->p1.x == b->p1.x && a->p1.y == b->p1.y && -- a->p2.x == b->p2.x && a->p2.y == b->p2.y; -+ return (a->p1.x == b->p1.x && a->p1.y == b->p1.y && -+ a->p2.x == b->p2.x && a->p2.y == b->p2.y); - } - - static int -@@ -1024,7 +1025,6 @@ static void - _cairo_bo_sweep_line_init (cairo_bo_sweep_line_t *sweep_line) - { - sweep_line->head = NULL; -- sweep_line->stopped = NULL; - sweep_line->current_y = INT32_MIN; - sweep_line->current_edge = NULL; - } -@@ -1139,6 +1139,8 @@ edges_colinear (const cairo_bo_edge_t *a, const cairo_bo_edge_t *b) - */ - if (a->edge.line.p1.y == b->edge.line.p1.y) { - return a->edge.line.p1.x == b->edge.line.p1.x; -+ } else if (a->edge.line.p2.y == b->edge.line.p2.y) { -+ return a->edge.line.p2.x == b->edge.line.p2.x; - } else if (a->edge.line.p1.y < b->edge.line.p1.y) { - return edge_compare_for_y_against_x (b, - a->edge.line.p1.y, -@@ -1205,82 +1207,48 @@ _active_edges_to_polygon (cairo_bo_edge_t *left, - cairo_polygon_t *polygon) - { - cairo_bo_edge_t *right; -+ unsigned int mask; - -- if (fill_rule == CAIRO_FILL_RULE_WINDING) { -- while (left != NULL) { -- int in_out = left->edge.dir; -- -- right = left->next; -- if (left->deferred.right == NULL) { -- while (right != NULL && right->deferred.right == NULL) -- right = right->next; -- -- if (right != NULL && edges_colinear (left, right)) { -- /* continuation on left */ -- left->deferred = right->deferred; -- right->deferred.right = NULL; -- } -- } -- -- right = left->next; -- while (right != NULL) { -- if (right->deferred.right != NULL) -- _cairo_bo_edge_end (right, top, polygon); -- -- in_out += right->edge.dir; -- if (in_out == 0) { -- cairo_bo_edge_t *next; -- cairo_bool_t skip = FALSE; -- -- /* skip co-linear edges */ -- next = right->next; -- if (next != NULL) -- skip = edges_colinear (right, next); -+ if (fill_rule == CAIRO_FILL_RULE_WINDING) -+ mask = ~0; -+ else -+ mask = 1; - -- if (! skip) -- break; -- } -+ while (left != NULL) { -+ int in_out = left->edge.dir; - -+ right = left->next; -+ if (left->deferred.right == NULL) { -+ while (right != NULL && right->deferred.right == NULL) - right = right->next; -- } -- -- _cairo_bo_edge_start_or_continue (left, right, top, polygon); - -- left = right; -- if (left != NULL) -- left = left->next; -+ if (right != NULL && edges_colinear (left, right)) { -+ /* continuation on left */ -+ left->deferred = right->deferred; -+ right->deferred.right = NULL; -+ } - } -- } else { -- while (left != NULL) { -- int in_out = 0; - -- right = left->next; -- while (right != NULL) { -- if (right->deferred.right != NULL) -- _cairo_bo_edge_end (right, top, polygon); -+ right = left->next; -+ while (right != NULL) { -+ if (right->deferred.right != NULL) -+ _cairo_bo_edge_end (right, top, polygon); - -- if ((in_out++ & 1) == 0) { -- cairo_bo_edge_t *next; -- cairo_bool_t skip = FALSE; -- -- /* skip co-linear edges */ -- next = right->next; -- if (next != NULL) -- skip = edges_colinear (right, next); -- -- if (! skip) -- break; -- } -- -- right = right->next; -+ in_out += right->edge.dir; -+ if ((in_out & mask) == 0) { -+ /* skip co-linear edges */ -+ if (right->next == NULL || !edges_colinear (right, right->next)) -+ break; - } - -- _cairo_bo_edge_start_or_continue (left, right, top, polygon); -- -- left = right; -- if (left != NULL) -- left = left->next; -+ right = right->next; - } -+ -+ _cairo_bo_edge_start_or_continue (left, right, top, polygon); -+ -+ left = right; -+ if (left != NULL) -+ left = left->next; - } - } - -@@ -1303,12 +1271,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - - while ((event = _cairo_bo_event_dequeue (&event_queue))) { - if (event->point.y != sweep_line.current_y) { -- for (e1 = sweep_line.stopped; e1; e1 = e1->next) { -- if (e1->deferred.right != NULL) -- _cairo_bo_edge_end (e1, e1->edge.bottom, polygon); -- } -- sweep_line.stopped = NULL; -- - _active_edges_to_polygon (sweep_line.head, - sweep_line.current_y, - fill_rule, polygon); -@@ -1328,23 +1290,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - if (unlikely (status)) - goto unwind; - -- /* check to see if this is a continuation of a stopped edge */ -- /* XXX change to an infinitesimal lengthening rule */ -- for (left = sweep_line.stopped; left; left = left->next) { -- if (e1->edge.top <= left->edge.bottom && -- edges_colinear (e1, left)) -- { -- e1->deferred = left->deferred; -- if (left->prev != NULL) -- left->prev = left->next; -- else -- sweep_line.stopped = left->next; -- if (left->next != NULL) -- left->next->prev = left->prev; -- break; -- } -- } -- - left = e1->prev; - right = e1->next; - -@@ -1371,14 +1316,8 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - - _cairo_bo_sweep_line_delete (&sweep_line, e1); - -- /* first, check to see if we have a continuation via a fresh edge */ -- if (e1->deferred.right != NULL) { -- e1->next = sweep_line.stopped; -- if (sweep_line.stopped != NULL) -- sweep_line.stopped->prev = e1; -- sweep_line.stopped = e1; -- e1->prev = NULL; -- } -+ if (e1->deferred.right != NULL) -+ _cairo_bo_edge_end (e1, e1->edge.bottom, polygon); - - if (left != NULL && right != NULL) { - status = _cairo_bo_event_queue_insert_if_intersect_below_current_y (&event_queue, left, right); -@@ -1420,10 +1359,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events, - } - } - -- for (e1 = sweep_line.stopped; e1; e1 = e1->next) { -- if (e1->deferred.right != NULL) -- _cairo_bo_edge_end (e1, e1->edge.bottom, polygon); -- } - unwind: - _cairo_bo_event_queue_fini (&event_queue); - -@@ -1447,6 +1382,12 @@ _cairo_polygon_reduce (cairo_polygon_t *polygon, - if (unlikely (0 == num_events)) - return CAIRO_STATUS_SUCCESS; - -+ if (DEBUG_POLYGON) { -+ FILE *file = fopen ("reduce_in.txt", "w"); -+ _cairo_debug_print_polygon (file, polygon); -+ fclose (file); -+ } -+ - events = stack_events; - event_ptrs = stack_event_ptrs; - if (num_events > ARRAY_LENGTH (stack_events)) { -@@ -1482,10 +1423,16 @@ _cairo_polygon_reduce (cairo_polygon_t *polygon, - num_events, - fill_rule, - polygon); -- polygon->num_limits = num_limits; -+ polygon->num_limits = num_limits; - - if (events != stack_events) - free (events); - -+ if (DEBUG_POLYGON) { -+ FILE *file = fopen ("reduce_out.txt", "w"); -+ _cairo_debug_print_polygon (file, polygon); -+ fclose (file); -+ } -+ - return status; - } --- -cgit v0.9.0.2-2-gbebe diff -r faaf4f7a0acc -r b34e3540f205 cairo/stuff/cairo-respect-fontconfig.patch --- a/cairo/stuff/cairo-respect-fontconfig.patch Wed Jun 29 13:38:09 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -diff -Nur cairo-1.8.6.orig/src/cairo-ft-font.c cairo-1.8.6/src/cairo-ft-font.c ---- cairo-1.8.6.orig/src/cairo-ft-font.c 2008-12-12 20:48:04.000000000 +0800 -+++ cairo-1.8.6/src/cairo-ft-font.c 2009-02-20 14:56:57.000000000 +0800 -@@ -1448,8 +1448,15 @@ - if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT) - options->base.hint_style = other->base.hint_style; - -- if (other->base.hint_style == CAIRO_HINT_STYLE_NONE) -- options->base.hint_style = CAIRO_HINT_STYLE_NONE; -+ //if (other->base.hint_style == CAIRO_HINT_STYLE_NONE) -+ //options->base.hint_style = CAIRO_HINT_STYLE_NONE; -+ -+ if (other->base.hint_style == CAIRO_HINT_STYLE_NONE || -+ other->base.hint_style == CAIRO_HINT_STYLE_SLIGHT || -+ other->base.hint_style == CAIRO_HINT_STYLE_MEDIUM || -+ other->base.hint_style == CAIRO_HINT_STYLE_FULL) { -+ options->base.hint_style = other->base.hint_style; -+ } - - if (options->base.antialias == CAIRO_ANTIALIAS_NONE) { - if (options->base.hint_style == CAIRO_HINT_STYLE_NONE)