commit 95c464d5feaae58b6cc0990434ce2498cc315dc6 Author: Bryce Harrington AuthorDate: Mon Dec 11 13:02:28 2017 -0800 Commit: Bryce Harrington CommitDate: Mon Dec 11 13:02:38 2017 -0800 1.15.10 release Signed-off-by: Bryce Harrington NEWS | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cairo-version.h | 2 +- 2 files changed, 73 insertions(+), 1 deletion(-) commit f723ce31920cf5d5fe0ba417bb4b50b62a3ac4e6 Author: Bryce Harrington AuthorDate: Thu Dec 7 15:53:16 2017 -0800 Commit: Bryce Harrington CommitDate: Thu Dec 7 15:53:16 2017 -0800 pattern: Mark a private routine as cairo_private. Fixes distcheck PLT error: Checking .libs/libcairo.so for local PLT entries 000000000031f1d0 0000024200000007 R_X86_64_JUMP_SLOT 0000000000055de0 _cairo_pattern_is_constant_alpha + 0 src/cairo-pattern-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9a78ec9c21900f4418988ffe832b7e611a776c8 Author: Bryce Harrington AuthorDate: Thu Dec 7 14:15:17 2017 -0800 Commit: Bryce Harrington CommitDate: Thu Dec 7 14:15:17 2017 -0800 Fix distcheck errors on use of #ifdef Checking that feature conditionals are used with #if only (not #ifdef) ./cairo-ft.h:#ifdef CAIRO_HAS_FC_FONT ./cairo-ft.h:#ifdef CAIRO_HAS_FC_FONT src/cairo-ft.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04b4967586ac31763186d9894107b8c8403bcb34 Author: Bryce Harrington AuthorDate: Thu Dec 7 14:00:21 2017 -0800 Commit: Bryce Harrington CommitDate: Thu Dec 7 14:13:32 2017 -0800 Fix various doxygen warnings found by check-doc-syntax.sh ./cairo-clip-boxes.c (268): ERROR: copy invalid doc id (should be 'cairo_...:') ./cairo-clip-boxes.c (274): ERROR: copy bad line: ' */' ./cairo-clip-boxes.c (274): ERROR: copy documentation comment not closed with **/ ./cairo-boxes.c (106): ERROR: Computes invalid doc id (should be 'cairo_...:') ./cairo-boxes.c (114): ERROR: Computes bad line: ' */' ./cairo-boxes.c (114): ERROR: Computes documentation comment not closed with **/ ./cairo-boxes.c (279): ERROR: Computes invalid doc id (should be 'cairo_...:') ./cairo-boxes.c (284): ERROR: Computes bad line: ' */' ./cairo-boxes.c (284): ERROR: Computes documentation comment not closed with **/ ./cairo-boxes.c (338): ERROR: Linearize invalid doc id (should be 'cairo_...:') ./cairo-boxes.c (345): ERROR: Linearize documentation comment not closed with **/ ./cairo.c (240): ERROR: SECTION:cairo-tag bad line: '' ./cairo.c (892): ERROR: cairo_set_source_rgb: Duplicate 'Since' field src/cairo-boxes.c | 23 +++++++++++++---------- src/cairo-clip-boxes.c | 11 +++++------ src/cairo-svg-surface.c | 2 +- src/cairo.c | 4 +--- 4 files changed, 20 insertions(+), 20 deletions(-) commit dbc1636a9b932fd81ace436a03c1992a6ac1cbcf Author: Bryce Harrington AuthorDate: Thu Dec 7 13:25:58 2017 -0800 Commit: Bryce Harrington CommitDate: Thu Dec 7 14:13:32 2017 -0800 win32: Fix since field version number check-doc-syntax.sh expects since numbers to be MAJOR.MINOR without a patch level number src/win32/cairo-win32-display-surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb0d616c4efe1015d17d41125f235a219ad14322 Author: Bryce Harrington AuthorDate: Wed Dec 6 18:27:21 2017 -0800 Commit: Bryce Harrington CommitDate: Thu Dec 7 14:13:28 2017 -0800 image: Fix include for use of ptrdiff Commit 38fbe621 added use of the ptrdiff_t type in a header file, however `make distcheck` complains: In file included from headers-standalone-tmp.c:1:0: ../../../src/cairo-image-surface-private.h:74:5: error: unknown type name ‘ptrdiff_t’ ptrdiff_t stride; ^ src/cairo-image-surface-private.h | 1 + 1 file changed, 1 insertion(+) commit 15559b54af473d720da9e03b0e769c54a53505a9 Author: Antonio Ospite AuthorDate: Wed Oct 11 18:51:13 2017 +0200 Commit: Bryce Harrington CommitDate: Mon Dec 4 13:58:34 2017 -0800 svg: add a new function to specify the SVG document unit Add a cairo_svg_surface_set_document_unit() function to allow users to set a unit for the width and height values of the root element. In particular this allows to draw in pixels and still have the expected result when generating SVG output. Add also the correspondent getter function. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90166 Reviewed-by: Bryce Harrington src/cairo-svg-surface.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++-- src/cairo-svg.h | 47 +++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 2 deletions(-) commit 84fc0ce91d1a57d20500f710abc0e17de82c67df Author: Tom Schoonjans AuthorDate: Thu Nov 2 16:55:22 2017 +0000 Commit: Adrian Johnson CommitDate: Sun Nov 26 20:16:43 2017 +1030 Use UTF-8 filenames on Windows Until now fopen was used on Windows to open files for reading and writing. This assumed however that the filename would be encoded in the current codepage, which is a major inconvenience and makes it even impossible to use filenames that use characters from more than one codepage. This patch enforces the use of UTF-8 filenames on all platforms. Based on the work of Owen Taylor (https://lists.cairographics.org/archives/cairo/2007-February/009591.html) src/cairo-misc.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++ src/cairo-output-stream.c | 7 +++++- src/cairo-png.c | 20 +++++++++++---- src/cairoint.h | 4 +++ 4 files changed, 87 insertions(+), 6 deletions(-) commit e5532f5ad7f5493d703f9a7110b0816b5fa33e54 Author: Mikhail Fludkov AuthorDate: Mon Nov 6 13:07:00 2017 +0100 Commit: Adrian Johnson CommitDate: Sun Nov 26 13:09:51 2017 +1030 Fix code generation when using GCC legacy atomic operations https://bugs.freedesktop.org/show_bug.cgi?id=103559 build/aclocal.cairo.m4 | 8 ++++---- src/cairo-atomic-private.h | 9 +-------- 2 files changed, 5 insertions(+), 12 deletions(-) commit f614f588e67daebd123bb6698b56d4b8054616c4 Author: Adrian Johnson AuthorDate: Sat Nov 11 16:59:47 2017 +1030 Commit: Adrian Johnson CommitDate: Sun Nov 26 13:03:44 2017 +1030 Prevent -Wundef warnings in when cairo-ft.h is used without fontconfig src/cairo-ft.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a709197121c8e405c2dd99e408ee3046ccf50a6a Author: Adrian Johnson AuthorDate: Sun Nov 26 13:03:18 2017 +1030 Commit: Adrian Johnson CommitDate: Sun Nov 26 13:03:18 2017 +1030 pdf: fix some annotation bugs - each annotation was emitted on every page instead of just the page that contains the annotation - the document structure did not correctly link to annotation objects - fix some annotation related memory leaks src/cairo-pdf-interchange.c | 165 ++++++++++++++++++++++++++++++---------- src/cairo-pdf-surface-private.h | 14 ++-- src/cairo-pdf-surface.c | 3 +- src/cairo-tag-attributes.c | 4 + 4 files changed, 138 insertions(+), 48 deletions(-) commit 17e2abc992b012ac3dceb2f66fba17d312ae6d77 Author: Adrian Johnson AuthorDate: Mon Nov 20 05:37:34 2017 +1030 Commit: Adrian Johnson CommitDate: Mon Nov 20 05:37:34 2017 +1030 ps: fix compile with old versions of MSVC https://lists.cairographics.org/archives/cairo/2017-November/028452.html src/cairo-ps-surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c8070f5bc74c124e6393b433a61807a8e4bee5d Author: Adrian Johnson AuthorDate: Thu Nov 16 20:16:14 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 16 20:16:14 2017 +1030 pdf: fix document structure for non tagged structures src/cairo-pdf-interchange.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 164be896603ceb419c5bc47c7348781f791f70e4 Author: Adrian Johnson AuthorDate: Fri Nov 10 20:10:01 2017 +1030 Commit: Adrian Johnson CommitDate: Fri Nov 10 20:10:01 2017 +1030 test: update some stale ref images test/reference/record-extend-pad.ps.ref.png | Bin 341 -> 0 bytes ...recording-surface-extend-none.pdf.argb32.ref.png | Bin 3941 -> 3944 bytes .../recording-surface-extend-none.pdf.rgb24.ref.png | Bin 3775 -> 3773 bytes ...ording-surface-extend-reflect.pdf.argb32.ref.png | Bin 29897 -> 29999 bytes ...cording-surface-extend-reflect.pdf.rgb24.ref.png | Bin 29901 -> 29984 bytes ...cording-surface-extend-repeat.pdf.argb32.ref.png | Bin 26323 -> 26534 bytes ...ecording-surface-extend-repeat.pdf.rgb24.ref.png | Bin 25867 -> 26017 bytes test/reference/scale-offset-similar.pdf.ref.png | Bin 9742 -> 9742 bytes 8 files changed, 0 insertions(+), 0 deletions(-) commit 5c7a6ca141363333a5dc9d2eaef055d383f91ef9 Author: Adrian Johnson AuthorDate: Fri Nov 10 20:10:01 2017 +1030 Commit: Adrian Johnson CommitDate: Fri Nov 10 20:10:01 2017 +1030 ps: fix extend-*-similar failures src/cairo-ps-surface-private.h | 1 + src/cairo-ps-surface.c | 39 +++++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 18 deletions(-) commit 9bfa9df2bb8557623df7c561613ea6eaa2a67cdd Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:02:05 2017 +1030 ps: fix padded image crash src/cairo-ps-surface.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f7d6d78f9428c6813e79d5f7c1351c354d44da64 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:02:05 2017 +1030 ps: prevent self-copy infinite loop src/cairo-ps-surface-private.h | 3 ++- src/cairo-ps-surface.c | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) commit 71746c37d48a08d56b18d4d82185896ada215194 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:02:05 2017 +1030 test: use CAIRO_MIME_TYPE_UNIQUE_ID with record-text-transform The PS output from this test is > 100MB due to the duplicated images. Using CAIRO_MIME_TYPE_UNIQUE_ID reduces the PS output to 650k, runs considerably faster, and now produces correct output. test/cairo-test.c | 5 +++++ test/record.c | 11 +++++++++++ .../reference/record-text-transform.ps.argb32.ref.png | Bin 1216 -> 3995 bytes test/reference/record-text-transform.ps.rgb24.ref.png | Bin 1216 -> 3995 bytes 4 files changed, 16 insertions(+) commit 5ffbaf9e2f7da103da8d015b5f928e25f9433b60 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:02:05 2017 +1030 ps: add CAIRO_MIME_TYPE_EPS mime type for embedding EPS files doc/public/cairo-sections.txt | 2 + src/cairo-ps-surface-private.h | 1 + src/cairo-ps-surface.c | 183 +++++++++++++++++++++++++++++++++++-- src/cairo-surface.c | 18 ++++ src/cairo-tag-attributes-private.h | 7 ++ src/cairo-tag-attributes.c | 47 ++++++++++ src/cairo.h | 2 + 7 files changed, 252 insertions(+), 8 deletions(-) commit 7d3ba77b6cd20f68cfbda3d8008811265aa030cb Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:01:40 2017 +1030 ps: use Reusable streams for forms in Level 3 to avoid emitting image data as strings src/cairo-ps-surface.c | 57 +++++++++++++++++++++++++++++++++++++++++++------- test/mime-unique-id.c | 2 +- 2 files changed, 50 insertions(+), 9 deletions(-) commit b1c7a087b5da9a3bfa1e05e2e99861e07723c6f8 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:01:40 2017 +1030 ps: use forms for surfaces with UNIQUE_ID mime type to ensure the surfaces are emitted only once. fixes mime-unique-id PS output src/cairo-ps-surface-private.h | 19 +- src/cairo-ps-surface.c | 665 ++++++++++++++++++++++++++++++++--------- test/mime-unique-id.c | 4 +- 3 files changed, 544 insertions(+), 144 deletions(-) commit 638d64a702449fee130b103e623c8fa3b8c06e9b Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:01:40 2017 +1030 ps: don't acquire image or snapshot in acquire_source_image_from_pattern otherwise emit_surface may not see the mime data src/cairo-ps-surface.c | 156 +++++++++++++++++++------------------------------ 1 file changed, 61 insertions(+), 95 deletions(-) commit fcc037a76ecd70050e324d0e3f7decd81f2f0a05 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:01:40 2017 +1030 ps: use << >> for dictionaries instead of dict begin end src/cairo-ps-surface.c | 94 ++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 48 deletions(-) commit 632232c3ce465e31929ab026012c731491492d6a Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:01:40 2017 +1030 ps: remove unused prolog src/cairo-ps-surface.c | 3 --- 1 file changed, 3 deletions(-) commit 9d372ca91a067b00fc1f66f466ab795206f5ef14 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:01:40 2017 +1030 ps: emit base85 strings instead of strings of base85 When image data is emitted as strings (required when an image is used in a PaintProc), the base85 encoded data was emitted inside PS strings (...) and the image filters included an ASCI85Decode filter. This has been changed to emit the strings as ASCII85 strings <~...~> and remove the ASCII85Decode filter since the base85 is decoded when the string is parsed. Also factor out the string data source procedure into the prolog. src/cairo-ps-surface.c | 186 +++++++++++++++++++++---------------------------- 1 file changed, 79 insertions(+), 107 deletions(-) commit d5cb45013bf10d97657cea105683bf5ccb21c2d7 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 22:01:40 2017 +1030 pdf: fix mime-unique-id jpeg attached to recording test - Restructure the emit_surface code so that mime types are checked first. - Add a test parameter to emit_surface to test if the surface will be emitted as an image or recording instead checking the surface type as the attached mime may override this. - Mark surface as not clear when mime is attached to avoid optimizing away "clear" surfaces that have mime attached. - Include entire surface in analysis if mime attached (also fixes bug with calculating the extents CONTENT_COLOR surfaces) src/cairo-analysis-surface.c | 172 +++++++++++++++++++---------------- src/cairo-pdf-surface.c | 209 +++++++++++++++++++++++++++++-------------- src/cairo-surface.c | 42 +++++++++ src/cairoint.h | 3 + test/mime-unique-id.c | 4 +- 5 files changed, 286 insertions(+), 144 deletions(-) commit bff47b43c4b0501c0255e9ba191904bea13ddf5c Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 20:52:36 2017 +1030 pdf: fix mime-unique-id unbounded recording test PDF XObjects need to specify the bounding box. Emit unbounded surfaces when finishing as at this point the extents of all uses of the unbounded surface are known. src/cairo-pdf-surface-private.h | 7 +++- src/cairo-pdf-surface.c | 85 +++++++++++++++++++++++++++++++---------- src/cairo-surface.c | 4 +- 3 files changed, 72 insertions(+), 24 deletions(-) commit cf9a07035292f3a1a3d057cfbb9dac1447a11235 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 20:52:36 2017 +1030 pdf: fix mime-unique-id bounded recording test The embedded bounded recording surface was being clipped to the extents of its first use. src/cairo-pdf-surface.c | 77 ++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 46 deletions(-) commit 5e4707a10d476604614bddcc9ba8b06f6002e6d6 Author: Adrian Johnson AuthorDate: Thu Nov 9 20:52:36 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Nov 9 20:52:36 2017 +1030 Add mime-unique-id test to check that PS/PDF embeds images with CAIRO_MIME_TYPE_UNIQUE_ID only once. test/Makefile.sources | 2 +- test/mime-unique-id.c | 511 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 512 insertions(+), 1 deletion(-) commit 38fbe621cf80d560cfc27b54b5417b62cda64c8a Author: Adrian Johnson AuthorDate: Thu Oct 20 21:12:30 2016 +1030 Commit: Bryce Harrington CommitDate: Tue Nov 7 17:01:49 2017 -0800 image: prevent invalid ptr access for > 4GB images Image data is often accessed using: image->data + y * image->stride On 64-bit achitectures if the image data is > 4GB, this computation will overflow since both y and stride are 32-bit types. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98165 Reviewed-by: Bryce Harrington boilerplate/cairo-boilerplate.c | 4 +++- src/cairo-image-compositor.c | 4 ++-- src/cairo-image-surface-private.h | 2 +- src/cairo-mesh-pattern-rasterizer.c | 2 +- src/cairo-png.c | 2 +- src/cairo-script-surface.c | 3 ++- 6 files changed, 10 insertions(+), 7 deletions(-) commit 35fccff6ec393ccca3d3ced79093ca491ce32df4 Author: Bryce Harrington AuthorDate: Mon Nov 6 12:09:53 2017 -0800 Commit: Bryce Harrington CommitDate: Mon Nov 6 12:18:37 2017 -0800 Un-doxygen disabled cairo_set_opacity The cairo_set_opacity() routine has been disabled since 2010. There appears to be support for it internally in the backend, so it is unclear why it is not enabled or what might break if it were re-enabled. Given the lack of bug reports about its omission, it may be vestigal. For now, just hide the doxygen for it to suppress warnings. It may be worth deeper review to either re-enable it or remove it entirely. Reported-by: Rafał Mużyło (See fdo bugzilla #82741) Signed-off-by: Bryce Harrington src/cairo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d89fc573eae0bc0234e1b909932e405a776b7e1 Author: Bryce Harrington AuthorDate: Mon Nov 6 11:28:58 2017 -0800 Commit: Bryce Harrington CommitDate: Mon Nov 6 11:35:24 2017 -0800 configure: Check for typeof Check via the AC_C_TYPEOF macro if GCC's typeof is available. If it is available via a different spelling, define typeof to that spelling. Patch from and issue reported by Richard Palo. Signed-off-by: Bryce Harrington Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93027 configure.ac | 1 + 1 file changed, 1 insertion(+) commit 3322580f0488ff77f53d86c2b4d3cf59e6dca4c7 Author: Adrian Johnson AuthorDate: Tue Oct 24 21:30:45 2017 +1030 Commit: Adrian Johnson CommitDate: Tue Oct 24 21:44:08 2017 +1030 pdf: remove old comment These issues have been fixed. src/cairo-pdf-surface.c | 9 --------- 1 file changed, 9 deletions(-) commit 1674d2b8850f9264232e60e82cb5b2827426632c Author: Adrian Johnson AuthorDate: Tue Oct 24 21:26:56 2017 +1030 Commit: Adrian Johnson CommitDate: Tue Oct 24 21:44:08 2017 +1030 pdf: set default create date boilerplate/cairo-boilerplate-pdf.c | 1 + build/configure.ac.system | 2 +- src/cairo-pdf-interchange.c | 50 +++++++++++++++++++++++++++++++++++++ src/cairo-pdf-surface.c | 1 - 4 files changed, 52 insertions(+), 2 deletions(-) commit 378e8e2f59a109a40da8e40893652a4c003a4dc7 Author: Adrian Johnson AuthorDate: Tue Oct 24 07:01:14 2017 +1030 Commit: Adrian Johnson CommitDate: Tue Oct 24 07:01:14 2017 +1030 pdf: set ca/CA instead of using an smask when the mask has constant alpha src/cairo-pattern-private.h | 5 +++ src/cairo-pattern.c | 53 +++++++++++++++++++++++++++++ src/cairo-pdf-surface-private.h | 1 + src/cairo-pdf-surface.c | 74 ++++++++++++++++++++++++++++++++--------- 4 files changed, 117 insertions(+), 16 deletions(-) commit 5fd0b8710f125bb33c55d75fcc8252996b403e2d Author: Carlos Garcia Campos AuthorDate: Wed Oct 18 11:33:25 2017 +0200 Commit: Adrian Johnson CommitDate: Sun Oct 22 11:09:02 2017 +1030 scaled-font: Fix assert when destroying glyph page This happens when _cairo_ft_scaled_glyph_init() returns CAIRO_INT_STATUS_UNSUPPORTED when called from _cairo_scaled_glyph_lookup(). In those cases _cairo_scaled_font_free_last_glyph() is called to release the glyph that has just been allocated. If there aren't more glyphs, _cairo_scaled_glyph_page_destroy() is called. The problem is that _cairo_scaled_glyph_lookup() should always be called with the cache frozen, and _cairo_scaled_glyph_page_destroy() without the cache frozen. We can simply thaw/freeze the font before calling _cairo_scaled_glyph_page_destroy(). https://bugs.freedesktop.org/show_bug.cgi?id=103335 src/cairo-scaled-font.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 87dfd0c16f4fa798c1f72612a2e070fca8547ad2 Author: Adrian Johnson AuthorDate: Sun Oct 22 08:45:45 2017 +1030 Commit: Adrian Johnson CommitDate: Sun Oct 22 08:59:58 2017 +1030 Allow mime image to be different size to cairo image Previously it was assumed the mime image size is the same as the cairo image surface size. When using the 1 bpp formats (CCITT, JBIG2), creating a cairo image of the same size will have very large memory requirements and in some case may exceed the pixman image size limits. In these cases it is useful to allow the mime image to have a different resolution to the cairo image and in the PDF/PS output scale the mime image to be the same physical size as the cairo image. In PDF, this is easy as all PDF images are scaled to 1x1 unit and the CTM is used to scale the image to the required size. The PS surface has been changed to also scale images to 1x1 and use the CTM to get the required size. src/cairo-pdf-surface.c | 124 ------------------------------------------------ src/cairo-ps-surface.c | 29 +++++++++-- 2 files changed, 24 insertions(+), 129 deletions(-) commit e1a02b180d804887980c111c1f9780bed44b96a6 Author: Adrian Johnson AuthorDate: Sun Oct 22 08:07:49 2017 +1030 Commit: Adrian Johnson CommitDate: Sun Oct 22 08:42:36 2017 +1030 Add CCITT_FAX mime type for PDF and PS surfaces This completes the full set of PDF/PS image filters allowing image data to be passed though without decompressing then recompresssing in a less efficient format. The difficulty with CCITT_FAX is it needs some decoding parameters that are not stored inside the image data. This is achieved by using an additional mime type CCITT_FAX_PARAMS that contains the params in key=value format. doc/public/cairo-sections.txt | 2 + src/Makefile.sources | 16 +- src/cairo-pdf-surface-private.h | 2 +- src/cairo-pdf-surface.c | 263 ++++++++++++++++++++++++--- src/cairo-ps-surface.c | 200 ++++++++++++++++++-- src/cairo-surface.c | 21 ++- src/cairo-tag-attributes-private.h | 15 ++ src/cairo-tag-attributes.c | 80 ++++++++ src/cairo.h | 2 + test/ccitt.g3 | 2 + test/mime-data.c | 56 +++++- test/reference/mime-data.base.argb32.ref.png | Bin 243 -> 272 bytes test/reference/mime-data.base.rgb24.ref.png | Bin 243 -> 272 bytes test/reference/mime-data.pdf.ref.png | Bin 7563 -> 8205 bytes test/reference/mime-data.ps.ref.png | Bin 4705 -> 5386 bytes test/reference/mime-data.ref.png | Bin 243 -> 272 bytes test/reference/mime-data.script.ref.png | Bin 2130 -> 2175 bytes test/reference/mime-data.svg.ref.png | Bin 6437 -> 6513 bytes 18 files changed, 609 insertions(+), 50 deletions(-) commit 4ae7f411c865a25b577faea58e5fda6f4e9e1172 Author: Adrian Johnson AuthorDate: Sat Oct 21 20:05:56 2017 +1030 Commit: Adrian Johnson CommitDate: Sat Oct 21 20:05:56 2017 +1030 util/font-view: fix build error util/font-view.c | 2 ++ 1 file changed, 2 insertions(+) commit 9ffbf63d3715f81ec92cdba93b60a04a11be130f Author: Adrian Johnson AuthorDate: Sat Oct 21 13:05:26 2017 +1030 Commit: Adrian Johnson CommitDate: Sat Oct 21 13:08:39 2017 +1030 fix warning: inlining failed in call to '_csi_stack_push' util/cairo-script/cairo-script-interpreter.c | 11 +++++++++++ util/cairo-script/cairo-script-private.h | 11 ++--------- 2 files changed, 13 insertions(+), 9 deletions(-) commit b092b63119cbfe3cb4bc786eee81630998996acf Author: Adrian Johnson AuthorDate: Sat Oct 21 13:02:42 2017 +1030 Commit: Adrian Johnson CommitDate: Sat Oct 21 13:08:30 2017 +1030 fix warning: variable X might be clobbered by 'longjmp' Move calls to setjmp into separate function to avoid clobbering local variables. src/cairo-bentley-ottmann-rectangular.c | 8 +++++++- src/cairo-png.c | 17 +++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) commit 132794f6832ea83e2f9a72e11b05080d2cdf80f8 Author: Adrian Johnson AuthorDate: Mon Oct 16 20:13:48 2017 +1030 Commit: Adrian Johnson CommitDate: Mon Oct 16 20:18:49 2017 +1030 svg: recording_surface is needed even if not emitted src/cairo-svg-surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27990e391070dd43f08450a3d54c90d18e6d85f3 Author: Adrian Johnson AuthorDate: Mon Oct 16 19:47:21 2017 +1030 Commit: Adrian Johnson CommitDate: Mon Oct 16 20:18:49 2017 +1030 fix unused function warnings src/cairo-botor-scan-converter.c | 2 ++ test/any2ppm.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit fc929d70054583d0c21f24b18083348e3e7d914c Author: Adrian Johnson AuthorDate: Mon Oct 16 19:42:16 2017 +1030 Commit: Adrian Johnson CommitDate: Mon Oct 16 19:42:16 2017 +1030 ft: prevent unused var warning when freetype < 2.8 src/cairo-ft-font.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 1d58e0f81856038d8aa306b97302485a4d2e2ec9 Author: Adrian Johnson AuthorDate: Sun Oct 15 19:42:08 2017 +1030 Commit: Adrian Johnson CommitDate: Sun Oct 15 19:42:08 2017 +1030 svg2png: remove unused headers test/svg2png.c | 2 -- 1 file changed, 2 deletions(-) commit 90104809b0e03d28ac1152034fd4f05fc8e97b9a Author: Mikhail Fludkov AuthorDate: Fri Oct 6 13:47:51 2017 +0200 Commit: Adrian Johnson CommitDate: Sun Oct 15 18:51:04 2017 +1030 Surround initialisations with atomic critical section Fixes the race condition when one thread uses cairo_mask_compositor_t pointer returned by _cairo_image_mask_compositor_get, while another one started but has not finished it's initialisation yet Usage: static cairo_atomic_once_t once = CAIRO_ATOMIC_ONCE_INIT; if (_cairo_atomic_init_once_enter(&once)) { /* Initialization code */ _cairo_atomic_init_once_leave(&once); } https://bugs.freedesktop.org/show_bug.cgi?id=103037 src/cairo-atomic-private.h | 33 +++++++++++++++++++++++++++++++++ src/cairo-gl-msaa-compositor.c | 5 ++++- src/cairo-gl-spans-compositor.c | 5 ++++- src/cairo-gl-traps-compositor.c | 5 ++++- src/cairo-image-compositor.c | 19 ++++++++++++++----- src/cairo-image-mask-compositor.c | 5 ++++- src/cairo-xlib-core-compositor.c | 5 ++++- src/cairo-xlib-render-compositor.c | 10 ++++++++-- src/test-null-compositor-surface.c | 10 ++++++++-- src/win32/cairo-win32-gdi-compositor.c | 5 ++++- 10 files changed, 87 insertions(+), 15 deletions(-) commit 79e0e25e441a74e3ec207d95bd83437457ba1885 Author: Adrian Johnson AuthorDate: Sun Oct 15 07:57:54 2017 +1030 Commit: Adrian Johnson CommitDate: Sun Oct 15 07:57:54 2017 +1030 svg: source surface hash table does not need to hold the source src/cairo-svg-surface-private.h | 1 - src/cairo-svg-surface.c | 2 -- 2 files changed, 3 deletions(-) commit 965ba86bbf87fb0d8df666cbba7c8823cc393b0b Author: Adrian Johnson AuthorDate: Sat Oct 14 19:47:39 2017 +1030 Commit: Adrian Johnson CommitDate: Sat Oct 14 20:53:01 2017 +1030 svg: use hash table instead of user_data to track emitted surfaces Setting a key on the source surface->user_data prevents the surface from being reused to create another svg file. The hash table also supports CAIRO_MIME_TYPE_UNIQUE_ID. https://lists.cairographics.org/archives/cairo/2017-October/028406.html src/cairo-svg-surface-private.h | 9 ++ src/cairo-svg-surface.c | 185 ++++++++++++++++++++++++++++++++-------- 2 files changed, 159 insertions(+), 35 deletions(-) commit bb10bd10138a262759b37281135b5199e334f392 Author: Adrian Johnson AuthorDate: Fri Oct 13 19:44:45 2017 +1030 Commit: Adrian Johnson CommitDate: Fri Oct 13 19:50:24 2017 +1030 truetype: limit font name to 127 chars Some broken fonts have long strings of garbage in the font name https://bugs.freedesktop.org/show_bug.cgi?id=103249 src/cairo-truetype-subset.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 202a9ed64e3d164307defddb41a9f8cf9e9b751b Author: Adrian Johnson AuthorDate: Fri Oct 13 19:27:03 2017 +1030 Commit: Adrian Johnson CommitDate: Fri Oct 13 19:33:30 2017 +1030 output-stream: allow %s strings larger than 512 chars https://bugs.freedesktop.org/show_bug.cgi?id=103249 src/cairo-output-stream.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d5b634da61597aa8e80ba7d5bc39f092e5888515 Author: Bryce Harrington AuthorDate: Wed Oct 11 19:13:46 2017 -0700 Commit: Bryce Harrington CommitDate: Wed Oct 11 19:13:46 2017 -0700 Factor out the ISFINITE() macro src/cairo-gstate.c | 6 ------ src/cairo-matrix.c | 6 ------ src/cairo-scaled-font.c | 6 ------ src/cairoint.h | 6 ++++++ 4 files changed, 6 insertions(+), 18 deletions(-) commit 5a9dba9929d9c9046705150f7e3c4783ff34e4dd Author: Adrian Johnson AuthorDate: Thu Oct 5 20:50:19 2017 +1030 Commit: Adrian Johnson CommitDate: Thu Oct 5 20:50:19 2017 +1030 svg: fix painting an unbounded recording surface https://lists.cairographics.org/archives/cairo/2017-October/028395.html src/cairo-svg-surface-private.h | 1 + src/cairo-svg-surface.c | 38 +++++++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) commit bec8c7508ebc0f69266f9aebe9903539391c519b Author: Adrian Johnson AuthorDate: Tue Oct 3 22:18:49 2017 +1030 Commit: Adrian Johnson CommitDate: Tue Oct 3 22:27:25 2017 +1030 Prevent curved strokes in small ctms from being culled from vector surfaces The combination of both curved strokes and ignoring the ctm in the thin line check caused some fill-strokes in this test case to be culled. Modify the thin line check to take the ctm into account and increase the minimum width to 1 point to prevent curved lines such as tiny dots from being culled. https://bugs.freedesktop.org/show_bug.cgi?id=103071 src/cairo-path-bounds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dccbed7d78d32bd3b912e8810379451dd94e6a1f Author: Adrian Johnson AuthorDate: Fri Sep 22 20:24:45 2017 +0930 Commit: Adrian Johnson CommitDate: Fri Sep 22 20:25:59 2017 +0930 truetype: clarify glyph count variables - move num_glyphs_in_face to base struct as it is the number in the font - move num_glyphs to the subset variables as it is the num glyphs in the subset - move widths to subset variables as it uses the subset id as the array index src/cairo-truetype-subset.c | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 52cbf42b74785c3c3c2d15effe7bdb416ff9c8b2 Author: Adrian Johnson AuthorDate: Fri Sep 22 20:10:10 2017 +0930 Commit: Adrian Johnson CommitDate: Fri Sep 22 20:10:10 2017 +0930 truetype: reserve space in subset arrays for .notdef Subset array sizes are allocated based on the number of glyphs in the font. In this bug the fonts did not contain the mandatory .notdef glyph, hence the subset arrays were not large enough. https://bugs.freedesktop.org/show_bug.cgi?id=102922 src/cairo-truetype-subset.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e773dd744e88dc871fdc549132f07760f1be94c7 Author: Adrian Johnson AuthorDate: Sun Sep 17 14:15:25 2017 +0930 Commit: Adrian Johnson CommitDate: Fri Sep 22 18:17:25 2017 +0930 factor out ascii to double code in cff-subset into _cairo_strtod src/cairo-cff-subset.c | 27 +++------------------ src/cairo-misc.c | 60 +++++++++++++++++++++++++++++++++++++++++++++-- src/cairo-output-stream.c | 2 +- src/cairo-type1-subset.c | 2 +- src/cairoint.h | 5 +++- 5 files changed, 67 insertions(+), 29 deletions(-) commit 871c518121452116ee799fe4262421d4c935972e Author: Aleksander Morgado AuthorDate: Mon Aug 28 11:23:34 2017 +0200 Commit: Bryce Harrington CommitDate: Wed Sep 20 11:44:29 2017 -0700 build: fix minor typo in autogen.sh Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102452 Reviewed-by: Bryce Harrington autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1220e3c6b8f94a00ac7afee15f21e6782655d97c Author: Adrian Johnson AuthorDate: Sat Sep 2 19:17:37 2017 +0930 Commit: Adrian Johnson CommitDate: Sat Sep 16 10:04:57 2017 +0930 replace _BSD_SOURCE with _DEFAULT_SOURCE fixes the warning: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" src/cairo-cff-subset.c | 2 +- src/cairo-ft-font.c | 2 +- src/cairo-output-stream.c | 2 +- src/cairo-path-stroke-boxes.c | 2 +- src/cairo-path-stroke-polygon.c | 2 +- src/cairo-path-stroke-tristrip.c | 2 +- src/cairo-path-stroke.c | 2 +- src/cairo-pdf-surface.c | 2 +- src/cairo-ps-surface.c | 2 +- src/cairo-scaled-font-subsets.c | 2 +- src/cairo-svg-surface.c | 2 +- src/cairo-toy-font-face.c | 2 +- src/cairo-truetype-subset.c | 2 +- src/cairo-type1-fallback.c | 2 +- src/cairo-type1-subset.c | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) commit 117a3c27d48107cb9c570fee725105419b1251e3 Author: Adrian Johnson AuthorDate: Sat Sep 2 19:09:49 2017 +0930 Commit: Adrian Johnson CommitDate: Sat Sep 16 10:04:57 2017 +0930 build: use _WIN32 instead of windows.h to check for windows build ifdef _WIN32 is the recommended way to check for a windows build [1] and avoids identifying cygwin as windows. based on the patch at [2] [1] https://lists.gnu.org/archive/html/autoconf/2012-02/msg00008.html [2] https://lists.gnu.org/archive/html/autoconf/2012-02/msg00009.html build/configure.ac.system | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8ff3019f51bd40c23d8a0dd5e51ce3fab6442d6e Author: Bryce Harrington AuthorDate: Wed Sep 13 12:35:27 2017 -0700 Commit: Bryce Harrington CommitDate: Wed Sep 13 15:18:04 2017 -0700 gl: Add support for OpenGL ES 3.0 This improves the OpenGL ES support to extend it to version 3.0. A number of new features are available in glesv3 including creation of multi-sampled renderbuffers. These renderbuffers can be blitted to single sample textures (but not the other way around). Other features such as PBO for image uploading, are left as followon work. For this preliminary implementation, glesv3 backends always create renderbuffers, which can be set as single sample or multisample. The renderbuffer's content is blitted to the texture only when used as a source or a mask. Images uploaded to a texture stay there until the surface is used as a rendering target, at which point its painted to the renderbuffer. This patch is heavily based off of Henry Song's initial GLESv3 patch 6f7f3795 from his cairogles fork of Cairo, and incorporates subsequent fixes and pertinent refactorings from his trunk and review feedback from Uli. This implements the *functional* support for glesv3, excluding the various optimization work to utilize its features. Rendering and performance should not be expected to improve notably from pure glesv2. As the GL backend for Cairo remains "experimental", these changes should likewise be considered as such. Signed-off-by: Bryce Harrington boilerplate/Makefile.win32.features | 12 +++++ boilerplate/cairo-boilerplate-egl.c | 30 ++++++++--- build/Makefile.win32.features | 1 + build/Makefile.win32.features-h | 3 ++ build/configure.ac.features | 1 + configure.ac | 23 ++++++++ src/Makefile.sources | 4 ++ src/Makefile.win32.features | 16 ++++++ src/cairo-gl-composite.c | 103 +++++++++++++++++++++++++++++++++++- src/cairo-gl-device.c | 91 +++++++++++++++++++++++-------- src/cairo-gl-dispatch.c | 12 +++++ src/cairo-gl-gradient-private.h | 9 ++-- src/cairo-gl-gradient.c | 3 +- src/cairo-gl-info.c | 4 +- src/cairo-gl-msaa-compositor.c | 10 +++- src/cairo-gl-operand.c | 3 +- src/cairo-gl-private.h | 20 ++++--- src/cairo-gl-shaders.c | 15 ++++-- src/cairo-gl-surface.c | 73 ++++++++++++++++++++----- src/cairo-gl.h | 2 +- 20 files changed, 370 insertions(+), 65 deletions(-) commit d1f941d7ee06340c155158b32bec28fc2e1a4264 Author: Bryce Harrington AuthorDate: Thu Oct 20 16:37:28 2016 -0700 Commit: Bryce Harrington CommitDate: Wed Sep 13 15:17:55 2017 -0700 gl: Make _cairo_gl_ensure_framebuffer a private shared routine Signed-off-by: Bryce Harrington src/cairo-gl-device.c | 2 +- src/cairo-gl-private.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 4b164bc89872f0cf4e123e1358cc83be8e83a4d3 Author: Bryce Harrington AuthorDate: Fri Oct 7 15:26:25 2016 -0700 Commit: Bryce Harrington CommitDate: Wed Sep 13 15:17:55 2017 -0700 gl: Convert images to rgba or a8 formats when uploading with GLESv2 The GLESv2 backend supports only GL_RGBA and GL_ALPHA as supported texture formats. So, make _cairo_gl_get_image_format_and_type_gles2 force conversion of other image formats to either of these two as appropriate when uploading images. Patch originally from Henry Song Bryce Harrington Signed-off-by: Bryce Harrington src/cairo-gl-surface.c | 45 +++++++++++++++++++++++++++++++++++++++++ src/cairo-gl-traps-compositor.c | 30 --------------------------- 2 files changed, 45 insertions(+), 30 deletions(-) commit 99427c3f4f6ce7ce3c95c4caa4d2b8ff7c0093d9 Author: Behdad Esfahbod AuthorDate: Tue Sep 12 01:35:15 2017 -0400 Commit: Behdad Esfahbod CommitDate: Tue Sep 12 01:35:15 2017 -0400 Handle SOURCE and CLEAR operators when painting color glyphs In cairo, most operators are composited this way: ((src IN mask) OP dst) LERP_clip dst but SOURCE and CLEAR operators are composited this way: (src OP dst) LERP_(clip IN mask) dst (why is this not specified anywhere in the docs or source tree?) With color glyphs, we were not special-casing SOURCE and CLEAR. We do now. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=102661 src/cairo-surface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7f6b57a2386c051e4bb6a156cf14904fe061f837 Author: Behdad Esfahbod AuthorDate: Mon Sep 11 22:00:00 2017 -0700 Commit: Behdad Esfahbod CommitDate: Mon Sep 11 22:00:00 2017 -0700 Fix undefined-behavior with integer math As reported to me: "A calculation on signed integers has undefined behaviour if the result is not representable in the type. In this case, it's trying to negate int_min, aka -2^31 but the range of an int is [-2^31, 2^31-1] so it doesn't fit. Instead, cast to unsigned which has 2's complement wrap-around arithmetic which is what this particular function expects." src/cairo-fixed-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1af18610baaefd2031259fc7aae79b341c57fb91 Author: Bryce Harrington AuthorDate: Mon Sep 11 19:49:14 2017 -0700 Commit: Bryce Harrington CommitDate: Mon Sep 11 19:56:06 2017 -0700 glesv2: Fix regression in gles version detection Revert the _cairo_gl_get_flavor() portion of the change from commit eb523200. This caused GLES to be enabled only if the hardware reported version 2 exactly; if the hardware supported version 2 and 3 then no ES support would be enabled. src/cairo-gl-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c29db4f0de52727406a8b62f4da9a382084b5a79 Author: Adrian Johnson AuthorDate: Sat Sep 2 16:11:43 2017 +0930 Commit: Adrian Johnson CommitDate: Sat Sep 2 16:11:43 2017 +0930 Remove unused variable src/cairo-unicode.c | 2 -- 1 file changed, 2 deletions(-) commit b646f755f3ad12ccd437ea32bffaefe5f6c6be25 Author: Adrian Johnson AuthorDate: Sat Sep 2 07:37:36 2017 +0930 Commit: Adrian Johnson CommitDate: Sat Sep 2 07:37:36 2017 +0930 RELEASING: use correct branch name RELEASING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 934e42fa5e4b74cf7fed022d2ff8a6326908ba3c Author: Bryce Harrington AuthorDate: Tue Aug 29 10:18:14 2017 -0700 Commit: Bryce Harrington CommitDate: Tue Aug 29 10:18:14 2017 -0700 Bump version for new development tree, 1.15.9 cairo-version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)