[arch-commits] Commit in lib32-cairo/trunk (4 files)
Ionuț Mircea Bîru
ioni at nymeria.archlinux.org
Sat Apr 27 13:17:22 UTC 2013
Date: Saturday, April 27, 2013 @ 15:17:22
Author: ioni
Revision: 89173
libpng 1.6 rebuild
actually apply that patch
Added:
lib32-cairo/trunk/libpng16.patch
Modified:
lib32-cairo/trunk/PKGBUILD
Deleted:
lib32-cairo/trunk/revert-xlib-Simplify-source-creation-by-use-of-map-to-image.patch
lib32-cairo/trunk/revert-xlib-map-to-image-requires-an-extents.patch
-------------------------------------------------------------------+
PKGBUILD | 3
libpng16.patch | 40 ++
revert-xlib-Simplify-source-creation-by-use-of-map-to-image.patch | 144 ----------
revert-xlib-map-to-image-requires-an-extents.patch | 24 -
4 files changed, 42 insertions(+), 169 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2013-04-27 13:15:01 UTC (rev 89172)
+++ PKGBUILD 2013-04-27 13:17:22 UTC (rev 89173)
@@ -22,7 +22,8 @@
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
cd "${srcdir}/${_pkgbasename}-${pkgver}"
-
+
+ patch -N1 -i ../libpng16.patch
./configure --prefix=/usr \
--libdir=/usr/lib32 \
--sysconfdir=/etc \
Added: libpng16.patch
===================================================================
--- libpng16.patch (rev 0)
+++ libpng16.patch 2013-04-27 13:17:22 UTC (rev 89173)
@@ -0,0 +1,40 @@
+From 2dd2c826a5b367d32cf2d48ed69754795990c5db Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Tue, 16 Apr 2013 09:58:56 +0000
+Subject: png: Avoid marking the surface as in error after a png warning
+
+It turns out that libpng will continue to load an image after throwing a
+warning, and that libpng16 now throws warnings for images that libpng15
+and earlier loaded without error. As we were happily loading those
+images into cairo surfaces before, we are therefore being overzealous
+in throwing an error now - so just squelch the warning.
+
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+---
+diff --git a/src/cairo-png.c b/src/cairo-png.c
+index e74a4a8..068617d 100644
+--- a/src/cairo-png.c
++++ b/src/cairo-png.c
+@@ -149,13 +149,13 @@ static void
+ png_simple_warning_callback (png_structp png,
+ png_const_charp error_msg)
+ {
+- cairo_status_t *error = png_get_error_ptr (png);
+-
+- /* default to the most likely error */
+- if (*error == CAIRO_STATUS_SUCCESS)
+- *error = _cairo_error (CAIRO_STATUS_NO_MEMORY);
+-
+- /* png does not expect to abort and will try to tidy up after a warning */
++ /* png does not expect to abort and will try to tidy up and continue
++ * loading the image after a warning. So we also want to return the
++ * (incorrect?) surface.
++ *
++ * We use our own warning callback to squelch any attempts by libpng
++ * to write to stderr as we may not be in control of that output.
++ */
+ }
+
+
+--
+cgit v0.9.0.2-2-gbebe
Deleted: revert-xlib-Simplify-source-creation-by-use-of-map-to-image.patch
===================================================================
--- revert-xlib-Simplify-source-creation-by-use-of-map-to-image.patch 2013-04-27 13:15:01 UTC (rev 89172)
+++ revert-xlib-Simplify-source-creation-by-use-of-map-to-image.patch 2013-04-27 13:17:22 UTC (rev 89173)
@@ -1,144 +0,0 @@
-From a73e7ff0186176bc82cd3ae1432c054c1fd3aebd Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris at chris-wilson.co.uk>
-Date: Sun, 06 Jan 2013 11:29:27 +0000
-Subject: xlib: Simplify source creation by use of map-to-image
-
-We were open-coding the functionality of map-to-image inside the source
-creation routines. so refactor to actually use map-to-image instead.
-
-Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
----
-diff --git a/src/cairo-xlib-source.c b/src/cairo-xlib-source.c
-index e312222..d08052a 100644
---- a/src/cairo-xlib-source.c
-+++ b/src/cairo-xlib-source.c
-@@ -898,9 +898,6 @@ surface_source (cairo_xlib_surface_t *dst,
- cairo_surface_pattern_t local_pattern;
- cairo_status_t status;
- cairo_rectangle_int_t upload, limit;
-- cairo_matrix_t m;
-- pixman_format_code_t format;
-- int draw_x, draw_y;
-
- src = pattern->surface;
- if (src->type == CAIRO_SURFACE_TYPE_IMAGE &&
-@@ -910,7 +907,6 @@ surface_source (cairo_xlib_surface_t *dst,
-
- cairo_surface_reference (src);
-
--prepare_shm_image:
- proxy = malloc (sizeof(*proxy));
- if (unlikely (proxy == NULL)) {
- cairo_surface_destroy (src);
-@@ -954,46 +950,47 @@ prepare_shm_image:
- }
- }
-
-- if (_cairo_surface_is_image (src))
-- format = ((cairo_image_surface_t *)src)->pixman_format;
-- else
-- format = _cairo_format_to_pixman_format_code (_cairo_format_from_content (src->content));
-- src = _cairo_xlib_surface_create_shm (dst, format,
-- upload.width, upload.height);
-- if (src == NULL) {
-- if (_cairo_surface_is_image (pattern->surface)) {
-- draw_x = upload.x;
-- draw_y = upload.y;
-- src = cairo_surface_reference (pattern->surface);
-- goto skip_paint;
-- }
--
-- src = _cairo_image_surface_create_with_pixman_format (NULL,
-- format,
-- upload.width,
-- upload.height,
-- 0);
-+ xsrc = (cairo_xlib_surface_t *)
-+ _cairo_surface_create_similar_scratch (&dst->base,
-+ src->content,
-+ upload.width,
-+ upload.height);
-+ if (xsrc->base.type != CAIRO_SURFACE_TYPE_XLIB) {
-+ cairo_surface_destroy (src);
-+ cairo_surface_destroy (&xsrc->base);
-+ return None;
- }
-
-- _cairo_pattern_init_for_surface (&local_pattern, pattern->surface);
-- cairo_matrix_init_translate (&local_pattern.base.matrix,
-- upload.x, upload.y);
-+ if (_cairo_surface_is_image (src)) {
-+ status = _cairo_xlib_surface_draw_image (xsrc, (cairo_image_surface_t *)src,
-+ upload.x, upload.y,
-+ upload.width, upload.height,
-+ 0, 0);
-+ } else {
-+ cairo_image_surface_t *image;
-
-- status = _cairo_surface_paint (src,
-- CAIRO_OPERATOR_SOURCE,
-- &local_pattern.base,
-- NULL);
-- _cairo_pattern_fini (&local_pattern.base);
-+ image = _cairo_surface_map_to_image (&xsrc->base, NULL);
-
-- if (unlikely (status)) {
-- cairo_surface_destroy (src);
-- return _cairo_surface_create_in_error (status);
-+ _cairo_pattern_init_for_surface (&local_pattern, pattern->surface);
-+ cairo_matrix_init_translate (&local_pattern.base.matrix,
-+ upload.x, upload.y);
-+
-+ status = _cairo_surface_paint (&image->base,
-+ CAIRO_OPERATOR_SOURCE,
-+ &local_pattern.base,
-+ NULL);
-+ _cairo_pattern_fini (&local_pattern.base);
-+
-+ status = _cairo_surface_unmap_image (&xsrc->base, image);
-+ if (unlikely (status)) {
-+ cairo_surface_destroy (src);
-+ return _cairo_surface_create_in_error (status);
-+ }
- }
-
-- draw_x = draw_y = 0;
--skip_paint:
- _cairo_pattern_init_static_copy (&local_pattern.base, &pattern->base);
- if (upload.x | upload.y) {
-+ cairo_matrix_t m;
- cairo_matrix_init_translate (&m, -upload.x, -upload.y);
- cairo_matrix_multiply (&local_pattern.base.matrix,
- &local_pattern.base.matrix,
-@@ -1001,29 +998,6 @@ skip_paint:
- }
-
- *src_x = *src_y = 0;
-- if (src->device == dst->base.device &&
-- _cairo_xlib_shm_surface_get_pixmap (src)) {
-- pattern = &local_pattern;
-- goto prepare_shm_image;
-- }
--
-- xsrc = (cairo_xlib_surface_t *)
-- _cairo_surface_create_similar_scratch (&dst->base,
-- src->content,
-- upload.width,
-- upload.height);
-- if (xsrc->base.type != CAIRO_SURFACE_TYPE_XLIB) {
-- cairo_surface_destroy (src);
-- cairo_surface_destroy (&xsrc->base);
-- return None;
-- }
--
-- status = _cairo_xlib_surface_draw_image (xsrc, (cairo_image_surface_t *)src,
-- draw_x, draw_y,
-- upload.width, upload.height,
-- 0, 0);
-- cairo_surface_destroy (src);
--
- _cairo_xlib_surface_ensure_picture (xsrc);
- if (! picture_set_properties (xsrc->display,
- xsrc->picture,
---
-cgit v0.9.0.2-2-gbebe
Deleted: revert-xlib-map-to-image-requires-an-extents.patch
===================================================================
--- revert-xlib-map-to-image-requires-an-extents.patch 2013-04-27 13:15:01 UTC (rev 89172)
+++ revert-xlib-map-to-image-requires-an-extents.patch 2013-04-27 13:17:22 UTC (rev 89173)
@@ -1,24 +0,0 @@
-From dd20c1f4d6419238bbb37fb93a48986f83c6e6c2 Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris at chris-wilson.co.uk>
-Date: Wed, 09 Jan 2013 12:38:09 +0000
-Subject: xlib: map-to-image requires an extents
-
-Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
----
-diff --git a/src/cairo-xlib-source.c b/src/cairo-xlib-source.c
-index d08052a..0689d82 100644
---- a/src/cairo-xlib-source.c
-+++ b/src/cairo-xlib-source.c
-@@ -968,8 +968,9 @@ surface_source (cairo_xlib_surface_t *dst,
- 0, 0);
- } else {
- cairo_image_surface_t *image;
-+ cairo_rectangle_int_t map_extents = { 0,0, upload.width,upload.height };
-
-- image = _cairo_surface_map_to_image (&xsrc->base, NULL);
-+ image = _cairo_surface_map_to_image (&xsrc->base, &map_extents);
-
- _cairo_pattern_init_for_surface (&local_pattern, pattern->surface);
- cairo_matrix_init_translate (&local_pattern.base.matrix,
---
-cgit v0.9.0.2-2-gbebe
More information about the arch-commits
mailing list