diff options
author | Ross Burton <ross.burton@intel.com> | 2013-04-17 14:34:28 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-22 14:45:03 +0100 |
commit | e0b4d0e6db992f2f0aaab90c6546aedd2c36ae74 (patch) | |
tree | 2c113ed4d87dd4eeb886edd53cf96fa0e5e8e3ff /meta/recipes-graphics/cairo | |
parent | 5af9ca580f90758bb3939401743c4813e2e32989 (diff) | |
download | poky-e0b4d0e6db992f2f0aaab90c6546aedd2c36ae74.tar.gz |
cairo: drop transform patch, it's been rejected upstream
This fix was rejected by upstream, the correct fix is actually to fix libpng.
(From OE-Core rev: f7f8ec1197ec64620c80e13214dc395ab3e12afc)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/cairo')
-rw-r--r-- | meta/recipes-graphics/cairo/cairo/png.patch | 77 |
1 files changed, 3 insertions, 74 deletions
diff --git a/meta/recipes-graphics/cairo/cairo/png.patch b/meta/recipes-graphics/cairo/cairo/png.patch index 15ce80ad62..bf00332e57 100644 --- a/meta/recipes-graphics/cairo/cairo/png.patch +++ b/meta/recipes-graphics/cairo/cairo/png.patch | |||
@@ -1,81 +1,10 @@ | |||
1 | libpng 1.6 is stricter in various ways, which trips up Cairo's PNG loader. | 1 | libpng 1.6 is stricter in various ways, which can trip up the PNG loader as it |
2 | considers all warnings fatal. | ||
2 | 3 | ||
3 | Upstream-Status: Submitted (first)/Backport (second) | 4 | Upstream-Status: Backport |
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 5 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
5 | 6 | ||
6 | 7 | ||
7 | From 1535e4eeda7e0792fe5e7e5ab377c5253ee89ce7 Mon Sep 17 00:00:00 2001 | ||
8 | From: Ingmar Runge <ingmar@irsoft.de> | ||
9 | Date: Tue, 16 Apr 2013 10:48:59 +0100 | ||
10 | Subject: [PATCH 1/2] png: fix transform ordering | ||
11 | |||
12 | libpng 1.6 is stricter with the function ordering, emitting the warning "invalid | ||
13 | before the PNG header has been read" when calling png_set_read_user_transform_fn | ||
14 | whilst loading a PNG. | ||
15 | |||
16 | So, re-order the functions to the order that libpng is happy with. | ||
17 | |||
18 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
19 | --- | ||
20 | src/cairo-png.c | 21 +++++++++++++++++++-- | ||
21 | 1 file changed, 19 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/src/cairo-png.c b/src/cairo-png.c | ||
24 | index e74a4a8..3aec86a 100644 | ||
25 | --- a/src/cairo-png.c | ||
26 | +++ b/src/cairo-png.c | ||
27 | @@ -497,6 +497,20 @@ convert_bytes_to_data (png_structp png, png_row_infop row_info, png_bytep data) | ||
28 | } | ||
29 | } | ||
30 | |||
31 | +/* branches into premultiply_data or convert_bytes_to_data depending on color type */ | ||
32 | +static void read_user_transform_func (png_structp png, png_row_infop row_info, png_bytep data) | ||
33 | +{ | ||
34 | + switch ((cairo_format_t) png_get_user_transform_ptr (png)) { | ||
35 | + case CAIRO_FORMAT_ARGB32: | ||
36 | + premultiply_data (png, row_info, data); | ||
37 | + break; | ||
38 | + | ||
39 | + case CAIRO_FORMAT_RGB24: | ||
40 | + convert_bytes_to_data (png, row_info, data); | ||
41 | + break; | ||
42 | + } | ||
43 | +} | ||
44 | + | ||
45 | static cairo_status_t | ||
46 | stdio_read_func (void *closure, unsigned char *data, unsigned int size) | ||
47 | { | ||
48 | @@ -623,6 +637,9 @@ read_png (struct png_read_closure_t *png_closure) | ||
49 | |||
50 | png_set_filler (png, 0xff, PNG_FILLER_AFTER); | ||
51 | |||
52 | + /* this must be stored before calling png_read_update_info */ | ||
53 | + png_set_read_user_transform_fn (png, read_user_transform_func); | ||
54 | + | ||
55 | /* recheck header after setting EXPAND options */ | ||
56 | png_read_update_info (png, info); | ||
57 | png_get_IHDR (png, info, | ||
58 | @@ -643,15 +660,15 @@ read_png (struct png_read_closure_t *png_closure) | ||
59 | |||
60 | case PNG_COLOR_TYPE_RGB_ALPHA: | ||
61 | format = CAIRO_FORMAT_ARGB32; | ||
62 | - png_set_read_user_transform_fn (png, premultiply_data); | ||
63 | break; | ||
64 | |||
65 | case PNG_COLOR_TYPE_RGB: | ||
66 | format = CAIRO_FORMAT_RGB24; | ||
67 | - png_set_read_user_transform_fn (png, convert_bytes_to_data); | ||
68 | break; | ||
69 | } | ||
70 | |||
71 | + png_set_user_transform_info (png, (void*) format, 0, 0); | ||
72 | + | ||
73 | stride = cairo_format_stride_for_width (format, png_width); | ||
74 | if (stride < 0) { | ||
75 | surface = _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_STRIDE)); | ||
76 | -- | ||
77 | 1.7.10.4 | ||
78 | |||
79 | From 2dd2c826a5b367d32cf2d48ed69754795990c5db Mon Sep 17 00:00:00 2001 | 8 | From 2dd2c826a5b367d32cf2d48ed69754795990c5db Mon Sep 17 00:00:00 2001 |
80 | From: Chris Wilson <chris@chris-wilson.co.uk> | 9 | From: Chris Wilson <chris@chris-wilson.co.uk> |
81 | Date: Tue, 16 Apr 2013 10:58:56 +0100 | 10 | Date: Tue, 16 Apr 2013 10:58:56 +0100 |