diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-10-15 07:49:29 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-10-15 07:49:29 +0000 |
commit | f30e59e50f4dc8d3b3d043346af5b1beaff3e313 (patch) | |
tree | 370069828aa09ea4fa28477458e05e8fc649e1d7 /Build | |
parent | f8c3097b508413f6171ad5332227256e32daddd1 (diff) |
cairo 1.14.0
git-svn-id: svn://tug.org/texlive/trunk@35377 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/libs/README | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/Makefile.am | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/Makefile.in | 18 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0-PATCHES/ChangeLog (renamed from Build/source/libs/cairo/cairo-1.12.16-PATCHES/ChangeLog) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0-PATCHES/TL-Changes (renamed from Build/source/libs/cairo/cairo-1.12.16-PATCHES/TL-Changes) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/AUTHORS (renamed from Build/source/libs/cairo/cairo-1.12.16/AUTHORS) | 6 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/BIBLIOGRAPHY (renamed from Build/source/libs/cairo/cairo-1.12.16/BIBLIOGRAPHY) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/BUGS (renamed from Build/source/libs/cairo/cairo-1.12.16/BUGS) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/CODING_STYLE (renamed from Build/source/libs/cairo/cairo-1.12.16/CODING_STYLE) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/COPYING (renamed from Build/source/libs/cairo/cairo-1.12.16/COPYING) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/COPYING-LGPL-2.1 (renamed from Build/source/libs/cairo/cairo-1.12.16/COPYING-LGPL-2.1) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/COPYING-MPL-1.1 (renamed from Build/source/libs/cairo/cairo-1.12.16/COPYING-MPL-1.1) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/HACKING (renamed from Build/source/libs/cairo/cairo-1.12.16/HACKING) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/INSTALL (renamed from Build/source/libs/cairo/cairo-1.12.16/INSTALL) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/KNOWN_ISSUES (renamed from Build/source/libs/cairo/cairo-1.12.16/KNOWN_ISSUES) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/Makefile.am (renamed from Build/source/libs/cairo/cairo-1.12.16/Makefile.am) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/Makefile.win32 (renamed from Build/source/libs/cairo/cairo-1.12.16/Makefile.win32) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/NEWS (renamed from Build/source/libs/cairo/cairo-1.12.16/NEWS) | 210 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/PORTING_GUIDE (renamed from Build/source/libs/cairo/cairo-1.12.16/PORTING_GUIDE) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/README (renamed from Build/source/libs/cairo/cairo-1.12.16/README) | 30 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/README.win32 (renamed from Build/source/libs/cairo/cairo-1.12.16/README.win32) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/RELEASING (renamed from Build/source/libs/cairo/cairo-1.12.16/RELEASING) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/acinclude.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/acinclude.m4) | 0 | ||||
-rwxr-xr-x | Build/source/libs/cairo/cairo-1.14.0/autogen.sh (renamed from Build/source/libs/cairo/cairo-1.12.16/autogen.sh) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.analysis (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.analysis) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.changelog (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.changelog) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.common (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.common) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.gtk-doc (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.gtk-doc) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.releasing (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.releasing) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.common (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.common) | 23 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.features (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.features) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.features-h (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.features-h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.inform (renamed from Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.inform) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/aclocal.cairo.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/build/aclocal.cairo.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/aclocal.compare.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/build/aclocal.compare.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/aclocal.enable.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/build/aclocal.enable.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/aclocal.float.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/build/aclocal.float.m4) | 9 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/aclocal.makefile.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/build/aclocal.makefile.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/aclocal.pkg.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/build/aclocal.pkg.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.analysis (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.analysis) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.features (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.features) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.noversion (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.noversion) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.pthread (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.pthread) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.system (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.system) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.tools (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.tools) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.version (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.version) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.warnings (renamed from Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.warnings) | 24 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/build/gtk-doc.m4 (renamed from Build/source/libs/cairo/cairo-1.12.16/build/gtk-doc.m4) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/cairo-version.h (renamed from Build/source/libs/cairo/cairo-1.12.16/cairo-version.h) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/config.h.in (renamed from Build/source/libs/cairo/cairo-1.12.16/config.h.in) | 8 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/configure.ac (renamed from Build/source/libs/cairo/cairo-1.12.16/configure.ac) | 30 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am (renamed from Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am.analysis (renamed from Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am.analysis) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am.features (renamed from Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am.features) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/Makefile.sources (renamed from Build/source/libs/cairo/cairo-1.12.16/src/Makefile.sources) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/Makefile.win32 (renamed from Build/source/libs/cairo/cairo-1.12.16/src/Makefile.win32) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/Makefile.win32.features (renamed from Build/source/libs/cairo/cairo-1.12.16/src/Makefile.win32.features) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/README (renamed from Build/source/libs/cairo/cairo-1.12.16/src/README) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-analysis-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-analysis-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-analysis-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-analysis-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-arc-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-arc-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-arc.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-arc.c) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-array-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-array-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-array.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-array.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-atomic-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-atomic-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-atomic.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-atomic.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-backend-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-backend-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-base64-stream.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-base64-stream.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-base85-stream.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-base85-stream.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann-rectangular.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann-rectangular.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann-rectilinear.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann-rectilinear.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann.c) | 232 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-beos-surface.cpp (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-beos-surface.cpp) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-beos.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-beos.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-botor-scan-converter.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-botor-scan-converter.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-box-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-box-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes-intersect.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes-intersect.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cache-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cache-private.h) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cache.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cache.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cff-subset.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cff-subset.c) | 10 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-boxes.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-boxes.c) | 11 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-polygon.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-polygon.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-region.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-region.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-surface.c) | 20 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-tor-scan-converter.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-tor-scan-converter.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-context-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-context-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-context.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-context.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-gradient-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-gradient-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-gradient.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-gradient.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-surface.c) | 8 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-utils-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-utils-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-utils.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-utils.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-color.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-color.c) | 11 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-combsort-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-combsort-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-compiler-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-compiler-private.h) | 12 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-composite-rectangles-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-composite-rectangles-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-composite-rectangles.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-composite-rectangles.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-compositor-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-compositor-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-compositor.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour.c) | 1 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-damage-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-damage-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-damage.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-damage.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-debug.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-debug.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-default-context-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-default-context-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-default-context.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-default-context.c) | 37 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-deflate-stream.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-deflate-stream.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-deprecated.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-deprecated.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-device-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-device-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-device.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-device.c) | 1 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-directfb-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-directfb-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-directfb.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-directfb.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-drm.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-drm.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-egl-context.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-egl-context.c) | 6 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-error-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-error-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-error-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-error-private.h) | 8 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-error.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-error.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-fallback-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-fallback-compositor.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-features-uninstalled.pc.in (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-features-uninstalled.pc.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-features.pc.in (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-features.pc.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed-private.h) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed-type-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed-type-private.h) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face-twin-data.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face-twin-data.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face-twin.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face-twin.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face.c) | 43 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-options.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-options.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-fontconfig-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-fontconfig-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-freed-pool-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-freed-pool-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-freed-pool.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-freed-pool.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist-type-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist-type-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft-font.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft-font.c) | 26 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-composite.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-composite.c) | 3 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-device.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-device.c) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-dispatch-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-dispatch-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-dispatch.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-dispatch.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-ext-def-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-ext-def-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-glyphs.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-glyphs.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-gradient-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-gradient-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-gradient.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-gradient.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-info.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-info.c) | 20 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-msaa-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-msaa-compositor.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-operand.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-operand.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-private.h) | 9 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-shaders.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-shaders.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-source.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-source.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-spans-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-spans-compositor.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-surface.c) | 8 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-traps-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-traps-compositor.c) | 18 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-glx-context.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-glx-context.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gstate-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gstate-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-gstate.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-gstate.c) | 25 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-hash-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-hash-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-hash.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-hash.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-hull.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-hull.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-compositor.c) | 43 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-info-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-info-private.h) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-info.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-info.c) | 135 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-source.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-source.c) | 420 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface.c) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-inline.h | 48 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-private.h | 51 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-line.c | 306 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-list-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-list-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-list-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-list-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-lzw.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-lzw.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-malloc-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-malloc-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mask-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mask-compositor.c) | 14 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-matrix.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-matrix.c) | 37 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mempool-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mempool-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mempool.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mempool.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mesh-pattern-rasterizer.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mesh-pattern-rasterizer.c) | 11 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-misc.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-misc.c) | 20 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mono-scan-converter.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mono-scan-converter.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-impl-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-impl-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-list-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-list-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-type-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-type-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-no-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-no-compositor.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-observer.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-observer.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-output-stream-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-output-stream-private.h) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-output-stream.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-output-stream.c) | 44 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-surface.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-bounds.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-bounds.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fill.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fill.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fixed-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fixed-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fixed.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fixed.c) | 3 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-in-fill.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-in-fill.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-boxes.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-boxes.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-polygon.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-polygon.c) | 10 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-traps.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-traps.c) | 57 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-tristrip.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-tristrip.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-path.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-path.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern-private.h) | 9 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern.c) | 332 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-operators-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-operators-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-operators.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-operators.c) | 23 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-shading-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-shading-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-shading.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-shading.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-surface-private.h) | 12 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-surface.c) | 889 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pen.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pen.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-pixman-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-pixman-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-png.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-png.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon-intersect.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon-intersect.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon-reduce.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon-reduce.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps-surface.c) | 138 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-qt-surface.cpp (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-qt-surface.cpp) | 39 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-qt.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-qt.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-font.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-font.c) | 3 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-image-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-image-surface.c) | 6 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-image.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-image.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-private.h) | 3 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-surface.c) | 13 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-raster-source-pattern.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-raster-source-pattern.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface-private.h) | 8 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface.c) | 116 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-rectangle.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-rectangle.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-rectangular-scan-converter.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-rectangular-scan-converter.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-reference-count-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-reference-count-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-region-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-region-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-region.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-region.c) | 13 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-rtree-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-rtree-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-rtree.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-rtree.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-subsets-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-subsets-private.h) | 15 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-subsets.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-subsets.c) | 40 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-script-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-script-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-script-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-script-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-script.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-script.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-shape-mask-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-shape-mask-compositor.c) | 27 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-skia.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-skia.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-slope-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-slope-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-slope.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-slope.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-compositor-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-compositor-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-compositor.c) | 23 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-private.h) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-spline.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-spline.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-dash-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-dash-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-dash.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-dash.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-style.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-style.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-backend-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-backend-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-clipper-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-clipper-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-clipper.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-clipper.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-fallback-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-fallback-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-fallback.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-fallback.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer.c) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-offset-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-offset-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-offset.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-offset.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface-inline.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface-inline.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface.c) | 30 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-wrapper-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-wrapper-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-wrapper.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-wrapper.c) | 9 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface.c) | 234 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg-surface.c) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-time-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-time-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-time.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-time.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-tor-scan-converter.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-tor-scan-converter.c) | 457 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-tor22-scan-converter.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-tor22-scan-converter.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-toy-font-face.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-toy-font-face.c) | 7 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps-compositor.c) | 80 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps-private.h) | 8 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps.c) | 85 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-tristrip-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-tristrip-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-tristrip.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-tristrip.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-truetype-subset-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-truetype-subset-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-truetype-subset.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-truetype-subset.c) | 37 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-fallback.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-fallback.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-glyph-names.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-glyph-names.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-subset.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-subset.c) | 30 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-type3-glyph-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-type3-glyph-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-type3-glyph-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-type3-glyph-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-types-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-types-private.h) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-unicode.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-unicode.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-uninstalled.pc.in (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-uninstalled.pc.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-user-font-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-user-font-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-user-font.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-user-font.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-version.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-version.c) | 1 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-version.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-version.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-vg-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-vg-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-vg.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-vg.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-wgl-context.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-wgl-context.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint-type-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint-type-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint.c) | 8 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-win32.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-win32.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-core.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-core.c) | 34 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-render.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-render.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-shm.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-shm.c) | 6 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection.c) | 10 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-private.h) | 45 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-resources.c | 304 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-screen.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-screen.c) | 114 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-shm.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-shm.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface-core.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface-core.c) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface-render.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface-render.c) | 103 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface.c) | 33 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-core-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-core-compositor.c) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-display.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-display.c) | 10 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-fallback-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-fallback-compositor.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-private.h) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-render-compositor.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-render-compositor.c) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-screen.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-screen.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-source.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-source.c) | 59 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface-shm.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface-shm.c) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-visual.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-visual.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xcb-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xcb-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xrender-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xrender-private.h) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xrender.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xrender.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xml-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xml-surface.c) | 5 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo-xml.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo-xml.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo.c) | 6 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo.h) | 36 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairo.pc.in (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairo.pc.in) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/cairoint.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/cairoint.h) | 45 | ||||
-rwxr-xr-x | Build/source/libs/cairo/cairo-1.14.0/src/check-def.sh (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-def.sh) | 0 | ||||
-rwxr-xr-x | Build/source/libs/cairo/cairo-1.14.0/src/check-doc-syntax.awk (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-doc-syntax.awk) | 2 | ||||
-rwxr-xr-x | Build/source/libs/cairo/cairo-1.14.0/src/check-doc-syntax.sh (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-doc-syntax.sh) | 2 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/check-has-hidden-symbols.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-has-hidden-symbols.c) | 0 | ||||
-rwxr-xr-x | Build/source/libs/cairo/cairo-1.14.0/src/check-headers.sh (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-headers.sh) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/check-link.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-link.c) | 0 | ||||
-rwxr-xr-x | Build/source/libs/cairo/cairo-1.14.0/src/check-plt.sh (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-plt.sh) | 0 | ||||
-rwxr-xr-x | Build/source/libs/cairo/cairo-1.14.0/src/check-preprocessor-syntax.sh (renamed from Build/source/libs/cairo/cairo-1.12.16/src/check-preprocessor-syntax.sh) | 4 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-base-compositor-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-base-compositor-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface-private.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface-private.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-null-compositor-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-null-compositor-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-null-compositor-surface.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-null-compositor-surface.h) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-paginated-surface.c (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-paginated-surface.c) | 0 | ||||
-rw-r--r-- | Build/source/libs/cairo/cairo-1.14.0/src/test-paginated-surface.h (renamed from Build/source/libs/cairo/cairo-1.12.16/src/test-paginated-surface.h) | 0 | ||||
-rwxr-xr-x | Build/source/libs/cairo/configure | 24 | ||||
-rw-r--r-- | Build/source/libs/cairo/version.ac | 4 |
385 files changed, 4246 insertions, 1473 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index 1cd8ba3cf4c..7245ec25b50 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -9,7 +9,7 @@ bypassing or using the original one. See also comments in ../texk/README. -cairo 1.12.16 - checked 10sep13 +cairo 1.14.0 - checked 15oct14 http://cairographics.org/releases/ freetype2 2.5.3 - checked 8mar14 diff --git a/Build/source/libs/cairo/ChangeLog b/Build/source/libs/cairo/ChangeLog index 77cb09cf2db..e3152846b47 100644 --- a/Build/source/libs/cairo/ChangeLog +++ b/Build/source/libs/cairo/ChangeLog @@ -1,3 +1,8 @@ +2014-10-15 Peter Breitenlohner <peb@mppmu.mpg.de> + + Import cairo-1.14.0. + * Makefile.am, version.ac: Adapted. + 2014-02-04 Peter Breitenlohner <peb@mppmu.mpg.de> * configure.ac: Use -Wno-attributes only for gcc Version 4.2 and diff --git a/Build/source/libs/cairo/Makefile.am b/Build/source/libs/cairo/Makefile.am index ac7c89812af..148d5365c99 100644 --- a/Build/source/libs/cairo/Makefile.am +++ b/Build/source/libs/cairo/Makefile.am @@ -72,6 +72,7 @@ libcairo_a_SOURCES = \ @CAIRO_TREE@/src/cairo-image-info.c \ @CAIRO_TREE@/src/cairo-image-source.c \ @CAIRO_TREE@/src/cairo-image-surface.c \ + @CAIRO_TREE@/src/cairo-line.c \ @CAIRO_TREE@/src/cairo-lzw.c \ @CAIRO_TREE@/src/cairo-matrix.c \ @CAIRO_TREE@/src/cairo-mask-compositor.c \ @@ -154,6 +155,7 @@ libcairo_a_SOURCES += \ @CAIRO_TREE@/src/cairo-xcb-connection-core.c \ @CAIRO_TREE@/src/cairo-xcb-connection-render.c \ @CAIRO_TREE@/src/cairo-xcb-connection-shm.c \ + @CAIRO_TREE@/src/cairo-xcb-resources.c \ @CAIRO_TREE@/src/cairo-xcb-screen.c \ @CAIRO_TREE@/src/cairo-xcb-shm.c \ @CAIRO_TREE@/src/cairo-xcb-surface.c \ diff --git a/Build/source/libs/cairo/Makefile.in b/Build/source/libs/cairo/Makefile.in index 6012d823e71..be9496be886 100644 --- a/Build/source/libs/cairo/Makefile.in +++ b/Build/source/libs/cairo/Makefile.in @@ -95,6 +95,7 @@ host_triplet = @host@ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-connection-core.c \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-connection-render.c \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-connection-shm.c \ +@CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-resources.c \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-screen.c \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-shm.c \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-surface.c \ @@ -215,7 +216,8 @@ am__libcairo_a_SOURCES_DIST = \ @CAIRO_TREE@/src/cairo-image-info.c \ @CAIRO_TREE@/src/cairo-image-source.c \ @CAIRO_TREE@/src/cairo-image-surface.c \ - @CAIRO_TREE@/src/cairo-lzw.c @CAIRO_TREE@/src/cairo-matrix.c \ + @CAIRO_TREE@/src/cairo-line.c @CAIRO_TREE@/src/cairo-lzw.c \ + @CAIRO_TREE@/src/cairo-matrix.c \ @CAIRO_TREE@/src/cairo-mask-compositor.c \ @CAIRO_TREE@/src/cairo-mesh-pattern-rasterizer.c \ @CAIRO_TREE@/src/cairo-mempool.c @CAIRO_TREE@/src/cairo-misc.c \ @@ -285,6 +287,7 @@ am__libcairo_a_SOURCES_DIST = \ @CAIRO_TREE@/src/cairo-xcb-connection-core.c \ @CAIRO_TREE@/src/cairo-xcb-connection-render.c \ @CAIRO_TREE@/src/cairo-xcb-connection-shm.c \ + @CAIRO_TREE@/src/cairo-xcb-resources.c \ @CAIRO_TREE@/src/cairo-xcb-screen.c \ @CAIRO_TREE@/src/cairo-xcb-shm.c \ @CAIRO_TREE@/src/cairo-xcb-surface.c \ @@ -324,6 +327,7 @@ am__dirstamp = $(am__leading_dot)dirstamp @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-connection-core.$(OBJEXT) \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-connection-render.$(OBJEXT) \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-connection-shm.$(OBJEXT) \ +@CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-resources.$(OBJEXT) \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-screen.$(OBJEXT) \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-shm.$(OBJEXT) \ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ @CAIRO_TREE@/src/cairo-xcb-surface.$(OBJEXT) \ @@ -401,6 +405,7 @@ am_libcairo_a_OBJECTS = \ @CAIRO_TREE@/src/cairo-image-info.$(OBJEXT) \ @CAIRO_TREE@/src/cairo-image-source.$(OBJEXT) \ @CAIRO_TREE@/src/cairo-image-surface.$(OBJEXT) \ + @CAIRO_TREE@/src/cairo-line.$(OBJEXT) \ @CAIRO_TREE@/src/cairo-lzw.$(OBJEXT) \ @CAIRO_TREE@/src/cairo-matrix.$(OBJEXT) \ @CAIRO_TREE@/src/cairo-mask-compositor.$(OBJEXT) \ @@ -940,7 +945,8 @@ libcairo_a_SOURCES = @CAIRO_TREE@/src/cairo-analysis-surface.c \ @CAIRO_TREE@/src/cairo-image-info.c \ @CAIRO_TREE@/src/cairo-image-source.c \ @CAIRO_TREE@/src/cairo-image-surface.c \ - @CAIRO_TREE@/src/cairo-lzw.c @CAIRO_TREE@/src/cairo-matrix.c \ + @CAIRO_TREE@/src/cairo-line.c @CAIRO_TREE@/src/cairo-lzw.c \ + @CAIRO_TREE@/src/cairo-matrix.c \ @CAIRO_TREE@/src/cairo-mask-compositor.c \ @CAIRO_TREE@/src/cairo-mesh-pattern-rasterizer.c \ @CAIRO_TREE@/src/cairo-mempool.c @CAIRO_TREE@/src/cairo-misc.c \ @@ -1214,6 +1220,9 @@ clean-noinstLIBRARIES: @CAIRO_TREE@/src/cairo-image-surface.$(OBJEXT): \ @CAIRO_TREE@/src/$(am__dirstamp) \ @CAIRO_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@CAIRO_TREE@/src/cairo-line.$(OBJEXT): \ + @CAIRO_TREE@/src/$(am__dirstamp) \ + @CAIRO_TREE@/src/$(DEPDIR)/$(am__dirstamp) @CAIRO_TREE@/src/cairo-lzw.$(OBJEXT): \ @CAIRO_TREE@/src/$(am__dirstamp) \ @CAIRO_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -1439,6 +1448,9 @@ clean-noinstLIBRARIES: @CAIRO_TREE@/src/cairo-xcb-connection-shm.$(OBJEXT): \ @CAIRO_TREE@/src/$(am__dirstamp) \ @CAIRO_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@CAIRO_TREE@/src/cairo-xcb-resources.$(OBJEXT): \ + @CAIRO_TREE@/src/$(am__dirstamp) \ + @CAIRO_TREE@/src/$(DEPDIR)/$(am__dirstamp) @CAIRO_TREE@/src/cairo-xcb-screen.$(OBJEXT): \ @CAIRO_TREE@/src/$(am__dirstamp) \ @CAIRO_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -1588,6 +1600,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-image-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-image-source.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-image-surface.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-line.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-lzw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-mask-compositor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-matrix.Po@am__quote@ @@ -1658,6 +1671,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-xcb-connection-render.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-xcb-connection-shm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-xcb-connection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-xcb-resources.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-xcb-screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-xcb-shm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@CAIRO_TREE@/src/$(DEPDIR)/cairo-xcb-surface-core.Po@am__quote@ diff --git a/Build/source/libs/cairo/cairo-1.12.16-PATCHES/ChangeLog b/Build/source/libs/cairo/cairo-1.14.0-PATCHES/ChangeLog index 94900a9d026..599599d6022 100644 --- a/Build/source/libs/cairo/cairo-1.12.16-PATCHES/ChangeLog +++ b/Build/source/libs/cairo/cairo-1.14.0-PATCHES/ChangeLog @@ -1,3 +1,7 @@ +2014-10-15 Peter Breitenlohner <peb@mppmu.mpg.de> + + Import cairo-1.14.0. + 2013-09-10 Peter Breitenlohner <peb@mppmu.mpg.de> Import cairo-1.12.16. diff --git a/Build/source/libs/cairo/cairo-1.12.16-PATCHES/TL-Changes b/Build/source/libs/cairo/cairo-1.14.0-PATCHES/TL-Changes index 191bf9fc8f7..81aedbfe337 100644 --- a/Build/source/libs/cairo/cairo-1.12.16-PATCHES/TL-Changes +++ b/Build/source/libs/cairo/cairo-1.14.0-PATCHES/TL-Changes @@ -1,10 +1,11 @@ -Changes applied to the cairo-1.12.16/ tree as obtained from: - http://cairographics.org/releases/cairo-1.12.16.tar.xz +Changes applied to the cairo-1.14.0/ tree as obtained from: + http://cairographics.org/releases/cairo-1.14.0.tar.xz Removed: Makefile.in ChangeLog* aclocal.m4 + build/ar-lib build/compile build/config.guess build/config.sub diff --git a/Build/source/libs/cairo/cairo-1.12.16/AUTHORS b/Build/source/libs/cairo/cairo-1.14.0/AUTHORS index a977e73c944..d85696fa81c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/AUTHORS +++ b/Build/source/libs/cairo/cairo-1.14.0/AUTHORS @@ -24,6 +24,7 @@ John Ellson <ellson@research.att.com> First font/glyph extents functions Michael Emmel <mike.emmel@gmail.com> DirectFB backend Miklós Erdélyi <erdelyim@gmail.com> Fix typo leading to a crash Behdad Esfahbod <behdad@behdad.org> Huge piles of bug fixes, improvements, and general maintenance +Gilles Espinasse <g.esp@free.fr> Font related fixes Larry Ewing <lewing@novell.com> Test case for group-clip Brian Ewins <Brian.Ewins@gmail.com> ATSUI maintenance (first success at making it really work) Bertram Felgenhauer <int-e@gmx.de> Fixes for subtle arithmetic errors @@ -32,6 +33,7 @@ Bdale Garbee <bdale@gag.com> Provided essential support for cairo achitecture se Jens Granseuer <jensgr@gmx.net> Fixes to generate proper compiler flags Laxmi Harikumar <laxmi.harikumar@digital.com> Build fix J. Ali Harlow <ali@avrc.city.ac.uk> win32 backend updates +Bryce Harrington <bryce@osg.samsung.com> Test cases, bug/typo fixes Mathias Hasselmann <mathias.hasselmann@gmx.de> Significant reduction of calls to malloc Richard Henderson <rth@twiddle.net> "slim" macros for better shared libraries James Henstridge <james@daa.com.au> Build fixes related to freetype @@ -49,6 +51,7 @@ Martin Kretzschmar <martink@gnome.org> Arithmetic fix for 64-bit architectures Mathieu Lacage <Mathieu.Lacage@sophia.inria.fr> several bug/typo fixes Dominic Lachowicz <domlachowicz@gmail.com> PDF conformance fix, fix image surface to zero out contents Alexander Larsson <alexl@redhat.com> Profiling and performance fixes. +Sylvestre Ledru <sylvestre@mozilla.com> Static analysis fixes. Tor Lillqvist <tml@novell.com> win32 build fixes, build scripts Jinghua Luo <sunmoon1997@gmail.com> Add bitmap glyph transformation, many freetype and glitz fixes Luke-Jr <luke-jr@utopios.org> Build fix for cross-compiling @@ -62,6 +65,7 @@ Christopher (Monty) Montgomery <xiphmont@gmail.com> Performnace fix (subimage_co Tim Mooney <enchanter@users.sourceforge.net> Fix test suite to compile with Solaris compiler Jeff Muizelaar <jeff@infidigm.net> Patient, painful, pixman code merge. Many fixes for intricacies of dashing. Yevgen Muntyan <muntyan@tamu.edu> win32 build fix +Ravi Nanjundappa <nravi.n@samsung.com> Static analysis fixes, test cases, skia backend update/fixes Declan Naughton <piratepenguin@gmail.com> Fix documentation typos Peter Nilsson <c99pnn@cs.umu.se> Glitz backend Henning Noren <henning.noren.402@student.lu.se> Fix memory leak @@ -88,7 +92,7 @@ Jamey Sharp <jamey@minilop.net> Surface/font backend virtualization, XCB backend Jason Dorje Short <jdorje@users.sf.net> Build fixes and bug fixes Jeff Smith <whydoubt@yahoo.com> Fixes for intricacies of stroking code Travis Spencer <tspencer@cs.pdx.edu> XCB backend fix -Bill Spitzak <spitzak@d2.com> Build fix to find Xrender.h without xrender.pc +Bill Spitzak <spitzak@d2.com> Build fix to find Xrender.h without xrender.pc, downscaling support Zhe Su <james.su@gmail.com> Add support for fontconfig's embeddedbitmap option Owen Taylor <otaylor@redhat.com> Font rewrite, documentation, win32 backend Pierre Tardy <tardyp@gmail.com> EGL support and testing, OpenVG backend diff --git a/Build/source/libs/cairo/cairo-1.12.16/BIBLIOGRAPHY b/Build/source/libs/cairo/cairo-1.14.0/BIBLIOGRAPHY index 90a6cef205b..90a6cef205b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/BIBLIOGRAPHY +++ b/Build/source/libs/cairo/cairo-1.14.0/BIBLIOGRAPHY diff --git a/Build/source/libs/cairo/cairo-1.12.16/BUGS b/Build/source/libs/cairo/cairo-1.14.0/BUGS index ef044046d3e..ef044046d3e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/BUGS +++ b/Build/source/libs/cairo/cairo-1.14.0/BUGS diff --git a/Build/source/libs/cairo/cairo-1.12.16/CODING_STYLE b/Build/source/libs/cairo/cairo-1.14.0/CODING_STYLE index 95ceac04d84..95ceac04d84 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/CODING_STYLE +++ b/Build/source/libs/cairo/cairo-1.14.0/CODING_STYLE diff --git a/Build/source/libs/cairo/cairo-1.12.16/COPYING b/Build/source/libs/cairo/cairo-1.14.0/COPYING index f54969f1c94..f54969f1c94 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/COPYING +++ b/Build/source/libs/cairo/cairo-1.14.0/COPYING diff --git a/Build/source/libs/cairo/cairo-1.12.16/COPYING-LGPL-2.1 b/Build/source/libs/cairo/cairo-1.14.0/COPYING-LGPL-2.1 index f1ed6182c52..f1ed6182c52 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/COPYING-LGPL-2.1 +++ b/Build/source/libs/cairo/cairo-1.14.0/COPYING-LGPL-2.1 diff --git a/Build/source/libs/cairo/cairo-1.12.16/COPYING-MPL-1.1 b/Build/source/libs/cairo/cairo-1.14.0/COPYING-MPL-1.1 index 7714141d154..7714141d154 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/COPYING-MPL-1.1 +++ b/Build/source/libs/cairo/cairo-1.14.0/COPYING-MPL-1.1 diff --git a/Build/source/libs/cairo/cairo-1.12.16/HACKING b/Build/source/libs/cairo/cairo-1.14.0/HACKING index 752efbab227..752efbab227 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/HACKING +++ b/Build/source/libs/cairo/cairo-1.14.0/HACKING diff --git a/Build/source/libs/cairo/cairo-1.12.16/INSTALL b/Build/source/libs/cairo/cairo-1.14.0/INSTALL index 9db68dee2ba..9db68dee2ba 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/INSTALL +++ b/Build/source/libs/cairo/cairo-1.14.0/INSTALL diff --git a/Build/source/libs/cairo/cairo-1.12.16/KNOWN_ISSUES b/Build/source/libs/cairo/cairo-1.14.0/KNOWN_ISSUES index 5fda6838929..5fda6838929 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/KNOWN_ISSUES +++ b/Build/source/libs/cairo/cairo-1.14.0/KNOWN_ISSUES diff --git a/Build/source/libs/cairo/cairo-1.12.16/Makefile.am b/Build/source/libs/cairo/cairo-1.14.0/Makefile.am index 03fa3523649..03fa3523649 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/Makefile.am +++ b/Build/source/libs/cairo/cairo-1.14.0/Makefile.am diff --git a/Build/source/libs/cairo/cairo-1.12.16/Makefile.win32 b/Build/source/libs/cairo/cairo-1.14.0/Makefile.win32 index fbad7f3e4c9..fbad7f3e4c9 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/Makefile.win32 +++ b/Build/source/libs/cairo/cairo-1.14.0/Makefile.win32 diff --git a/Build/source/libs/cairo/cairo-1.12.16/NEWS b/Build/source/libs/cairo/cairo-1.14.0/NEWS index 030eacc2758..2370dfd5814 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/NEWS +++ b/Build/source/libs/cairo/cairo-1.14.0/NEWS @@ -1,3 +1,209 @@ +Release 1.14.0 (2014-10-13 Bryce Harrington <bryce@osg.samsung.com>) +==================================================================== +Hard to believe it's been over a year since our last release, but it's +not for lack of activity. This release includes contributions of a wide +assortment of bug fixes, build system improvements, warnings cleanups, +codebase refactoring, test suite repairs, and static analysis work. + +This release is lighter on features (compared with 1.12.10) but includes +a highly demanded rehaul of our image downscaling functionality, which +solves a serious problem experienced by Inkscape users when shrinking +embedded bitmaps in SVG files. The new scaling algorithms are used by +the image backend and by other backends as needed for fallbacks. + + +Features +-------- + + Filtering improvements for the image backend, in particular + down-scaling of images produces filtered images that depend on all the + pixels of the source. When using the image backend you get the + following settings: + + CAIRO_FILTER_GOOD: uses a box filter for scales less than .75 in + either direction. For scales larger than this, the same filter as + CAIRO_FILTER_BILINEAR is used. + + CAIRO_FILTER_BEST: uses a Catmull-Rom filter always. When upscaling + more than 2x this will produce anti-aliased square pixels, similar + to OS/X. + + CAIRO_FILTER_GAUSSIAN: uses PIXMAN_FILTER_BEST, which in current + pixman is the same as BILINEAR. (This is subject to change in the + future). + + xlib and xcb also use the image fallback for GOOD/BEST filters, but + note that other backends do not implement these filtering fixes yet, + however other actions may cause them to use an image fallback which + will cause these filters to be used. + + Improve handling of device transformation and scaling, allowing Cairo + to now support scaling at a device level, permitting easier, more + transparent HiDPI support. + + Support JBIG2 mime data in PDF. This allows embedding of more + compressed JPEG formats within PDF, rather than including the full + uncompressed image. Also, reduce the number of transparency groups + used by PDF to keep the file size small and viewing/printing of the + PDF fast. + + Expand the embedding section to include stencil mask support. + + Reorder font declarations to be in natural order. + + Update the Skia backend to build against current Skia (as of June + 2014). + + Drop Link-Time Optimization (LTO) support from build system. This + seems to have caused much trouble for unclear benefit, and most + distros are reverting or disabling it anyway. + + Optimize VBO size on GL to 1M and to 16k for EGL. This improves + (theoretical) performance for desktop GLX use cases while avoiding + hitting VBO memory size limitations on embedded devices. + +API Changes +----------- + + cairo_surface_set_device_scale, cairo_surface_get_device_scale: + + Sets a scale that is multiplied to the device coordinates + determined by the CTM when drawing to @surface. One common use for + this is to render to very high resolution display devices at a scale + factor, so that code that assumes 1 pixel will be a certain size + will still work. + + cairo_egl_device_get_display, cairo_egl_device_get_context: + + Support get/set of EGLContext and EGLDisplay for egl-based cairo + devices, similar to GLX. + +Dependency Changes +------------------ + + Cairo now requires glib 2.14 for its gobject helper functions, + and pixman 0.30 for downscaling. + + +Bug fixes +--------- + + Don't embed CMYK Jpeg images in svg. + + Fix tests to place output in proper location. + + Fix determination of alpha for all surfaces when recording. + + Extend oversize check to cairo_gl_surface_create_for_texture, so an + error surface is returned if the texture is too large to render to. + + Fix embedding of mime data in PDF and PS files. + + Remove useless error handling in *_reply() functions in XCB. + + Fix a double-free exposed by multithreaded apps creating and + destroying the same font concurrently. + https://bugs.freedesktop.org/show_bug.cgi?id=69470 + + Fix corrupt stacks produced by bugs in operand emission for trace. + + Fix out of bounds array access in format cache for xlib + + Don't rename glyphs used by seac operator. This can cause certain + combined characters to use their decorations (e.g. umlauts on ö) to be + lost during printing of PDFs using evince. + https://bugs.freedesktop.org/show_bug.cgi?id=70364 + + Fix crash on calling cairo_create with a finished surface + + Fix SSIZE_T definition problem when making with MSYS on Windows7 + + Fix one off issue in gl context cleanup + + Fix usage of CAIRO_STACK_ARRAY_LENGTH + + Fix rectangle stroke with non rectilinear pen + + Fix imagemask with pattern source failure on some printers. This bug + could cause files converted using pdftops to fail for example on Ricoh + printers, or opening in Adobe Distiller on Windows. + https://bugs.freedesktop.org/show_bug.cgi?id=69485 + + Fix whitespace in font names + + Fix page size in generated PDFs. When printing using pdftocairo on + larger page sizes, such as 11x17, the image would be cropped to letter + size. + https://bugs.freedesktop.org/show_bug.cgi?id=73452 + + Fix path-currentpoint test by preserving current-point in + copy_path()/append_path() sequence + + Fix generation of HTML in code docs for + cairo-format-stride-for-width. Raw HTML code was being passed + to the browser, instead of displaying normally. + https://bugs.freedesktop.org/show_bug.cgi?id=63257 + + Fix spelling of "tessellator" throughout code. We're using the + American rather than British spelling of this word. + https://bugs.freedesktop.org/show_bug.cgi?id=50411 + + Fix crash in pixman_image_composite32 + + Fix crash when trying to modify a (const) all-clipped cairo_clip_t + https://bugs.freedesktop.org/show_bug.cgi?id=75819 + + Add check_composite method to all compositors, to fix crashes in the + test suite. + + Fix crash in Firefox when scrolling on certain pages. + + Fix memory leaks found by static analysis. + + Fix build of any2ppm if fork is not available. + + Fix broken build for Qt backend, due to missing libstdc++. + + Fix typo in two cairo_uint128 functions. Fixes potential build issues + on systems without a uint128 type. + + Fix build when --enable-pdf=no + + Fix cache_frozen assertions for Win32 print. + + Correctly check for xcb image surface for inplace upload + + Fix webkit-based web browser crashes due to empty boxes by skipping + over them when tesselating. + + Make pixman, libpng, and zlib paths commandline configurable for win32 + builds. + + Fix image scale on Win32 when GDI scale is not identity. + + Fix float endian configure test when using clang -O4 + + Fix compilation with Android bionic libc + + Don't try to build util/sphinx on Windows + + Fix loss of precision when emitting joins. This was caused by + discrepancies in line gradients when passing trapezoids around. + + Fix loss of precision and associated rendering issues in + cairo-tor-scan-converter from projection onto sample grid. + + Fix pixman oversampling of neighbouring edges within a cell by + eliminating self-intersections for the pixman traps compositor. + + Fix multi-line string splitting in PDFs + + Various cleanups and fixes to warnings, documentation, tests, and + build system. Improve error handling and return value checks. + Cleanup XFAIL tests and reference images. Cover recently added + functionality. + + Release 1.12.16 (2013-08-21 Chris Wilson <chris@chris-wilson.co.uk>) =================================================================== Thanks to everybody who reported a bug and helped us develop a fix, @@ -405,8 +611,8 @@ cases (such as stroking around a rectangle) and by reducing the number of edges generated by the general stroker. As part of the focus on performance, Cairo 1.12 introduces some -antialias hints (NONE,FAST, GOOD, BEST) that are interpolated by the -raserisers to fine tune their performance versus quality. Cairo 1.12 +antialias hints (NONE, FAST, GOOD, BEST) that are interpolated by the +rasterisers to fine tune their performance versus quality. Cairo 1.12 also introduces a new observation architecture, cairo_surface_observer_t, which can be used to analyse the amount of time consumed by drawing commands and help identify inefficiencies in diff --git a/Build/source/libs/cairo/cairo-1.12.16/PORTING_GUIDE b/Build/source/libs/cairo/cairo-1.14.0/PORTING_GUIDE index 7488173c46b..7488173c46b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/PORTING_GUIDE +++ b/Build/source/libs/cairo/cairo-1.14.0/PORTING_GUIDE diff --git a/Build/source/libs/cairo/cairo-1.12.16/README b/Build/source/libs/cairo/cairo-1.14.0/README index 67ce4f58d61..592643067ac 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/README +++ b/Build/source/libs/cairo/cairo-1.14.0/README @@ -67,29 +67,31 @@ backends. Further, the supported backends can be divided into the "platform" backends which depend on some underlying platform-specific system, (such as the X Window System or some other window system). -As an example, for a standard Linux build, (with image, png, pdf, -PostScript, svg, and xlib surface backends, and the freetype font -backend), the following sample commands will install necessary -dependencies: +As an example, for a standard Linux build similar to what's shipped by +your distro, (with image, png, pdf, PostScript, svg, and xlib surface +backends, and the freetype font backend), the following sample commands +will install necessary dependencies: Debian (and similar): - apt-get install libpng12-dev libz-dev libxrender-dev libfontconfig1-dev + apt-get build-dep cairo Fedora (and similar): yum install libpng-devel zlib-devel libXrender-devel fontconfig-devel -(Those commands intentionally don't install pixman from a distribution -package since if you're manually compiling cairo, then you likely want -to grab pixman from the same place at the same time and compile it as -well.) +Technically you probably don't need pixman from the distribution since +if you're manually compiling Cairo you probably want an updated pixman +as well. However, if you follow the default settings and install pixman +to /usr/local, your Cairo build should properly use it in preference to +the system pixman. + Supported, "standard" surface backends ------------------------------------ image backend (required) ------------------------ - pixman >= 0.20.2 http://cairographics.org/releases + pixman >= 0.30.0 http://cairographics.org/releases png support (can be left out if desired, but many ----------- applications expect it to be present) @@ -179,10 +181,18 @@ Experimental surface backends packages and developer dependencies are available at Netlabs: ftp://ftp.netlabs.org/pub/cairo + skia backend + ------------ + Requires the skia library as of June 2014. Since skia is not + API stable, building against newer (or older) versions of skia + will probably fail. + + Compiling ========= See the INSTALL document for build instructions. + History ======= Cairo was originally developed by Carl Worth <cworth@cworth.org> and diff --git a/Build/source/libs/cairo/cairo-1.12.16/README.win32 b/Build/source/libs/cairo/cairo-1.14.0/README.win32 index ff962b72a68..ff962b72a68 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/README.win32 +++ b/Build/source/libs/cairo/cairo-1.14.0/README.win32 diff --git a/Build/source/libs/cairo/cairo-1.12.16/RELEASING b/Build/source/libs/cairo/cairo-1.14.0/RELEASING index a1edceba9cd..60e3e9e41b2 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/RELEASING +++ b/Build/source/libs/cairo/cairo-1.14.0/RELEASING @@ -2,7 +2,9 @@ Here are the steps to follow to create a new cairo release: 1) Ensure that there are no local, uncommitted/unpushed modifications. You're probably in a good state if both "git diff - HEAD" and "git log master..origin/master" give no output. + HEAD" and "git log master..origin/master" give no output. Also make + sure you have libglib2.0-doc installed (else you'll get excessive + gtk-doc cross reference warnings in the next step). 2) Verify that the code passes "make distcheck" diff --git a/Build/source/libs/cairo/cairo-1.12.16/acinclude.m4 b/Build/source/libs/cairo/cairo-1.14.0/acinclude.m4 index dcf54f9357d..dcf54f9357d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/acinclude.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/acinclude.m4 diff --git a/Build/source/libs/cairo/cairo-1.12.16/autogen.sh b/Build/source/libs/cairo/cairo-1.14.0/autogen.sh index 4d113f8be5f..4d113f8be5f 100755 --- a/Build/source/libs/cairo/cairo-1.12.16/autogen.sh +++ b/Build/source/libs/cairo/cairo-1.14.0/autogen.sh diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.analysis b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.analysis index a44077ab453..a44077ab453 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.analysis +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.analysis diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.changelog b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.changelog index 07e603695cf..07e603695cf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.changelog +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.changelog diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.common b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.common index b955af58fdf..b955af58fdf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.common +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.common diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.gtk-doc b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.gtk-doc index c3d642b097b..c3d642b097b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.gtk-doc +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.gtk-doc diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.releasing b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.releasing index b17faabce2f..b17faabce2f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.am.releasing +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.am.releasing diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.common b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.common index 01a38cd32ee..7d7e9735f15 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.common +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.common @@ -23,18 +23,29 @@ CFG_CFLAGS := -MD -O2 CFG_LDFLAGS := endif -PIXMAN_CFLAGS := -I$(top_srcdir)/../pixman/pixman -PIXMAN_LIBS := $(top_builddir)/../pixman/pixman/$(CFG)/pixman-1.lib +ifeq ($(PIXMAN_PATH),) +PIXMAN_PATH := $(top_builddir)/../pixman +endif +PIXMAN_CFLAGS := -I$(PIXMAN_PATH)/pixman/ +PIXMAN_LIBS := $(PIXMAN_PATH)/pixman/$(CFG)/pixman-1.lib CAIRO_LIBS = gdi32.lib msimg32.lib user32.lib + ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1) -LIBPNG_CFLAGS += -I$(top_srcdir)/../libpng/ -CAIRO_LIBS += $(top_builddir)/../libpng/libpng.lib +ifeq ($(LIBPNG_PATH),) +LIBPNG_PATH := $(top_builddir)/../libpng +endif +LIBPNG_CFLAGS += -I$(LIBPNG_PATH)/ +CAIRO_LIBS += $(LIBPNG_PATH)/libpng.lib endif + ifeq ($(CAIRO_HAS_PS_SURFACE)$(CAIRO_HAS_PDF_SURFACE),00) else -ZLIB_CFLAGS += -I$(top_srcdir)/../zlib/ -CAIRO_LIBS += $(top_builddir)/../zlib/zdll.lib +ifeq ($(ZLIB_PATH),) +ZLIB_PATH := $(top_builddir)/../zlib +endif +ZLIB_CFLAGS += -I$(ZLIB_PATH)/ +CAIRO_LIBS += $(ZLIB_PATH)/zdll.lib endif DEFAULT_CFLAGS = -nologo $(CFG_CFLAGS) diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.features b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.features index 8cb155dc084..8cb155dc084 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.features +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.features diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.features-h b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.features-h index 13904cfa9f0..13904cfa9f0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.features-h +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.features-h diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.inform b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.inform index ba11165050a..ba11165050a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/Makefile.win32.inform +++ b/Build/source/libs/cairo/cairo-1.14.0/build/Makefile.win32.inform diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.cairo.m4 b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.cairo.m4 index 2f4873b043f..2f4873b043f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.cairo.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.cairo.m4 diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.compare.m4 b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.compare.m4 index bd6c51b289d..bd6c51b289d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.compare.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.compare.m4 diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.enable.m4 b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.enable.m4 index f3522b9832c..f3522b9832c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.enable.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.enable.m4 diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.float.m4 b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.float.m4 index 18ec3161840..bc0a91c6047 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.float.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.float.m4 @@ -24,16 +24,17 @@ AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], # is found, the user is instructed to specify the ordering. ax_cv_c_float_words_bigendian=unknown -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +AC_LINK_IFELSE([AC_LANG_SOURCE([[ -double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; +double d __attribute__((used)) = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; +int main() { return 0; } ]])], [ -if strings - conftest.$ac_objext | grep noonsees >/dev/null ; then +if strings - conftest | grep noonsees >/dev/null ; then ax_cv_c_float_words_bigendian=yes fi -if strings - conftest.$ac_objext | grep seesnoon >/dev/null ; then +if strings - conftest | grep seesnoon >/dev/null ; then if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.makefile.m4 b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.makefile.m4 index 70777810d14..70777810d14 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.makefile.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.makefile.m4 diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.pkg.m4 b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.pkg.m4 index cf90a967880..cf90a967880 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/aclocal.pkg.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/build/aclocal.pkg.m4 diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.analysis b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.analysis index 11c52e70d6e..11c52e70d6e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.analysis +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.analysis diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.features b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.features index e4a2aafcc82..e4a2aafcc82 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.features +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.features diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.noversion b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.noversion index 18c4bd5f7ae..18c4bd5f7ae 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.noversion +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.noversion diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.pthread b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.pthread index 29c930da932..29c930da932 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.pthread +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.pthread diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.system b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.system index b9d71c8d783..b9d71c8d783 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.system +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.system diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.tools b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.tools index a24dbcecb91..a24dbcecb91 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.tools +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.tools diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.version b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.version index a91cee39eef..a91cee39eef 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.version +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.version diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.warnings b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.warnings index f984eb29c0f..74e6634b29c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/configure.ac.warnings +++ b/Build/source/libs/cairo/cairo-1.14.0/build/configure.ac.warnings @@ -11,16 +11,17 @@ dnl MAYBE_WARN in an ignorable way (like adding whitespace) # -Wlogical-op causes too much noise from strcmp("literal", str) MAYBE_WARN="-Wall -Wextra \ --Wold-style-definition -Wdeclaration-after-statement \ -Wmissing-declarations -Werror-implicit-function-declaration \ --Wnested-externs -Wpointer-arith -Wwrite-strings \ --Wsign-compare -Wstrict-prototypes -Wmissing-prototypes \ --Wpacked -Wswitch-enum -Wmissing-format-attribute \ --Wbad-function-cast -Wvolatile-register-var \ +-Wpointer-arith -Wwrite-strings -Wsign-compare -Wpacked +-Wswitch-enum -Wmissing-format-attribute -Wvolatile-register-var \ -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \ -Wno-missing-field-initializers -Wno-unused-parameter \ -Wno-attributes -Wno-long-long -Winline" +MAYBE_C_SPECIFIC_WARN="-Wold-style-definition \ +-Wdeclaration-after-statement -Wstrict-prototypes \ +-Wmissing-prototypes -Wbad-function-cast -Wnested-externs" + # 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. @@ -35,17 +36,6 @@ MAYBE_WARN="$MAYBE_WARN -erroff=E_ENUM_TYPE_MISMATCH_ARG \ dnl We also abuse the warning-flag facility to enable other compiler dnl options. Namely, the following: - -dnl -flto working really needs a test link, not just a compile - -safe_MAYBE_WARN="$MAYBE_WARN" -MAYBE_WARN="$MAYBE_WARN -flto" -AC_TRY_LINK([],[ - int main(int argc, char **argv) { return 0; } -],[],[ - MAYBE_WARN="$safe_MAYBE_WARN" -]) - MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common" dnl Also to turn various gcc/glibc-specific preprocessor checks @@ -77,7 +67,7 @@ AC_CACHE_CHECK([for supported warning flags], cairo_cv_warn_cflags, [ 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 + cairo_cv_warn_maybe="$MAYBE_WARN $MAYBE_C_SPECIFIC_WARN" AC_MSG_CHECKING([which warning flags were supported]) ]) diff --git a/Build/source/libs/cairo/cairo-1.12.16/build/gtk-doc.m4 b/Build/source/libs/cairo/cairo-1.14.0/build/gtk-doc.m4 index 0ada151935f..0ada151935f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/build/gtk-doc.m4 +++ b/Build/source/libs/cairo/cairo-1.14.0/build/gtk-doc.m4 diff --git a/Build/source/libs/cairo/cairo-1.12.16/cairo-version.h b/Build/source/libs/cairo/cairo-1.14.0/cairo-version.h index 107df301c63..c65a5ffc609 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/cairo-version.h +++ b/Build/source/libs/cairo/cairo-1.14.0/cairo-version.h @@ -2,7 +2,7 @@ #define CAIRO_VERSION_H #define CAIRO_VERSION_MAJOR 1 -#define CAIRO_VERSION_MINOR 12 -#define CAIRO_VERSION_MICRO 16 +#define CAIRO_VERSION_MINOR 14 +#define CAIRO_VERSION_MICRO 0 #endif diff --git a/Build/source/libs/cairo/cairo-1.12.16/config.h.in b/Build/source/libs/cairo/cairo-1.14.0/config.h.in index e5160395414..d804988498f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/config.h.in +++ b/Build/source/libs/cairo/cairo-1.14.0/config.h.in @@ -276,6 +276,9 @@ /* Define to 1 if you have the `XRenderCreateRadialGradient' function. */ #undef HAVE_XRENDERCREATERADIALGRADIENT +/* Define to 1 if you have the `XRenderCreateSolidFill' function. */ +#undef HAVE_XRENDERCREATESOLIDFILL + /* Define to 1 if you have zlib available */ #undef HAVE_ZLIB @@ -385,11 +388,6 @@ /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff --git a/Build/source/libs/cairo/cairo-1.12.16/configure.ac b/Build/source/libs/cairo/cairo-1.14.0/configure.ac index fd54ad1e380..2ce19599e30 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/configure.ac +++ b/Build/source/libs/cairo/cairo-1.14.0/configure.ac @@ -15,6 +15,7 @@ AC_CHECK_HEADERS([unistd.h sys/ioctl.h]) AM_INIT_AUTOMAKE([1.11 foreign -Wall no-define no-dist-gzip dist-xz]) AM_SILENT_RULES([yes]) +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.12 # Initialize libtool LT_PREREQ([2.2]) @@ -147,7 +148,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [ old_LIBS=$LIBS CFLAGS="$CFLAGS $xlib_CFLAGS $xlib_NONPKGCONFIG_CFLAGS $xlib_xrender_CFLAGS $xlib_xrender_NONPKGCONFIG_CFLAGS" LIBS="$LIBS $xlib_LIBS $xlib_NONPKGCONFIG_LIBS $xlib_xrender_LIBS $xlib_xrender_NONPKGCONFIG_LIBS" - AC_CHECK_FUNCS([XRenderCreateLinearGradient XRenderCreateRadialGradient XRenderCreateConicalGradient]) + AC_CHECK_FUNCS([XRenderCreateSolidFill XRenderCreateLinearGradient XRenderCreateRadialGradient XRenderCreateConicalGradient]) CFLAGS=$old_CFLAGS LIBS=$old_LIBS @@ -190,6 +191,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(qt, Qt, no, [ [qt_REQUIRES="" use_qt="no (requires Qt4 development libraries)" ]) + qt_NONPKGCONFIG_LIBS="-lstdc++" ]) dnl =========================================================================== @@ -249,16 +251,16 @@ CAIRO_ENABLE_SURFACE_BACKEND(skia, Skia, no, [ [directory to find compiled skia sources])], [skia_DIR="$withval"], [skia_DIR="`pwd`/../skia"]) - AC_ARG_WITH([skia-bulid], - [AS_HELP_STRING([--with-skia-build=(Release|Debug)] + AC_ARG_WITH([skia-build-type], + [AS_HELP_STRING([--with-skia-build-type=(Release|Debug)] [build of skia to link with, default is Release])], - [skia_BUILD="$withval"], - [skia_BUILD="Release"]) + [skia_BUILD_TYPE="$withval"], + [skia_BUILD_TYPE="Release"]) skia_NONPKGCONFIG_CFLAGS="-I$skia_DIR/include/config -I$skia_DIR/include/core -I$skia_DIR/include/effects" - if test "x$skia_BUILD" = x"Release"; then + if test "x$skia_BUILD_TYPE" = "xRelease"; then skia_NONPKGCONFIG_CFLAGS="-DSK_RELEASE -DSK_CAN_USE_FLOAT $skia_NONPKGCONFIG_CFLAGS" fi - skia_NONPKGCONFIG_LIBS="--start-group $skia_DIR/out/$skia_BUILD/obj.target/gyp/libeffects.a $skia_DIR/out/$skia_BUILD/obj.target/gyp/libimages.a $skia_DIR/out/$skia_BUILD/obj.target/gyp/libutils.a $skia_DIR/out/$skia_BUILD/obj.target/gyp/libopts.a $skia_DIR/out/$skia_BUILD/obj.target/gyp/libcore.a -end-group" + skia_NONPKGCONFIG_LIBS="-L$skia_DIR/out/$skia_BUILD_TYPE/lib.target/ -lskia -lstdc++" AC_SUBST(skia_DIR) ]) @@ -376,6 +378,10 @@ CAIRO_ENABLE_SURFACE_BACKEND(glesv2, OpenGLESv2, no, [ glesv2_LIBS="$glesv2_LIBS -ldl" fi + if test "x$use_glesv2" = "xyes" -a "x$use_gl" = "xyes"; then + AC_MSG_ERROR([use either --enable-gl=yes or --enable-glesv2=yes. Not both at the same time.]) + fi + need_egl_functions=yes ]) @@ -627,7 +633,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(svg, SVG, yes, [ fi ]) -LIBRSVG_VERSION_REQUIRED=2.15.0 +LIBRSVG_VERSION_REQUIRED=2.35.0 test_svg=no any2ppm_svg=no if test "x$use_svg" = "xyes"; then @@ -656,7 +662,7 @@ CAIRO_ENABLE(test_surfaces, test surfaces, no) dnl =========================================================================== CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [ - pixman_REQUIRES="pixman-1 >= 0.16.0" + pixman_REQUIRES="pixman-1 >= 0.30.0" PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, , [use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"]) image_REQUIRES=$pixman_REQUIRES @@ -704,7 +710,7 @@ dnl =========================================================================== dnl Build gobject integration library CAIRO_ENABLE_FUNCTIONS(gobject, gobject, auto, [ - gobject_REQUIRES="gobject-2.0 glib-2.0" + gobject_REQUIRES="gobject-2.0 glib-2.0 >= 2.14" 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" @@ -799,7 +805,7 @@ CAIRO_ENABLE(symbol_lookup, symbol-lookup, auto, [ PKG_CHECK_MODULES(glib, glib-2.0, have_glib=yes, have_glib=no) AC_SUBST(glib_CFLAGS) AC_SUBST(glib_LIBS) -AM_CONDITIONAL(BUILD_SPHINX, test "x$have_glib" = "xyes") +AM_CONDITIONAL(BUILD_SPHINX, test "x$have_glib" = "xyes" -a "x$have_windows" = "xno") save_LIBS="$LIBS" AC_CHECK_LIB(rt, shm_open, shm_LIBS="-lrt") @@ -865,6 +871,8 @@ util/cairo-trace/cairo-trace doc/Makefile doc/public/Makefile ]) +AC_CONFIG_COMMANDS([cairo-trace], + [chmod a+x util/cairo-trace/cairo-trace]) AC_OUTPUT CAIRO_REPORT diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am index acf0a828100..acf0a828100 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am +++ b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am.analysis b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am.analysis index fab4cf7a514..fab4cf7a514 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am.analysis +++ b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am.analysis diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am.features b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am.features index c58ac23da4e..c58ac23da4e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.am.features +++ b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.am.features diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.sources b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.sources index 2e14fff8a45..fac24d79d8a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.sources +++ b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.sources @@ -84,6 +84,8 @@ cairo_private = \ cairo-image-info-private.h \ cairo-image-surface-inline.h \ cairo-image-surface-private.h \ + cairo-line-inline.h \ + cairo-line-private.h \ cairo-list-inline.h \ cairo-list-private.h \ cairo-malloc-private.h \ @@ -176,6 +178,7 @@ cairo_sources = \ cairo-image-info.c \ cairo-image-source.c \ cairo-image-surface.c \ + cairo-line.c \ cairo-lzw.c \ cairo-matrix.c \ cairo-mask-compositor.c \ @@ -334,6 +337,7 @@ cairo_xcb_sources = \ cairo-xcb-surface.c \ cairo-xcb-surface-core.c \ cairo-xcb-surface-render.c \ + cairo-xcb-resources.c \ $(NULL) cairo_qt_headers = cairo-qt.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.win32 b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.win32 index 864791f377b..864791f377b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.win32 +++ b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.win32 diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.win32.features b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.win32.features index 2274f4ad6cf..2274f4ad6cf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/Makefile.win32.features +++ b/Build/source/libs/cairo/cairo-1.14.0/src/Makefile.win32.features diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/README b/Build/source/libs/cairo/cairo-1.14.0/src/README index 03e4455ea58..03e4455ea58 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/README +++ b/Build/source/libs/cairo/cairo-1.14.0/src/README diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-analysis-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-analysis-surface-private.h index 1e054c209ab..1e054c209ab 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-analysis-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-analysis-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-analysis-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-analysis-surface.c index 8516094c200..8516094c200 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-analysis-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-analysis-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-arc-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-arc-private.h index a22c01ac90b..a22c01ac90b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-arc-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-arc-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-arc.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-arc.c index 5cbd11238ef..390397bae10 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-arc.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-arc.c @@ -236,6 +236,10 @@ _cairo_arc_in_direction (cairo_t *cr, step = -step; } + cairo_line_to (cr, + xc + radius * cos (angle_min), + yc + radius * sin (angle_min)); + for (i = 0; i < segments; i++, angle_min += step) { _cairo_arc_segment (cr, xc, yc, radius, angle_min, angle_min + step); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-array-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-array-private.h index 35b29e5fc07..35b29e5fc07 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-array-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-array-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-array.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-array.c index 4f3c082ff6b..4f3c082ff6b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-array.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-array.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-atomic-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-atomic-private.h index 327fed1d928..327fed1d928 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-atomic-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-atomic-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-atomic.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-atomic.c index 909cfea4925..909cfea4925 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-atomic.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-atomic.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-backend-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-backend-private.h index b05eca59ab3..b05eca59ab3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-backend-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-backend-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-base64-stream.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-base64-stream.c index 636431372b5..636431372b5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-base64-stream.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-base64-stream.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-base85-stream.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-base85-stream.c index f81affb49ea..f81affb49ea 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-base85-stream.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-base85-stream.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann-rectangular.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann-rectangular.c index 5541bdc3a2d..5541bdc3a2d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann-rectangular.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann-rectangular.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann-rectilinear.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann-rectilinear.c index 7c0be69b712..7c0be69b712 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann-rectilinear.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann-rectilinear.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann.c index 0e1a3f570c2..91e41f9c3cb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-bentley-ottmann.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-bentley-ottmann.c @@ -38,9 +38,10 @@ /* Provide definitions for standalone compilation */ #include "cairoint.h" +#include "cairo-combsort-inline.h" #include "cairo-error-private.h" #include "cairo-freelist-private.h" -#include "cairo-combsort-inline.h" +#include "cairo-line-inline.h" #include "cairo-traps-private.h" #define DEBUG_PRINT_STATE 0 @@ -307,156 +308,6 @@ _slope_compare (const cairo_bo_edge_t *a, } } -/* - * We need to compare the x-coordinates of a pair of lines for a particular y, - * without loss of precision. - * - * The x-coordinate along an edge for a given y is: - * X = A_x + (Y - A_y) * A_dx / A_dy - * - * So the inequality we wish to test is: - * A_x + (Y - A_y) * A_dx / A_dy ∘ B_x + (Y - B_y) * B_dx / B_dy, - * where ∘ is our inequality operator. - * - * By construction, we know that A_dy and B_dy (and (Y - A_y), (Y - B_y)) are - * all positive, so we can rearrange it thus without causing a sign change: - * A_dy * B_dy * (A_x - B_x) ∘ (Y - B_y) * B_dx * A_dy - * - (Y - A_y) * A_dx * B_dy - * - * Given the assumption that all the deltas fit within 32 bits, we can compute - * this comparison directly using 128 bit arithmetic. For certain, but common, - * input we can reduce this down to a single 32 bit compare by inspecting the - * deltas. - * - * (And put the burden of the work on developing fast 128 bit ops, which are - * required throughout the tessellator.) - * - * See the similar discussion for _slope_compare(). - */ -static int -edges_compare_x_for_y_general (const cairo_bo_edge_t *a, - const cairo_bo_edge_t *b, - int32_t y) -{ - /* XXX: We're assuming here that dx and dy will still fit in 32 - * bits. That's not true in general as there could be overflow. We - * should prevent that before the tessellation algorithm - * begins. - */ - int32_t dx; - int32_t adx, ady; - int32_t bdx, bdy; - enum { - HAVE_NONE = 0x0, - HAVE_DX = 0x1, - HAVE_ADX = 0x2, - HAVE_DX_ADX = HAVE_DX | HAVE_ADX, - HAVE_BDX = 0x4, - HAVE_DX_BDX = HAVE_DX | HAVE_BDX, - HAVE_ADX_BDX = HAVE_ADX | HAVE_BDX, - HAVE_ALL = HAVE_DX | HAVE_ADX | HAVE_BDX - } have_dx_adx_bdx = HAVE_ALL; - - /* don't bother solving for abscissa if the edges' bounding boxes - * can be used to order them. */ - { - int32_t amin, amax; - int32_t bmin, bmax; - if (a->edge.line.p1.x < a->edge.line.p2.x) { - amin = a->edge.line.p1.x; - amax = a->edge.line.p2.x; - } else { - amin = a->edge.line.p2.x; - amax = a->edge.line.p1.x; - } - if (b->edge.line.p1.x < b->edge.line.p2.x) { - bmin = b->edge.line.p1.x; - bmax = b->edge.line.p2.x; - } else { - bmin = b->edge.line.p2.x; - bmax = b->edge.line.p1.x; - } - if (amax < bmin) return -1; - if (amin > bmax) return +1; - } - - ady = a->edge.line.p2.y - a->edge.line.p1.y; - adx = a->edge.line.p2.x - a->edge.line.p1.x; - if (adx == 0) - have_dx_adx_bdx &= ~HAVE_ADX; - - bdy = b->edge.line.p2.y - b->edge.line.p1.y; - bdx = b->edge.line.p2.x - b->edge.line.p1.x; - if (bdx == 0) - have_dx_adx_bdx &= ~HAVE_BDX; - - dx = a->edge.line.p1.x - b->edge.line.p1.x; - if (dx == 0) - have_dx_adx_bdx &= ~HAVE_DX; - -#define L _cairo_int64x32_128_mul (_cairo_int32x32_64_mul (ady, bdy), dx) -#define A _cairo_int64x32_128_mul (_cairo_int32x32_64_mul (adx, bdy), y - a->edge.line.p1.y) -#define B _cairo_int64x32_128_mul (_cairo_int32x32_64_mul (bdx, ady), y - b->edge.line.p1.y) - switch (have_dx_adx_bdx) { - default: - case HAVE_NONE: - return 0; - case HAVE_DX: - /* A_dy * B_dy * (A_x - B_x) ∘ 0 */ - return dx; /* ady * bdy is positive definite */ - case HAVE_ADX: - /* 0 ∘ - (Y - A_y) * A_dx * B_dy */ - return adx; /* bdy * (y - a->top.y) is positive definite */ - case HAVE_BDX: - /* 0 ∘ (Y - B_y) * B_dx * A_dy */ - return -bdx; /* ady * (y - b->top.y) is positive definite */ - case HAVE_ADX_BDX: - /* 0 ∘ (Y - B_y) * B_dx * A_dy - (Y - A_y) * A_dx * B_dy */ - if ((adx ^ bdx) < 0) { - return adx; - } else if (a->edge.line.p1.y == b->edge.line.p1.y) { /* common origin */ - cairo_int64_t adx_bdy, bdx_ady; - - /* ∴ A_dx * B_dy ∘ B_dx * A_dy */ - - adx_bdy = _cairo_int32x32_64_mul (adx, bdy); - bdx_ady = _cairo_int32x32_64_mul (bdx, ady); - - return _cairo_int64_cmp (adx_bdy, bdx_ady); - } else - return _cairo_int128_cmp (A, B); - case HAVE_DX_ADX: - /* A_dy * (A_x - B_x) ∘ - (Y - A_y) * A_dx */ - if ((-adx ^ dx) < 0) { - return dx; - } else { - cairo_int64_t ady_dx, dy_adx; - - ady_dx = _cairo_int32x32_64_mul (ady, dx); - dy_adx = _cairo_int32x32_64_mul (a->edge.line.p1.y - y, adx); - - return _cairo_int64_cmp (ady_dx, dy_adx); - } - case HAVE_DX_BDX: - /* B_dy * (A_x - B_x) ∘ (Y - B_y) * B_dx */ - if ((bdx ^ dx) < 0) { - return dx; - } else { - cairo_int64_t bdy_dx, dy_bdx; - - bdy_dx = _cairo_int32x32_64_mul (bdy, dx); - dy_bdx = _cairo_int32x32_64_mul (y - b->edge.line.p1.y, bdx); - - return _cairo_int64_cmp (bdy_dx, dy_bdx); - } - case HAVE_ALL: - /* XXX try comparing (a->edge.line.p2.x - b->edge.line.p2.x) et al */ - return _cairo_int128_cmp (L, _cairo_int128_sub (B, A)); - } -#undef B -#undef A -#undef L -} /* * We need to compare the x-coordinate of a line for a particular y wrt to a @@ -510,58 +361,6 @@ edge_compare_for_y_against_x (const cairo_bo_edge_t *a, return _cairo_int64_cmp (L, R); } -static int -edges_compare_x_for_y (const cairo_bo_edge_t *a, - const cairo_bo_edge_t *b, - int32_t y) -{ - /* If the sweep-line is currently on an end-point of a line, - * then we know its precise x value (and considering that we often need to - * compare events at end-points, this happens frequently enough to warrant - * special casing). - */ - enum { - HAVE_NEITHER = 0x0, - HAVE_AX = 0x1, - HAVE_BX = 0x2, - HAVE_BOTH = HAVE_AX | HAVE_BX - } have_ax_bx = HAVE_BOTH; - int32_t ax, bx; - - if (y == a->edge.line.p1.y) - ax = a->edge.line.p1.x; - else if (y == a->edge.line.p2.y) - ax = a->edge.line.p2.x; - else - have_ax_bx &= ~HAVE_AX; - - if (y == b->edge.line.p1.y) - bx = b->edge.line.p1.x; - else if (y == b->edge.line.p2.y) - bx = b->edge.line.p2.x; - else - have_ax_bx &= ~HAVE_BX; - - switch (have_ax_bx) { - default: - case HAVE_NEITHER: - return edges_compare_x_for_y_general (a, b, y); - case HAVE_AX: - return -edge_compare_for_y_against_x (b, y, ax); - case HAVE_BX: - return edge_compare_for_y_against_x (a, y, bx); - case HAVE_BOTH: - return ax - bx; - } -} - -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; -} - static inline int _cairo_bo_sweep_line_compare_edges (const cairo_bo_sweep_line_t *sweep_line, const cairo_bo_edge_t *a, @@ -569,28 +368,11 @@ _cairo_bo_sweep_line_compare_edges (const cairo_bo_sweep_line_t *sweep_line, { int cmp; - /* compare the edges if not identical */ - if (! _line_equal (&a->edge.line, &b->edge.line)) { - if (MAX (a->edge.line.p1.x, a->edge.line.p2.x) < - MIN (b->edge.line.p1.x, b->edge.line.p2.x)) - return -1; - else if (MIN (a->edge.line.p1.x, a->edge.line.p2.x) > - MAX (b->edge.line.p1.x, b->edge.line.p2.x)) - return 1; - - cmp = edges_compare_x_for_y (a, b, sweep_line->current_y); - if (cmp) - return cmp; - - /* The two edges intersect exactly at y, so fall back on slope - * comparison. We know that this compare_edges function will be - * called only when starting a new edge, (not when stopping an - * edge), so we don't have to worry about conditionally inverting - * the sense of _slope_compare. */ - cmp = _slope_compare (a, b); - if (cmp) + cmp = cairo_lines_compare_at_y (&a->edge.line, + &b->edge.line, + sweep_line->current_y); + if (cmp) return cmp; - } /* We've got two collinear edges now. */ return b->edge.bottom - a->edge.bottom; @@ -1090,7 +872,7 @@ _cairo_bo_event_queue_insert_if_intersect_below_current_y (cairo_bo_event_queue_ MIN (right->edge.line.p1.x, right->edge.line.p2.x)) return CAIRO_STATUS_SUCCESS; - if (_line_equal (&left->edge.line, &right->edge.line)) + if (cairo_lines_equal (&left->edge.line, &right->edge.line)) return CAIRO_STATUS_SUCCESS; /* The names "left" and "right" here are correct descriptions of diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-beos-surface.cpp b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-beos-surface.cpp index c97641685fc..c97641685fc 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-beos-surface.cpp +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-beos-surface.cpp diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-beos.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-beos.h index fdb89a6c4dc..fdb89a6c4dc 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-beos.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-beos.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-botor-scan-converter.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-botor-scan-converter.c index 515305bf24e..515305bf24e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-botor-scan-converter.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-botor-scan-converter.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-box-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-box-inline.h index d6b994127e3..d6b994127e3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-box-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-box-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes-intersect.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes-intersect.c index 96ae66334e6..96ae66334e6 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes-intersect.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes-intersect.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes-private.h index d1f9dfcd1e5..d1f9dfcd1e5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes.c index 63b68ddfb90..63b68ddfb90 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-boxes.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-boxes.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cache-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cache-private.h index 76b556194d5..24b6d0b2092 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cache-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cache-private.h @@ -43,7 +43,7 @@ #include "cairo-types-private.h" /** - * cairo_cache_entry_t: + * _cairo_cache_entry: * * A #cairo_cache_entry_t contains both a key and a value for * #cairo_cache_t. User-derived types for #cairo_cache_entry_t must diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cache.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cache.c index 5c4e4caa3d0..5c4e4caa3d0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cache.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cache.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cff-subset.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cff-subset.c index c420bd49c0e..4660d6e0956 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cff-subset.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cff-subset.c @@ -295,7 +295,6 @@ decode_nibble (int n, char *buf) static unsigned char * decode_real (unsigned char *p, double *real) { - struct lconv *locale_data; const char *decimal_point; int decimal_point_len; int n; @@ -305,8 +304,7 @@ decode_real (unsigned char *p, double *real) char *buf = buffer; char *buf_end = buffer + sizeof (buffer); - locale_data = localeconv (); - decimal_point = locale_data->decimal_point; + decimal_point = cairo_get_locale_decimal_point (); decimal_point_len = strlen (decimal_point); assert (decimal_point_len != 0); @@ -899,6 +897,8 @@ cairo_cff_font_read_name (cairo_cff_font_t *font) memcpy (font->ps_name, p, len); font->ps_name[len] = 0; + + status = _cairo_escape_ps_name (&font->ps_name); } cff_index_fini (&index); @@ -1849,8 +1849,10 @@ cairo_cff_font_subset_fontdict (cairo_cff_font_t *font) for (i = 0; i < font->scaled_font_subset->num_glyphs; i++) { cid = font->scaled_font_subset->glyphs[i]; status = cairo_cff_font_get_gid_for_cid (font, cid, &gid); - if (unlikely (status)) + if (unlikely (status)) { + free (reverse_map); return status; + } fd = font->fdselect[gid]; if (reverse_map[fd] < 0) { diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-boxes.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-boxes.c index bbb41978868..7bcbeb1918a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-boxes.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-boxes.c @@ -173,7 +173,7 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip, clip->extents = *r; } else { if (! _cairo_rectangle_intersect (&clip->extents, r)) - clip = _cairo_clip_set_all_clipped (clip); + return _cairo_clip_set_all_clipped (clip); } if (clip->path == NULL) clip->is_region = _cairo_box_is_pixel_aligned (box); @@ -258,6 +258,9 @@ _cairo_clip_intersect_box (cairo_clip_t *clip, { cairo_rectangle_int_t r; + if (_cairo_clip_is_all_clipped (clip)) + return clip; + _cairo_box_round_to_rectangle (box, &r); if (r.width == 0 || r.height == 0) return _cairo_clip_set_all_clipped (clip); @@ -312,10 +315,12 @@ _cairo_clip_intersect_boxes (cairo_clip_t *clip, _cairo_boxes_extents (boxes, &limits); _cairo_box_round_to_rectangle (&limits, &extents); - if (clip->path == NULL) + if (clip->path == NULL) { clip->extents = extents; - else if (! _cairo_rectangle_intersect (&clip->extents, &extents)) + } else if (! _cairo_rectangle_intersect (&clip->extents, &extents)) { clip = _cairo_clip_set_all_clipped (clip); + goto out; + } if (clip->region) { cairo_region_destroy (clip->region); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-inline.h index a9f23269223..a9f23269223 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-polygon.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-polygon.c index f40faefba80..f40faefba80 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-polygon.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-polygon.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-private.h index 5fc05a64e93..5fc05a64e93 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-region.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-region.c index e3f4891e3f2..e3f4891e3f2 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-region.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-region.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-surface.c index fff9724033f..85feaa649eb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-surface.c @@ -132,11 +132,11 @@ _cairo_clip_get_surface (const cairo_clip_t *clip, cairo_path_fixed_t path; int i; - surface = _cairo_surface_create_similar_solid (target, - CAIRO_CONTENT_ALPHA, - clip->extents.width, - clip->extents.height, - CAIRO_COLOR_TRANSPARENT); + surface = _cairo_surface_create_scratch (target, + CAIRO_CONTENT_ALPHA, + clip->extents.width, + clip->extents.height, + CAIRO_COLOR_TRANSPARENT); if (unlikely (surface->status)) return surface; @@ -162,11 +162,11 @@ _cairo_clip_get_surface (const cairo_clip_t *clip, return _cairo_surface_create_in_error (status); } } else { - surface = _cairo_surface_create_similar_solid (target, - CAIRO_CONTENT_ALPHA, - clip->extents.width, - clip->extents.height, - CAIRO_COLOR_WHITE); + surface = _cairo_surface_create_scratch (target, + CAIRO_CONTENT_ALPHA, + clip->extents.width, + clip->extents.height, + CAIRO_COLOR_WHITE); if (unlikely (surface->status)) return surface; } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-tor-scan-converter.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-tor-scan-converter.c index e32a5a9d9c7..e32a5a9d9c7 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip-tor-scan-converter.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip-tor-scan-converter.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip.c index 0df9b06bf60..0df9b06bf60 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-clip.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-clip.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-context-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-context-private.h index 0a7185ef1f5..0a7185ef1f5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-context-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-context-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-context.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-context.c index 0116b0a5a93..0116b0a5a93 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-context.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-context.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-gradient-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-gradient-private.h index fa684d2c6b0..fa684d2c6b0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-gradient-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-gradient-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-gradient.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-gradient.c index f8c80041629..f8c80041629 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-gradient.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-gradient.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-private.h index 13fe5a8dc76..13fe5a8dc76 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-surface.c index 27c3676de38..c57fd7f433c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-surface.c @@ -143,7 +143,7 @@ typedef struct _cairo_cogl_path_fill_meta { * and translations but not for different scales. * * one idea is to track the diagonal lenghts of a unit rectangle - * transformed through the original ctm use to tesselate the geometry + * transformed through the original ctm use to tessellate the geometry * so we can check what the lengths are for any new ctm to know if * this geometry is compatible. */ @@ -167,7 +167,7 @@ typedef struct _cairo_cogl_path_stroke_meta { * and translations but not for different scales. * * one idea is to track the diagonal lenghts of a unit rectangle - * transformed through the original ctm use to tesselate the geometry + * transformed through the original ctm use to tessellate the geometry * so we can check what the lengths are for any new ctm to know if * this geometry is compatible. */ @@ -805,7 +805,7 @@ _cairo_cogl_journal_flush (cairo_cogl_surface_t *surface) _cairo_path_fixed_approximate_clip_extents (&path->path, &extents); /* TODO - maintain a fifo of the last 10 used clips with cached - * primitives to see if we can avoid tesselating the path and + * primitives to see if we can avoid tessellating the path and * uploading the vertices... */ #if 0 @@ -2789,7 +2789,7 @@ cairo_cogl_device_create (CoglContext *cogl_context) ERROR: g_free (dev); - return NULL; + return _cairo_device_create_in_error (CAIRO_STATUS_DEVICE_ERROR); } slim_hidden_def (cairo_cogl_device_create); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-utils-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-utils-private.h index ee77f3034c3..ee77f3034c3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-utils-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-utils-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-utils.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-utils.c index 4f02aaa52da..4f02aaa52da 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl-utils.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl-utils.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl.h index f270d74d307..f270d74d307 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-cogl.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-cogl.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-color.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-color.c index 9c852559e28..c2a11a17738 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-color.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-color.c @@ -78,18 +78,13 @@ _cairo_stock_color (cairo_stock_t stock) } /* Convert a double in [0.0, 1.0] to an integer in [0, 65535] - * The conversion is designed to divide the input range into 65536 - * equally-sized regions. This is achieved by multiplying by 65536 and - * then special-casing the result of an input value of 1.0 so that it - * maps to 65535 instead of 65536. + * The conversion is designed to choose the integer i such that + * i / 65535.0 is as close as possible to the input value. */ uint16_t _cairo_color_double_to_short (double d) { - uint32_t i; - i = (uint32_t) (d * 65536); - i -= (i >> 16); - return i; + return d * 65535.0 + 0.5; } static void diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-combsort-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-combsort-inline.h index d359faeb5b8..d359faeb5b8 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-combsort-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-combsort-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-compiler-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-compiler-private.h index f3e971ebba1..216e71b4ec3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-compiler-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-compiler-private.h @@ -221,16 +221,14 @@ be needed for GCC but it seems fine for now. */ #define CAIRO_ENSURE_UNIQUE \ do { \ - char func[] = __FUNCTION__; \ char file[] = __FILE__; \ __asm { \ __asm jmp __internal_skip_line_no \ - __asm _emit (__LINE__ & 0xff) \ - __asm _emit ((__LINE__>>8) & 0xff) \ - __asm _emit ((__LINE__>>16) & 0xff) \ - __asm _emit ((__LINE__>>24) & 0xff) \ - __asm lea eax, func \ - __asm lea eax, file \ + __asm _emit (__COUNTER__ & 0xff) \ + __asm _emit ((__COUNTER__>>8) & 0xff) \ + __asm _emit ((__COUNTER__>>16) & 0xff)\ + __asm _emit ((__COUNTER__>>24) & 0xff)\ + __asm lea eax, dword ptr file \ __asm __internal_skip_line_no: \ }; \ } while (0) diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-composite-rectangles-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-composite-rectangles-private.h index fd7728995de..fd7728995de 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-composite-rectangles-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-composite-rectangles-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-composite-rectangles.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-composite-rectangles.c index e6639d0c3f5..6c3e97d4a97 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-composite-rectangles.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-composite-rectangles.c @@ -57,7 +57,7 @@ _cairo_composite_reduce_pattern (const cairo_pattern_t *src, if (dst->base.type == CAIRO_PATTERN_TYPE_SOLID) return; - dst->base.filter = _cairo_pattern_analyze_filter (&dst->base, NULL), + dst->base.filter = _cairo_pattern_analyze_filter (&dst->base); tx = ty = 0; if (_cairo_matrix_is_pixman_translation (&dst->base.matrix, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-compositor-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-compositor-private.h index 019972333f3..019972333f3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-compositor-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-compositor-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-compositor.c index b31413b9964..b31413b9964 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-compositor.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour-inline.h index 7972c1ac5e0..7972c1ac5e0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour-private.h index 1dfc46f3acd..1dfc46f3acd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour.c index d356f4f6544..9ad75bdbf8d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-contour.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-contour.c @@ -332,7 +332,6 @@ _cairo_contour_simplify (cairo_contour_t *contour, double tolerance) } /* stage2: polygon simplification using Douglas-Peucker */ - simplified = FALSE; do { last = &contour->chain.points[0]; iter_init (&furthest, contour); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-damage-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-damage-private.h index 97b177e86b4..97b177e86b4 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-damage-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-damage-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-damage.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-damage.c index 63191fee95d..63191fee95d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-damage.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-damage.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-debug.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-debug.c index 33d46aa3f79..33d46aa3f79 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-debug.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-debug.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-default-context-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-default-context-private.h index fd159b49670..fd159b49670 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-default-context-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-default-context-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-default-context.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-default-context.c index aec5b10c4c7..1e5067bf1b8 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-default-context.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-default-context.c @@ -170,11 +170,11 @@ _cairo_default_context_push_group (void *abstract_cr, cairo_content_t content) group_surface = cairo_recording_surface_create (content, NULL); extents.x = extents.y = 0; } else { - group_surface = _cairo_surface_create_similar_solid (parent_surface, - content, - extents.width, - extents.height, - CAIRO_COLOR_TRANSPARENT); + group_surface = _cairo_surface_create_scratch (parent_surface, + content, + extents.width, + extents.height, + CAIRO_COLOR_TRANSPARENT); } status = group_surface->status; if (unlikely (status)) @@ -189,6 +189,10 @@ _cairo_default_context_push_group (void *abstract_cr, cairo_content_t content) parent_surface->device_transform.x0 - extents.x, parent_surface->device_transform.y0 - extents.y); + cairo_surface_set_device_scale (group_surface, + parent_surface->device_transform.xx, + parent_surface->device_transform.yy); + /* If we have a current path, we need to adjust it to compensate for * the device offset just applied. */ _cairo_path_fixed_translate (cr->path, @@ -214,7 +218,8 @@ _cairo_default_context_pop_group (void *abstract_cr) cairo_default_context_t *cr = abstract_cr; cairo_surface_t *group_surface; cairo_pattern_t *group_pattern; - cairo_matrix_t group_matrix, device_transform_matrix; + cairo_surface_t *parent_surface; + cairo_matrix_t group_matrix; cairo_status_t status; /* Verify that we are at the right nesting level */ @@ -228,29 +233,21 @@ _cairo_default_context_pop_group (void *abstract_cr) status = _cairo_gstate_restore (&cr->gstate, &cr->gstate_freelist); assert (status == CAIRO_STATUS_SUCCESS); + parent_surface = _cairo_gstate_get_target (cr->gstate); + group_pattern = cairo_pattern_create_for_surface (group_surface); status = group_pattern->status; if (unlikely (status)) goto done; _cairo_gstate_get_matrix (cr->gstate, &group_matrix); - /* Transform by group_matrix centered around device_transform so that when - * we call _cairo_gstate_copy_transformed_pattern the result is a pattern - * with a matrix equivalent to the device_transform of group_surface. */ - if (_cairo_surface_has_device_transform (group_surface)) { - cairo_pattern_set_matrix (group_pattern, &group_surface->device_transform); - _cairo_pattern_transform (group_pattern, &group_matrix); - _cairo_pattern_transform (group_pattern, &group_surface->device_transform_inverse); - } else { - cairo_pattern_set_matrix (group_pattern, &group_matrix); - } + cairo_pattern_set_matrix (group_pattern, &group_matrix); /* If we have a current path, we need to adjust it to compensate for * the device offset just removed. */ - cairo_matrix_multiply (&device_transform_matrix, - &_cairo_gstate_get_target (cr->gstate)->device_transform, - &group_surface->device_transform_inverse); - _cairo_path_fixed_transform (cr->path, &device_transform_matrix); + _cairo_path_fixed_translate (cr->path, + _cairo_fixed_from_int (parent_surface->device_transform.x0 - group_surface->device_transform.x0), + _cairo_fixed_from_int (parent_surface->device_transform.y0 - group_surface->device_transform.y0)); done: cairo_surface_destroy (group_surface); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-deflate-stream.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-deflate-stream.c index ae23bda9472..ae23bda9472 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-deflate-stream.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-deflate-stream.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-deprecated.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-deprecated.h index 7a56aadbfe1..7a56aadbfe1 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-deprecated.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-deprecated.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-device-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-device-private.h index 6eb44f3b634..6eb44f3b634 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-device-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-device-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-device.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-device.c index 098f8560189..585a9c1c41f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-device.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-device.c @@ -158,6 +158,7 @@ _cairo_device_create_in_error (cairo_status_t status) case CAIRO_STATUS_INVALID_CONTENT: case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: case CAIRO_STATUS_DEVICE_FINISHED: + case CAIRO_STATUS_JBIG2_GLOBAL_MISSING: default: _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return (cairo_device_t *) &_nil_device; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-directfb-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-directfb-surface.c index 5ac64ba98ee..5ac64ba98ee 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-directfb-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-directfb-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-directfb.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-directfb.h index e3d818c6687..e3d818c6687 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-directfb.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-directfb.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-drm.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-drm.h index 907610dcde8..907610dcde8 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-drm.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-drm.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-egl-context.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-egl-context.c index bb0772ab403..bf704c630fb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-egl-context.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-egl-context.c @@ -244,6 +244,12 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl) return _cairo_gl_context_create_in_error (status); } + /* Tune the default VBO size to reduce overhead on embedded devices. + * This smaller size means that flushing needs to be done more often, + * but it is less demanding of scarce memory on embedded devices. + */ + ctx->base.vbo_size = 16*1024; + eglMakeCurrent (dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); return &ctx->base.base; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-error-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-error-inline.h index 9126c5e61eb..9126c5e61eb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-error-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-error-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-error-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-error-private.h index ea9c2ea3119..178078ad614 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-error-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-error-private.h @@ -46,10 +46,13 @@ CAIRO_BEGIN_DECLS -/* Sure wish C had a real enum type so that this would be distinct +/* _cairo_int_status: internal status + * + * Sure wish C had a real enum type so that this would be distinct * from #cairo_status_t. Oh well, without that, I'll use this bogus 100 * offset. We want to keep it fit in int8_t as the compiler may choose - * that for #cairo_status_t */ + * that for #cairo_status_t + */ enum _cairo_int_status { CAIRO_INT_STATUS_SUCCESS = 0, @@ -90,6 +93,7 @@ enum _cairo_int_status { CAIRO_INT_STATUS_DEVICE_ERROR, CAIRO_INT_STATUS_INVALID_MESH_CONSTRUCTION, CAIRO_INT_STATUS_DEVICE_FINISHED, + CAIRO_INT_STATUS_JBIG2_GLOBAL_MISSING, CAIRO_INT_STATUS_LAST_STATUS, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-error.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-error.c index 1b9bd76be13..1b9bd76be13 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-error.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-error.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fallback-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fallback-compositor.c index 3f6199fe2bb..3f6199fe2bb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fallback-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fallback-compositor.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-features-uninstalled.pc.in b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-features-uninstalled.pc.in index b9cd9d3ad2b..b9cd9d3ad2b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-features-uninstalled.pc.in +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-features-uninstalled.pc.in diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-features.pc.in b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-features.pc.in index 9a4b657c8da..9a4b657c8da 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-features.pc.in +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-features.pc.in diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed-private.h index e970c0ff9fa..9ff8f750392 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed-private.h @@ -46,7 +46,7 @@ #if (CAIRO_FIXED_BITS != 32) # error CAIRO_FIXED_BITS must be 32, and the type must be a 32-bit type. -# error To remove this limitation, you will have to fix the tesselator. +# error To remove this limitation, you will have to fix the tessellator. #endif #define CAIRO_FIXED_ONE ((cairo_fixed_t)(1 << CAIRO_FIXED_FRAC_BITS)) @@ -312,7 +312,7 @@ _cairo_fixed_mul_div_floor (cairo_fixed_t a, cairo_fixed_t b, cairo_fixed_t c) return _cairo_int64_32_div (_cairo_int32x32_64_mul (a, b), c); } - +/* compute y from x so that (x,y), p1, and p2 are collinear */ static inline cairo_fixed_t _cairo_edge_compute_intersection_y_for_x (const cairo_point_t *p1, const cairo_point_t *p2, @@ -333,6 +333,7 @@ _cairo_edge_compute_intersection_y_for_x (const cairo_point_t *p1, return y; } +/* compute x from y so that (x,y), p1, and p2 are collinear */ static inline cairo_fixed_t _cairo_edge_compute_intersection_x_for_y (const cairo_point_t *p1, const cairo_point_t *p2, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed-type-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed-type-private.h index 2bbd5f78621..e9f26f61539 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed-type-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed-type-private.h @@ -50,7 +50,7 @@ typedef cairo_int128_t cairo_fixed_64_64_t; typedef cairo_int128_t cairo_fixed_96_32_t; /* Eventually, we should allow changing this, but I think - * there are some assumptions in the tesselator about the + * there are some assumptions in the tessellator about the * size of a fixed type. For now, it must be 32. */ #define CAIRO_FIXED_BITS 32 diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed.c index 03e05592354..03e05592354 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fixed.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fixed.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face-twin-data.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face-twin-data.c index ff09cb2be10..ff09cb2be10 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face-twin-data.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face-twin-data.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face-twin.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face-twin.c index 2ad26302849..2ad26302849 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face-twin.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face-twin.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face.c index b93bd8caaba..e32a9bb7584 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-face.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-face.c @@ -115,7 +115,7 @@ cairo_font_face_t * cairo_font_face_reference (cairo_font_face_t *font_face) { if (font_face == NULL || - CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->ref_count)) + CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->ref_count)) return font_face; /* We would normally assert that we have a reference here but we @@ -128,6 +128,27 @@ cairo_font_face_reference (cairo_font_face_t *font_face) } slim_hidden_def (cairo_font_face_reference); +static inline int __put(cairo_reference_count_t *v) +{ + int c, old; + + c = CAIRO_REFERENCE_COUNT_GET_VALUE(v); + while (c != 1 && (old = _cairo_atomic_int_cmpxchg_return_old(&v->ref_count, c, c - 1)) != c) + c = old; + + return c; +} + +cairo_bool_t +_cairo_font_face_destroy (void *abstract_face) +{ +#if 0 /* Nothing needs to be done, we can just drop the last reference */ + cairo_font_face_t *font_face = abstract_face; + return _cairo_reference_count_dec_and_test (&font_face->ref_count); +#endif + return TRUE; +} + /** * cairo_font_face_destroy: * @font_face: a #cairo_font_face_t @@ -142,22 +163,19 @@ void cairo_font_face_destroy (cairo_font_face_t *font_face) { if (font_face == NULL || - CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->ref_count)) + CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->ref_count)) return; assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&font_face->ref_count)); - if (! _cairo_reference_count_dec_and_test (&font_face->ref_count)) - return; - - if (font_face->backend->destroy) - font_face->backend->destroy (font_face); - /* We allow resurrection to deal with some memory management for the * FreeType backend where cairo_ft_font_face_t and cairo_ft_unscaled_font_t * need to effectively mutually reference each other */ - if (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&font_face->ref_count)) + if (__put (&font_face->ref_count)) + return; + + if (! font_face->backend->destroy (font_face)) return; _cairo_user_data_array_fini (&font_face->user_data); @@ -201,7 +219,7 @@ unsigned int cairo_font_face_get_reference_count (cairo_font_face_t *font_face) { if (font_face == NULL || - CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->ref_count)) + CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->ref_count)) return 0; return CAIRO_REFERENCE_COUNT_GET_VALUE (&font_face->ref_count); @@ -309,10 +327,11 @@ _cairo_unscaled_font_destroy (cairo_unscaled_font_t *unscaled_font) assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&unscaled_font->ref_count)); - if (! _cairo_reference_count_dec_and_test (&unscaled_font->ref_count)) + if (__put (&unscaled_font->ref_count)) return; - unscaled_font->backend->destroy (unscaled_font); + if (! unscaled_font->backend->destroy (unscaled_font)) + return; free (unscaled_font); } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-options.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-options.c index ad28745e6b9..ad28745e6b9 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-font-options.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-font-options.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fontconfig-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fontconfig-private.h index ea873abe7e4..ea873abe7e4 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-fontconfig-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-fontconfig-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freed-pool-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freed-pool-private.h index 0ec6de3d1f1..0ec6de3d1f1 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freed-pool-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freed-pool-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freed-pool.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freed-pool.c index cfdc8e96b05..cfdc8e96b05 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freed-pool.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freed-pool.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist-private.h index 8fe6516f385..8fe6516f385 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist-type-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist-type-private.h index 4dd05646107..4dd05646107 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist-type-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist-type-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist.c index d596eab81dc..d596eab81dc 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-freelist.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-freelist.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft-font.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft-font.c index 9f4b5244d7d..87e733bb769 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft-font.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft-font.c @@ -588,23 +588,20 @@ _cairo_ft_unscaled_font_create_from_face (FT_Face face, return _cairo_ft_unscaled_font_create_internal (TRUE, NULL, 0, face, out); } -static void +static cairo_bool_t _cairo_ft_unscaled_font_destroy (void *abstract_font) { cairo_ft_unscaled_font_t *unscaled = abstract_font; cairo_ft_unscaled_font_map_t *font_map; - if (unscaled == NULL) - return; - font_map = _cairo_ft_unscaled_font_map_lock (); /* All created objects must have been mapped in the font map. */ assert (font_map != NULL); - if (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&unscaled->base.ref_count)) { + if (! _cairo_reference_count_dec_and_test (&unscaled->base.ref_count)) { /* somebody recreated the font whilst we waited for the lock */ _cairo_ft_unscaled_font_map_unlock (); - return; + return FALSE; } _cairo_hash_table_remove (font_map->hash_table, @@ -626,6 +623,7 @@ _cairo_ft_unscaled_font_destroy (void *abstract_font) _cairo_ft_unscaled_font_map_unlock (); _cairo_ft_unscaled_font_fini (unscaled); + return TRUE; } static cairo_bool_t @@ -743,12 +741,11 @@ _compute_transform (cairo_ft_font_transform_t *sf, double min_distance = DBL_MAX; cairo_bool_t magnify = TRUE; int i; - int best_i = 0; double best_x_size = 0; double best_y_size = 0; for (i = 0; i < unscaled->face->num_fixed_sizes; i++) { - double x_size = unscaled->face->available_sizes[i].y_ppem / 64.; + double x_size = unscaled->face->available_sizes[i].x_ppem / 64.; double y_size = unscaled->face->available_sizes[i].y_ppem / 64.; double distance = y_size - y_scale; @@ -762,7 +759,6 @@ _compute_transform (cairo_ft_font_transform_t *sf, if ((magnify && distance >= 0) || fabs (distance) <= min_distance) { magnify = distance < 0; min_distance = fabs (distance); - best_i = i; best_x_size = x_size; best_y_size = y_size; } @@ -1163,7 +1159,9 @@ _get_bitmap_surface (FT_Bitmap *bitmap, source = bitmap->buffer; dest = data; for (i = height; i; i--) { - memcpy (dest, source, stride); + memcpy (dest, source, bitmap->pitch); + memset (dest + bitmap->pitch, '\0', stride - bitmap->pitch); + source += bitmap->pitch; dest += stride; } @@ -2771,7 +2769,7 @@ _cairo_ft_font_face_create_for_toy (cairo_toy_font_face_t *toy_face, } #endif -static void +static cairo_bool_t _cairo_ft_font_face_destroy (void *abstract_face) { cairo_ft_font_face_t *font_face = abstract_face; @@ -2797,12 +2795,10 @@ _cairo_ft_font_face_destroy (void *abstract_face) font_face->unscaled->faces == font_face && CAIRO_REFERENCE_COUNT_GET_VALUE (&font_face->unscaled->base.ref_count) > 1) { - cairo_font_face_reference (&font_face->base); - _cairo_unscaled_font_destroy (&font_face->unscaled->base); font_face->unscaled = NULL; - return; + return FALSE; } if (font_face->unscaled) { @@ -2834,6 +2830,8 @@ _cairo_ft_font_face_destroy (void *abstract_face) cairo_font_face_destroy (font_face->resolved_font_face); } #endif + + return TRUE; } static cairo_font_face_t * diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft-private.h index 3921518664a..3921518664a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft.h index 29c43c9655b..29c43c9655b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ft.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ft.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-composite.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-composite.c index 30b7931304b..b50f9a76c52 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-composite.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-composite.c @@ -875,7 +875,8 @@ _cairo_gl_composite_prepare_buffer (cairo_gl_context_t *ctx, ctx->primitive_type = primitive_type; } - if (ctx->vb_offset + n_vertices * ctx->vertex_size > CAIRO_GL_VBO_SIZE) + assert(ctx->vbo_size > 0); + if (ctx->vb_offset + n_vertices * ctx->vertex_size > ctx->vbo_size) _cairo_gl_composite_flush (ctx); } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-device.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-device.c index 054f1452f15..7235d9ae123 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-device.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-device.c @@ -297,7 +297,9 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx) if (unlikely (status)) return status; - ctx->vb = malloc (CAIRO_GL_VBO_SIZE); + ctx->vbo_size = _cairo_gl_get_vbo_size(); + + ctx->vb = malloc (ctx->vbo_size); if (unlikely (ctx->vb == NULL)) { _cairo_cache_fini (&ctx->gradients); return _cairo_error (CAIRO_STATUS_NO_MEMORY); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-dispatch-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-dispatch-private.h index cabf76f0d6b..cabf76f0d6b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-dispatch-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-dispatch-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-dispatch.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-dispatch.c index 76c3115ba37..76c3115ba37 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-dispatch.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-dispatch.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-ext-def-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-ext-def-private.h index a261947bef0..a261947bef0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-ext-def-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-ext-def-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-glyphs.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-glyphs.c index 8a1a548d939..8a1a548d939 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-glyphs.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-glyphs.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-gradient-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-gradient-private.h index 77f9bbdc5f5..77f9bbdc5f5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-gradient-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-gradient-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-gradient.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-gradient.c index ac3292101ec..ac3292101ec 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-gradient.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-gradient.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-info.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-info.c index 12a618da0c9..acefbb91059 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-info.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-info.c @@ -32,6 +32,8 @@ #include "cairoint.h" #include "cairo-gl-private.h" +#include <errno.h> + int _cairo_gl_get_version (void) { @@ -71,6 +73,24 @@ _cairo_gl_get_flavor (void) return flavor; } +unsigned long +_cairo_gl_get_vbo_size (void) +{ + unsigned long vbo_size; + + const char *env = getenv ("CAIRO_GL_VBO_SIZE"); + if (env == NULL) { + vbo_size = CAIRO_GL_VBO_SIZE_DEFAULT; + } else { + errno = 0; + vbo_size = strtol (env, NULL, 10); + assert (errno == 0); + assert (vbo_size > 0); + } + + return vbo_size; +} + cairo_bool_t _cairo_gl_has_extension (const char *ext) { diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-msaa-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-msaa-compositor.c index 83e8eb2d160..83e8eb2d160 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-msaa-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-msaa-compositor.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-operand.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-operand.c index 40157471747..40157471747 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-operand.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-operand.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-private.h index 8379abc9589..cb915c8cf25 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-private.h @@ -93,8 +93,9 @@ /* VBO size that we allocate, smaller size means we gotta flush more often, * but larger means hogging more memory and can cause trouble for drivers - * (especially on embedded devices). */ -#define CAIRO_GL_VBO_SIZE (16*1024) + * (especially on embedded devices). Use the CAIRO_GL_VBO_SIZE environment + * variable to set this to a different size. */ +#define CAIRO_GL_VBO_SIZE_DEFAULT (1024*1024) typedef struct _cairo_gl_surface cairo_gl_surface_t; @@ -361,6 +362,7 @@ struct _cairo_gl_context { cairo_gl_operand_t operands[2]; cairo_bool_t spans; + unsigned int vbo_size; unsigned int vb_offset; unsigned int vertex_size; cairo_region_t *clip_region; @@ -702,6 +704,9 @@ _cairo_gl_get_version (void); cairo_private cairo_gl_flavor_t _cairo_gl_get_flavor (void); +cairo_private unsigned long +_cairo_gl_get_vbo_size (void); + cairo_private cairo_bool_t _cairo_gl_has_extension (const char *ext); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-shaders.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-shaders.c index cc22cea41a8..27106066650 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-shaders.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-shaders.c @@ -198,7 +198,7 @@ _cairo_gl_context_fini_shaders (cairo_gl_context_t *ctx) { int i; - for (i = 0; i <= CAIRO_GL_VAR_TYPE_MAX; i++) { + for (i = 0; i < CAIRO_GL_VAR_TYPE_MAX; i++) { if (ctx->vertex_shaders[i]) ctx->dispatch.DeleteShader (ctx->vertex_shaders[i]); } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-source.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-source.c index 12235295f40..12235295f40 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-source.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-source.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-spans-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-spans-compositor.c index 4317ccd074a..4317ccd074a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-spans-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-spans-compositor.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-surface.c index c287a01e680..cfccf4dfda5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-surface.c @@ -261,6 +261,9 @@ _cairo_gl_get_image_format_and_type_gl (pixman_format_code_t pixman_format, *type = GL_UNSIGNED_BYTE; return TRUE; +#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,27,2) + case PIXMAN_a8r8g8b8_sRGB: +#endif case PIXMAN_a2b10g10r10: case PIXMAN_x2b10g10r10: case PIXMAN_a4r4g4b4: @@ -681,6 +684,11 @@ cairo_gl_surface_create_for_texture (cairo_device_t *abstract_device, if (unlikely (status)) return _cairo_surface_create_in_error (status); + if (! _cairo_gl_surface_size_valid_for_context (ctx, width, height)) { + status = _cairo_gl_context_release (ctx, status); + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE)); + } + surface = (cairo_gl_surface_t *) _cairo_gl_surface_create_scratch_for_texture (ctx, content, tex, width, height); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-traps-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-traps-compositor.c index ec478ee53a9..125ed4eabcb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl-traps-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl-traps-compositor.c @@ -333,10 +333,11 @@ traps_to_operand (void *_dst, } } - mask = _cairo_surface_create_similar_scratch (_dst, - CAIRO_CONTENT_COLOR_ALPHA, - extents->width, - extents->height); + mask = _cairo_surface_create_scratch (_dst, + CAIRO_CONTENT_COLOR_ALPHA, + extents->width, + extents->height, + NULL); if (unlikely (mask->status)) { cairo_surface_destroy (image); return mask->status; @@ -445,10 +446,11 @@ tristrip_to_surface (void *_dst, return (cairo_gl_surface_t *)image; } - mask = _cairo_surface_create_similar_scratch (_dst, - CAIRO_CONTENT_COLOR_ALPHA, - extents->width, - extents->height); + mask = _cairo_surface_create_scratch (_dst, + CAIRO_CONTENT_COLOR_ALPHA, + extents->width, + extents->height, + NULL); if (unlikely (mask->status)) { cairo_surface_destroy (image); return (cairo_gl_surface_t *)mask; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl.h index 9fd7608f5cf..9fd7608f5cf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gl.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gl.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-glx-context.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-glx-context.c index 3761b9079a4..3761b9079a4 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-glx-context.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-glx-context.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gstate-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gstate-private.h index b2ccc76d145..b2ccc76d145 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gstate-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gstate-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gstate.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gstate.c index b8caa63f17e..b4e988e96d8 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-gstate.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-gstate.c @@ -954,7 +954,7 @@ _cairo_gstate_copy_transformed_pattern (cairo_gstate_t *gstate, surface = surface_pattern->surface; if (_cairo_surface_has_device_transform (surface)) - _cairo_pattern_transform (pattern, &surface->device_transform); + _cairo_pattern_pretransform (pattern, &surface->device_transform); } if (! _cairo_matrix_is_identity (ctm_inverse)) @@ -1155,6 +1155,8 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path) cairo_stroke_style_t style; double dash[2]; cairo_status_t status; + cairo_matrix_t aggregate_transform; + cairo_matrix_t aggregate_transform_inverse; status = _cairo_gstate_get_pattern_status (gstate->source); if (unlikely (status)) @@ -1171,8 +1173,15 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path) assert (gstate->opacity == 1.0); + cairo_matrix_multiply (&aggregate_transform, + &gstate->ctm, + &gstate->target->device_transform); + cairo_matrix_multiply (&aggregate_transform_inverse, + &gstate->target->device_transform_inverse, + &gstate->ctm_inverse); + memcpy (&style, &gstate->stroke_style, sizeof (gstate->stroke_style)); - if (_cairo_stroke_style_dash_can_approximate (&gstate->stroke_style, &gstate->ctm, gstate->tolerance)) { + if (_cairo_stroke_style_dash_can_approximate (&gstate->stroke_style, &aggregate_transform, gstate->tolerance)) { style.dash = dash; _cairo_stroke_style_dash_approximate (&gstate->stroke_style, &gstate->ctm, gstate->tolerance, &style.dash_offset, @@ -1187,8 +1196,8 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path) &source_pattern.base, path, &style, - &gstate->ctm, - &gstate->ctm_inverse, + &aggregate_transform, + &aggregate_transform_inverse, gstate->tolerance, gstate->antialias, gstate->clip); @@ -1833,6 +1842,7 @@ _cairo_gstate_ensure_scaled_font (cairo_gstate_t *gstate) cairo_status_t status; cairo_font_options_t options; cairo_scaled_font_t *scaled_font; + cairo_matrix_t font_ctm; if (gstate->scaled_font != NULL) return gstate->scaled_font->status; @@ -1844,9 +1854,13 @@ _cairo_gstate_ensure_scaled_font (cairo_gstate_t *gstate) cairo_surface_get_font_options (gstate->target, &options); cairo_font_options_merge (&options, &gstate->font_options); + cairo_matrix_multiply (&font_ctm, + &gstate->ctm, + &gstate->target->device_transform); + scaled_font = cairo_scaled_font_create (gstate->font_face, &gstate->font_matrix, - &gstate->ctm, + &font_ctm, &options); status = cairo_scaled_font_status (scaled_font); @@ -1996,6 +2010,7 @@ _cairo_gstate_show_text_glyphs (cairo_gstate_t *gstate, if (cairo_surface_has_show_text_glyphs (gstate->target) || _cairo_scaled_font_get_max_scale (gstate->scaled_font) <= 10240) { + if (info != NULL) { status = _cairo_surface_show_text_glyphs (gstate->target, op, pattern, info->utf8, info->utf8_len, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-hash-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-hash-private.h index 30e51ffe669..30e51ffe669 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-hash-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-hash-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-hash.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-hash.c index 928c74b8bd6..928c74b8bd6 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-hash.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-hash.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-hull.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-hull.c index c65593327f6..c65593327f6 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-hull.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-hull.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-compositor.c index d0c4dd97146..6ff0f09c00f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-compositor.c @@ -279,8 +279,7 @@ fill_reduces_to_source (cairo_operator_t op, uint32_t *pixel) { if (__fill_reduces_to_source (op, color, dst)) { - color_to_pixel (color, dst->pixman_format, pixel); - return TRUE; + return color_to_pixel (color, dst->pixman_format, pixel); } return FALSE; @@ -309,6 +308,8 @@ fill_rectangles (void *_dst, } } else { pixman_image_t *src = _pixman_image_for_color (color); + if (unlikely (src == NULL)) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); op = _pixman_operator (op); for (i = 0; i < num_rects; i++) { @@ -356,6 +357,8 @@ fill_boxes (void *_dst, else { pixman_image_t *src = _pixman_image_for_color (color); + if (unlikely (src == NULL)) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); op = _pixman_operator (op); for (chunk = &boxes->chunks; chunk; chunk = chunk->next) { @@ -508,6 +511,8 @@ composite_boxes (void *_dst, op = PIXMAN_OP_LERP_CLEAR; #else free_src = src = _pixman_image_for_color (CAIRO_COLOR_WHITE); + if (unlikely (src == NULL)) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); op = PIXMAN_OP_OUT_REVERSE; #endif } else if (op == CAIRO_OPERATOR_SOURCE) { @@ -644,11 +649,18 @@ composite_traps (void *_dst, { cairo_image_surface_t *dst = (cairo_image_surface_t *) _dst; cairo_image_source_t *src = (cairo_image_source_t *) abstract_src; + cairo_int_status_t status; pixman_image_t *mask; pixman_format_code_t format; TRACE ((stderr, "%s\n", __FUNCTION__)); + /* pixman doesn't eliminate self-intersecting trapezoids/edges */ + status = _cairo_bentley_ottmann_tessellate_traps (traps, + CAIRO_FILL_RULE_WINDING); + if (status != CAIRO_INT_STATUS_SUCCESS) + return status; + /* Special case adding trapezoids onto a mask surface; we want to avoid * creating an intermediate temporary mask unnecessarily. * @@ -733,6 +745,31 @@ composite_tristrip (void *_dst, if (strip->num_points < 3) return CAIRO_STATUS_SUCCESS; + if (1) { /* pixman doesn't eliminate self-intersecting triangles/edges */ + cairo_int_status_t status; + cairo_traps_t traps; + int n; + + _cairo_traps_init (&traps); + for (n = 0; n < strip->num_points; n++) { + cairo_point_t p[4]; + + p[0] = strip->points[0]; + p[1] = strip->points[1]; + p[2] = strip->points[2]; + p[3] = strip->points[0]; + + _cairo_traps_tessellate_convex_quad (&traps, p); + } + status = composite_traps (_dst, op, abstract_src, + src_x, src_y, + dst_x, dst_y, + extents, antialias, &traps); + _cairo_traps_fini (&traps); + + return status; + } + format = antialias == CAIRO_ANTIALIAS_NONE ? PIXMAN_a1 : PIXMAN_a8; if (dst->pixman_format == format && (abstract_src == NULL || @@ -1252,7 +1289,7 @@ _cairo_image_mask_compositor_get (void) compositor.draw_image_boxes = draw_image_boxes; compositor.fill_rectangles = fill_rectangles; compositor.fill_boxes = fill_boxes; - //compositor.check_composite = check_composite; + compositor.check_composite = check_composite; compositor.composite = composite; //compositor.lerp = lerp; //compositor.check_composite_boxes = check_composite_boxes; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-info-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-info-private.h index 0d9ef84985f..e64928e40ec 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-info-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-info-private.h @@ -60,4 +60,9 @@ _cairo_image_info_get_png_info (cairo_image_info_t *info, const unsigned char *data, unsigned long length); +cairo_private cairo_int_status_t +_cairo_image_info_get_jbig2_info (cairo_image_info_t *info, + const unsigned char *data, + unsigned long length); + #endif /* CAIRO_IMAGE_INFO_PRIVATE_H */ diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-info.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-info.c index 4489698e8f8..64053a218eb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-info.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-info.c @@ -1,3 +1,4 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ /* cairo - a vector graphics library with display and print output * * Copyright © 2008 Adrian Johnson @@ -290,3 +291,137 @@ _cairo_image_info_get_png_info (cairo_image_info_t *info, return CAIRO_STATUS_SUCCESS; } + +static const unsigned char * +_jbig2_find_data_end (const unsigned char *p, + const unsigned char *end, + int type) +{ + unsigned char end_seq[2]; + int mmr; + + /* Segments of type "Immediate generic region" may have an + * unspecified data length. The JBIG2 specification specifies the + * method to find the end of the data for these segments. */ + if (type == 36 || type == 38 || type == 39) { + if (p + 18 < end) { + mmr = p[17] & 0x01; + if (mmr) { + /* MMR encoding ends with 0x00, 0x00 */ + end_seq[0] = 0x00; + end_seq[1] = 0x00; + } else { + /* Template encoding ends with 0xff, 0xac */ + end_seq[0] = 0xff; + end_seq[1] = 0xac; + } + p += 18; + while (p < end) { + if (p[0] == end_seq[0] && p[1] == end_seq[1]) { + /* Skip the 2 terminating bytes and the 4 byte row count that follows. */ + p += 6; + if (p < end) + return p; + } + p++; + } + } + } + + return NULL; +} + +static const unsigned char * +_jbig2_get_next_segment (const unsigned char *p, + const unsigned char *end, + int *type, + const unsigned char **data, + unsigned long *data_len) +{ + unsigned long seg_num; + cairo_bool_t big_page_size; + int num_segs; + int ref_seg_bytes; + int referred_size; + + if (p + 6 >= end) + return NULL; + + seg_num = _get_be32 (p); + *type = p[4] & 0x3f; + big_page_size = (p[4] & 0x40) != 0; + p += 5; + + num_segs = p[0] >> 5; + if (num_segs == 7) { + num_segs = _get_be32 (p) & 0x1fffffff; + ref_seg_bytes = 4 + ((num_segs + 1)/8); + } else { + ref_seg_bytes = 1; + } + p += ref_seg_bytes; + + if (seg_num <= 256) + referred_size = 1; + else if (seg_num <= 65536) + referred_size = 2; + else + referred_size = 4; + + p += num_segs * referred_size; + p += big_page_size ? 4 : 1; + if (p + 4 >= end) + return NULL; + + *data_len = _get_be32 (p); + p += 4; + *data = p; + + if (*data_len == 0xffffffff) { + /* if data length is -1 we have to scan through the data to find the end */ + p = _jbig2_find_data_end (*data, end, *type); + if (!p || p >= end) + return NULL; + + *data_len = p - *data; + } else { + p += *data_len; + } + + if (p < end) + return p; + else + return NULL; +} + +static void +_jbig2_extract_info (cairo_image_info_t *info, const unsigned char *p) +{ + info->width = _get_be32 (p); + info->height = _get_be32 (p + 4); + info->num_components = 1; + info->bits_per_component = 1; +} + +cairo_int_status_t +_cairo_image_info_get_jbig2_info (cairo_image_info_t *info, + const unsigned char *data, + unsigned long length) +{ + const unsigned char *p = data; + const unsigned char *end = data + length; + int seg_type; + const unsigned char *seg_data; + unsigned long seg_data_len; + + while (p && p < end) { + p = _jbig2_get_next_segment (p, end, &seg_type, &seg_data, &seg_data_len); + if (p && seg_type == 48 && seg_data_len > 8) { + /* page information segment */ + _jbig2_extract_info (info, seg_data); + return CAIRO_STATUS_SUCCESS; + } + } + + return CAIRO_INT_STATUS_UNSUPPORTED; +} diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-source.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-source.c index c5bd228c498..950053db2c1 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-source.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-source.c @@ -526,6 +526,368 @@ _pixel_to_solid (cairo_image_surface_t *image, int x, int y) } } +/* ========================================================================== */ + +/* Index into filter table */ +typedef enum +{ + KERNEL_IMPULSE, + KERNEL_BOX, + KERNEL_LINEAR, + KERNEL_MITCHELL, + KERNEL_NOTCH, + KERNEL_CATMULL_ROM, + KERNEL_LANCZOS3, + KERNEL_LANCZOS3_STRETCHED, + KERNEL_TENT +} kernel_t; + +/* Produce contribution of a filter of size r for pixel centered on x. + For a typical low-pass function this evaluates the function at x/r. + If the frequency is higher than 1/2, such as when r is less than 1, + this may need to integrate several samples, see cubic for examples. +*/ +typedef double (* kernel_func_t) (double x, double r); + +/* Return maximum number of pixels that will be non-zero. Except for + impluse this is the maximum of 2 and the width of the non-zero part + of the filter rounded up to the next integer. +*/ +typedef int (* kernel_width_func_t) (double r); + +/* Table of filters */ +typedef struct +{ + kernel_t kernel; + kernel_func_t func; + kernel_width_func_t width; +} filter_info_t; + +/* PIXMAN_KERNEL_IMPULSE: Returns pixel nearest the center. This + matches PIXMAN_FILTER_NEAREST. This is useful if you wish to + combine the result of nearest in one direction with another filter + in the other. +*/ + +static double +impulse_kernel (double x, double r) +{ + return 1; +} + +static int +impulse_width (double r) +{ + return 1; +} + +/* PIXMAN_KERNEL_BOX: Intersection of a box of width r with square + pixels. This is the smallest possible filter such that the output + image contains an equal contribution from all the input + pixels. Lots of software uses this. The function is a trapazoid of + width r+1, not a box. + + When r == 1.0, PIXMAN_KERNEL_BOX, PIXMAN_KERNEL_LINEAR, and + PIXMAN_KERNEL_TENT all produce the same filter, allowing + them to be exchanged at this point. +*/ + +static double +box_kernel (double x, double r) +{ + return MAX (0.0, MIN (MIN (r, 1.0), + MIN ((r + 1) / 2 - x, (r + 1) / 2 + x))); +} + +static int +box_width (double r) +{ + return r < 1.0 ? 2 : ceil(r + 1); +} + +/* PIXMAN_KERNEL_LINEAR: Weighted sum of the two pixels nearest the + center, or a triangle of width 2. This matches + PIXMAN_FILTER_BILINEAR. This is useful if you wish to combine the + result of bilinear in one direction with another filter in the + other. This is not a good filter if r > 1. You may actually want + PIXMAN_FILTER_TENT. + + When r == 1.0, PIXMAN_KERNEL_BOX, PIXMAN_KERNEL_LINEAR, and + PIXMAN_KERNEL_TENT all produce the same filter, allowing + them to be exchanged at this point. +*/ + +static double +linear_kernel (double x, double r) +{ + return MAX (1.0 - fabs(x), 0.0); +} + +static int +linear_width (double r) +{ + return 2; +} + +/* Cubic functions described in the Mitchell-Netravali paper. + http://mentallandscape.com/Papers_siggraph88.pdf. This describes + all possible cubic functions that can be used for sampling. +*/ + +static double +general_cubic (double x, double r, double B, double C) +{ + double ax; + if (r < 1.0) + return + general_cubic(x * 2 - .5, r * 2, B, C) + + general_cubic(x * 2 + .5, r * 2, B, C); + + ax = fabs (x / r); + + if (ax < 1) + { + return (((12 - 9 * B - 6 * C) * ax + + (-18 + 12 * B + 6 * C)) * ax * ax + + (6 - 2 * B)) / 6; + } + else if (ax < 2) + { + return ((((-B - 6 * C) * ax + + (6 * B + 30 * C)) * ax + + (-12 * B - 48 * C)) * ax + + (8 * B + 24 * C)) / 6; + } + else + { + return 0.0; + } +} + +static int +cubic_width (double r) +{ + return MAX (2, ceil (r * 4)); +} + +/* PIXMAN_KERNEL_CATMULL_ROM: Catmull-Rom interpolation. Often called + "cubic interpolation", "b-spline", or just "cubic" by other + software. This filter has negative values so it can produce ringing + and output pixels outside the range of input pixels. This is very + close to lanczos2 so there is no reason to supply that as well. +*/ + +static double +cubic_kernel (double x, double r) +{ + return general_cubic (x, r, 0.0, 0.5); +} + +/* PIXMAN_KERNEL_MITCHELL: Cubic recommended by the Mitchell-Netravali + paper. This has negative values and because the values at +/-1 are + not zero it does not interpolate the pixels, meaning it will change + an image even if there is no translation. +*/ + +static double +mitchell_kernel (double x, double r) +{ + return general_cubic (x, r, 1/3.0, 1/3.0); +} + +/* PIXMAN_KERNEL_NOTCH: Cubic recommended by the Mitchell-Netravali + paper to remove postaliasing artifacts. This does not remove + aliasing already present in the source image, though it may appear + to due to it's excessive blurriness. In any case this is more + useful than gaussian for image reconstruction. +*/ + +static double +notch_kernel (double x, double r) +{ + return general_cubic (x, r, 1.5, -0.25); +} + +/* PIXMAN_KERNEL_LANCZOS3: lanczos windowed sinc function from -3 to + +3. Very popular with high-end software though I think any + advantage over cubics is hidden by quantization and programming + mistakes. You will see LANCZOS5 or even 7 sometimes. +*/ + +static double +sinc (double x) +{ + return x ? sin (M_PI * x) / (M_PI * x) : 1.0; +} + +static double +lanczos (double x, double n) +{ + return fabs (x) < n ? sinc (x) * sinc (x * (1.0 / n)) : 0.0; +} + +static double +lanczos3_kernel (double x, double r) +{ + if (r < 1.0) + return + lanczos3_kernel (x * 2 - .5, r * 2) + + lanczos3_kernel (x * 2 + .5, r * 2); + else + return lanczos (x / r, 3.0); +} + +static int +lanczos3_width (double r) +{ + return MAX (2, ceil (r * 6)); +} + +/* PIXMAN_KERNEL_LANCZOS3_STRETCHED - The LANCZOS3 kernel widened by + 4/3. Recommended by Jim Blinn + http://graphics.cs.cmu.edu/nsp/course/15-462/Fall07/462/papers/jaggy.pdf +*/ + +static double +nice_kernel (double x, double r) +{ + return lanczos3_kernel (x, r * (4.0/3)); +} + +static int +nice_width (double r) +{ + return MAX (2.0, ceil (r * 8)); +} + +/* PIXMAN_KERNEL_TENT: Triangle of width 2r. Lots of software uses + this as a "better" filter, twice the size of a box but smaller than + a cubic. + + When r == 1.0, PIXMAN_KERNEL_BOX, PIXMAN_KERNEL_LINEAR, and + PIXMAN_KERNEL_TENT all produce the same filter, allowing + them to be exchanged at this point. +*/ + +static double +tent_kernel (double x, double r) +{ + if (r < 1.0) + return box_kernel(x, r); + else + return MAX (1.0 - fabs(x / r), 0.0); +} + +static int +tent_width (double r) +{ + return r < 1.0 ? 2 : ceil(2 * r); +} + + +static const filter_info_t filters[] = +{ + { KERNEL_IMPULSE, impulse_kernel, impulse_width }, + { KERNEL_BOX, box_kernel, box_width }, + { KERNEL_LINEAR, linear_kernel, linear_width }, + { KERNEL_MITCHELL, mitchell_kernel, cubic_width }, + { KERNEL_NOTCH, notch_kernel, cubic_width }, + { KERNEL_CATMULL_ROM, cubic_kernel, cubic_width }, + { KERNEL_LANCZOS3, lanczos3_kernel, lanczos3_width }, + { KERNEL_LANCZOS3_STRETCHED,nice_kernel, nice_width }, + { KERNEL_TENT, tent_kernel, tent_width } +}; + +/* Fills in one dimension of the filter array */ +static void get_filter(kernel_t filter, double r, + int width, int subsample, + pixman_fixed_t* out) +{ + int i; + pixman_fixed_t *p = out; + int n_phases = 1 << subsample; + double step = 1.0 / n_phases; + kernel_func_t func = filters[filter].func; + + /* special-case the impulse filter: */ + if (width <= 1) + { + for (i = 0; i < n_phases; ++i) + *p++ = pixman_fixed_1; + return; + } + + for (i = 0; i < n_phases; ++i) + { + double frac = (i + .5) * step; + /* Center of left-most pixel: */ + double x1 = ceil (frac - width / 2.0 - 0.5) - frac + 0.5; + double total = 0; + pixman_fixed_t new_total = 0; + int j; + + for (j = 0; j < width; ++j) + { + double v = func(x1 + j, r); + total += v; + p[j] = pixman_double_to_fixed (v); + } + + /* Normalize */ + total = 1 / total; + for (j = 0; j < width; ++j) + new_total += (p[j] *= total); + + /* Put any error on center pixel */ + p[width / 2] += (pixman_fixed_1 - new_total); + + p += width; + } +} + + +/* Create the parameter list for a SEPARABLE_CONVOLUTION filter + * with the given kernels and scale parameters. + */ +static pixman_fixed_t * +create_separable_convolution (int *n_values, + kernel_t xfilter, + double sx, + kernel_t yfilter, + double sy) +{ + int xwidth, xsubsample, ywidth, ysubsample, size_x, size_y; + pixman_fixed_t *params; + + xwidth = filters[xfilter].width(sx); + xsubsample = 0; + if (xwidth > 1) + while (sx * (1 << xsubsample) <= 128.0) xsubsample++; + size_x = (1 << xsubsample) * xwidth; + + ywidth = filters[yfilter].width(sy); + ysubsample = 0; + if (ywidth > 1) + while (sy * (1 << ysubsample) <= 128.0) ysubsample++; + size_y = (1 << ysubsample) * ywidth; + + *n_values = 4 + size_x + size_y; + params = malloc (*n_values * sizeof (pixman_fixed_t)); + if (!params) return 0; + + params[0] = pixman_int_to_fixed (xwidth); + params[1] = pixman_int_to_fixed (ywidth); + params[2] = pixman_int_to_fixed (xsubsample); + params[3] = pixman_int_to_fixed (ysubsample); + + get_filter(xfilter, sx, xwidth, xsubsample, params + 4); + get_filter(yfilter, sy, ywidth, ysubsample, params + 4 + size_x); + + return params; +} + +/* ========================================================================== */ + static cairo_bool_t _pixman_image_set_properties (pixman_image_t *pixman_image, const cairo_pattern_t *pattern, @@ -555,16 +917,58 @@ _pixman_image_set_properties (pixman_image_t *pixman_image, else { pixman_filter_t pixman_filter; + kernel_t kernel; + double dx, dy; + + /* Compute scale factors from the pattern matrix. These scale + * factors are from user to pattern space, and as such they + * are greater than 1.0 for downscaling and less than 1.0 for + * upscaling. The factors are the size of an axis-aligned + * rectangle with the same area as the parallelgram a 1x1 + * square transforms to. + */ + dx = hypot (pattern->matrix.xx, pattern->matrix.xy); + dy = hypot (pattern->matrix.yx, pattern->matrix.yy); + + /* Clip at maximum pixman_fixed number. Besides making it + * passable to pixman, this avoids errors from inf and nan. + */ + if (! (dx < 0x7FFF)) dx = 0x7FFF; + if (! (dy < 0x7FFF)) dy = 0x7FFF; switch (pattern->filter) { case CAIRO_FILTER_FAST: pixman_filter = PIXMAN_FILTER_FAST; break; case CAIRO_FILTER_GOOD: - pixman_filter = PIXMAN_FILTER_GOOD; + pixman_filter = PIXMAN_FILTER_SEPARABLE_CONVOLUTION; + kernel = KERNEL_BOX; + /* Clip the filter size to prevent extreme slowness. This + value could be raised if 2-pass filtering is done */ + if (dx > 16.0) dx = 16.0; + if (dy > 16.0) dy = 16.0; + /* Match the bilinear filter for scales > .75: */ + if (dx < 1.0/0.75) dx = 1.0; + if (dy < 1.0/0.75) dy = 1.0; break; case CAIRO_FILTER_BEST: - pixman_filter = PIXMAN_FILTER_BEST; + pixman_filter = PIXMAN_FILTER_SEPARABLE_CONVOLUTION; + kernel = KERNEL_CATMULL_ROM; /* LANCZOS3 is better but not much */ + /* Clip the filter size to prevent extreme slowness. This + value could be raised if 2-pass filtering is done */ + if (dx > 16.0) { dx = 16.0; kernel = KERNEL_BOX; } + /* blur up to 2x scale, then blend to square pixels for larger: */ + else if (dx < 1.0) { + if (dx < 1.0/128) dx = 1.0/127; + else if (dx < 0.5) dx = 1.0 / (1.0 / dx - 1.0); + else dx = 1.0; + } + if (dy > 16.0) { dy = 16.0; kernel = KERNEL_BOX; } + else if (dy < 1.0) { + if (dy < 1.0/128) dy = 1.0/127; + else if (dy < 0.5) dy = 1.0 / (1.0 / dy - 1.0); + else dy = 1.0; + } break; case CAIRO_FILTER_NEAREST: pixman_filter = PIXMAN_FILTER_NEAREST; @@ -582,7 +986,17 @@ _pixman_image_set_properties (pixman_image_t *pixman_image, pixman_filter = PIXMAN_FILTER_BEST; } - pixman_image_set_filter (pixman_image, pixman_filter, NULL, 0); + if (pixman_filter == PIXMAN_FILTER_SEPARABLE_CONVOLUTION) { + int n_params; + pixman_fixed_t *params; + params = create_separable_convolution + (&n_params, kernel, dx, kernel, dy); + pixman_image_set_filter (pixman_image, pixman_filter, + params, n_params); + free (params); + } else { + pixman_image_set_filter (pixman_image, pixman_filter, NULL, 0); + } } { diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface-inline.h index 743d5fd3e75..743d5fd3e75 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface-private.h index 8ca694c5e3e..8ca694c5e3e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface.c index 824dbf3c67a..1fd563d1c34 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-image-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-image-surface.c @@ -107,6 +107,9 @@ _cairo_format_from_pixman_format (pixman_format_code_t pixman_format) #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,22,0) case PIXMAN_r8g8b8a8: case PIXMAN_r8g8b8x8: #endif +#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,27,2) + case PIXMAN_a8r8g8b8_sRGB: +#endif case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: case PIXMAN_r8g8b8: case PIXMAN_b8g8r8: case PIXMAN_b5g6r5: case PIXMAN_a1r5g5b5: case PIXMAN_x1r5g5b5: case PIXMAN_a1b5g5r5: @@ -419,7 +422,7 @@ _cairo_image_surface_create_with_content (cairo_content_t content, * <informalexample><programlisting> * int stride; * unsigned char *data; - * #cairo_surface_t *surface; + * cairo_surface_t *surface; * * stride = cairo_format_stride_for_width (format, width); * data = malloc (stride * height); diff --git a/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-inline.h new file mode 100644 index 00000000000..71cc5e7ebf4 --- /dev/null +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-inline.h @@ -0,0 +1,48 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2014 Intel Corporation + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + */ + +#ifndef CAIRO_LINE_INLINE_H +#define CAIRO_LINE_INLINE_H + +#include "cairo-types-private.h" +#include "cairo-compiler-private.h" +#include "cairo-fixed-private.h" +#include "cairo-line-private.h" + +static inline int +cairo_lines_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); +} + +#endif /* CAIRO_LINE_INLINE_H */ diff --git a/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-private.h new file mode 100644 index 00000000000..08bf4b3587c --- /dev/null +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line-private.h @@ -0,0 +1,51 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2014 Intel Corporation, Inc + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is University of Southern + * California. + * + */ + +#ifndef CAIRO_LINE_PRIVATE_H +#define CAIRO_LINE_PRIVATE_H + +#include "cairo-types-private.h" +#include "cairo-error-private.h" +#include "cairo-compiler-private.h" + +CAIRO_BEGIN_DECLS + +cairo_private int +cairo_lines_compare_at_y(const cairo_line_t *a, + const cairo_line_t *b, + int y); + +CAIRO_END_DECLS + +#endif /* CAIRO_LINE_PRIVATE_H */ diff --git a/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line.c new file mode 100644 index 00000000000..cb13927bdce --- /dev/null +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-line.c @@ -0,0 +1,306 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ +/* + * Copyright © 2004 Carl Worth + * Copyright © 2006 Red Hat, Inc. + * Copyright © 2008 Chris Wilson + * Copyright © 2014 Intel Corporation + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Keith Packard + * + * Contributor(s): + * Carl D. Worth <cworth@cworth.org> + * Chris Wilson <chris@chris-wilson.co.uk> + * + */ + +#include "cairoint.h" + +#include "cairo-line-inline.h" +#include "cairo-slope-private.h" + +static int +line_compare_for_y_against_x (const cairo_line_t *a, + int32_t y, + int32_t x) +{ + int32_t adx, ady; + int32_t dx, dy; + cairo_int64_t L, R; + + if (x < a->p1.x && x < a->p2.x) + return 1; + if (x > a->p1.x && x > a->p2.x) + return -1; + + adx = a->p2.x - a->p1.x; + dx = x - a->p1.x; + + if (adx == 0) + return -dx; + if (dx == 0 || (adx ^ dx) < 0) + return adx; + + dy = y - a->p1.y; + ady = a->p2.y - a->p1.y; + + L = _cairo_int32x32_64_mul (dy, adx); + R = _cairo_int32x32_64_mul (dx, ady); + + return _cairo_int64_cmp (L, R); +} + +/* + * We need to compare the x-coordinates of a pair of lines for a particular y, + * without loss of precision. + * + * The x-coordinate along an edge for a given y is: + * X = A_x + (Y - A_y) * A_dx / A_dy + * + * So the inequality we wish to test is: + * A_x + (Y - A_y) * A_dx / A_dy ∘ B_x + (Y - B_y) * B_dx / B_dy, + * where ∘ is our inequality operator. + * + * By construction, we know that A_dy and B_dy (and (Y - A_y), (Y - B_y)) are + * all positive, so we can rearrange it thus without causing a sign change: + * A_dy * B_dy * (A_x - B_x) ∘ (Y - B_y) * B_dx * A_dy + * - (Y - A_y) * A_dx * B_dy + * + * Given the assumption that all the deltas fit within 32 bits, we can compute + * this comparison directly using 128 bit arithmetic. For certain, but common, + * input we can reduce this down to a single 32 bit compare by inspecting the + * deltas. + * + * (And put the burden of the work on developing fast 128 bit ops, which are + * required throughout the tessellator.) + * + * See the similar discussion for _slope_compare(). + */ +static int +lines_compare_x_for_y_general (const cairo_line_t *a, + const cairo_line_t *b, + int32_t y) +{ + /* XXX: We're assuming here that dx and dy will still fit in 32 + * bits. That's not true in general as there could be overflow. We + * should prevent that before the tessellation algorithm + * begins. + */ + int32_t dx; + int32_t adx, ady; + int32_t bdx, bdy; + enum { + HAVE_NONE = 0x0, + HAVE_DX = 0x1, + HAVE_ADX = 0x2, + HAVE_DX_ADX = HAVE_DX | HAVE_ADX, + HAVE_BDX = 0x4, + HAVE_DX_BDX = HAVE_DX | HAVE_BDX, + HAVE_ADX_BDX = HAVE_ADX | HAVE_BDX, + HAVE_ALL = HAVE_DX | HAVE_ADX | HAVE_BDX + } have_dx_adx_bdx = HAVE_ALL; + + ady = a->p2.y - a->p1.y; + adx = a->p2.x - a->p1.x; + if (adx == 0) + have_dx_adx_bdx &= ~HAVE_ADX; + + bdy = b->p2.y - b->p1.y; + bdx = b->p2.x - b->p1.x; + if (bdx == 0) + have_dx_adx_bdx &= ~HAVE_BDX; + + dx = a->p1.x - b->p1.x; + if (dx == 0) + have_dx_adx_bdx &= ~HAVE_DX; + +#define L _cairo_int64x32_128_mul (_cairo_int32x32_64_mul (ady, bdy), dx) +#define A _cairo_int64x32_128_mul (_cairo_int32x32_64_mul (adx, bdy), y - a->p1.y) +#define B _cairo_int64x32_128_mul (_cairo_int32x32_64_mul (bdx, ady), y - b->p1.y) + switch (have_dx_adx_bdx) { + default: + case HAVE_NONE: + return 0; + case HAVE_DX: + /* A_dy * B_dy * (A_x - B_x) ∘ 0 */ + return dx; /* ady * bdy is positive definite */ + case HAVE_ADX: + /* 0 ∘ - (Y - A_y) * A_dx * B_dy */ + return adx; /* bdy * (y - a->top.y) is positive definite */ + case HAVE_BDX: + /* 0 ∘ (Y - B_y) * B_dx * A_dy */ + return -bdx; /* ady * (y - b->top.y) is positive definite */ + case HAVE_ADX_BDX: + /* 0 ∘ (Y - B_y) * B_dx * A_dy - (Y - A_y) * A_dx * B_dy */ + if ((adx ^ bdx) < 0) { + return adx; + } else if (a->p1.y == b->p1.y) { /* common origin */ + cairo_int64_t adx_bdy, bdx_ady; + + /* ∴ A_dx * B_dy ∘ B_dx * A_dy */ + + adx_bdy = _cairo_int32x32_64_mul (adx, bdy); + bdx_ady = _cairo_int32x32_64_mul (bdx, ady); + + return _cairo_int64_cmp (adx_bdy, bdx_ady); + } else + return _cairo_int128_cmp (A, B); + case HAVE_DX_ADX: + /* A_dy * (A_x - B_x) ∘ - (Y - A_y) * A_dx */ + if ((-adx ^ dx) < 0) { + return dx; + } else { + cairo_int64_t ady_dx, dy_adx; + + ady_dx = _cairo_int32x32_64_mul (ady, dx); + dy_adx = _cairo_int32x32_64_mul (a->p1.y - y, adx); + + return _cairo_int64_cmp (ady_dx, dy_adx); + } + case HAVE_DX_BDX: + /* B_dy * (A_x - B_x) ∘ (Y - B_y) * B_dx */ + if ((bdx ^ dx) < 0) { + return dx; + } else { + cairo_int64_t bdy_dx, dy_bdx; + + bdy_dx = _cairo_int32x32_64_mul (bdy, dx); + dy_bdx = _cairo_int32x32_64_mul (y - b->p1.y, bdx); + + return _cairo_int64_cmp (bdy_dx, dy_bdx); + } + case HAVE_ALL: + /* XXX try comparing (a->p2.x - b->p2.x) et al */ + return _cairo_int128_cmp (L, _cairo_int128_sub (B, A)); + } +#undef B +#undef A +#undef L +} + +static int +lines_compare_x_for_y (const cairo_line_t *a, + const cairo_line_t *b, + int32_t y) +{ + /* If the sweep-line is currently on an end-point of a line, + * then we know its precise x value (and considering that we often need to + * compare events at end-points, this happens frequently enough to warrant + * special casing). + */ + enum { + HAVE_NEITHER = 0x0, + HAVE_AX = 0x1, + HAVE_BX = 0x2, + HAVE_BOTH = HAVE_AX | HAVE_BX + } have_ax_bx = HAVE_BOTH; + int32_t ax, bx; + + if (y == a->p1.y) + ax = a->p1.x; + else if (y == a->p2.y) + ax = a->p2.x; + else + have_ax_bx &= ~HAVE_AX; + + if (y == b->p1.y) + bx = b->p1.x; + else if (y == b->p2.y) + bx = b->p2.x; + else + have_ax_bx &= ~HAVE_BX; + + switch (have_ax_bx) { + default: + case HAVE_NEITHER: + return lines_compare_x_for_y_general (a, b, y); + case HAVE_AX: + return -line_compare_for_y_against_x (b, y, ax); + case HAVE_BX: + return line_compare_for_y_against_x (a, y, bx); + case HAVE_BOTH: + return ax - bx; + } +} + +static int bbox_compare (const cairo_line_t *a, + const cairo_line_t *b) +{ + int32_t amin, amax; + int32_t bmin, bmax; + + if (a->p1.x < a->p2.x) { + amin = a->p1.x; + amax = a->p2.x; + } else { + amin = a->p2.x; + amax = a->p1.x; + } + + if (b->p1.x < b->p2.x) { + bmin = b->p1.x; + bmax = b->p2.x; + } else { + bmin = b->p2.x; + bmax = b->p1.x; + } + + if (amax < bmin) + return -1; + + if (amin > bmax) + return +1; + + return 0; +} + +int cairo_lines_compare_at_y (const cairo_line_t *a, + const cairo_line_t *b, + int y) +{ + cairo_slope_t sa, sb; + int ret; + + if (cairo_lines_equal (a, b)) + return 0; + + /* Don't bother solving for abscissa if the edges' bounding boxes + * can be used to order them. + */ + ret = bbox_compare (a, b); + if (ret) + return ret; + + ret = lines_compare_x_for_y (a, b, y); + if (ret) + return ret; + + _cairo_slope_init (&sa, &a->p1, &a->p2); + _cairo_slope_init (&sb, &b->p1, &b->p2); + + return _cairo_slope_compare (&sb, &sa); +} diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-list-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-list-inline.h index 0955178d24f..0955178d24f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-list-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-list-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-list-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-list-private.h index 9f39b668f82..9f39b668f82 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-list-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-list-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-lzw.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-lzw.c index de7f9998376..de7f9998376 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-lzw.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-lzw.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-malloc-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-malloc-private.h index 1e2c67f8d9a..1e2c67f8d9a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-malloc-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-malloc-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mask-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mask-compositor.c index d0be1449d3f..4d6b118dda5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mask-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mask-compositor.c @@ -163,9 +163,10 @@ create_composite_mask (const cairo_mask_compositor_t *compositor, struct blt_in info; int i; - surface = _cairo_surface_create_similar_scratch (dst, CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + surface = _cairo_surface_create_scratch (dst, CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (surface->status)) return surface; @@ -346,9 +347,10 @@ clip_and_composite_combine (const cairo_mask_compositor_t *compositor, cairo_status_t status; int clip_x, clip_y; - tmp = _cairo_surface_create_similar_scratch (dst, dst->content, - extents->bounded.width, - extents->bounded.height); + tmp = _cairo_surface_create_scratch (dst, dst->content, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (tmp->status)) return tmp->status; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-matrix.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-matrix.c index ba975beaef0..ae498f5151a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-matrix.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-matrix.c @@ -748,23 +748,32 @@ _cairo_matrix_is_integer_translation (const cairo_matrix_t *matrix, return FALSE; } +#define SCALING_EPSILON _cairo_fixed_to_double(1) + +/* This only returns true if the matrix is 90 degree rotations or + * flips. It appears calling code is relying on this. It will return + * false for other rotations even if the scale is one. Approximations + * are allowed to handle matricies filled in using trig functions + * such as sin(M_PI_2). + */ cairo_bool_t _cairo_matrix_has_unity_scale (const cairo_matrix_t *matrix) { - if (matrix->xy == 0.0 && matrix->yx == 0.0) { - if (! (matrix->xx == 1.0 || matrix->xx == -1.0)) - return FALSE; - if (! (matrix->yy == 1.0 || matrix->yy == -1.0)) - return FALSE; - } else if (matrix->xx == 0.0 && matrix->yy == 0.0) { - if (! (matrix->xy == 1.0 || matrix->xy == -1.0)) - return FALSE; - if (! (matrix->yx == 1.0 || matrix->yx == -1.0)) - return FALSE; - } else - return FALSE; - - return TRUE; + /* check that the determinant is near +/-1 */ + double det = _cairo_matrix_compute_determinant (matrix); + if (fabs (det * det - 1.0) < SCALING_EPSILON) { + /* check that one axis is close to zero */ + if (fabs (matrix->xy) < SCALING_EPSILON && + fabs (matrix->yx) < SCALING_EPSILON) + return TRUE; + if (fabs (matrix->xx) < SCALING_EPSILON && + fabs (matrix->yy) < SCALING_EPSILON) + return TRUE; + /* If rotations are allowed then it must instead test for + * orthogonality. This is xx*xy+yx*yy ~= 0. + */ + } + return FALSE; } /* By pixel exact here, we mean a matrix that is composed only of diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mempool-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mempool-private.h index a09f6ce51f6..a09f6ce51f6 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mempool-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mempool-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mempool.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mempool.c index 751ede320f3..751ede320f3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mempool.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mempool.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mesh-pattern-rasterizer.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mesh-pattern-rasterizer.c index 6f0dd66676d..1b63ca8a660 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mesh-pattern-rasterizer.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mesh-pattern-rasterizer.c @@ -697,9 +697,9 @@ rasterize_bezier_patch (unsigned char *data, int width, int height, int stride, cairo_point_double_t p[4][4], double col[4][4]) { double pv[4][2][4], cstart[4], cend[4], dcstart[4], dcend[4]; - int vsteps, v, i, k; + int v, i, k; - vsteps = 1 << vshift; + v = 1 << vshift; /* * pv[i][0] is the function (represented using forward @@ -724,11 +724,12 @@ rasterize_bezier_patch (unsigned char *data, int width, int height, int stride, for (i = 0; i < 4; ++i) { cstart[i] = col[0][i]; cend[i] = col[1][i]; - dcstart[i] = (col[2][i] - col[0][i]) / vsteps; - dcend[i] = (col[3][i] - col[1][i]) / vsteps; + dcstart[i] = (col[2][i] - col[0][i]) / v; + dcend[i] = (col[3][i] - col[1][i]) / v; } - for (v = 0; v <= vsteps; ++v) { + v++; + while (v--) { cairo_point_double_t nodes[4]; for (i = 0; i < 4; ++i) { nodes[i].x = pv[i][0][0]; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-misc.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-misc.c index bb37e1a0a00..df8a4efc940 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-misc.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-misc.c @@ -156,6 +156,8 @@ cairo_status_to_string (cairo_status_t status) return "invalid operation during mesh pattern construction"; case CAIRO_STATUS_DEVICE_FINISHED: return "the target device has been finished"; + case CAIRO_STATUS_JBIG2_GLOBAL_MISSING: + return "CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID used but no CAIRO_MIME_TYPE_JBIG2_GLOBAL data provided"; default: case CAIRO_STATUS_LAST_STATUS: return "<unknown error status>"; @@ -757,6 +759,24 @@ _cairo_half_from_float (float f) } } +#ifndef __BIONIC__ +# include <locale.h> + +const char * +cairo_get_locale_decimal_point (void) +{ + struct lconv *locale_data = localeconv (); + return locale_data->decimal_point; +} + +#else +/* Android's Bionic libc doesn't provide decimal_point */ +const char * +cairo_get_locale_decimal_point (void) +{ + return '.'; +} +#endif #ifdef _WIN32 diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mono-scan-converter.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mono-scan-converter.c index 2a9546cf82a..2a9546cf82a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mono-scan-converter.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mono-scan-converter.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-impl-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-impl-private.h index 25223f3eac0..25223f3eac0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-impl-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-impl-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-list-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-list-private.h index f46afadb04b..f46afadb04b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-list-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-list-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-private.h index 61a7160a066..61a7160a066 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-type-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-type-private.h index e8c493985c9..e8c493985c9 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex-type-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex-type-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex.c index 0a31dced3e1..0a31dced3e1 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-mutex.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-mutex.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-no-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-no-compositor.c index 1602a12f63a..1602a12f63a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-no-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-no-compositor.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-observer.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-observer.c index 36d6b93bd63..36d6b93bd63 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-observer.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-observer.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2-private.h index 829dd3c8d41..829dd3c8d41 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2-surface.c index 1ab50f97798..1ab50f97798 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2.h index d23f2dec42a..d23f2dec42a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-os2.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-os2.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-output-stream-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-output-stream-private.h index edaabbe78e5..2542646b860 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-output-stream-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-output-stream-private.h @@ -135,6 +135,11 @@ _cairo_output_stream_printf (cairo_output_stream_t *stream, const char *fmt, ...) CAIRO_PRINTF_FORMAT (2, 3); +/* Print matrix element values with rounding of insignificant digits. */ +cairo_private void +_cairo_output_stream_print_matrix (cairo_output_stream_t *stream, + const cairo_matrix_t *matrix); + cairo_private long _cairo_output_stream_get_position (cairo_output_stream_t *stream); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-output-stream.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-output-stream.c index cc7e300c936..369a59bfba8 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-output-stream.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-output-stream.c @@ -43,7 +43,6 @@ #include "cairo-compiler-private.h" #include <stdio.h> -#include <locale.h> #include <errno.h> /* Numbers printed with %f are printed with this number of significant @@ -303,7 +302,6 @@ _cairo_output_stream_write_hex_string (cairo_output_stream_t *stream, static void _cairo_dtostr (char *buffer, size_t size, double d, cairo_bool_t limited_precision) { - struct lconv *locale_data; const char *decimal_point; int decimal_point_len; char *p; @@ -314,8 +312,7 @@ _cairo_dtostr (char *buffer, size_t size, double d, cairo_bool_t limited_precisi if (d == 0.0) d = 0.0; - locale_data = localeconv (); - decimal_point = locale_data->decimal_point; + decimal_point = cairo_get_locale_decimal_point (); decimal_point_len = strlen (decimal_point); assert (decimal_point_len != 0); @@ -530,6 +527,45 @@ _cairo_output_stream_printf (cairo_output_stream_t *stream, va_end (ap); } +/* Matrix elements that are smaller than the value of the largest element * MATRIX_ROUNDING_TOLERANCE + * are rounded down to zero. */ +#define MATRIX_ROUNDING_TOLERANCE 1e-12 + +void +_cairo_output_stream_print_matrix (cairo_output_stream_t *stream, + const cairo_matrix_t *matrix) +{ + cairo_matrix_t m; + double s, e; + + m = *matrix; + s = fabs (m.xx); + if (fabs (m.xy) > s) + s = fabs (m.xy); + if (fabs (m.yx) > s) + s = fabs (m.yx); + if (fabs (m.yy) > s) + s = fabs (m.yy); + + e = s * MATRIX_ROUNDING_TOLERANCE; + if (fabs(m.xx) < e) + m.xx = 0; + if (fabs(m.xy) < e) + m.xy = 0; + if (fabs(m.yx) < e) + m.yx = 0; + if (fabs(m.yy) < e) + m.yy = 0; + if (fabs(m.x0) < e) + m.x0 = 0; + if (fabs(m.y0) < e) + m.y0 = 0; + + _cairo_output_stream_printf (stream, + "%f %f %f %f %f %f", + m.xx, m.yx, m.xy, m.yy, m.x0, m.y0); +} + long _cairo_output_stream_get_position (cairo_output_stream_t *stream) { diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-private.h index b827faba0ef..b827faba0ef 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-surface-private.h index ebf4b342492..ebf4b342492 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-surface.c index fe9ccee63c7..68e4e0e34fd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-paginated-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-paginated-surface.c @@ -308,7 +308,7 @@ _paint_fallback_image (cairo_paginated_surface_t *surface, image = _cairo_paginated_surface_create_image_surface (surface, ceil (width * x_scale), ceil (height * y_scale)); - _cairo_surface_set_device_scale (image, x_scale, y_scale); + cairo_surface_set_device_scale (image, x_scale, y_scale); /* set_device_offset just sets the x0/y0 components of the matrix; * so we have to do the scaling manually. */ cairo_surface_set_device_offset (image, -x*x_scale, -y*y_scale); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-bounds.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-bounds.c index 9c7222426d3..9c7222426d3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-bounds.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-bounds.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fill.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fill.c index 4000c9c586e..4000c9c586e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fill.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fill.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fixed-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fixed-private.h index cf7cd0836fb..cf7cd0836fb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fixed-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fixed-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fixed.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fixed.c index 14913fd09ac..4bbf496f075 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-fixed.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-fixed.c @@ -847,6 +847,9 @@ _cairo_path_fixed_interpret (const cairo_path_fixed_t *path, } } cairo_path_foreach_buf_end (buf, path); + if (path->needs_move_to && path->has_current_point) + return (*move_to) (closure, &path->current_point); + return CAIRO_STATUS_SUCCESS; } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-in-fill.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-in-fill.c index 1787fb1a3ba..1787fb1a3ba 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-in-fill.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-in-fill.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-private.h index 7b54317e20e..7b54317e20e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-boxes.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-boxes.c index 7f25bf76cf7..7f25bf76cf7 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-boxes.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-boxes.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-polygon.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-polygon.c index 2c8fe5e7e4d..e5082bbec68 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-polygon.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-polygon.c @@ -1083,7 +1083,6 @@ spline_to (void *closure, _cairo_contour_add_point (&stroker->path, point); #endif if ((tangent->dx | tangent->dy) == 0) { - const cairo_point_t *inpt, *outpt; struct stroke_contour *outer; cairo_point_t t; int clockwise; @@ -1101,12 +1100,8 @@ spline_to (void *closure, clockwise = join_is_clockwise (&stroker->current_face, &face); if (clockwise) { - inpt = &stroker->current_face.cw; - outpt = &face.cw; outer = &stroker->cw; } else { - inpt = &stroker->current_face.ccw; - outpt = &face.ccw; outer = &stroker->ccw; } @@ -1121,7 +1116,6 @@ spline_to (void *closure, if ((face.dev_slope.x * stroker->current_face.dev_slope.x + face.dev_slope.y * stroker->current_face.dev_slope.y) < stroker->spline_cusp_tolerance) { - const cairo_point_t *inpt, *outpt; struct stroke_contour *outer; int clockwise = join_is_clockwise (&stroker->current_face, &face); @@ -1134,12 +1128,8 @@ spline_to (void *closure, contour_add_point (stroker, &stroker->ccw, &stroker->current_face.ccw); if (clockwise) { - inpt = &stroker->current_face.cw; - outpt = &face.cw; outer = &stroker->cw; } else { - inpt = &stroker->current_face.ccw; - outpt = &face.ccw; outer = &stroker->ccw; } add_fan (stroker, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-traps.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-traps.c index 304dea7db94..520a3e5b9d5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-traps.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-traps.c @@ -249,9 +249,11 @@ join (struct stroker *stroker, in->dev_slope.y * out->dev_slope.y) < stroker->spline_cusp_tolerance) { int start, stop; - cairo_point_t tri[3]; + cairo_point_t tri[3], edges[4]; cairo_pen_t *pen = &stroker->pen; + edges[0] = in->cw; + edges[1] = in->ccw; tri[0] = in->point; tri[1] = *inpt; if (clockwise) { @@ -261,8 +263,13 @@ join (struct stroker *stroker, while (start != stop) { tri[2] = in->point; translate_point (&tri[2], &pen->vertices[start].point); - _cairo_traps_tessellate_triangle (stroker->traps, tri); + edges[2] = in->point; + edges[3] = tri[2]; + _cairo_traps_tessellate_triangle_with_edges (stroker->traps, + tri, edges); tri[1] = tri[2]; + edges[0] = edges[2]; + edges[1] = edges[3]; if (start-- == 0) start += pen->num_vertices; @@ -274,17 +281,29 @@ join (struct stroker *stroker, while (start != stop) { tri[2] = in->point; translate_point (&tri[2], &pen->vertices[start].point); - _cairo_traps_tessellate_triangle (stroker->traps, tri); + edges[2] = in->point; + edges[3] = tri[2]; + _cairo_traps_tessellate_triangle_with_edges (stroker->traps, + tri, edges); tri[1] = tri[2]; + edges[0] = edges[2]; + edges[1] = edges[3]; if (++start == pen->num_vertices) start = 0; } } tri[2] = *outpt; - _cairo_traps_tessellate_triangle (stroker->traps, tri); - break; + edges[2] = out->cw; + edges[3] = out->ccw; + _cairo_traps_tessellate_triangle_with_edges (stroker->traps, + tri, edges); + } else { + cairo_point_t t[] = { in->point, *inpt, *outpt }; + cairo_point_t e[] = { in->cw, in->ccw, out->cw, out->ccw }; + _cairo_traps_tessellate_triangle_with_edges (stroker->traps, t, e); } + break; case CAIRO_LINE_JOIN_MITER: default: { @@ -442,12 +461,9 @@ join (struct stroker *stroker, } case CAIRO_LINE_JOIN_BEVEL: { - cairo_point_t tri[3]; - tri[0] = in->point; - tri[1] = *inpt; - tri[2] = *outpt; - - _cairo_traps_tessellate_triangle (stroker->traps, tri); + cairo_point_t t[] = { in->point, *inpt, *outpt }; + cairo_point_t e[] = { in->cw, in->ccw, out->cw, out->ccw }; + _cairo_traps_tessellate_triangle_with_edges (stroker->traps, t, e); break; } } @@ -460,7 +476,7 @@ add_cap (struct stroker *stroker, cairo_stroke_face_t *f) case CAIRO_LINE_CAP_ROUND: { int start, stop; cairo_slope_t in_slope, out_slope; - cairo_point_t tri[3]; + cairo_point_t tri[3], edges[4]; cairo_pen_t *pen = &stroker->pen; in_slope = f->dev_vector; @@ -468,19 +484,29 @@ add_cap (struct stroker *stroker, cairo_stroke_face_t *f) out_slope.dy = -in_slope.dy; _cairo_pen_find_active_cw_vertices (pen, &in_slope, &out_slope, &start, &stop); + edges[0] = f->cw; + edges[1] = f->ccw; tri[0] = f->point; tri[1] = f->cw; while (start != stop) { tri[2] = f->point; translate_point (&tri[2], &pen->vertices[start].point); - _cairo_traps_tessellate_triangle (stroker->traps, tri); + edges[2] = f->point; + edges[3] = tri[2]; + _cairo_traps_tessellate_triangle_with_edges (stroker->traps, + tri, edges); tri[1] = tri[2]; + edges[0] = edges[2]; + edges[1] = edges[3]; if (++start == pen->num_vertices) start = 0; } tri[2] = f->ccw; - _cairo_traps_tessellate_triangle (stroker->traps, tri); + edges[2] = f->cw; + edges[3] = f->ccw; + _cairo_traps_tessellate_triangle_with_edges (stroker->traps, + tri, edges); break; } @@ -932,7 +958,6 @@ spline_to (void *closure, cairo_point_t rectangle[4]; compute_face (&stroker->current_face.point, tangent, stroker, &face); - join (stroker, &stroker->current_face, &face); rectangle[0] = face.cw; @@ -1019,7 +1044,7 @@ curve_to_dashed (void *closure, func = (cairo_spline_add_point_func_t)line_to_dashed; if (stroker->has_bounds && - ! _cairo_spline_intersects (&stroker->current_face.point, b, c, b, + ! _cairo_spline_intersects (&stroker->current_face.point, b, c, d, &stroker->line_bounds)) return func (closure, d, NULL); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-tristrip.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-tristrip.c index 6ce4131cc0f..6ce4131cc0f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke-tristrip.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke-tristrip.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke.c index 4d4ede81361..4d4ede81361 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path-stroke.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path-stroke.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path.c index 43cd175a3c5..43cd175a3c5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-path.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-path.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern-inline.h index 97e8ea034e4..97e8ea034e4 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern-private.h index dfd843fc146..be8ab9fc239 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern-private.h @@ -237,6 +237,10 @@ cairo_private void _cairo_pattern_transform (cairo_pattern_t *pattern, const cairo_matrix_t *ctm_inverse); +cairo_private void +_cairo_pattern_pretransform (cairo_pattern_t *pattern, + const cairo_matrix_t *ctm); + cairo_private cairo_bool_t _cairo_pattern_is_opaque_solid (const cairo_pattern_t *pattern); @@ -285,7 +289,7 @@ _cairo_mesh_pattern_coord_box (const cairo_mesh_pattern_t *mesh, double *out_xmax, double *out_ymax); -cairo_private_no_warn cairo_filter_t +cairo_private void _cairo_pattern_sampled_area (const cairo_pattern_t *pattern, const cairo_rectangle_int_t *extents, cairo_rectangle_int_t *sample); @@ -324,6 +328,9 @@ cairo_private cairo_bool_t _cairo_pattern_equal (const cairo_pattern_t *a, const cairo_pattern_t *b); +cairo_private cairo_filter_t +_cairo_pattern_analyze_filter (const cairo_pattern_t *pattern); + /* cairo-mesh-pattern-rasterizer.c */ cairo_private void diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern.c index 940227d298c..010de5c30be 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pattern.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pattern.c @@ -51,8 +51,8 @@ * @See_Also: #cairo_t, #cairo_surface_t * * #cairo_pattern_t is the paint with which cairo draws. - * The primary use of patterns is as the source for all cairo drawing - * operations, although they can also be used as masks, that is, as the + * The primary use of patterns is as the source for all cairo drawing + * operations, although they can also be used as masks, that is, as the * brush too. * * A cairo pattern is created by using one of the many constructors, @@ -2128,6 +2128,16 @@ cairo_pattern_get_extend (cairo_pattern_t *pattern) slim_hidden_def (cairo_pattern_get_extend); void +_cairo_pattern_pretransform (cairo_pattern_t *pattern, + const cairo_matrix_t *ctm) +{ + if (pattern->status) + return; + + cairo_matrix_multiply (&pattern->matrix, &pattern->matrix, ctm); +} + +void _cairo_pattern_transform (cairo_pattern_t *pattern, const cairo_matrix_t *ctm_inverse) { @@ -3329,110 +3339,179 @@ _cairo_pattern_is_clear (const cairo_pattern_t *abstract_pattern) } /** + * Will given row of back-translation matrix work with bilinear scale? + * This is true for scales larger than 1. Also it was judged acceptable + * for scales larger than .75. And if there is integer translation + * then a scale of exactly .5 works. + */ +static int +use_bilinear(double x, double y, double t) +{ + /* This is the inverse matrix! */ + double h = x*x + y*y; + if (h < 1.0 / (0.75 * 0.75)) + return TRUE; /* scale > .75 */ + if ((h > 3.99 && h < 4.01) /* scale is 1/2 */ + && !_cairo_fixed_from_double(x*y) /* parallel to an axis */ + && _cairo_fixed_is_integer (_cairo_fixed_from_double (t))) + return TRUE; + return FALSE; +} + +/** * _cairo_pattern_analyze_filter: * @pattern: surface pattern - * @pad_out: location to store necessary padding in the source image, or %NULL * Returns: the optimized #cairo_filter_t to use with @pattern. * - * Analyze the filter to determine how much extra needs to be sampled - * from the source image to account for the filter radius and whether - * we can optimize the filter to a simpler value. - * - * XXX: We don't actually have any way of querying the backend for - * the filter radius, so we just guess base on what we know that - * backends do currently (see bug #10508) + * Possibly optimize the filter to a simpler value depending on transformation **/ cairo_filter_t -_cairo_pattern_analyze_filter (const cairo_pattern_t *pattern, - double *pad_out) +_cairo_pattern_analyze_filter (const cairo_pattern_t *pattern) { - double pad; - cairo_filter_t optimized_filter; - switch (pattern->filter) { case CAIRO_FILTER_GOOD: case CAIRO_FILTER_BEST: case CAIRO_FILTER_BILINEAR: + case CAIRO_FILTER_FAST: /* If source pixels map 1:1 onto destination pixels, we do * not need to filter (and do not want to filter, since it * will cause blurriness) */ if (_cairo_matrix_is_pixel_exact (&pattern->matrix)) { - pad = 0.; - optimized_filter = CAIRO_FILTER_NEAREST; + return CAIRO_FILTER_NEAREST; } else { - /* 0.5 is enough for a bilinear filter. It's possible we - * should defensively use more for CAIRO_FILTER_BEST, but - * without a single example, it's hard to know how much - * more would be defensive... + /* Use BILINEAR for any scale greater than .75 instead + * of GOOD. For scales of 1 and larger this is identical, + * for the smaller sizes it was judged that the artifacts + * were not worse than the artifacts from a box filer. + * BILINEAR can also be used if the scale is exactly .5 + * and the translation in that direction is an integer. */ - pad = 0.5; - optimized_filter = pattern->filter; + if (pattern->filter == CAIRO_FILTER_GOOD && + use_bilinear (pattern->matrix.xx, pattern->matrix.xy, + pattern->matrix.x0) && + use_bilinear (pattern->matrix.yx, pattern->matrix.yy, + pattern->matrix.y0)) + return CAIRO_FILTER_BILINEAR; } break; - case CAIRO_FILTER_FAST: case CAIRO_FILTER_NEAREST: case CAIRO_FILTER_GAUSSIAN: default: - pad = 0.; - optimized_filter = pattern->filter; break; } - if (pad_out) - *pad_out = pad; + return pattern->filter; +} - return optimized_filter; +/** + * _cairo_hypot: + * Returns: value similar to hypot(@x,@y) + * + * May want to replace this with Manhattan distance (abs(x)+abs(y)) if + * hypot is too slow, as there is no need for accuracy here. + **/ +static inline double +_cairo_hypot(double x, double y) +{ + return hypot(x, y); } -cairo_filter_t +/** + * _cairo_pattern_sampled_area + * + * Return region of @pattern that will be sampled to fill @extents, + * based on the transformation and filter. + * + * This does not include pixels that are mulitiplied by values very + * close to zero by the ends of filters. This is so that transforms + * that should be the identity or 90 degree rotations do not expand + * the source unexpectedly. + * + * XXX: We don't actually have any way of querying the backend for + * the filter radius, so we just guess base on what we know that + * backends do currently (see bug #10508) + **/ +void _cairo_pattern_sampled_area (const cairo_pattern_t *pattern, const cairo_rectangle_int_t *extents, cairo_rectangle_int_t *sample) { - cairo_filter_t filter; double x1, x2, y1, y2; - double pad; + double padx, pady; - filter = _cairo_pattern_analyze_filter (pattern, &pad); - if (pad == 0.0 && _cairo_matrix_is_identity (&pattern->matrix)) { + /* Assume filters are interpolating, which means identity + cannot change the image */ + if (_cairo_matrix_is_identity (&pattern->matrix)) { *sample = *extents; - return filter; + return; } - x1 = extents->x; - y1 = extents->y; - x2 = extents->x + (int) extents->width; - y2 = extents->y + (int) extents->height; - + /* Transform the centers of the corner pixels */ + x1 = extents->x + 0.5; + y1 = extents->y + 0.5; + x2 = x1 + (extents->width - 1); + y2 = y1 + (extents->height - 1); _cairo_matrix_transform_bounding_box (&pattern->matrix, &x1, &y1, &x2, &y2, NULL); - if (x1 > CAIRO_RECT_INT_MIN) - sample->x = floor (x1 - pad); - else - sample->x = CAIRO_RECT_INT_MIN; - if (y1 > CAIRO_RECT_INT_MIN) - sample->y = floor (y1 - pad); - else - sample->y = CAIRO_RECT_INT_MIN; + /* How far away from center will it actually sample? + * This is the distance from a transformed pixel center to the + * furthest sample of reasonable size. + */ + switch (pattern->filter) { + case CAIRO_FILTER_NEAREST: + case CAIRO_FILTER_FAST: + /* Correct value is zero, but when the sample is on an integer + * it is unknown if the backend will sample the pixel to the + * left or right. This value makes it include both possible pixels. + */ + padx = pady = 0.004; + break; + case CAIRO_FILTER_BILINEAR: + case CAIRO_FILTER_GAUSSIAN: + default: + /* Correct value is .5 */ + padx = pady = 0.495; + break; + case CAIRO_FILTER_GOOD: + /* Correct value is max(width,1)*.5 */ + padx = _cairo_hypot (pattern->matrix.xx, pattern->matrix.xy); + if (padx <= 1.0) padx = 0.495; + else if (padx >= 16.0) padx = 7.92; + else padx *= 0.495; + pady = _cairo_hypot (pattern->matrix.yx, pattern->matrix.yy); + if (pady <= 1.0) pady = 0.495; + else if (pady >= 16.0) pady = 7.92; + else pady *= 0.495; + break; + case CAIRO_FILTER_BEST: + /* Correct value is width*2 */ + padx = _cairo_hypot (pattern->matrix.xx, pattern->matrix.xy) * 1.98; + if (padx > 7.92) padx = 7.92; + pady = _cairo_hypot (pattern->matrix.yx, pattern->matrix.yy) * 1.98; + if (pady > 7.92) pady = 7.92; + break; + } - if (x2 < CAIRO_RECT_INT_MAX) - sample->width = ceil (x2 + pad); - else - sample->width = CAIRO_RECT_INT_MAX; + /* round furthest samples to edge of pixels */ + x1 = floor (x1 - padx); + if (x1 < CAIRO_RECT_INT_MIN) x1 = CAIRO_RECT_INT_MIN; + sample->x = x1; - if (y2 < CAIRO_RECT_INT_MAX) - sample->height = ceil (y2 + pad); - else - sample->height = CAIRO_RECT_INT_MAX; + y1 = floor (y1 - pady); + if (y1 < CAIRO_RECT_INT_MIN) y1 = CAIRO_RECT_INT_MIN; + sample->y = y1; - sample->width -= sample->x; - sample->height -= sample->y; + x2 = floor (x2 + padx) + 1.0; + if (x2 > CAIRO_RECT_INT_MAX) x2 = CAIRO_RECT_INT_MAX; + sample->width = x2 - x1; - return filter; + y2 = floor (y2 + pady) + 1.0; + if (y2 > CAIRO_RECT_INT_MAX) y2 = CAIRO_RECT_INT_MAX; + sample->height = y2 - y1; } /** @@ -3452,7 +3531,9 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, cairo_rectangle_int_t *extents) { double x1, y1, x2, y2; - cairo_status_t status; + int ix1, ix2, iy1, iy2; + cairo_bool_t round_x = FALSE; + cairo_bool_t round_y = FALSE; switch (pattern->type) { case CAIRO_PATTERN_TYPE_SOLID: @@ -3464,7 +3545,6 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, const cairo_surface_pattern_t *surface_pattern = (const cairo_surface_pattern_t *) pattern; cairo_surface_t *surface = surface_pattern->surface; - double pad; if (! _cairo_surface_get_extents (surface, &surface_extents)) goto UNBOUNDED; @@ -3475,14 +3555,12 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, if (pattern->extend != CAIRO_EXTEND_NONE) goto UNBOUNDED; - /* The filter can effectively enlarge the extents of the - * pattern, so extend as necessary. - */ - _cairo_pattern_analyze_filter (&surface_pattern->base, &pad); - x1 = surface_extents.x - pad; - y1 = surface_extents.y - pad; - x2 = surface_extents.x + (int) surface_extents.width + pad; - y2 = surface_extents.y + (int) surface_extents.height + pad; + x1 = surface_extents.x; + y1 = surface_extents.y; + x2 = surface_extents.x + (int) surface_extents.width; + y2 = surface_extents.y + (int) surface_extents.height; + + goto HANDLE_FILTER; } break; @@ -3490,7 +3568,6 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, { const cairo_raster_source_pattern_t *raster = (const cairo_raster_source_pattern_t *) pattern; - double pad; if (raster->extents.width == 0 || raster->extents.height == 0) goto EMPTY; @@ -3498,14 +3575,41 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, if (pattern->extend != CAIRO_EXTEND_NONE) goto UNBOUNDED; - /* The filter can effectively enlarge the extents of the - * pattern, so extend as necessary. - */ - _cairo_pattern_analyze_filter (pattern, &pad); - x1 = raster->extents.x - pad; - y1 = raster->extents.y - pad; - x2 = raster->extents.x + (int) raster->extents.width + pad; - y2 = raster->extents.y + (int) raster->extents.height + pad; + x1 = raster->extents.x; + y1 = raster->extents.y; + x2 = raster->extents.x + (int) raster->extents.width; + y2 = raster->extents.y + (int) raster->extents.height; + } + HANDLE_FILTER: + switch (pattern->filter) { + case CAIRO_FILTER_NEAREST: + case CAIRO_FILTER_FAST: + round_x = round_y = TRUE; + /* We don't know which way .5 will go, so fudge it slightly. */ + x1 -= 0.004; + y1 -= 0.004; + x2 += 0.004; + y2 += 0.004; + break; + case CAIRO_FILTER_BEST: + /* Assume best filter will produce nice antialiased edges */ + break; + case CAIRO_FILTER_BILINEAR: + case CAIRO_FILTER_GAUSSIAN: + case CAIRO_FILTER_GOOD: + default: + /* These filters can blur the edge out 1/2 pixel when scaling up */ + if (_cairo_hypot (pattern->matrix.xx, pattern->matrix.yx) < 1.0) { + x1 -= 0.5; + x2 += 0.5; + round_x = TRUE; + } + if (_cairo_hypot (pattern->matrix.xy, pattern->matrix.yy) < 1.0) { + y1 -= 0.5; + y2 += 0.5; + round_y = TRUE; + } + break; } break; @@ -3577,6 +3681,10 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, } else { goto UNBOUNDED; } + + /* The current linear renderer just point-samples in the middle + of the pixels, similar to the NEAREST filter: */ + round_x = round_y = TRUE; } break; @@ -3584,22 +3692,8 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, { const cairo_mesh_pattern_t *mesh = (const cairo_mesh_pattern_t *) pattern; - double padx, pady; - cairo_bool_t is_valid; - - is_valid = _cairo_mesh_pattern_coord_box (mesh, &x1, &y1, &x2, &y2); - if (!is_valid) + if (! _cairo_mesh_pattern_coord_box (mesh, &x1, &y1, &x2, &y2)) goto EMPTY; - - padx = pady = 1.; - cairo_matrix_transform_distance (&pattern->matrix, &padx, &pady); - padx = fabs (padx); - pady = fabs (pady); - - x1 -= padx; - y1 -= pady; - x2 += padx; - y2 += pady; } break; @@ -3612,6 +3706,7 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, y1 -= pattern->matrix.y0; y2 -= pattern->matrix.y0; } else { cairo_matrix_t imatrix; + cairo_status_t status; imatrix = pattern->matrix; status = cairo_matrix_invert (&imatrix); @@ -3623,22 +3718,34 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern, NULL); } - x1 = floor (x1); + if (!round_x) { + x1 -= 0.5; + x2 += 0.5; + } if (x1 < CAIRO_RECT_INT_MIN) - x1 = CAIRO_RECT_INT_MIN; - y1 = floor (y1); - if (y1 < CAIRO_RECT_INT_MIN) - y1 = CAIRO_RECT_INT_MIN; - - x2 = ceil (x2); + ix1 = CAIRO_RECT_INT_MIN; + else + ix1 = _cairo_lround (x1); if (x2 > CAIRO_RECT_INT_MAX) - x2 = CAIRO_RECT_INT_MAX; - y2 = ceil (y2); + ix2 = CAIRO_RECT_INT_MAX; + else + ix2 = _cairo_lround (x2); + extents->x = ix1; extents->width = ix2 - ix1; + + if (!round_y) { + y1 -= 0.5; + y2 += 0.5; + } + if (y1 < CAIRO_RECT_INT_MIN) + iy1 = CAIRO_RECT_INT_MIN; + else + iy1 = _cairo_lround (y1); if (y2 > CAIRO_RECT_INT_MAX) - y2 = CAIRO_RECT_INT_MAX; + iy2 = CAIRO_RECT_INT_MAX; + else + iy2 = _cairo_lround (y2); + extents->y = iy1; extents->height = iy2 - iy1; - extents->x = x1; extents->width = x2 - x1; - extents->y = y1; extents->height = y2 - y1; return; UNBOUNDED: @@ -3901,7 +4008,7 @@ _cairo_mesh_pattern_equal (const cairo_mesh_pattern_t *a, for (i = 0; i < num_patches_a; i++) { patch_a = _cairo_array_index_const (&a->patches, i); - patch_b = _cairo_array_index_const (&a->patches, i); + patch_b = _cairo_array_index_const (&b->patches, i); if (memcmp (patch_a, patch_b, sizeof(cairo_mesh_patch_t)) != 0) return FALSE; } @@ -4022,7 +4129,7 @@ cairo_pattern_get_rgba (cairo_pattern_t *pattern, * cairo_pattern_get_surface: * @pattern: a #cairo_pattern_t * @surface: return value for surface of pattern, or %NULL - * + * * Gets the surface of a surface pattern. The reference returned in * @surface is owned by the pattern; the caller should call * cairo_surface_reference() if the surface is to be retained. @@ -4062,8 +4169,9 @@ cairo_pattern_get_surface (cairo_pattern_t *pattern, * @alpha: return value for alpha component of color, or %NULL * * Gets the color and offset information at the given @index for a - * gradient pattern. Values of @index are 0 to 1 less than the number - * returned by cairo_pattern_get_color_stop_count(). + * gradient pattern. Values of @index range from 0 to n-1 + * where n is the number returned + * by cairo_pattern_get_color_stop_count(). * * Return value: %CAIRO_STATUS_SUCCESS, or %CAIRO_STATUS_INVALID_INDEX * if @index is not valid for the given pattern. If the pattern is @@ -4273,7 +4381,7 @@ slim_hidden_def (cairo_mesh_pattern_get_patch_count); * Gets path defining the patch @patch_num for a mesh * pattern. * - * @patch_num can range 0 to 1 less than the number returned by + * @patch_num can range from 0 to n-1 where n is the number returned by * cairo_mesh_pattern_get_patch_count(). * * Return value: the path defining the patch, or a path with status @@ -4366,7 +4474,7 @@ slim_hidden_def (cairo_mesh_pattern_get_path); * Gets the color information in corner @corner_num of patch * @patch_num for a mesh pattern. * - * @patch_num can range 0 to 1 less than the number returned by + * @patch_num can range from 0 to n-1 where n is the number returned by * cairo_mesh_pattern_get_patch_count(). * * Valid values for @corner_num are from 0 to 3 and identify the @@ -4432,7 +4540,7 @@ slim_hidden_def (cairo_mesh_pattern_get_corner_color_rgba); * Gets the control point @point_num of patch @patch_num for a mesh * pattern. * - * @patch_num can range 0 to 1 less than the number returned by + * @patch_num can range from 0 to n-1 where n is the number returned by * cairo_mesh_pattern_get_patch_count(). * * Valid values for @point_num are from 0 to 3 and identify the diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-operators-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-operators-private.h index 5d36879152c..5d36879152c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-operators-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-operators-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-operators.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-operators.c index fceaf1cc4b1..48ae3a675b9 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-operators.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-operators.c @@ -284,7 +284,7 @@ _word_wrap_stream_count_string_up_to (word_wrap_stream_t *stream, _cairo_output_stream_write (stream->output, data, count); if (newline) { - _cairo_output_stream_printf (stream->output, "\\\n"); + _cairo_output_stream_printf (stream->output, ")\n("); stream->column = 0; } @@ -510,7 +510,9 @@ _cairo_pdf_operators_emit_path (cairo_pdf_operators_t *pdf_operators, info.output = word_wrap; info.path_transform = path_transform; info.line_cap = line_cap; - if (_cairo_path_fixed_is_rectangle (path, &box)) { + if (_cairo_path_fixed_is_rectangle (path, &box) && + ((path_transform->xx == 0 && path_transform->yy == 0) || + (path_transform->xy == 0 && path_transform->yx == 0))) { status = _cairo_pdf_path_rectangle (&info, &box); } else { status = _cairo_path_fixed_interpret (path, @@ -828,10 +830,9 @@ _cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t *pdf_operators, return status; if (has_ctm) { - _cairo_output_stream_printf (pdf_operators->stream, - "q %f %f %f %f %f %f cm\n", - m.xx, m.yx, m.xy, m.yy, - m.x0, m.y0); + _cairo_output_stream_printf (pdf_operators->stream, "q "); + _cairo_output_stream_print_matrix (pdf_operators->stream, &m); + _cairo_output_stream_printf (pdf_operators->stream, " cm\n"); } else { path_transform = pdf_operators->cairo_to_pdf; } @@ -1120,14 +1121,8 @@ _cairo_pdf_operators_set_text_matrix (cairo_pdf_operators_t *pdf_operators, pdf_operators->cur_x = 0; pdf_operators->cur_y = 0; pdf_operators->glyph_buf_x_pos = 0; - _cairo_output_stream_printf (pdf_operators->stream, - "%f %f %f %f %f %f Tm\n", - pdf_operators->text_matrix.xx, - pdf_operators->text_matrix.yx, - pdf_operators->text_matrix.xy, - pdf_operators->text_matrix.yy, - pdf_operators->text_matrix.x0, - pdf_operators->text_matrix.y0); + _cairo_output_stream_print_matrix (pdf_operators->stream, &pdf_operators->text_matrix); + _cairo_output_stream_printf (pdf_operators->stream, " Tm\n"); pdf_operators->cairo_to_pdftext = *matrix; status = cairo_matrix_invert (&pdf_operators->cairo_to_pdftext); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-shading-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-shading-private.h index 0ca8cb7d518..0ca8cb7d518 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-shading-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-shading-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-shading.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-shading.c index 646e2cd4902..646e2cd4902 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-shading.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-shading.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-surface-private.h index d9f65d80016..618ca4ede9f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-surface-private.h @@ -70,9 +70,12 @@ typedef struct _cairo_pdf_source_surface_entry { unsigned int id; unsigned char *unique_id; unsigned long unique_id_length; + cairo_operator_t operator; cairo_bool_t interpolate; cairo_bool_t stencil_mask; + cairo_bool_t smask; cairo_pdf_resource_t surface_res; + cairo_pdf_resource_t smask_res; int width; int height; cairo_rectangle_int_t extents; @@ -92,6 +95,7 @@ typedef struct _cairo_pdf_pattern { cairo_pattern_t *pattern; cairo_pdf_resource_t pattern_res; cairo_pdf_resource_t gstate_res; + cairo_operator_t operator; cairo_bool_t is_shading; } cairo_pdf_pattern_t; @@ -127,6 +131,13 @@ typedef struct _cairo_pdf_smask_group { cairo_scaled_font_t *scaled_font; } cairo_pdf_smask_group_t; +typedef struct _cairo_pdf_jbig2_global { + unsigned char *id; + unsigned long id_length; + cairo_pdf_resource_t res; + cairo_bool_t emitted; +} cairo_pdf_jbig2_global_t; + typedef struct _cairo_pdf_surface cairo_pdf_surface_t; struct _cairo_pdf_surface { @@ -149,6 +160,7 @@ struct _cairo_pdf_surface { cairo_hash_table_t *all_surfaces; cairo_array_t smask_groups; cairo_array_t knockout_group; + cairo_array_t jbig2_global; cairo_scaled_font_subsets_t *font_subsets; cairo_array_t fonts; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-surface.c index 6580d5b6945..602d5192392 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf-surface.c @@ -130,6 +130,23 @@ * * The PDF surface is used to render cairo graphics to Adobe * PDF files and is a multi-page vector surface backend. + * + * The following mime types are supported: %CAIRO_MIME_TYPE_JPEG, + * %CAIRO_MIME_TYPE_JP2, %CAIRO_MIME_TYPE_UNIQUE_ID, + * %CAIRO_MIME_TYPE_JBIG2, %CAIRO_MIME_TYPE_JBIG2_GLOBAL, + * %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID. + * + * JBIG2 data in PDF must be in the embedded format as descibed in + * ISO/IEC 11544. Image specific JBIG2 data must be in + * %CAIRO_MIME_TYPE_JBIG2. Any global segments in the JBIG2 data + * (segments with page association field set to 0) must be in + * %CAIRO_MIME_TYPE_JBIG2_GLOBAL. The global data may be shared by + * multiple images. All images sharing the same global data must set + * %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID to a unique identifer. At least + * one of the images must provide the global data using + * %CAIRO_MIME_TYPE_JBIG2_GLOBAL. The global data will only be + * embedded once but shared by all JBIG2 images with the same + * %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID. **/ static cairo_bool_t @@ -164,6 +181,9 @@ static const char *_cairo_pdf_supported_mime_types[] = CAIRO_MIME_TYPE_JPEG, CAIRO_MIME_TYPE_JP2, CAIRO_MIME_TYPE_UNIQUE_ID, + CAIRO_MIME_TYPE_JBIG2, + CAIRO_MIME_TYPE_JBIG2_GLOBAL, + CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID, NULL }; @@ -364,6 +384,7 @@ _cairo_pdf_surface_create_for_stream_internal (cairo_output_stream_t *output, _cairo_array_init (&surface->page_patterns, sizeof (cairo_pdf_pattern_t)); _cairo_array_init (&surface->page_surfaces, sizeof (cairo_pdf_source_surface_t)); + _cairo_array_init (&surface->jbig2_global, sizeof (cairo_pdf_jbig2_global_t)); surface->all_surfaces = _cairo_hash_table_create (_cairo_pdf_source_surface_equal); if (unlikely (surface->all_surfaces == NULL)) { status = _cairo_error (CAIRO_STATUS_NO_MEMORY); @@ -1174,6 +1195,20 @@ _cairo_pdf_surface_release_source_image_from_pattern (cairo_pdf_surface_t } static cairo_int_status_t +_get_jbig2_image_info (cairo_surface_t *source, + cairo_image_info_t *info, + const unsigned char **mime_data, + unsigned long *mime_data_length) +{ + cairo_surface_get_mime_data (source, CAIRO_MIME_TYPE_JBIG2, + mime_data, mime_data_length); + if (*mime_data == NULL) + return CAIRO_INT_STATUS_UNSUPPORTED; + + return _cairo_image_info_get_jbig2_info (info, *mime_data, *mime_data_length); +} + +static cairo_int_status_t _get_jpx_image_info (cairo_surface_t *source, cairo_image_info_t *info, const unsigned char **mime_data, @@ -1250,6 +1285,15 @@ _get_source_surface_size (cairo_surface_t *source, extents->x = 0; extents->y = 0; + status = _get_jbig2_image_info (source, &info, &mime_data, &mime_data_length); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) { + *width = info.width; + *height = info.height; + extents->width = info.width; + extents->height = info.height; + return status; + } + status = _get_jpx_image_info (source, &info, &mime_data, &mime_data_length); if (status != CAIRO_INT_STATUS_UNSUPPORTED) { *width = info.width; @@ -1282,9 +1326,12 @@ _get_source_surface_size (cairo_surface_t *source, * @surface: the pdf surface * @source_surface: A #cairo_surface_t to use as the source surface * @source_pattern: A #cairo_pattern_t of type SURFACE or RASTER_SOURCE to use as the source + * @op: the operator used to composite this source * @filter: filter type of the source pattern * @stencil_mask: if true, the surface will be written to the PDF as an /ImageMask + * @smask: if true, only the alpha channel will be written (images only) * @extents: extents of the operation that is using this source + * @smask_res: if not NULL, the image written will specify this resource as the smask for the image (images only) * @surface_res: return PDF resource number of the surface * @width: returns width of surface * @height: returns height of surface @@ -1306,9 +1353,12 @@ static cairo_int_status_t _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t *surface, cairo_surface_t *source_surface, const cairo_pattern_t *source_pattern, + cairo_operator_t op, cairo_filter_t filter, cairo_bool_t stencil_mask, + cairo_bool_t smask, const cairo_rectangle_int_t *extents, + cairo_pdf_resource_t *smask_res, cairo_pdf_resource_t *surface_res, int *width, int *height, @@ -1406,13 +1456,19 @@ release_source: } surface_entry->id = surface_key.id; + surface_entry->operator = op; surface_entry->interpolate = interpolate; surface_entry->stencil_mask = stencil_mask; + surface_entry->smask = smask; surface_entry->unique_id_length = unique_id_length; surface_entry->unique_id = unique_id; surface_entry->width = *width; surface_entry->height = *height; surface_entry->extents = *source_extents; + if (smask_res) + surface_entry->smask_res = *smask_res; + else + surface_entry->smask_res.id = 0; _cairo_pdf_source_surface_init_key (surface_entry); src_surface.hash_entry = surface_entry; @@ -1466,6 +1522,7 @@ fail1: static cairo_int_status_t _cairo_pdf_surface_add_pdf_pattern_or_shading (cairo_pdf_surface_t *surface, const cairo_pattern_t *pattern, + cairo_operator_t op, const cairo_rectangle_int_t *extents, cairo_bool_t is_shading, cairo_pdf_resource_t *pattern_res, @@ -1475,6 +1532,7 @@ _cairo_pdf_surface_add_pdf_pattern_or_shading (cairo_pdf_surface_t *surface, cairo_int_status_t status; pdf_pattern.is_shading = is_shading; + pdf_pattern.operator = op; /* Solid colors are emitted into the content stream */ if (pattern->type == CAIRO_PATTERN_TYPE_SOLID) { @@ -1550,12 +1608,14 @@ _get_bbox_from_extents (double surface_height, static cairo_int_status_t _cairo_pdf_surface_add_pdf_shading (cairo_pdf_surface_t *surface, const cairo_pattern_t *pattern, + cairo_operator_t op, const cairo_rectangle_int_t *extents, cairo_pdf_resource_t *shading_res, cairo_pdf_resource_t *gstate_res) { return _cairo_pdf_surface_add_pdf_pattern_or_shading (surface, pattern, + op, extents, TRUE, shading_res, @@ -1565,12 +1625,14 @@ _cairo_pdf_surface_add_pdf_shading (cairo_pdf_surface_t *surface, static cairo_int_status_t _cairo_pdf_surface_add_pdf_pattern (cairo_pdf_surface_t *surface, const cairo_pattern_t *pattern, + cairo_operator_t op, const cairo_rectangle_int_t *extents, cairo_pdf_resource_t *pattern_res, cairo_pdf_resource_t *gstate_res) { return _cairo_pdf_surface_add_pdf_pattern_or_shading (surface, pattern, + op, extents, FALSE, pattern_res, @@ -1846,7 +1908,8 @@ static cairo_int_status_t _cairo_pdf_surface_open_content_stream (cairo_pdf_surface_t *surface, const cairo_box_double_t *bbox, cairo_pdf_resource_t *resource, - cairo_bool_t is_form) + cairo_bool_t is_form, + cairo_bool_t is_group) { cairo_int_status_t status; @@ -1860,25 +1923,41 @@ _cairo_pdf_surface_open_content_stream (cairo_pdf_surface_t *surface, if (is_form) { assert (bbox != NULL); - status = - _cairo_pdf_surface_open_stream (surface, - resource, - surface->compress_content, - " /Type /XObject\n" - " /Subtype /Form\n" - " /BBox [ %f %f %f %f ]\n" - " /Group <<\n" - " /Type /Group\n" - " /S /Transparency\n" - " /I true\n" - " /CS /DeviceRGB\n" - " >>\n" - " /Resources %d 0 R\n", - bbox->p1.x, - bbox->p1.y, - bbox->p2.x, - bbox->p2.y, - surface->content_resources.id); + if (is_group) { + status = + _cairo_pdf_surface_open_stream (surface, + resource, + surface->compress_content, + " /Type /XObject\n" + " /Subtype /Form\n" + " /BBox [ %f %f %f %f ]\n" + " /Group <<\n" + " /Type /Group\n" + " /S /Transparency\n" + " /I true\n" + " /CS /DeviceRGB\n" + " >>\n" + " /Resources %d 0 R\n", + bbox->p1.x, + bbox->p1.y, + bbox->p2.x, + bbox->p2.y, + surface->content_resources.id); + } else { + status = + _cairo_pdf_surface_open_stream (surface, + resource, + surface->compress_content, + " /Type /XObject\n" + " /Subtype /Form\n" + " /BBox [ %f %f %f %f ]\n" + " /Resources %d 0 R\n", + bbox->p1.x, + bbox->p1.y, + bbox->p2.x, + bbox->p2.y, + surface->content_resources.id); + } } else { status = _cairo_pdf_surface_open_stream (surface, @@ -1943,6 +2022,8 @@ _cairo_pdf_surface_finish (void *abstract_surface) long offset; cairo_pdf_resource_t info, catalog; cairo_status_t status, status2; + int size, i; + cairo_pdf_jbig2_global_t *global; status = surface->base.status; if (status == CAIRO_STATUS_SUCCESS) @@ -2030,6 +2111,17 @@ _cairo_pdf_surface_finish (void *abstract_surface) surface->font_subsets = NULL; } + size = _cairo_array_num_elements (&surface->jbig2_global); + for (i = 0; i < size; i++) { + global = (cairo_pdf_jbig2_global_t *) _cairo_array_index (&surface->jbig2_global, i); + free(global->id); + if (!global->emitted) + return _cairo_error (CAIRO_STATUS_JBIG2_GLOBAL_MISSING); + } + _cairo_array_fini (&surface->jbig2_global); + + _cairo_array_truncate (&surface->page_surfaces, 0); + _cairo_surface_clipper_reset (&surface->clipper); return status; @@ -2079,7 +2171,7 @@ _cairo_pdf_surface_has_fallback_images (void *abstract_surface, bbox.p1.y = 0; bbox.p2.x = surface->width; bbox.p2.y = surface->height; - status = _cairo_pdf_surface_open_content_stream (surface, &bbox, NULL, has_fallbacks); + status = _cairo_pdf_surface_open_content_stream (surface, &bbox, NULL, has_fallbacks, has_fallbacks); if (unlikely (status)) return status; @@ -2154,9 +2246,12 @@ _cairo_pdf_surface_add_padded_image_surface (cairo_pdf_surface_t *surfa status = _cairo_pdf_surface_add_source_surface (surface, pad_image, NULL, + FALSE, source->filter, FALSE, + FALSE, extents, + NULL, surface_res, width, height, @@ -2187,21 +2282,13 @@ BAIL: return status; } -/* Emit alpha channel from the image into the given data, providing - * an id that can be used to reference the resulting SMask object. - * - * In the case that the alpha channel happens to be all opaque, then - * no SMask object will be emitted and *id_ret will be set to 0. - * - * When stencil_mask is TRUE, stream_res is an an input specifying the - * resource to use. When stencil_mask is FALSE, a new resource will be - * created and returned in stream_res. +/* Emit alpha channel from the image into stream_res. */ static cairo_int_status_t _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, cairo_image_surface_t *image, cairo_bool_t stencil_mask, - const char *interpolate, + cairo_bool_t interpolate, cairo_pdf_resource_t *stream_res) { cairo_int_status_t status = CAIRO_STATUS_SUCCESS; @@ -2214,6 +2301,7 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, /* This is the only image format we support, which simplifies things. */ assert (image->format == CAIRO_FORMAT_ARGB32 || + image->format == CAIRO_FORMAT_RGB24 || image->format == CAIRO_FORMAT_A8 || image->format == CAIRO_FORMAT_A1 ); @@ -2222,11 +2310,10 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, assert (transparency == CAIRO_IMAGE_IS_OPAQUE || transparency == CAIRO_IMAGE_HAS_BILEVEL_ALPHA); } else { - if (transparency == CAIRO_IMAGE_IS_OPAQUE) - return status; + assert (transparency != CAIRO_IMAGE_IS_OPAQUE); } - if (transparency == CAIRO_IMAGE_HAS_BILEVEL_ALPHA) { + if (transparency == CAIRO_IMAGE_HAS_BILEVEL_ALPHA || transparency == CAIRO_IMAGE_IS_OPAQUE) { alpha_size = (image->width + 7) / 8 * image->height; alpha = _cairo_malloc_ab ((image->width+7) / 8, image->height); } else { @@ -2241,7 +2328,10 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, i = 0; for (y = 0; y < image->height; y++) { - if (image->format == CAIRO_FORMAT_A1) { + if (transparency == CAIRO_IMAGE_IS_OPAQUE) { + for (x = 0; x < (image->width + 7) / 8; x++) + alpha[i++] = 0xff; + } else if (image->format == CAIRO_FORMAT_A1) { pixel8 = (uint8_t *) (image->data + y * image->stride); for (x = 0; x < (image->width + 7) / 8; x++, pixel8++) { @@ -2293,11 +2383,11 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, " /Interpolate %s\n" " /BitsPerComponent 1\n" " /Decode [1 0]\n", - image->width, image->height, interpolate); + image->width, image->height, + interpolate ? "true" : "false"); } else { - stream_res->id = 0; status = _cairo_pdf_surface_open_stream (surface, - NULL, + stream_res, TRUE, " /Type /XObject\n" " /Subtype /Image\n" @@ -2306,15 +2396,13 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, " /ColorSpace /DeviceGray\n" " /Interpolate %s\n" " /BitsPerComponent %d\n", - image->width, image->height, interpolate, + image->width, image->height, + interpolate ? "true" : "false", transparency == CAIRO_IMAGE_HAS_ALPHA ? 8 : 1); } if (unlikely (status)) goto CLEANUP_ALPHA; - if (!stencil_mask) - *stream_res = surface->pdf_stream.self; - _cairo_output_stream_write (surface->output, alpha, alpha_size); status = _cairo_pdf_surface_close_stream (surface); @@ -2324,14 +2412,21 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, return status; } -/* Emit image data into the given surface, providing a resource that - * can be used to reference the data in image_ret. */ +/** + * _cairo_pdf_surface_emit_image: + * @surface: the pdf surface + * @image_surf: The image to write + * @surface_entry: Contains image resource, smask resource, interpolate and stencil mask parameters. + * + * Emit an image stream using the @image_res resource and write out + * the image data from @image_surf. If @smask_res is not null, @smask_res will + * be specified as the smask for the image. Otherwise emit the an smask if + * the image is requires one. + **/ static cairo_int_status_t -_cairo_pdf_surface_emit_image (cairo_pdf_surface_t *surface, - cairo_image_surface_t *image_surf, - cairo_pdf_resource_t *image_res, - cairo_filter_t filter, - cairo_bool_t stencil_mask) +_cairo_pdf_surface_emit_image (cairo_pdf_surface_t *surface, + cairo_image_surface_t *image_surf, + cairo_pdf_source_surface_entry_t *surface_entry) { cairo_int_status_t status = CAIRO_STATUS_SUCCESS; char *data; @@ -2340,9 +2435,10 @@ _cairo_pdf_surface_emit_image (cairo_pdf_surface_t *surface, int i, x, y, bit; cairo_pdf_resource_t smask = {0}; /* squelch bogus compiler warning */ cairo_bool_t need_smask; - const char *interpolate = "true"; cairo_image_color_t color; cairo_image_surface_t *image; + cairo_image_transparency_t transparency; + char smask_buf[30]; image = image_surf; if (image->format != CAIRO_FORMAT_RGB24 && @@ -2371,22 +2467,13 @@ _cairo_pdf_surface_emit_image (cairo_pdf_surface_t *surface, goto CLEANUP; } - switch (filter) { - case CAIRO_FILTER_GOOD: - case CAIRO_FILTER_BEST: - case CAIRO_FILTER_BILINEAR: - interpolate = "true"; - break; - case CAIRO_FILTER_FAST: - case CAIRO_FILTER_NEAREST: - case CAIRO_FILTER_GAUSSIAN: - interpolate = "false"; - break; + if (surface_entry->smask || surface_entry->stencil_mask) { + return _cairo_pdf_surface_emit_smask (surface, image, + surface_entry->stencil_mask, + surface_entry->interpolate, + &surface_entry->surface_res); } - if (stencil_mask) - return _cairo_pdf_surface_emit_smask (surface, image, stencil_mask, interpolate, image_res); - color = _cairo_image_analyze_color (image); switch (color) { default: @@ -2471,46 +2558,53 @@ _cairo_pdf_surface_emit_image (cairo_pdf_surface_t *surface, i++; } - need_smask = FALSE; - if (image->format == CAIRO_FORMAT_ARGB32 || - image->format == CAIRO_FORMAT_A8 || - image->format == CAIRO_FORMAT_A1) { - status = _cairo_pdf_surface_emit_smask (surface, image, FALSE, interpolate, &smask); - if (unlikely (status)) - goto CLEANUP_RGB; + if (surface_entry->smask_res.id != 0) { + need_smask = TRUE; + smask = surface_entry->smask_res; + } else { + need_smask = FALSE; + if (image->format == CAIRO_FORMAT_ARGB32 || + image->format == CAIRO_FORMAT_A8 || + image->format == CAIRO_FORMAT_A1) + { + transparency = _cairo_image_analyze_transparency (image); + if (transparency != CAIRO_IMAGE_IS_OPAQUE) { + need_smask = TRUE; + smask = _cairo_pdf_surface_new_object (surface); + if (smask.id == 0) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto CLEANUP_RGB; + } - if (smask.id) - need_smask = TRUE; + status = _cairo_pdf_surface_emit_smask (surface, image, FALSE, surface_entry->interpolate, &smask); + if (unlikely (status)) + goto CLEANUP_RGB; + } + } } -#define IMAGE_DICTIONARY " /Type /XObject\n" \ - " /Subtype /Image\n" \ - " /Width %d\n" \ - " /Height %d\n" \ - " /ColorSpace %s\n" \ - " /Interpolate %s\n" \ - " /BitsPerComponent %d\n" - if (need_smask) - status = _cairo_pdf_surface_open_stream (surface, - image_res, - TRUE, - IMAGE_DICTIONARY - " /SMask %d 0 R\n", - image->width, image->height, - color == CAIRO_IMAGE_IS_COLOR ? "/DeviceRGB" : "/DeviceGray", - interpolate, - color == CAIRO_IMAGE_IS_MONOCHROME? 1 : 8, - smask.id); + snprintf(smask_buf, sizeof(smask_buf), " /SMask %d 0 R\n", smask.id); else - status = _cairo_pdf_surface_open_stream (surface, - image_res, - TRUE, - IMAGE_DICTIONARY, - image->width, image->height, - color == CAIRO_IMAGE_IS_COLOR ? "/DeviceRGB" : "/DeviceGray", - interpolate, - color == CAIRO_IMAGE_IS_MONOCHROME? 1 : 8); + smask_buf[0] = 0; + + status = _cairo_pdf_surface_open_stream (surface, + &surface_entry->surface_res, + TRUE, + " /Type /XObject\n" + " /Subtype /Image\n" + " /Width %d\n" + " /Height %d\n" + " /ColorSpace %s\n" + " /Interpolate %s\n" + " /BitsPerComponent %d\n" + "%s", + image->width, + image->height, + color == CAIRO_IMAGE_IS_COLOR ? "/DeviceRGB" : "/DeviceGray", + surface_entry->interpolate ? "true" : "false", + color == CAIRO_IMAGE_IS_MONOCHROME? 1 : 8, + smask_buf); if (unlikely (status)) goto CLEANUP_RGB; @@ -2529,14 +2623,165 @@ CLEANUP: } static cairo_int_status_t -_cairo_pdf_surface_emit_jpx_image (cairo_pdf_surface_t *surface, - cairo_surface_t *source, - cairo_pdf_resource_t res) +_cairo_pdf_surface_lookup_jbig2_global (cairo_pdf_surface_t *surface, + const unsigned char *global_id, + unsigned long global_id_length, + cairo_pdf_jbig2_global_t **entry) +{ + cairo_pdf_jbig2_global_t global; + int size, i; + cairo_int_status_t status; + + size = _cairo_array_num_elements (&surface->jbig2_global); + for (i = 0; i < size; i++) { + *entry = (cairo_pdf_jbig2_global_t *) _cairo_array_index (&surface->jbig2_global, i); + if ((*entry)->id && global_id && (*entry)->id_length == global_id_length + && memcmp((*entry)->id, global_id, global_id_length) == 0) { + return CAIRO_STATUS_SUCCESS; + } + } + + global.id = malloc(global_id_length); + if (unlikely (global.id == NULL)) { + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } + + memcpy (global.id, global_id, global_id_length); + global.id_length = global_id_length; + global.res = _cairo_pdf_surface_new_object (surface); + if (global.res.id == 0) { + free(global.id); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } + + global.emitted = FALSE; + status = _cairo_array_append (&surface->jbig2_global, &global); + if (unlikely(status)) + return status; + + size = _cairo_array_num_elements (&surface->jbig2_global); + *entry = (cairo_pdf_jbig2_global_t *) _cairo_array_index (&surface->jbig2_global, size - 1); + return CAIRO_STATUS_SUCCESS; +} + +static cairo_int_status_t +_cairo_pdf_surface_emit_jbig2_image (cairo_pdf_surface_t *surface, + cairo_surface_t *source, + cairo_pdf_source_surface_entry_t *surface_entry) +{ + cairo_int_status_t status; + const unsigned char *mime_data; + unsigned long mime_data_length; + cairo_image_info_t info; + const unsigned char *global_id; + unsigned long global_id_length; + const unsigned char *global_data; + unsigned long global_data_length; + cairo_pdf_jbig2_global_t *global_entry; + char smask_buf[30]; + char decode_parms_buf[100]; + + cairo_surface_get_mime_data (source, CAIRO_MIME_TYPE_JBIG2, + &mime_data, &mime_data_length); + if (mime_data == NULL) + return CAIRO_INT_STATUS_UNSUPPORTED; + + status = _cairo_image_info_get_jbig2_info (&info, mime_data, mime_data_length); + if (status) + return status; + + cairo_surface_get_mime_data (source, CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID, + &global_id, &global_id_length); + if (global_id && global_id_length > 0) { + status = _cairo_pdf_surface_lookup_jbig2_global (surface, global_id, global_id_length, &global_entry); + if (unlikely(status)) + return status; + + if (!global_entry->emitted) { + cairo_surface_get_mime_data (source, CAIRO_MIME_TYPE_JBIG2_GLOBAL, + &global_data, &global_data_length); + if (global_data) { + status = _cairo_pdf_surface_open_stream (surface, &global_entry->res, FALSE, NULL); + if (unlikely(status)) + return status; + + _cairo_output_stream_write (surface->output, global_data, global_data_length); + status = _cairo_pdf_surface_close_stream (surface); + if (unlikely(status)) + return status; + + global_entry->emitted = TRUE; + } + } + + snprintf(decode_parms_buf, sizeof(decode_parms_buf), + " /DecodeParms << /JBIG2Globals %d 0 R >>\n", global_entry->res.id); + } else { + decode_parms_buf[0] = 0; + } + + if (surface_entry->smask_res.id) + snprintf(smask_buf, sizeof(smask_buf), " /SMask %d 0 R\n", surface_entry->smask_res.id); + else + smask_buf[0] = 0; + + if (surface_entry->stencil_mask) { + status = _cairo_pdf_surface_open_stream (surface, + &surface_entry->surface_res, + FALSE, + " /Type /XObject\n" + " /Subtype /Image\n" + " /ImageMask true\n" + " /Width %d\n" + " /Height %d\n" + " /Interpolate %s\n" + " /BitsPerComponent 1\n" + " /Decode [1 0]\n" + " /Filter /JPXDecode\n" + "%s", + info.width, + info.height, + surface_entry->interpolate ? "true" : "false", + decode_parms_buf); + } else { + status = _cairo_pdf_surface_open_stream (surface, + &surface_entry->surface_res, + FALSE, + " /Type /XObject\n" + " /Subtype /Image\n" + " /Width %d\n" + " /Height %d\n" + " /ColorSpace /DeviceGray\n" + " /BitsPerComponent 1\n" + " /Interpolate %s\n" + "%s" + " /Filter /JBIG2Decode\n" + "%s", + info.width, + info.height, + surface_entry->interpolate ? "true" : "false", + smask_buf, + decode_parms_buf); + } + if (unlikely(status)) + return status; + + _cairo_output_stream_write (surface->output, mime_data, mime_data_length); + status = _cairo_pdf_surface_close_stream (surface); + + return status; +} + +static cairo_int_status_t +_cairo_pdf_surface_emit_jpx_image (cairo_pdf_surface_t *surface, + cairo_surface_t *source, + cairo_pdf_source_surface_entry_t *surface_entry) { cairo_int_status_t status; const unsigned char *mime_data; unsigned long mime_data_length; cairo_image_info_t info; + char smask_buf[30]; if (surface->pdf_version < CAIRO_PDF_VERSION_1_5) return CAIRO_INT_STATUS_UNSUPPORTED; @@ -2550,16 +2795,49 @@ _cairo_pdf_surface_emit_jpx_image (cairo_pdf_surface_t *surface, if (status) return status; - status = _cairo_pdf_surface_open_stream (surface, - &res, - FALSE, - " /Type /XObject\n" - " /Subtype /Image\n" - " /Width %d\n" - " /Height %d\n" - " /Filter /JPXDecode\n", - info.width, - info.height); + if ((surface_entry->smask || surface_entry->stencil_mask) && info.num_components != 1) + return CAIRO_INT_STATUS_UNSUPPORTED; + + if ((surface_entry->stencil_mask) && info.bits_per_component != 1) + return CAIRO_INT_STATUS_UNSUPPORTED; + + if (surface_entry->smask_res.id) + snprintf(smask_buf, sizeof(smask_buf), " /SMask %d 0 R\n", surface_entry->smask_res.id); + else + smask_buf[0] = 0; + + if (surface_entry->stencil_mask) { + status = _cairo_pdf_surface_open_stream (surface, + &surface_entry->surface_res, + FALSE, + " /Type /XObject\n" + " /Subtype /Image\n" + " /ImageMask true\n" + " /Width %d\n" + " /Height %d\n" + " /Interpolate %s\n" + " /BitsPerComponent 1\n" + " /Decode [1 0]\n" + " /Filter /JPXDecode\n", + info.width, + info.height, + surface_entry->interpolate ? "true" : "false"); + } else { + status = _cairo_pdf_surface_open_stream (surface, + &surface_entry->surface_res, + FALSE, + " /Type /XObject\n" + " /Subtype /Image\n" + " /Width %d\n" + " /Height %d\n" + " /Interpolate %s\n" + "%s" + " /Filter /JPXDecode\n", + info.width, + info.height, + surface_entry->interpolate ? "true" : "false", + smask_buf); + } if (status) return status; @@ -2570,15 +2848,16 @@ _cairo_pdf_surface_emit_jpx_image (cairo_pdf_surface_t *surface, } static cairo_int_status_t -_cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t *surface, - cairo_surface_t *source, - cairo_pdf_resource_t res) +_cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t *surface, + cairo_surface_t *source, + cairo_pdf_source_surface_entry_t *surface_entry) { cairo_int_status_t status; const unsigned char *mime_data; unsigned long mime_data_length; cairo_image_info_t info; const char *colorspace; + char smask_buf[30]; cairo_surface_get_mime_data (source, CAIRO_MIME_TYPE_JPEG, &mime_data, &mime_data_length); @@ -2591,6 +2870,12 @@ _cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t *surface, if (unlikely (status)) return status; + if ((surface_entry->smask || surface_entry->stencil_mask) && info.num_components != 1) + return CAIRO_INT_STATUS_UNSUPPORTED; + + if ((surface_entry->stencil_mask) && info.bits_per_component != 1) + return CAIRO_INT_STATUS_UNSUPPORTED; + switch (info.num_components) { case 1: colorspace = "/DeviceGray"; @@ -2605,20 +2890,47 @@ _cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t *surface, return CAIRO_INT_STATUS_UNSUPPORTED; } - status = _cairo_pdf_surface_open_stream (surface, - &res, - FALSE, - " /Type /XObject\n" - " /Subtype /Image\n" - " /Width %d\n" - " /Height %d\n" - " /ColorSpace %s\n" - " /BitsPerComponent %d\n" - " /Filter /DCTDecode\n", - info.width, - info.height, - colorspace, - info.bits_per_component); + if (surface_entry->smask_res.id) + snprintf(smask_buf, sizeof(smask_buf), " /SMask %d 0 R\n", surface_entry->smask_res.id); + else + smask_buf[0] = 0; + + if (surface_entry->stencil_mask) { + status = _cairo_pdf_surface_open_stream (surface, + &surface_entry->surface_res, + FALSE, + " /Type /XObject\n" + " /Subtype /Image\n" + " /ImageMask true\n" + " /Width %d\n" + " /Height %d\n" + " /Interpolate %s\n" + " /BitsPerComponent 1\n" + " /Decode [1 0]\n" + " /Filter /DCTDecode\n", + info.width, + info.height, + surface_entry->interpolate ? "true" : "false"); + } else { + status = _cairo_pdf_surface_open_stream (surface, + &surface_entry->surface_res, + FALSE, + " /Type /XObject\n" + " /Subtype /Image\n" + " /Width %d\n" + " /Height %d\n" + " /ColorSpace %s\n" + " /Interpolate %s\n" + " /BitsPerComponent %d\n" + "%s" + " /Filter /DCTDecode\n", + info.width, + info.height, + colorspace, + surface_entry->interpolate ? "true" : "false", + info.bits_per_component, + smask_buf); + } if (unlikely (status)) return status; @@ -2637,6 +2949,20 @@ _cairo_pdf_surface_emit_image_surface (cairo_pdf_surface_t *surface, cairo_int_status_t status; if (source->type == CAIRO_PATTERN_TYPE_SURFACE) { + status = _cairo_pdf_surface_emit_jbig2_image (surface, source->surface, source->hash_entry); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; + + status = _cairo_pdf_surface_emit_jpx_image (surface, source->surface, source->hash_entry); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; + + status = _cairo_pdf_surface_emit_jpeg_image (surface, source->surface, source->hash_entry); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; + } + + if (source->type == CAIRO_PATTERN_TYPE_SURFACE) { status = _cairo_surface_acquire_source_image (source->surface, &image, &image_extra); } else { status = _cairo_pdf_surface_acquire_source_image_from_pattern (surface, source->raster_pattern, @@ -2645,22 +2971,10 @@ _cairo_pdf_surface_emit_image_surface (cairo_pdf_surface_t *surface, if (unlikely (status)) return status; - if (!source->hash_entry->stencil_mask) { - status = _cairo_pdf_surface_emit_jpx_image (surface, &image->base, source->hash_entry->surface_res); - if (status != CAIRO_INT_STATUS_UNSUPPORTED) - goto release_source; + status = _cairo_pdf_surface_emit_image (surface, + image, + source->hash_entry); - status = _cairo_pdf_surface_emit_jpeg_image (surface, &image->base, source->hash_entry->surface_res); - if (status != CAIRO_INT_STATUS_UNSUPPORTED) - goto release_source; - } - - status = _cairo_pdf_surface_emit_image (surface, image, - &source->hash_entry->surface_res, - source->hash_entry->interpolate, - source->hash_entry->stencil_mask); - -release_source: if (source->type == CAIRO_PATTERN_TYPE_SURFACE) _cairo_surface_release_source_image (source->surface, image, image_extra); else @@ -2686,6 +3000,8 @@ _cairo_pdf_surface_emit_recording_surface (cairo_pdf_surface_t *surface, int width; int height; cairo_bool_t is_subsurface; + cairo_bool_t transparency_group; + cairo_recording_surface_t *recording; assert (pdf_source->type == CAIRO_PATTERN_TYPE_SURFACE); extents = &pdf_source->hash_entry->extents; @@ -2705,6 +3021,9 @@ _cairo_pdf_surface_emit_recording_surface (cairo_pdf_surface_t *surface, is_subsurface = TRUE; } + assert (source->type == CAIRO_SURFACE_TYPE_RECORDING); + recording = (cairo_recording_surface_t *) source; + old_width = surface->width; old_height = surface->height; old_paginated_mode = surface->paginated_mode; @@ -2721,7 +3040,16 @@ _cairo_pdf_surface_emit_recording_surface (cairo_pdf_surface_t *surface, surface->paginated_mode = CAIRO_PAGINATED_MODE_RENDER; _cairo_pdf_group_resources_clear (&surface->resources); _get_bbox_from_extents (height, extents, &bbox); - status = _cairo_pdf_surface_open_content_stream (surface, &bbox, &pdf_source->hash_entry->surface_res, TRUE); + + /* We can optimize away the transparency group allowing the viewer + * to replay the group in place when all operators are OVER and the + * recording contains only opaque and/or clear alpha. + */ + transparency_group = !(pdf_source->hash_entry->operator == CAIRO_OPERATOR_OVER && + _cairo_recording_surface_has_only_bilevel_alpha (recording) && + _cairo_recording_surface_has_only_op_over (recording)); + status = _cairo_pdf_surface_open_content_stream (surface, &bbox, &pdf_source->hash_entry->surface_res, + TRUE, transparency_group); if (unlikely (status)) goto err; @@ -2805,9 +3133,12 @@ _cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t *surface, status = _cairo_pdf_surface_add_source_surface (surface, NULL, pattern, + pdf_pattern->operator, pattern->filter, FALSE, + FALSE, &pdf_pattern->extents, + NULL, &pattern_resource, &pattern_width, &pattern_height, @@ -3518,11 +3849,11 @@ _cairo_pdf_surface_output_gradient (cairo_pdf_surface_t *surface, _cairo_output_stream_printf (surface->output, "<< /Type /Pattern\n" " /PatternType 2\n" - " /Matrix [ %f %f %f %f %f %f ]\n" - " /Shading\n", - pat_to_pdf->xx, pat_to_pdf->yx, - pat_to_pdf->xy, pat_to_pdf->yy, - pat_to_pdf->x0, pat_to_pdf->y0); + " /Matrix [ "); + _cairo_output_stream_print_matrix (surface->output, pat_to_pdf); + _cairo_output_stream_printf (surface->output, + " ]\n" + " /Shading\n"); } if (pdf_pattern->pattern->type == CAIRO_PATTERN_TYPE_LINEAR) { @@ -3780,14 +4111,14 @@ _cairo_pdf_surface_emit_mesh_pattern (cairo_pdf_surface_t *surface, "%d 0 obj\n" "<< /Type /Pattern\n" " /PatternType 2\n" - " /Matrix [ %f %f %f %f %f %f ]\n" + " /Matrix [ ", + pdf_pattern->pattern_res.id); + _cairo_output_stream_print_matrix (surface->output, &pat_to_pdf); + _cairo_output_stream_printf (surface->output, + " ]\n" " /Shading %d 0 R\n" ">>\n" "endobj\n", - pdf_pattern->pattern_res.id, - pat_to_pdf.xx, pat_to_pdf.yx, - pat_to_pdf.xy, pat_to_pdf.yy, - pat_to_pdf.x0, pat_to_pdf.y0, res.id); if (pdf_pattern->gstate_res.id != 0) { @@ -3841,14 +4172,14 @@ _cairo_pdf_surface_emit_mesh_pattern (cairo_pdf_surface_t *surface, "%d 0 obj\n" "<< /Type /Pattern\n" " /PatternType 2\n" - " /Matrix [ %f %f %f %f %f %f ]\n" + " /Matrix [ ", + mask_resource.id); + _cairo_output_stream_print_matrix (surface->output, &pat_to_pdf); + _cairo_output_stream_printf (surface->output, + " ]\n" " /Shading %d 0 R\n" ">>\n" "endobj\n", - mask_resource.id, - pat_to_pdf.xx, pat_to_pdf.yx, - pat_to_pdf.xy, pat_to_pdf.yy, - pat_to_pdf.x0, pat_to_pdf.y0, res.id); status = cairo_pdf_surface_emit_transparency_group (surface, @@ -3909,8 +4240,10 @@ _cairo_pdf_surface_emit_pattern (cairo_pdf_surface_t *surface, cairo_pdf_pattern static cairo_int_status_t _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t *surface, + cairo_operator_t op, const cairo_pattern_t *source, const cairo_rectangle_int_t *extents, + cairo_pdf_resource_t *smask_res, cairo_bool_t stencil_mask) { cairo_pdf_resource_t surface_res; @@ -3938,9 +4271,12 @@ _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t *surface, status = _cairo_pdf_surface_add_source_surface (surface, NULL, source, + op, source->filter, stencil_mask, + FALSE, extents, + smask_res, &surface_res, &width, &height, @@ -3972,11 +4308,8 @@ _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t *surface, return status; if (! _cairo_matrix_is_identity (&pdf_p2d)) { - _cairo_output_stream_printf (surface->output, - "%f %f %f %f %f %f cm\n", - pdf_p2d.xx, pdf_p2d.yx, - pdf_p2d.xy, pdf_p2d.yy, - pdf_p2d.x0, pdf_p2d.y0); + _cairo_output_stream_print_matrix (surface->output, &pdf_p2d); + _cairo_output_stream_printf (surface->output, " cm\n"); } status = _cairo_pdf_surface_add_alpha (surface, 1.0, &alpha); @@ -3999,6 +4332,7 @@ _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t *surface, static cairo_int_status_t _cairo_pdf_surface_paint_gradient (cairo_pdf_surface_t *surface, + cairo_operator_t op, const cairo_pattern_t *source, const cairo_rectangle_int_t *extents) { @@ -4008,7 +4342,7 @@ _cairo_pdf_surface_paint_gradient (cairo_pdf_surface_t *surface, int alpha; status = _cairo_pdf_surface_add_pdf_shading (surface, source, - extents, + op, extents, &shading_res, &gstate_res); if (unlikely (status == CAIRO_INT_STATUS_NOTHING_TO_DO)) return CAIRO_INT_STATUS_SUCCESS; @@ -4026,11 +4360,8 @@ _cairo_pdf_surface_paint_gradient (cairo_pdf_surface_t *surface, return status; if (! _cairo_matrix_is_identity (&pat_to_pdf)) { - _cairo_output_stream_printf (surface->output, - "%f %f %f %f %f %f cm\n", - pat_to_pdf.xx, pat_to_pdf.yx, - pat_to_pdf.xy, pat_to_pdf.yy, - pat_to_pdf.x0, pat_to_pdf.y0); + _cairo_output_stream_print_matrix (surface->output, &pat_to_pdf); + _cairo_output_stream_printf (surface->output, " cm\n"); } status = _cairo_pdf_surface_add_shading (surface, shading_res); @@ -4062,6 +4393,7 @@ _cairo_pdf_surface_paint_gradient (cairo_pdf_surface_t *surface, static cairo_int_status_t _cairo_pdf_surface_paint_pattern (cairo_pdf_surface_t *surface, + cairo_operator_t op, const cairo_pattern_t *source, const cairo_rectangle_int_t *extents, cairo_bool_t mask) @@ -4070,13 +4402,16 @@ _cairo_pdf_surface_paint_pattern (cairo_pdf_surface_t *surface, case CAIRO_PATTERN_TYPE_SURFACE: case CAIRO_PATTERN_TYPE_RASTER_SOURCE: return _cairo_pdf_surface_paint_surface_pattern (surface, + op, source, extents, + NULL, mask); case CAIRO_PATTERN_TYPE_LINEAR: case CAIRO_PATTERN_TYPE_RADIAL: case CAIRO_PATTERN_TYPE_MESH: return _cairo_pdf_surface_paint_gradient (surface, + op, source, extents); @@ -5701,6 +6036,7 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface, if (_can_paint_pattern (group->mask)) { _cairo_output_stream_printf (surface->output, "q\n"); status = _cairo_pdf_surface_paint_pattern (surface, + CAIRO_OPERATOR_OVER, group->mask, &group->extents, FALSE); @@ -5711,7 +6047,9 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface, } else { pattern_res.id = 0; gstate_res.id = 0; - status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, NULL, + status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, + CAIRO_OPERATOR_OVER, + NULL, &pattern_res, &gstate_res); if (unlikely (status)) return status; @@ -5774,6 +6112,7 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface, if (_can_paint_pattern (group->source)) { _cairo_output_stream_printf (surface->output, "q\n"); status = _cairo_pdf_surface_paint_pattern (surface, + CAIRO_OPERATOR_OVER, group->source, &group->extents, FALSE); @@ -5784,7 +6123,9 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface, } else { pattern_res.id = 0; gstate_res.id = 0; - status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, NULL, + status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, + CAIRO_OPERATOR_OVER, + NULL, &pattern_res, &gstate_res); if (unlikely (status)) return status; @@ -6039,7 +6380,7 @@ _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface) return status; _cairo_pdf_group_resources_clear (&surface->resources); - status = _cairo_pdf_surface_open_content_stream (surface, NULL, NULL, FALSE); + status = _cairo_pdf_surface_open_content_stream (surface, NULL, NULL, FALSE, FALSE); if (unlikely (status)) return status; @@ -6327,12 +6668,189 @@ _cairo_pdf_surface_start_fallback (cairo_pdf_surface_t *surface) bbox.p1.y = 0; bbox.p2.x = surface->width; bbox.p2.y = surface->height; - return _cairo_pdf_surface_open_content_stream (surface, &bbox, NULL, TRUE); + return _cairo_pdf_surface_open_content_stream (surface, &bbox, NULL, TRUE, TRUE); +} + +/* If source is an opaque image and mask is an image and both images + * have the same bounding box we can emit them as a image/smask pair. + */ +static cairo_int_status_t +_cairo_pdf_surface_emit_combined_smask (cairo_pdf_surface_t *surface, + cairo_operator_t op, + const cairo_pattern_t *source, + const cairo_pattern_t *mask, + const cairo_rectangle_int_t *extents) +{ + cairo_int_status_t status; + cairo_image_surface_t *image; + void *image_extra; + cairo_image_transparency_t transparency; + cairo_pdf_resource_t smask_res; + int src_width, src_height; + int mask_width, mask_height; + double src_x_offset, src_y_offset; + double mask_x_offset, mask_y_offset; + double src_x1, src_y1, src_x2, src_y2; + double mask_x1, mask_y1, mask_x2, mask_y2; + cairo_matrix_t p2u; + double src_radius, mask_radius, e; + cairo_rectangle_int_t extents2; + cairo_bool_t need_smask; + + /* Check that source and mask are images */ + + if (!((source->type == CAIRO_PATTERN_TYPE_SURFACE || source->type == CAIRO_PATTERN_TYPE_RASTER_SOURCE) && + (mask->type == CAIRO_PATTERN_TYPE_SURFACE || mask->type == CAIRO_PATTERN_TYPE_RASTER_SOURCE))) + return CAIRO_INT_STATUS_UNSUPPORTED; + + if (source->type == CAIRO_PATTERN_TYPE_SURFACE && + ((cairo_surface_pattern_t *) source)->surface->type == CAIRO_SURFACE_TYPE_RECORDING) + { + return CAIRO_INT_STATUS_UNSUPPORTED; + } + + if (mask->type == CAIRO_PATTERN_TYPE_SURFACE && + ((cairo_surface_pattern_t *) mask)->surface->type == CAIRO_SURFACE_TYPE_RECORDING) + { + return CAIRO_INT_STATUS_UNSUPPORTED; + } + + if (source->extend != CAIRO_EXTEND_NONE || mask->extend != CAIRO_EXTEND_NONE) + return CAIRO_INT_STATUS_UNSUPPORTED; + + /* Check that source is opaque and get image sizes */ + + status = _cairo_pdf_surface_acquire_source_image_from_pattern (surface, source, + &image, &image_extra); + if (unlikely (status)) + return status; + + if (image->base.status) + return image->base.status; + + src_width = image->width; + src_height = image->height; + if (source->type == CAIRO_PATTERN_TYPE_RASTER_SOURCE) { + cairo_surface_get_device_offset (&image->base, &src_x_offset, &src_y_offset); + } else { + src_x_offset = 0; + src_y_offset = 0; + } + + transparency = _cairo_image_analyze_transparency (image); + _cairo_pdf_surface_release_source_image_from_pattern (surface, source, image, image_extra); + + if (transparency != CAIRO_IMAGE_IS_OPAQUE) + return CAIRO_INT_STATUS_UNSUPPORTED; + + status = _cairo_pdf_surface_acquire_source_image_from_pattern (surface, mask, + &image, &image_extra); + if (unlikely (status)) + return status; + + if (image->base.status) + return image->base.status; + + mask_width = image->width; + mask_height = image->height; + if (mask->type == CAIRO_PATTERN_TYPE_RASTER_SOURCE) { + cairo_surface_get_device_offset (&image->base, &mask_x_offset, &mask_y_offset); + } else { + mask_x_offset = 0; + mask_y_offset = 0; + } + + transparency = _cairo_image_analyze_transparency (image); + need_smask = transparency != CAIRO_IMAGE_IS_OPAQUE; + + _cairo_pdf_surface_release_source_image_from_pattern (surface, mask, image, image_extra); + + /* Check that both images have the same extents with a tolerance + * of half the smallest source pixel. */ + + p2u = source->matrix; + status = cairo_matrix_invert (&p2u); + /* cairo_pattern_set_matrix ensures the matrix is invertible */ + assert (status == CAIRO_INT_STATUS_SUCCESS); + src_x1 = 0; + src_y1 = 0; + src_x2 = src_width; + src_y2 = src_height; + cairo_matrix_transform_point (&p2u, &src_x1, &src_y1); + cairo_matrix_transform_point (&p2u, &src_x2, &src_y2); + src_radius = _cairo_matrix_transformed_circle_major_axis (&p2u, 0.5); + + p2u = mask->matrix; + status = cairo_matrix_invert (&p2u); + /* cairo_pattern_set_matrix ensures the matrix is invertible */ + assert (status == CAIRO_INT_STATUS_SUCCESS); + mask_x1 = 0; + mask_y1 = 0; + mask_x2 = mask_width; + mask_y2 = mask_height; + cairo_matrix_transform_point (&p2u, &mask_x1, &mask_y1); + cairo_matrix_transform_point (&p2u, &mask_x2, &mask_y2); + mask_radius = _cairo_matrix_transformed_circle_major_axis (&p2u, 0.5); + + if (src_radius < mask_radius) + e = src_radius; + else + e = mask_radius; + + if (fabs(src_x1 - mask_x1) > e || + fabs(src_x2 - mask_x2) > e || + fabs(src_y1 - mask_y1) > e || + fabs(src_y2 - mask_y2) > e) + return CAIRO_INT_STATUS_UNSUPPORTED; + + /* Check both images have same device offset */ + if (fabs(src_x_offset - mask_x_offset) > e || + fabs(src_y_offset - mask_y_offset) > e) + return CAIRO_INT_STATUS_UNSUPPORTED; + + if (need_smask) { + status = _cairo_pdf_surface_add_source_surface (surface, + NULL, + mask, + op, + source->filter, + FALSE, + TRUE, + extents, + NULL, + &smask_res, + &mask_width, + &mask_height, + &mask_x_offset, + &mask_y_offset, + &extents2); + if (unlikely (status)) + return status; + } + + status = _cairo_pdf_operators_flush (&surface->pdf_operators); + if (unlikely (status)) + return status; + + _cairo_output_stream_printf (surface->output, "q\n"); + status = _cairo_pdf_surface_paint_surface_pattern (surface, op, source, extents, + need_smask ? &smask_res : NULL, + FALSE); + if (unlikely (status)) + return status; + + _cairo_output_stream_printf (surface->output, "Q\n"); + + status = _cairo_output_stream_get_status (surface->output); + + + return status; } /* A PDF stencil mask is an A1 mask used with the current color */ static cairo_int_status_t _cairo_pdf_surface_emit_stencil_mask (cairo_pdf_surface_t *surface, + cairo_operator_t op, const cairo_pattern_t *source, const cairo_pattern_t *mask, const cairo_rectangle_int_t *extents) @@ -6379,7 +6897,7 @@ _cairo_pdf_surface_emit_stencil_mask (cairo_pdf_surface_t *surface, return status; _cairo_output_stream_printf (surface->output, "q\n"); - status = _cairo_pdf_surface_paint_surface_pattern (surface, mask, extents, TRUE); + status = _cairo_pdf_surface_paint_surface_pattern (surface, op, mask, extents, NULL, TRUE); if (unlikely (status)) return status; @@ -6455,6 +6973,7 @@ _cairo_pdf_surface_paint (void *abstract_surface, if (_can_paint_pattern (source)) { _cairo_output_stream_printf (surface->output, "q\n"); status = _cairo_pdf_surface_paint_pattern (surface, + op, source, &extents.bounded, FALSE); @@ -6468,7 +6987,7 @@ _cairo_pdf_surface_paint (void *abstract_surface, pattern_res.id = 0; gstate_res.id = 0; - status = _cairo_pdf_surface_add_pdf_pattern (surface, source, + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, op, &extents.bounded, &pattern_res, &gstate_res); if (unlikely (status)) @@ -6608,8 +7127,13 @@ _cairo_pdf_surface_mask (void *abstract_surface, if (unlikely (status)) goto cleanup; + /* Check if we can combine source and mask into a smask image */ + status = _cairo_pdf_surface_emit_combined_smask (surface, op, source, mask, &extents.bounded); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + goto cleanup; + /* Check if we can use a stencil mask */ - status = _cairo_pdf_surface_emit_stencil_mask (surface, source, mask, &extents.bounded); + status = _cairo_pdf_surface_emit_stencil_mask (surface, op, source, mask, &extents.bounded); if (status != CAIRO_INT_STATUS_UNSUPPORTED) goto cleanup; @@ -6726,7 +7250,7 @@ _cairo_pdf_surface_stroke (void *abstract_surface, pattern_res.id = 0; gstate_res.id = 0; - status = _cairo_pdf_surface_add_pdf_pattern (surface, source, + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, op, &extents.bounded, &pattern_res, &gstate_res); if (unlikely (status)) @@ -6879,6 +7403,7 @@ _cairo_pdf_surface_fill (void *abstract_surface, goto cleanup; status = _cairo_pdf_surface_paint_pattern (surface, + op, source, &extents.bounded, FALSE); @@ -6892,7 +7417,7 @@ _cairo_pdf_surface_fill (void *abstract_surface, pattern_res.id = 0; gstate_res.id = 0; - status = _cairo_pdf_surface_add_pdf_pattern (surface, source, + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, op, &extents.bounded, &pattern_res, &gstate_res); if (unlikely (status)) @@ -7067,6 +7592,7 @@ _cairo_pdf_surface_fill_stroke (void *abstract_surface, fill_pattern_res.id = 0; gstate_res.id = 0; status = _cairo_pdf_surface_add_pdf_pattern (surface, fill_source, + fill_op, &extents.bounded, &fill_pattern_res, &gstate_res); @@ -7079,6 +7605,7 @@ _cairo_pdf_surface_fill_stroke (void *abstract_surface, gstate_res.id = 0; status = _cairo_pdf_surface_add_pdf_pattern (surface, stroke_source, + stroke_op, &extents.bounded, &stroke_pattern_res, &gstate_res); @@ -7170,7 +7697,7 @@ _cairo_pdf_surface_show_text_glyphs (void *abstract_surface, pattern_res.id = 0; gstate_res.id = 0; - status = _cairo_pdf_surface_add_pdf_pattern (surface, source, + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, op, &extents.bounded, &pattern_res, &gstate_res); if (unlikely (status)) diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf.h index 1bc8524f2b1..1bc8524f2b1 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pdf.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pdf.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pen.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pen.c index 61be0e8299d..61be0e8299d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pen.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pen.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pixman-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pixman-private.h index d705025c8ee..d705025c8ee 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-pixman-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-pixman-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-png.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-png.c index 068617d588d..068617d588d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-png.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-png.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon-intersect.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon-intersect.c index 2cd73d2e56b..2cd73d2e56b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon-intersect.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon-intersect.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon-reduce.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon-reduce.c index ea457fe4edf..ea457fe4edf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon-reduce.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon-reduce.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon.c index b0424f6e72e..b0424f6e72e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-polygon.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-polygon.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-private.h index 9f4f55b7cea..9f4f55b7cea 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps-surface-private.h index 1d5d27d4910..1d5d27d4910 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps-surface.c index 5e6206aa9a4..706e3057570 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps-surface.c @@ -337,14 +337,48 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface) "/rg { setrgbcolor } bind def\n" "/d1 { setcachedevice } bind def\n"); + if (!surface->eps) { + _cairo_output_stream_printf (surface->final_stream, + "/cairo_set_page_size {\n" + " %% Change paper size, but only if different from previous paper size otherwise\n" + " %% duplex fails. PLRM specifies a tolerance of 5 pts when matching paper size\n" + " %% so we use the same when checking if the size changes.\n" + " /setpagedevice where {\n" + " pop currentpagedevice\n" + " /PageSize known {\n" + " 2 copy\n" + " currentpagedevice /PageSize get aload pop\n" + " exch 4 1 roll\n" + " sub abs 5 gt\n" + " 3 1 roll\n" + " sub abs 5 gt\n" + " or\n" + " } {\n" + " true\n" + " } ifelse\n" + " {\n" + " 2 array astore\n" + " 2 dict begin\n" + " /PageSize exch def\n" + " /ImagingBBox null def\n" + " currentdict end\n" + " setpagedevice\n" + " } {\n" + " pop pop\n" + " } ifelse\n" + " } {\n" + " pop\n" + " } ifelse\n" + "} def\n"); + } + _cairo_output_stream_printf (surface->final_stream, "%%%%EndProlog\n"); + _cairo_output_stream_printf (surface->final_stream, + "%%%%BeginSetup\n"); num_comments = _cairo_array_num_elements (&surface->dsc_setup_comments); if (num_comments) { - _cairo_output_stream_printf (surface->final_stream, - "%%%%BeginSetup\n"); - comments = _cairo_array_index (&surface->dsc_setup_comments, 0); for (i = 0; i < num_comments; i++) { _cairo_output_stream_printf (surface->final_stream, @@ -352,9 +386,6 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface) free (comments[i]); comments[i] = NULL; } - - _cairo_output_stream_printf (surface->final_stream, - "%%%%EndSetup\n"); } } @@ -382,8 +413,13 @@ _cairo_ps_surface_emit_type1_font_subset (cairo_ps_surface_t *surface, "%% _cairo_ps_surface_emit_type1_font_subset\n"); #endif + _cairo_output_stream_printf (surface->final_stream, + "%%%%BeginResource: font %s\n", + subset.base_font); length = subset.header_length + subset.data_length + subset.trailer_length; _cairo_output_stream_write (surface->final_stream, subset.data, length); + _cairo_output_stream_printf (surface->final_stream, + "%%%%EndResource\n"); _cairo_type1_subset_fini (&subset); @@ -406,15 +442,18 @@ _cairo_ps_surface_emit_type1_font_fallback (cairo_ps_surface_t *surface, if (unlikely (status)) return status; - /* FIXME: Figure out document structure convention for fonts */ - #if DEBUG_PS _cairo_output_stream_printf (surface->final_stream, "%% _cairo_ps_surface_emit_type1_font_fallback\n"); #endif + _cairo_output_stream_printf (surface->final_stream, + "%%%%BeginResource: font %s\n", + subset.base_font); length = subset.header_length + subset.data_length + subset.trailer_length; _cairo_output_stream_write (surface->final_stream, subset.data, length); + _cairo_output_stream_printf (surface->final_stream, + "%%%%EndResource\n"); _cairo_type1_fallback_fini (&subset); @@ -443,6 +482,9 @@ _cairo_ps_surface_emit_truetype_font_subset (cairo_ps_surface_t *surface, #endif _cairo_output_stream_printf (surface->final_stream, + "%%%%BeginResource: font %s\n", + subset.ps_name); + _cairo_output_stream_printf (surface->final_stream, "11 dict begin\n" "/FontType 42 def\n" "/FontName /%s def\n" @@ -524,9 +566,11 @@ _cairo_ps_surface_emit_truetype_font_subset (cairo_ps_surface_t *surface, "/f-%d-%d currentdict end definefont pop\n", font_subset->font_id, font_subset->subset_id); - + _cairo_output_stream_printf (surface->final_stream, + "%%%%EndResource\n"); _cairo_truetype_subset_fini (&subset); + return CAIRO_STATUS_SUCCESS; } @@ -621,6 +665,8 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface, #endif _cairo_output_stream_printf (surface->final_stream, + "%%%%BeginResource: font\n"); + _cairo_output_stream_printf (surface->final_stream, "8 dict begin\n" "/FontType 3 def\n" "/FontMatrix [1 0 0 1 0 0] def\n" @@ -700,6 +746,8 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface, - _cairo_fixed_to_double (font_bbox.p1.y), font_subset->font_id, font_subset->subset_id); + _cairo_output_stream_printf (surface->final_stream, + "%%%%EndResource\n"); return CAIRO_STATUS_SUCCESS; } @@ -1563,6 +1611,9 @@ _cairo_ps_surface_finish (void *abstract_surface) if (unlikely (status)) goto CLEANUP; + _cairo_output_stream_printf (surface->final_stream, + "%%%%EndSetup\n"); + status = _cairo_ps_surface_emit_body (surface); if (unlikely (status)) goto CLEANUP; @@ -2718,11 +2769,9 @@ _cairo_ps_surface_emit_image (cairo_ps_surface_t *surface, } _cairo_output_stream_printf (surface->stream, - " /Interpolate %s def\n" " /ImageMatrix [ 1 0 0 -1 0 %d ] def\n" "end\n" "%s\n", - interpolate, ps_image->height, stencil_mask ? "imagemask" : "image"); } @@ -3093,6 +3142,16 @@ _cairo_ps_surface_emit_surface (cairo_ps_surface_t *surface, { cairo_int_status_t status; + if (source_pattern->type == CAIRO_PATTERN_TYPE_SURFACE && + source_pattern->extend != CAIRO_EXTEND_PAD) + { + cairo_surface_t *surf = ((cairo_surface_pattern_t *) source_pattern)->surface; + + status = _cairo_ps_surface_emit_jpeg_image (surface, surf, width, height); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; + } + if (source_surface->type == CAIRO_SURFACE_TYPE_RECORDING) { if (source_surface->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) { cairo_surface_subsurface_t *sub = (cairo_surface_subsurface_t *) source_surface; @@ -3102,12 +3161,6 @@ _cairo_ps_surface_emit_surface (cairo_ps_surface_t *surface, } } else { cairo_image_surface_t *image = (cairo_image_surface_t *) source_surface; - if (source_pattern->extend != CAIRO_EXTEND_PAD) { - status = _cairo_ps_surface_emit_jpeg_image (surface, source_surface, - width, height); - if (status != CAIRO_INT_STATUS_UNSUPPORTED) - return status; - } status = _cairo_ps_surface_emit_image (surface, image, op, source_pattern->filter, stencil_mask); @@ -3247,11 +3300,9 @@ _cairo_ps_surface_paint_surface (cairo_ps_surface_t *surface, cairo_matrix_scale (&ps_p2d, 1.0, -1.0); if (! _cairo_matrix_is_identity (&ps_p2d)) { - _cairo_output_stream_printf (surface->stream, - "[ %f %f %f %f %f %f ] concat\n", - ps_p2d.xx, ps_p2d.yx, - ps_p2d.xy, ps_p2d.yy, - ps_p2d.x0, ps_p2d.y0); + _cairo_output_stream_printf (surface->stream, "[ "); + _cairo_output_stream_print_matrix (surface->stream, &ps_p2d); + _cairo_output_stream_printf (surface->stream, " ] concat\n"); } status = _cairo_ps_surface_emit_surface (surface, @@ -3401,7 +3452,7 @@ _cairo_ps_surface_emit_surface_pattern (cairo_ps_surface_t *surface, _cairo_output_stream_printf (surface->stream, " /BBox [0 0 %d %d]\n" " /PaintProc {\n" - " CairoPattern\n" + " pop CairoPattern\n" " [-1 0 0 1 %d 0] concat CairoPattern\n" " [ 1 0 0 -1 0 %d] concat CairoPattern\n" " [-1 0 0 1 %d 0] concat CairoPattern\n" @@ -3422,7 +3473,7 @@ _cairo_ps_surface_emit_surface_pattern (cairo_ps_surface_t *surface, pattern_width, pattern_height); } _cairo_output_stream_printf (surface->stream, - " /PaintProc { CairoPattern }\n"); + " /PaintProc { pop CairoPattern }\n"); } _cairo_output_stream_printf (surface->stream, @@ -3440,12 +3491,10 @@ _cairo_ps_surface_emit_surface_pattern (cairo_ps_surface_t *surface, cairo_matrix_translate (&ps_p2d, 0.0, pattern_height); cairo_matrix_scale (&ps_p2d, 1.0, -1.0); + _cairo_output_stream_printf (surface->stream, "[ "); + _cairo_output_stream_print_matrix (surface->stream, &ps_p2d); _cairo_output_stream_printf (surface->stream, - "[ %f %f %f %f %f %f ]\n", - ps_p2d.xx, ps_p2d.yx, - ps_p2d.xy, ps_p2d.yy, - ps_p2d.x0, ps_p2d.y0); - _cairo_output_stream_printf (surface->stream, + " ]\n" "makepattern setpattern\n"); release_source: @@ -3819,11 +3868,10 @@ _cairo_ps_surface_emit_gradient (cairo_ps_surface_t *surface, if (is_ps_pattern) { _cairo_output_stream_printf (surface->stream, ">>\n" - "[ %f %f %f %f %f %f ]\n" - "makepattern setpattern\n", - pat_to_ps.xx, pat_to_ps.yx, - pat_to_ps.xy, pat_to_ps.yy, - pat_to_ps.x0, pat_to_ps.y0); + "[ "); + _cairo_output_stream_print_matrix (surface->stream, &pat_to_ps); + _cairo_output_stream_printf (surface->stream, " ]\n" + "makepattern setpattern\n"); } else { _cairo_output_stream_printf (surface->stream, "shfill\n"); @@ -3901,11 +3949,10 @@ _cairo_ps_surface_emit_mesh_pattern (cairo_ps_surface_t *surface, if (is_ps_pattern) { _cairo_output_stream_printf (surface->stream, ">>\n" - "[ %f %f %f %f %f %f ]\n", - pat_to_ps.xx, pat_to_ps.yx, - pat_to_ps.xy, pat_to_ps.yy, - pat_to_ps.x0, pat_to_ps.y0); + "[ \n"); + _cairo_output_stream_print_matrix (surface->stream, &pat_to_ps); _cairo_output_stream_printf (surface->stream, + " ]\n" "makepattern\n" "setpattern\n"); } else { @@ -4004,11 +4051,9 @@ _cairo_ps_surface_paint_gradient (cairo_ps_surface_t *surface, cairo_matrix_multiply (&pat_to_ps, &pat_to_ps, &surface->cairo_to_ps); if (! _cairo_matrix_is_identity (&pat_to_ps)) { - _cairo_output_stream_printf (surface->stream, - "[%f %f %f %f %f %f] concat\n", - pat_to_ps.xx, pat_to_ps.yx, - pat_to_ps.xy, pat_to_ps.yy, - pat_to_ps.x0, pat_to_ps.y0); + _cairo_output_stream_printf (surface->stream, "["); + _cairo_output_stream_print_matrix (surface->stream, &pat_to_ps); + _cairo_output_stream_printf (surface->stream, "] concat\n"); } if (source->type == CAIRO_PATTERN_TYPE_MESH) { @@ -4557,6 +4602,13 @@ _cairo_ps_surface_set_bounding_box (void *abstract_surface, x1, y1, x2, y2); } + if (!surface->eps) { + _cairo_output_stream_printf (surface->stream, + "%f %f cairo_set_page_size\n", + ceil(surface->width), + ceil(surface->height)); + } + _cairo_output_stream_printf (surface->stream, "%%%%EndPageSetup\n" "q %d %d %d %d rectclip q\n", diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps.h index 33d0e0d941b..33d0e0d941b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-ps.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-ps.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-qt-surface.cpp b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-qt-surface.cpp index ce05dba7ef9..7ddad77df37 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-qt-surface.cpp +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-qt-surface.cpp @@ -306,6 +306,8 @@ _qimage_format_from_cairo_format (cairo_format_t fmt) #else return QImage::Format_MonoLSB; #endif + case CAIRO_FORMAT_RGB30: + return QImage::Format_Mono; } return QImage::Format_Mono; @@ -386,7 +388,7 @@ _cairo_path_to_qpainterpath_close_path (void *closure) return CAIRO_STATUS_SUCCESS; } -static inline QPainterPath +static QPainterPath path_to_qt (const cairo_path_fixed_t *path, const cairo_matrix_t *ctm_inverse = NULL) { @@ -849,7 +851,8 @@ _cairo_qt_surface_set_clip (cairo_qt_surface_t *qs, */ struct PatternToBrushConverter { - PatternToBrushConverter (const cairo_pattern_t *pattern) : + PatternToBrushConverter (const cairo_pattern_t *pattern) + __attribute__ ((noinline)) : mAcquiredImageParent(0), mAcquiredImage(0), mAcquiredImageExtra(0) @@ -1048,7 +1051,7 @@ struct PatternToBrushConverter { } } - ~PatternToBrushConverter () { + ~PatternToBrushConverter () __attribute__ ((noinline)){ if (mAcquiredImageParent) _cairo_surface_release_source_image (mAcquiredImageParent, mAcquiredImage, mAcquiredImageExtra); } @@ -1657,13 +1660,30 @@ cairo_qt_surface_create_with_qpixmap (cairo_content_t content, return &qs->base; } +/** + * _cairo_surface_is_qt: + * @surface: a #cairo_surface_t + * + * Checks if a surface is a #cairo_qt_surface_t + * + * Return value: True if the surface is an qt surface + **/ +static inline cairo_bool_t +_cairo_surface_is_qt (cairo_surface_t *surface) +{ + return surface->backend == &cairo_qt_surface_backend; +} + QPainter * cairo_qt_surface_get_qpainter (cairo_surface_t *surface) { cairo_qt_surface_t *qs = (cairo_qt_surface_t*) surface; - if (surface->type != CAIRO_SURFACE_TYPE_QT) + /* Throw an error for a non-qt surface */ + if (! _cairo_surface_is_qt (surface)) { + _cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH); return NULL; + } return qs->p; } @@ -1673,8 +1693,11 @@ cairo_qt_surface_get_qimage (cairo_surface_t *surface) { cairo_qt_surface_t *qs = (cairo_qt_surface_t*) surface; - if (surface->type != CAIRO_SURFACE_TYPE_QT) + /* Throw an error for a non-qt surface */ + if (! _cairo_surface_is_qt (surface)) { + _cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH); return NULL; + } return qs->image; } @@ -1684,8 +1707,10 @@ cairo_qt_surface_get_image (cairo_surface_t *surface) { cairo_qt_surface_t *qs = (cairo_qt_surface_t*) surface; - if (surface->type != CAIRO_SURFACE_TYPE_QT) - return NULL; + /* Throw an error for a non-qt surface */ + if (! _cairo_surface_is_qt (surface)) { + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH)); + } return qs->image_equiv; } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-qt.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-qt.h index c20bbb18d0b..c20bbb18d0b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-qt.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-qt.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-font.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-font.c index a9bbbdc7a49..e6a379ad447 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-font.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-font.c @@ -241,12 +241,13 @@ _cairo_quartz_font_face_create_for_toy (cairo_toy_font_face_t *toy_face, return CAIRO_STATUS_SUCCESS; } -static void +static cairo_bool_t _cairo_quartz_font_face_destroy (void *abstract_face) { cairo_quartz_font_face_t *font_face = (cairo_quartz_font_face_t*) abstract_face; CGFontRelease (font_face->cgFont); + return TRUE; } static const cairo_scaled_font_backend_t _cairo_quartz_scaled_font_backend; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-image-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-image-surface.c index 2715abd061c..498a7b06436 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-image-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-image-surface.c @@ -378,8 +378,10 @@ cairo_quartz_image_surface_get_image (cairo_surface_t *asurface) { cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t*) asurface; - if (asurface->type != CAIRO_SURFACE_TYPE_QUARTZ_IMAGE) - return NULL; + /* Throw an error for a non-quartz surface */ + if (! _cairo_surface_is_quartz (asurface)) { + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH)); + } return (cairo_surface_t*) surface->imageSurface; } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-image.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-image.h index dae234dacae..dae234dacae 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-image.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-image.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-private.h index f841a49ecc3..3ef14c3ae60 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-private.h @@ -83,6 +83,9 @@ typedef struct cairo_quartz_image_surface { cairo_private cairo_bool_t _cairo_quartz_verify_surface_size(int width, int height); +cairo_private cairo_bool_t +_cairo_surface_is_quartz (const cairo_surface_t *surface); + cairo_private CGImageRef CairoQuartzCreateCGImage (cairo_format_t format, unsigned int width, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-surface.c index 868c6c855bc..1116ff94c1e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz-surface.c @@ -140,9 +140,6 @@ _cairo_quartz_surface_create_internal (CGContextRef cgContext, unsigned int width, unsigned int height); -static cairo_bool_t -_cairo_surface_is_quartz (const cairo_surface_t *surface); - /* Load all extra symbols */ static void quartz_ensure_symbols (void) { @@ -2465,7 +2462,15 @@ cairo_quartz_surface_get_cg_context (cairo_surface_t *surface) return NULL; } -static cairo_bool_t +/** + * _cairo_surface_is_quartz: + * @surface: a #cairo_surface_t + * + * Checks if a surface is a #cairo_quartz_surface_t + * + * Return value: True if the surface is an quartz surface + **/ +cairo_bool_t _cairo_surface_is_quartz (const cairo_surface_t *surface) { return surface->backend == &cairo_quartz_surface_backend; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz.h index 9be5f9ae5cf..9be5f9ae5cf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-quartz.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-quartz.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-raster-source-pattern.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-raster-source-pattern.c index 601fe60ff63..64520feae52 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-raster-source-pattern.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-raster-source-pattern.c @@ -57,8 +57,6 @@ * Other callbacks are provided for when the pattern is copied temporarily * during rasterisation, or more permanently as a snapshot in order to keep * the pixel data available for printing. - * - * Since: 1.12 **/ cairo_surface_t * diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface-inline.h index 9002ccd6938..9002ccd6938 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface-private.h index 49194812d5f..456c63389b7 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface-private.h @@ -136,6 +136,8 @@ typedef struct _cairo_recording_surface { unsigned int *indices; unsigned int num_indices; cairo_bool_t optimize_clears; + cairo_bool_t has_bilevel_alpha; + cairo_bool_t has_only_op_over; struct bbtree { cairo_box_t extents; @@ -184,4 +186,10 @@ _cairo_recording_surface_get_ink_bbox (cairo_recording_surface_t *surface, cairo_box_t *bbox, const cairo_matrix_t *transform); +cairo_private cairo_bool_t +_cairo_recording_surface_has_only_bilevel_alpha (cairo_recording_surface_t *surface); + +cairo_private cairo_bool_t +_cairo_recording_surface_has_only_op_over (cairo_recording_surface_t *surface); + #endif /* CAIRO_RECORDING_SURFACE_H */ diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface.c index 55a98d02377..ce29b936630 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-recording-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-recording-surface.c @@ -87,6 +87,7 @@ #include "cairo-error-private.h" #include "cairo-image-surface-private.h" #include "cairo-recording-surface-inline.h" +#include "cairo-surface-snapshot-inline.h" #include "cairo-surface-wrapper-private.h" #include "cairo-traps-private.h" @@ -420,6 +421,8 @@ cairo_recording_surface_create (cairo_content_t content, surface->indices = NULL; surface->num_indices = 0; surface->optimize_clears = TRUE; + surface->has_bilevel_alpha = FALSE; + surface->has_only_op_over = FALSE; return &surface->base; } @@ -1603,6 +1606,68 @@ _cairo_recording_surface_get_visible_commands (cairo_recording_surface_t *surfac return num_visible; } +static void +_cairo_recording_surface_merge_source_attributes (cairo_recording_surface_t *surface, + cairo_operator_t op, + const cairo_pattern_t *source) +{ + if (op != CAIRO_OPERATOR_OVER) + surface->has_only_op_over = FALSE; + + if (source->type == CAIRO_PATTERN_TYPE_SURFACE) { + cairo_surface_pattern_t *surf_pat = (cairo_surface_pattern_t *) source; + cairo_surface_t *surf = surf_pat->surface; + cairo_surface_t *free_me = NULL; + + if (_cairo_surface_is_snapshot (surf)) + free_me = surf = _cairo_surface_snapshot_get_target (surf); + + if (surf->type == CAIRO_SURFACE_TYPE_RECORDING) { + cairo_recording_surface_t *rec_surf = (cairo_recording_surface_t *) surf; + + if (! _cairo_recording_surface_has_only_bilevel_alpha (rec_surf)) + surface->has_bilevel_alpha = FALSE; + + if (! _cairo_recording_surface_has_only_op_over (rec_surf)) + surface->has_only_op_over = FALSE; + + } else if (surf->type == CAIRO_SURFACE_TYPE_IMAGE) { + cairo_image_surface_t *img_surf = (cairo_image_surface_t *) surf; + + if (_cairo_image_analyze_transparency (img_surf) == CAIRO_IMAGE_HAS_ALPHA) + surface->has_bilevel_alpha = FALSE; + + } else { + if (!_cairo_pattern_is_clear (source) && !_cairo_pattern_is_opaque (source, NULL)) + surface->has_bilevel_alpha = FALSE; + } + + cairo_surface_destroy (free_me); + return; + + } else if (source->type == CAIRO_PATTERN_TYPE_RASTER_SOURCE) { + cairo_surface_t *image; + cairo_surface_t *raster; + + image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1, 1); + raster = _cairo_raster_source_pattern_acquire (source, image, NULL); + cairo_surface_destroy (image); + if (raster) { + if (raster->type == CAIRO_SURFACE_TYPE_IMAGE) { + if (_cairo_image_analyze_transparency ((cairo_image_surface_t *)raster) == CAIRO_IMAGE_HAS_ALPHA) + surface->has_bilevel_alpha = FALSE; + } + + _cairo_raster_source_pattern_release (source, raster); + if (raster->type == CAIRO_SURFACE_TYPE_IMAGE) + return; + } + } + + if (!_cairo_pattern_is_clear (source) && !_cairo_pattern_is_opaque (source, NULL)) + surface->has_bilevel_alpha = FALSE; +} + static cairo_status_t _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, const cairo_rectangle_int_t *surface_extents, @@ -1652,6 +1717,9 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, if (! _cairo_surface_wrapper_get_target_extents (&wrapper, &extents)) goto done; + surface->has_bilevel_alpha = TRUE; + surface->has_only_op_over = TRUE; + num_elements = surface->commands.num_elements; elements = _cairo_array_index (&surface->commands, 0); if (extents.width < r->width || extents.height < r->height) { @@ -1675,6 +1743,11 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, command->header.op, &command->paint.source.base, command->header.clip); + if (type == CAIRO_RECORDING_CREATE_REGIONS) { + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->paint.source.base); + } break; case CAIRO_COMMAND_MASK: @@ -1683,6 +1756,14 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, &command->mask.source.base, &command->mask.mask.base, command->header.clip); + if (type == CAIRO_RECORDING_CREATE_REGIONS) { + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->mask.source.base); + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->mask.mask.base); + } break; case CAIRO_COMMAND_STROKE: @@ -1696,6 +1777,11 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, command->stroke.tolerance, command->stroke.antialias, command->header.clip); + if (type == CAIRO_RECORDING_CREATE_REGIONS) { + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->stroke.source.base); + } break; case CAIRO_COMMAND_FILL: @@ -1737,6 +1823,14 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, stroke_command->stroke.tolerance, stroke_command->stroke.antialias, command->header.clip); + if (type == CAIRO_RECORDING_CREATE_REGIONS) { + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->fill.source.base); + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->stroke.source.base); + } i++; } } @@ -1749,6 +1843,11 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, command->fill.tolerance, command->fill.antialias, command->header.clip); + if (type == CAIRO_RECORDING_CREATE_REGIONS) { + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->fill.source.base); + } } break; @@ -1762,6 +1861,11 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface, command->show_text_glyphs.cluster_flags, command->show_text_glyphs.scaled_font, command->header.clip); + if (type == CAIRO_RECORDING_CREATE_REGIONS) { + _cairo_recording_surface_merge_source_attributes (surface, + command->header.op, + &command->show_text_glyphs.source.base); + } break; default: @@ -2070,3 +2174,15 @@ cairo_recording_surface_get_extents (cairo_surface_t *surface, *extents = record->extents_pixels; return TRUE; } + +cairo_bool_t +_cairo_recording_surface_has_only_bilevel_alpha (cairo_recording_surface_t *surface) +{ + return surface->has_bilevel_alpha; +} + +cairo_bool_t +_cairo_recording_surface_has_only_op_over (cairo_recording_surface_t *surface) +{ + return surface->has_only_op_over; +} diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rectangle.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rectangle.c index 2d51d7b10a4..2d51d7b10a4 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rectangle.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rectangle.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rectangular-scan-converter.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rectangular-scan-converter.c index e353b34e853..e353b34e853 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rectangular-scan-converter.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rectangular-scan-converter.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-reference-count-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-reference-count-private.h index 75fdf3538f5..75fdf3538f5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-reference-count-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-reference-count-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-region-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-region-private.h index 549e5087898..549e5087898 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-region-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-region-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-region.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-region.c index a51e2247f1d..ccfb2200e14 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-region.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-region.c @@ -106,6 +106,7 @@ _cairo_region_create_in_error (cairo_status_t status) case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: case CAIRO_STATUS_DEVICE_FINISHED: + case CAIRO_STATUS_JBIG2_GLOBAL_MISSING: default: _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return (cairo_region_t *) &_cairo_region_nil; @@ -841,18 +842,6 @@ cairo_region_translate (cairo_region_t *region, slim_hidden_def (cairo_region_translate); /** - * cairo_region_overlap_t: - * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10) - * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10) - * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and - * partially outside the region. (Since 1.10) - * - * Used as the return value for cairo_region_contains_rectangle(). - * - * Since: 1.10 - **/ - -/** * cairo_region_contains_rectangle: * @region: a #cairo_region_t * @rectangle: a #cairo_rectangle_int_t diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rtree-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rtree-private.h index 27806cab603..27806cab603 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rtree-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rtree-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rtree.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rtree.c index dbc040929af..dbc040929af 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-rtree.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-rtree.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-private.h index da7b3469834..da7b3469834 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-subsets-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-subsets-private.h index dd1996258c9..866e63d7bca 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-subsets-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-subsets-private.h @@ -715,6 +715,21 @@ _cairo_truetype_get_style (cairo_scaled_font_t *scaled_font, cairo_bool_t *bold, cairo_bool_t *italic); +/** + * _cairo_escape_ps_name: + * @ps_name: returns the PostScript name with all invalid characters escaped + * + * Ensure that PostSript name is a valid PDF/PostSript name object. + * In PDF names are treated as UTF8 and non ASCII bytes, ' ', + * and '#' are encoded as '#' followed by 2 hex digits that + * encode the byte. + * + * Return value: %CAIRO_STATUS_SUCCESS if successful. Possible errors include + * %CAIRO_STATUS_NO_MEMORY. + **/ +cairo_private cairo_int_status_t +_cairo_escape_ps_name (char **ps_name); + #endif /* CAIRO_HAS_FONT_SUBSET */ #endif /* CAIRO_SCALED_FONT_SUBSETS_PRIVATE_H */ diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-subsets.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-subsets.c index e78e0c28390..2121761839e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font-subsets.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font-subsets.c @@ -1256,4 +1256,44 @@ CLEANUP_HASH: return status; } +cairo_int_status_t +_cairo_escape_ps_name (char **ps_name) +{ + cairo_status_t status = CAIRO_STATUS_SUCCESS; + + /* Ensure PS name is a valid PDF/PS name object. In PDF names are + * treated as UTF8 and non ASCII bytes, ' ', and '#' are encoded + * as '#' followed by 2 hex digits that encode the byte. By also + * encoding the characters in the reserved string we ensure the + * name is also PS compatible. */ + if (*ps_name) { + static const char *reserved = "()<>[]{}/%#\\"; + char buf[128]; /* max name length is 127 bytes */ + char *src = *ps_name; + char *dst = buf; + + while (*src && dst < buf + 127) { + unsigned char c = *src; + if (c < 0x21 || c > 0x7e || strchr (reserved, c)) { + if (dst + 4 > buf + 127) + break; + + snprintf (dst, 4, "#%02X", c); + src++; + dst += 3; + } else { + *dst++ = *src++; + } + } + *dst = 0; + free (*ps_name); + *ps_name = strdup (buf); + if (*ps_name == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + } + } + + return status; +} + #endif /* CAIRO_HAS_FONT_SUBSET */ diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font.c index ac80c97d1c5..ac80c97d1c5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-scaled-font.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-scaled-font.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-script-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-script-private.h index 5b506f500cd..5b506f500cd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-script-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-script-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-script-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-script-surface.c index b84aed976f3..b84aed976f3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-script-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-script-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-script.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-script.h index b5a8cf32d0b..b5a8cf32d0b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-script.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-script.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-shape-mask-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-shape-mask-compositor.c index c2425b08c32..3117267cccf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-shape-mask-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-shape-mask-compositor.c @@ -62,10 +62,11 @@ _cairo_shape_mask_compositor_stroke (const cairo_compositor_t *_compositor, return CAIRO_INT_STATUS_UNSUPPORTED; TRACE ((stderr, "%s\n", __FUNCTION__)); - mask = _cairo_surface_create_similar_scratch (extents->surface, - CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + mask = _cairo_surface_create_scratch (extents->surface, + CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (mask->status)) return mask->status; @@ -156,10 +157,11 @@ _cairo_shape_mask_compositor_fill (const cairo_compositor_t *_compositor, if (! extents->is_bounded) return CAIRO_INT_STATUS_UNSUPPORTED; - mask = _cairo_surface_create_similar_scratch (extents->surface, - CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + mask = _cairo_surface_create_scratch (extents->surface, + CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (mask->status)) return mask->status; @@ -248,10 +250,11 @@ _cairo_shape_mask_compositor_glyphs (const cairo_compositor_t *_compositor, return CAIRO_INT_STATUS_UNSUPPORTED; TRACE ((stderr, "%s\n", __FUNCTION__)); - mask = _cairo_surface_create_similar_scratch (extents->surface, - CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + mask = _cairo_surface_create_scratch (extents->surface, + CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (mask->status)) return mask->status; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-skia.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-skia.h index 99b92865699..99b92865699 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-skia.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-skia.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-slope-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-slope-private.h index 6a58c9f456d..6a58c9f456d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-slope-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-slope-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-slope.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-slope.c index cc5f30cb0b3..cc5f30cb0b3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-slope.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-slope.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-compositor-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-compositor-private.h index 0babebd26b5..0babebd26b5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-compositor-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-compositor-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-compositor.c index 6eb9b42a9d9..efbae254bf4 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-compositor.c @@ -95,11 +95,11 @@ get_clip_surface (const cairo_spans_compositor_t *compositor, assert (clip->path); - surface = _cairo_surface_create_similar_solid (dst, - CAIRO_CONTENT_ALPHA, - extents->width, - extents->height, - CAIRO_COLOR_TRANSPARENT); + surface = _cairo_surface_create_scratch (dst, + CAIRO_CONTENT_ALPHA, + extents->width, + extents->height, + CAIRO_COLOR_TRANSPARENT); _cairo_box_from_rectangle (&box, extents); _cairo_polygon_init (&polygon, &box, 1); @@ -585,6 +585,8 @@ composite_aligned_boxes (const cairo_spans_compositor_t *compositor, { cairo_clip_t *recording_clip; const cairo_pattern_t *source = &extents->source_pattern.base; + const cairo_matrix_t *m; + cairo_matrix_t matrix; /* XXX could also do tiling repeat modes... */ @@ -600,10 +602,17 @@ composite_aligned_boxes (const cairo_spans_compositor_t *compositor, dst->is_clear = TRUE; } + m = &source->matrix; + if (_cairo_surface_has_device_transform (dst)) { + cairo_matrix_multiply (&matrix, + &source->matrix, + &dst->device_transform); + m = &matrix; + } + recording_clip = _cairo_clip_from_boxes (boxes); status = _cairo_recording_surface_replay_with_clip (unwrap_source (source), - &source->matrix, - dst, recording_clip); + m, dst, recording_clip); _cairo_clip_destroy (recording_clip); return status; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-private.h index c42b5afa733..b158f4d360a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans-private.h @@ -53,7 +53,7 @@ struct _cairo_span_renderer { /* Render the spans on row y of the destination by whatever compositing * method is required. */ - cairo_warn cairo_status_t + cairo_status_t (*render_rows) (void *abstract_renderer, int y, int height, const cairo_half_open_span_t *coverages, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans.c index b8d41800efe..182390c205a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spans.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spans.c @@ -127,6 +127,7 @@ _cairo_scan_converter_create_in_error (cairo_status_t status) case CAIRO_STATUS_DEVICE_ERROR: RETURN_NIL; case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: RETURN_NIL; case CAIRO_STATUS_DEVICE_FINISHED: RETURN_NIL; + case CAIRO_STATUS_JBIG2_GLOBAL_MISSING: default: break; } @@ -239,6 +240,7 @@ _cairo_span_renderer_create_in_error (cairo_status_t status) case CAIRO_STATUS_DEVICE_ERROR: RETURN_NIL; case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: RETURN_NIL; case CAIRO_STATUS_DEVICE_FINISHED: RETURN_NIL; + case CAIRO_STATUS_JBIG2_GLOBAL_MISSING: RETURN_NIL; default: break; } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spline.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spline.c index 44634faec85..44634faec85 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-spline.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-spline.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-dash-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-dash-private.h index 75c000cd73a..75c000cd73a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-dash-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-dash-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-dash.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-dash.c index 9494010f561..9494010f561 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-dash.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-dash.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-style.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-style.c index 51c9414c042..51c9414c042 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-stroke-style.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-stroke-style.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-backend-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-backend-private.h index 955a79ff5c3..955a79ff5c3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-backend-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-backend-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-clipper-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-clipper-private.h index e5b00af7c66..e5b00af7c66 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-clipper-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-clipper-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-clipper.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-clipper.c index 5309362c68f..5309362c68f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-clipper.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-clipper.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-fallback-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-fallback-private.h index ecf7b0edf2b..ecf7b0edf2b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-fallback-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-fallback-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-fallback.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-fallback.c index a0af1596921..a0af1596921 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-fallback.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-fallback.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-inline.h index 85fbc9192bd..85fbc9192bd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer-inline.h index 07b94770d4b..07b94770d4b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer-private.h index 70c87db8283..70c87db8283 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer.c index 64036b64aa5..6721bf57d5e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-observer.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-observer.c @@ -1368,11 +1368,16 @@ static const cairo_surface_backend_t _cairo_surface_observer_backend = { /** * cairo_surface_create_observer: * @target: an existing surface for which the observer will watch + * @mode: sets the mode of operation (normal vs. record) * * Create a new surface that exists solely to watch another is doing. In * the process it will log operations and times, which are fast, which are * slow, which are frequent, etc. * + * The @mode parameter can be set to either CAIRO_SURFACE_OBSERVER_NORMAL + * or CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS, to control whether or not + * the internal observer should record operations. + * * Return value: a pointer to the newly allocated surface. The caller * owns the surface and should call cairo_surface_destroy() when done * with it. diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-offset-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-offset-private.h index 310ba5691cd..310ba5691cd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-offset-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-offset-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-offset.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-offset.c index 98f57f29804..98f57f29804 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-offset.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-offset.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-private.h index f20ab073932..f20ab073932 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot-inline.h index bf89c772b42..bf89c772b42 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot-private.h index 58bee7b49dd..58bee7b49dd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot.c index 68bf9054ecd..68bf9054ecd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-snapshot.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-snapshot.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface-inline.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface-inline.h index 0cd09e63e70..0cd09e63e70 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface-inline.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface-inline.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface-private.h index 89c5cc01b9d..89c5cc01b9d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface.c index 051e95f2415..b7dfd9d9e0c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-subsurface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-subsurface.c @@ -351,10 +351,11 @@ _cairo_surface_subsurface_snapshot (void *abstract_surface) TRACE ((stderr, "%s: target=%d\n", __FUNCTION__, surface->target->unique_id)); - clone = _cairo_surface_create_similar_scratch (surface->target, - surface->target->content, - surface->extents.width, - surface->extents.height); + clone = _cairo_surface_create_scratch (surface->target, + surface->target->content, + surface->extents.width, + surface->extents.height, + NULL); if (unlikely (clone->status)) return clone; @@ -465,7 +466,12 @@ cairo_surface_create_for_rectangle (cairo_surface_t *target, if (unlikely (surface == NULL)) return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); - assert (_cairo_matrix_is_translation (&target->device_transform)); + x *= target->device_transform.xx; + y *= target->device_transform.yy; + + width *= target->device_transform.xx; + height *= target->device_transform.yy; + x += target->device_transform.x0; y += target->device_transform.y0; @@ -495,6 +501,10 @@ cairo_surface_create_for_rectangle (cairo_surface_t *target, surface->snapshot = NULL; + cairo_surface_set_device_scale (&surface->base, + target->device_transform.xx, + target->device_transform.yy); + return &surface->base; } @@ -515,14 +525,16 @@ _cairo_surface_create_for_rectangle_int (cairo_surface_t *target, if (unlikely (surface == NULL)) return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); - assert (_cairo_matrix_is_translation (&target->device_transform)); - _cairo_surface_init (&surface->base, &_cairo_surface_subsurface_backend, NULL, /* device */ target->content); surface->extents = *extents; + surface->extents.x *= target->device_transform.xx; + surface->extents.y *= target->device_transform.yy; + surface->extents.width *= target->device_transform.xx; + surface->extents.height *= target->device_transform.yy; surface->extents.x += target->device_transform.x0; surface->extents.y += target->device_transform.y0; @@ -531,6 +543,10 @@ _cairo_surface_create_for_rectangle_int (cairo_surface_t *target, surface->snapshot = NULL; + cairo_surface_set_device_scale (&surface->base, + target->device_transform.xx, + target->device_transform.yy); + return &surface->base; } /* XXX observe mark-dirty */ diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-wrapper-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-wrapper-private.h index 6529ebc1115..6529ebc1115 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-wrapper-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-wrapper-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-wrapper.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-wrapper.c index 578e8e2bef6..9236c8bf42e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface-wrapper.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface-wrapper.c @@ -437,12 +437,11 @@ _cairo_surface_wrapper_show_text_glyphs (cairo_surface_wrapper_t *wrapper, _cairo_surface_wrapper_get_transform (wrapper, &m); - if (! _cairo_matrix_is_translation (&wrapper->transform)) { + if (! _cairo_matrix_is_translation (&m)) { cairo_matrix_t ctm; - /* XXX No device-transform? A bug in the tangle of layers? */ _cairo_matrix_multiply (&ctm, - &wrapper->transform, + &m, &scaled_font->ctm); dev_scaled_font = cairo_scaled_font_create (scaled_font->font_face, &scaled_font->font_matrix, @@ -514,8 +513,8 @@ _cairo_surface_wrapper_create_similar (cairo_surface_wrapper_t *wrapper, int width, int height) { - return _cairo_surface_create_similar_scratch (wrapper->target, - content, width, height); + return _cairo_surface_create_scratch (wrapper->target, + content, width, height, NULL); } cairo_bool_t diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface.c index 5e18b07e699..00ff52e8228 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-surface.c @@ -454,33 +454,6 @@ _cairo_surface_copy_similar_properties (cairo_surface_t *surface, other->y_fallback_resolution); } -cairo_surface_t * -_cairo_surface_create_similar_scratch (cairo_surface_t *other, - cairo_content_t content, - int width, - int height) -{ - cairo_surface_t *surface; - - if (unlikely (other->status)) - return _cairo_surface_create_in_error (other->status); - - surface = NULL; - if (other->backend->create_similar) - surface = other->backend->create_similar (other, content, width, height); - if (surface == NULL) - surface = cairo_surface_create_similar_image (other, - _cairo_format_from_content (content), - width, height); - - if (unlikely (surface->status)) - return surface; - - _cairo_surface_copy_similar_properties (surface, other); - - return surface; -} - /** * cairo_surface_create_similar: * @other: an existing surface used to select the backend of the new surface @@ -518,6 +491,8 @@ cairo_surface_create_similar (cairo_surface_t *other, int height) { cairo_surface_t *surface; + cairo_status_t status; + cairo_solid_pattern_t pattern; if (unlikely (other->status)) return _cairo_surface_create_in_error (other->status); @@ -529,9 +504,41 @@ cairo_surface_create_similar (cairo_surface_t *other, if (unlikely (! CAIRO_CONTENT_VALID (content))) return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_CONTENT); - surface = _cairo_surface_create_similar_solid (other, - content, width, height, - CAIRO_COLOR_TRANSPARENT); + if (unlikely (other->status)) + return _cairo_surface_create_in_error (other->status); + + /* We inherit the device scale, so create a larger surface */ + width = width * other->device_transform.xx; + height = height * other->device_transform.yy; + + surface = NULL; + if (other->backend->create_similar) + surface = other->backend->create_similar (other, content, width, height); + if (surface == NULL) + surface = cairo_surface_create_similar_image (other, + _cairo_format_from_content (content), + width, height); + + if (unlikely (surface->status)) + return surface; + + _cairo_surface_copy_similar_properties (surface, other); + cairo_surface_set_device_scale (surface, + other->device_transform.xx, + other->device_transform.yy); + + if (unlikely (surface->status)) + return surface; + + _cairo_pattern_init_solid (&pattern, CAIRO_COLOR_TRANSPARENT); + status = _cairo_surface_paint (surface, + CAIRO_OPERATOR_CLEAR, + &pattern.base, NULL); + if (unlikely (status)) { + cairo_surface_destroy (surface); + surface = _cairo_surface_create_in_error (status); + } + assert (surface->is_clear); return surface; @@ -852,29 +859,45 @@ error: } cairo_surface_t * -_cairo_surface_create_similar_solid (cairo_surface_t *other, - cairo_content_t content, - int width, - int height, - const cairo_color_t *color) +_cairo_surface_create_scratch (cairo_surface_t *other, + cairo_content_t content, + int width, + int height, + const cairo_color_t *color) { - cairo_status_t status; cairo_surface_t *surface; + cairo_status_t status; cairo_solid_pattern_t pattern; - surface = _cairo_surface_create_similar_scratch (other, content, - width, height); + if (unlikely (other->status)) + return _cairo_surface_create_in_error (other->status); + + surface = NULL; + if (other->backend->create_similar) + surface = other->backend->create_similar (other, content, width, height); + if (surface == NULL) + surface = cairo_surface_create_similar_image (other, + _cairo_format_from_content (content), + width, height); + if (unlikely (surface->status)) return surface; - _cairo_pattern_init_solid (&pattern, color); - status = _cairo_surface_paint (surface, - color == CAIRO_COLOR_TRANSPARENT ? - CAIRO_OPERATOR_CLEAR : CAIRO_OPERATOR_SOURCE, - &pattern.base, NULL); - if (unlikely (status)) { - cairo_surface_destroy (surface); - surface = _cairo_surface_create_in_error (status); + _cairo_surface_copy_similar_properties (surface, other); + + if (unlikely (surface->status)) + return surface; + + if (color) { + _cairo_pattern_init_solid (&pattern, color); + status = _cairo_surface_paint (surface, + color == CAIRO_COLOR_TRANSPARENT ? + CAIRO_OPERATOR_CLEAR : CAIRO_OPERATOR_SOURCE, + &pattern.base, NULL); + if (unlikely (status)) { + cairo_surface_destroy (surface); + surface = _cairo_surface_create_in_error (status); + } } return surface; @@ -1262,13 +1285,24 @@ _cairo_mime_data_destroy (void *ptr) * * The recognized MIME types are the following: %CAIRO_MIME_TYPE_JPEG, * %CAIRO_MIME_TYPE_PNG, %CAIRO_MIME_TYPE_JP2, %CAIRO_MIME_TYPE_URI, - * %CAIRO_MIME_TYPE_UNIQUE_ID. + * %CAIRO_MIME_TYPE_UNIQUE_ID, %CAIRO_MIME_TYPE_JBIG2, + * %CAIRO_MIME_TYPE_JBIG2_GLOBAL, %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID. * * See corresponding backend surface docs for details about which MIME * types it can handle. Caution: the associated MIME data will be * discarded if you draw on the surface afterwards. Use this function * with care. * + * Even if a backend supports a MIME type, that does not mean cairo + * will always be able to use the attached MIME data. For example, if + * the backend does not natively support the compositing operation used + * to apply the MIME data to the backend. In that case, the MIME data + * will be ignored. Therefore, to apply an image in all cases, it is best + * to create an image surface which contains the decoded image data and + * then attach the MIME data to that. This ensures the image will always + * be used while still allowing the MIME data to be used whenever + * possible. + * * Return value: %CAIRO_STATUS_SUCCESS or %CAIRO_STATUS_NO_MEMORY if a * slot could not be allocated for the user data. * @@ -1624,26 +1658,28 @@ cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface, slim_hidden_def (cairo_surface_mark_dirty_rectangle); /** - * _cairo_surface_set_device_scale: + * cairo_surface_set_device_scale: * @surface: a #cairo_surface_t - * @sx: a scale factor in the X direction - * @sy: a scale factor in the Y direction - * - * Private function for setting an extra scale factor to affect all - * drawing to a surface. This is used, for example, when replaying a - * recording surface to an image fallback intended for an eventual - * vector-oriented backend. Since the recording surface will record - * coordinates in one backend space, but the image fallback uses a - * different backend space, (differing by the fallback resolution - * scale factors), we need a scale factor correction. - * - * Caution: Not all places we use device transform correctly handle - * both a translate and a scale. An audit would be nice. + * @x_scale: a scale factor in the X direction + * @y_scale: a scale factor in the Y direction + * + * Sets a scale that is multiplied to the device coordinates determined + * by the CTM when drawing to @surface. One common use for this is to + * render to very high resolution display devices at a scale factor, so + * that code that assumes 1 pixel will be a certain size will still work. + * Setting a transformation via cairo_translate() isn't + * sufficient to do this, since functions like + * cairo_device_to_user() will expose the hidden scale. + * + * Note that the scale affects drawing to the surface as well as + * using the surface in a source pattern. + * + * Since: 1.14 **/ void -_cairo_surface_set_device_scale (cairo_surface_t *surface, - double sx, - double sy) +cairo_surface_set_device_scale (cairo_surface_t *surface, + double x_scale, + double y_scale) { cairo_status_t status; @@ -1663,8 +1699,8 @@ _cairo_surface_set_device_scale (cairo_surface_t *surface, return; } - surface->device_transform.xx = sx; - surface->device_transform.yy = sy; + surface->device_transform.xx = x_scale; + surface->device_transform.yy = y_scale; surface->device_transform.xy = 0.0; surface->device_transform.yx = 0.0; @@ -1675,6 +1711,30 @@ _cairo_surface_set_device_scale (cairo_surface_t *surface, _cairo_observers_notify (&surface->device_transform_observers, surface); } +slim_hidden_def (cairo_surface_set_device_scale); + +/** + * cairo_surface_get_device_scale: + * @surface: a #cairo_surface_t + * @x_scale: the scale in the X direction, in device units + * @y_scale: the scale in the Y direction, in device units + * + * This function returns the previous device offset set by + * cairo_surface_set_device_scale(). + * + * Since: 1.14 + **/ +void +cairo_surface_get_device_scale (cairo_surface_t *surface, + double *x_scale, + double *y_scale) +{ + if (x_scale) + *x_scale = surface->device_transform.xx; + if (y_scale) + *y_scale = surface->device_transform.yy; +} +slim_hidden_def (cairo_surface_get_device_scale); /** * cairo_surface_set_device_offset: @@ -2459,7 +2519,6 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface, const cairo_clip_t *clip) { cairo_int_status_t status; - cairo_scaled_font_t *dev_scaled_font = scaled_font; TRACE ((stderr, "%s\n", __FUNCTION__)); if (unlikely (surface->status)) @@ -2484,25 +2543,6 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface, if (unlikely (status)) return status; - if (_cairo_surface_has_device_transform (surface) && - ! _cairo_matrix_is_integer_translation (&surface->device_transform, NULL, NULL)) - { - cairo_font_options_t font_options; - cairo_matrix_t dev_ctm, font_matrix; - - cairo_scaled_font_get_font_matrix (scaled_font, &font_matrix); - cairo_scaled_font_get_ctm (scaled_font, &dev_ctm); - cairo_matrix_multiply (&dev_ctm, &dev_ctm, &surface->device_transform); - cairo_scaled_font_get_font_options (scaled_font, &font_options); - dev_scaled_font = cairo_scaled_font_create (cairo_scaled_font_get_font_face (scaled_font), - &font_matrix, - &dev_ctm, - &font_options); - } - status = cairo_scaled_font_status (dev_scaled_font); - if (unlikely (status)) - return _cairo_surface_set_error (surface, status); - status = CAIRO_INT_STATUS_UNSUPPORTED; /* The logic here is duplicated in _cairo_analysis_surface show_glyphs and @@ -2516,7 +2556,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags, - dev_scaled_font, + scaled_font, clip); } if (status == CAIRO_INT_STATUS_UNSUPPORTED && @@ -2525,7 +2565,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface, status = surface->backend->show_glyphs (surface, op, source, glyphs, num_glyphs, - dev_scaled_font, + scaled_font, clip); } } else { @@ -2534,7 +2574,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface, status = surface->backend->show_glyphs (surface, op, source, glyphs, num_glyphs, - dev_scaled_font, + scaled_font, clip); } else if (surface->backend->show_text_glyphs != NULL) { /* Intentionally only try show_text_glyphs method for show_glyphs @@ -2550,14 +2590,11 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags, - dev_scaled_font, + scaled_font, clip); } } - if (dev_scaled_font != scaled_font) - cairo_scaled_font_destroy (dev_scaled_font); - if (status != CAIRO_INT_STATUS_NOTHING_TO_DO) { surface->is_clear = FALSE; surface->serial++; @@ -2588,6 +2625,16 @@ _cairo_surface_set_resolution (cairo_surface_t *surface, surface->y_resolution = y_res; } +/** + * _cairo_surface_create_in_error: + * @status: the error status + * + * Return an appropriate static error surface for the error status. + * On error, surface creation functions should always return a surface + * created with _cairo_surface_create_in_error() instead of a new surface + * in an error state. This simplifies internal code as no refcounting has + * to be done. + **/ cairo_surface_t * _cairo_surface_create_in_error (cairo_status_t status) { @@ -2648,6 +2695,7 @@ _cairo_surface_create_in_error (cairo_status_t status) case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: case CAIRO_STATUS_DEVICE_FINISHED: + case CAIRO_STATUS_JBIG2_GLOBAL_MISSING: default: _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return (cairo_surface_t *) &_cairo_surface_nil; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg-surface-private.h index ddbf464b1d2..ddbf464b1d2 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg-surface.c index 5ee2857dc9e..372ef45b86e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg-surface.c @@ -808,7 +808,7 @@ _cairo_svg_document_emit_bitmap_glyph_data (cairo_svg_document_t *document, _cairo_output_stream_printf (document->xml_node_glyphs, "<g"); _cairo_svg_surface_emit_transform (document->xml_node_glyphs, " transform", &image->base.device_transform_inverse, NULL); - _cairo_output_stream_printf (document->xml_node_glyphs, ">/n"); + _cairo_output_stream_printf (document->xml_node_glyphs, ">\n"); for (y = 0, row = image->data, rows = image->height; rows; row += image->stride, rows--, y++) { for (x = 0, byte = row, cols = (image->width + 7) / 8; cols; byte++, cols--) { @@ -1118,6 +1118,9 @@ _cairo_surface_base64_encode_jpeg (cairo_surface_t *surface, if (unlikely (status)) return status; + if (image_info.num_components == 4) + return CAIRO_INT_STATUS_UNSUPPORTED; + _cairo_output_stream_printf (output, "data:image/jpeg;base64,"); info.output = output; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg.h index 592c645f627..592c645f627 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-svg.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-svg.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee-surface-private.h index a83cfc959db..a83cfc959db 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee-surface.c index 294e5f162e2..294e5f162e2 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee.h index 9125a3a4a2b..9125a3a4a2b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tee.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tee.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-time-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-time-private.h index 06dc912b431..06dc912b431 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-time-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-time-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-time.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-time.c index a0003fbfc2c..a0003fbfc2c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-time.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-time.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tor-scan-converter.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tor-scan-converter.c index 89ef20f0960..4adcafb4c5c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tor-scan-converter.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tor-scan-converter.c @@ -262,7 +262,7 @@ typedef int grid_scaled_y_t; struct quorem { int32_t quo; - int32_t rem; + int64_t rem; }; /* Header for a chunk of memory in a memory pool. */ @@ -308,6 +308,9 @@ struct edge { /* Next in y-bucket or active list. */ struct edge *next, *prev; + /* The clipped y of the top of the edge. */ + grid_scaled_y_t ytop; + /* Number of subsample rows remaining to scan convert of this * edge. */ grid_scaled_y_t height_left; @@ -315,7 +318,7 @@ struct edge { /* Original sign of the edge: +1 for downwards, -1 for upwards * edges. */ int dir; - int vertical; + int cell; /* Current x coordinate while the edge is on the active * list. Initialised to the x coordinate of the top of the @@ -332,11 +335,8 @@ struct edge { * full row's worth of subsample rows at a time. */ struct quorem dxdy_full; - /* The clipped y of the top of the edge. */ - grid_scaled_y_t ytop; - /* y2-y1 after orienting the edge downwards. */ - grid_scaled_y_t dy; + int64_t dy; }; #define EDGE_Y_BUCKET_INDEX(y, ymin) (((y) - (ymin))/GRID_Y) @@ -458,37 +458,6 @@ struct glitter_scan_converter { grid_scaled_y_t ymin, ymax; }; -/* Compute the floored division a/b. Assumes / and % perform symmetric - * division. */ -inline static struct quorem -floored_divrem(int a, int b) -{ - struct quorem qr; - qr.quo = a/b; - qr.rem = a%b; - if ((a^b)<0 && qr.rem) { - qr.quo -= 1; - qr.rem += b; - } - return qr; -} - -/* Compute the floored division (x*a)/b. Assumes / and % perform symmetric - * division. */ -static struct quorem -floored_muldivrem(int x, int a, int b) -{ - struct quorem qr; - long long xa = (long long)x*a; - qr.quo = xa/b; - qr.rem = xa%b; - if ((xa>=0) != (b>=0) && qr.rem) { - qr.quo -= 1; - qr.rem += b; - } - return qr; -} - static struct _pool_chunk * _pool_chunk_init( struct _pool_chunk *p, @@ -778,6 +747,25 @@ cell_list_add_subspan(struct cell_list *cells, } } +inline static void full_step (struct edge *e) +{ + if (e->dy == 0) + return; + + e->x.quo += e->dxdy_full.quo; + e->x.rem += e->dxdy_full.rem; + if (e->x.rem < 0) { + e->x.quo--; + e->x.rem += e->dy; + } else if (e->x.rem >= e->dy) { + ++e->x.quo; + e->x.rem -= e->dy; + } + + e->cell = e->x.quo + (e->x.rem >= e->dy/2); +} + + /* Adds the analytical coverage of an edge crossing the current pixel * row to the coverage cells and advances the edge's x position to the * following row. @@ -800,28 +788,42 @@ cell_list_render_edge(struct cell_list *cells, struct edge *edge, int sign) { - grid_scaled_y_t y1, y2, dy; - grid_scaled_x_t dx; - int ix1, ix2; + struct quorem x1, x2; grid_scaled_x_t fx1, fx2; + int ix1, ix2; - struct quorem x1 = edge->x; - struct quorem x2 = x1; + x1 = edge->x; + full_step (edge); + x2 = edge->x; + + /* Step back from the sample location (half-subrow) to the pixel origin */ + if (edge->dy) { + x1.quo -= edge->dxdy.quo / 2; + x1.rem -= edge->dxdy.rem / 2; + if (x1.rem < 0) { + --x1.quo; + x1.rem += edge->dy; + } else if (x1.rem >= edge->dy) { + ++x1.quo; + x1.rem -= edge->dy; + } - if (! edge->vertical) { - x2.quo += edge->dxdy_full.quo; - x2.rem += edge->dxdy_full.rem; - if (x2.rem >= 0) { + x2.quo -= edge->dxdy.quo / 2; + x2.rem -= edge->dxdy.rem / 2; + if (x2.rem < 0) { + --x2.quo; + x2.rem += edge->dy; + } else if (x2.rem >= edge->dy) { ++x2.quo; x2.rem -= edge->dy; } - - edge->x = x2; } GRID_X_TO_INT_FRAC(x1.quo, ix1, fx1); GRID_X_TO_INT_FRAC(x2.quo, ix2, fx2); + cell_list_maybe_rewind(cells, MIN(ix1, ix2)); + /* Edge is entirely within a column? */ if (ix1 == ix2) { /* We always know that ix1 is >= the cell list cursor in this @@ -833,26 +835,39 @@ cell_list_render_edge(struct cell_list *cells, } /* Orient the edge left-to-right. */ - dx = x2.quo - x1.quo; - if (dx >= 0) { - y1 = 0; - y2 = GRID_Y; - } else { - int tmp; - tmp = ix1; ix1 = ix2; ix2 = tmp; - tmp = fx1; fx1 = fx2; fx2 = tmp; - dx = -dx; - sign = -sign; - y1 = GRID_Y; - y2 = 0; + if (ix2 < ix1) { + struct quorem tx; + int t; + + t = ix1; + ix1 = ix2; + ix2 = t; + + t = fx1; + fx1 = fx2; + fx2 = t; + + tx = x1; + x1 = x2; + x2 = tx; } - dy = y2 - y1; /* Add coverage for all pixels [ix1,ix2] on this row crossed * by the edge. */ { struct cell_pair pair; - struct quorem y = floored_divrem((GRID_X - fx1)*dy, dx); + struct quorem y; + int64_t tmp, dx; + int y_last; + + dx = (x2.quo - x1.quo) * edge->dy + (x2.rem - x1.rem); + + tmp = (ix1 + 1) * GRID_X * edge->dy; + tmp -= x1.quo * edge->dy + x1.rem; + tmp *= GRID_Y; + + y.quo = tmp / dx; + y.rem = tmp % dx; /* When rendering a previous edge on the active list we may * advance the cell list cursor past the leftmost pixel of the @@ -868,35 +883,32 @@ cell_list_render_edge(struct cell_list *cells, * * The left edge touches cells past the starting cell of the * right edge. Fortunately such cases are rare. - * - * The rewinding is never necessary if the current edge stays - * within a single column because we've checked before calling - * this function that the active list order won't change. */ - cell_list_maybe_rewind(cells, ix1); + */ pair = cell_list_find_pair(cells, ix1, ix1+1); pair.cell1->uncovered_area += sign*y.quo*(GRID_X + fx1); pair.cell1->covered_height += sign*y.quo; - y.quo += y1; + y_last = y.quo; if (ix1+1 < ix2) { - struct quorem dydx_full = floored_divrem(GRID_X*dy, dx); struct cell *cell = pair.cell2; + struct quorem dydx_full; + + dydx_full.quo = GRID_Y * GRID_X * edge->dy / dx; + dydx_full.rem = GRID_Y * GRID_X * edge->dy % dx; ++ix1; do { - grid_scaled_y_t y_skip = dydx_full.quo; + y.quo += dydx_full.quo; y.rem += dydx_full.rem; if (y.rem >= dx) { - ++y_skip; + y.quo++; y.rem -= dx; } - y.quo += y_skip; - - y_skip *= sign; - cell->uncovered_area += y_skip*GRID_X; - cell->covered_height += y_skip; + cell->uncovered_area += sign*(y.quo - y_last)*GRID_X; + cell->covered_height += sign*(y.quo - y_last); + y_last = y.quo; ++ix1; cell = cell_list_find(cells, ix1); @@ -904,8 +916,8 @@ cell_list_render_edge(struct cell_list *cells, pair.cell2 = cell; } - pair.cell2->uncovered_area += sign*(y2 - y.quo)*fx2; - pair.cell2->covered_height += sign*(y2 - y.quo); + pair.cell2->uncovered_area += sign*(GRID_Y - y_last)*fx2; + pair.cell2->covered_height += sign*(GRID_Y - y_last); } } @@ -976,78 +988,19 @@ _polygon_insert_edge_into_its_y_bucket(struct polygon *polygon, *ptail = e; } -inline static void -polygon_add_edge (struct polygon *polygon, - const cairo_edge_t *edge) -{ - struct edge *e; - grid_scaled_x_t dx; - grid_scaled_y_t dy; - grid_scaled_y_t ytop, ybot; - grid_scaled_y_t ymin = polygon->ymin; - grid_scaled_y_t ymax = polygon->ymax; - - if (unlikely (edge->top >= ymax || edge->bottom <= ymin)) - return; - - e = pool_alloc (polygon->edge_pool.base, sizeof (struct edge)); - - dx = edge->line.p2.x - edge->line.p1.x; - dy = edge->line.p2.y - edge->line.p1.y; - e->dy = dy; - e->dir = edge->dir; - - ytop = edge->top >= ymin ? edge->top : ymin; - ybot = edge->bottom <= ymax ? edge->bottom : ymax; - e->ytop = ytop; - e->height_left = ybot - ytop; - - if (dx == 0) { - e->vertical = TRUE; - e->x.quo = edge->line.p1.x; - e->x.rem = 0; - e->dxdy.quo = 0; - e->dxdy.rem = 0; - e->dxdy_full.quo = 0; - e->dxdy_full.rem = 0; - } else { - e->vertical = FALSE; - e->dxdy = floored_divrem (dx, dy); - if (ytop == edge->line.p1.y) { - e->x.quo = edge->line.p1.x; - e->x.rem = 0; - } else { - e->x = floored_muldivrem (ytop - edge->line.p1.y, dx, dy); - e->x.quo += edge->line.p1.x; - } - - if (e->height_left >= GRID_Y) { - e->dxdy_full = floored_muldivrem (GRID_Y, dx, dy); - } else { - e->dxdy_full.quo = 0; - e->dxdy_full.rem = 0; - } - } - - _polygon_insert_edge_into_its_y_bucket (polygon, e); - - e->x.rem -= dy; /* Bias the remainder for faster - * edge advancement. */ -} - static void active_list_reset (struct active_list *active) { - active->head.vertical = 1; active->head.height_left = INT_MAX; - active->head.x.quo = INT_MIN; + active->head.dy = 0; + active->head.cell = INT_MIN; active->head.prev = NULL; active->head.next = &active->tail; active->tail.prev = &active->head; active->tail.next = NULL; - active->tail.x.quo = INT_MAX; + active->tail.cell = INT_MAX; active->tail.height_left = INT_MAX; - active->tail.vertical = 1; + active->tail.dy = 0; active->min_height = 0; active->is_vertical = 1; } @@ -1084,7 +1037,7 @@ merge_sorted_edges (struct edge *head_a, struct edge *head_b) prev = head_a->prev; next = &head; - if (head_a->x.quo <= head_b->x.quo) { + if (head_a->cell <= head_b->cell) { head = head_a; } else { head = head_b; @@ -1093,8 +1046,8 @@ merge_sorted_edges (struct edge *head_a, struct edge *head_b) } do { - x = head_b->x.quo; - while (head_a != NULL && head_a->x.quo <= x) { + x = head_b->cell; + while (head_a != NULL && head_a->cell <= x) { prev = head_a; next = &head_a->next; head_a = head_a->next; @@ -1106,8 +1059,8 @@ merge_sorted_edges (struct edge *head_a, struct edge *head_b) return head; start_with_b: - x = head_a->x.quo; - while (head_b != NULL && head_b->x.quo <= x) { + x = head_a->cell; + while (head_b != NULL && head_b->cell <= x) { prev = head_b; next = &head_b->next; head_b = head_b->next; @@ -1153,7 +1106,7 @@ sort_edges (struct edge *list, } remaining = head_other->next; - if (list->x.quo <= head_other->x.quo) { + if (list->cell <= head_other->cell) { *head_out = list; head_other->next = NULL; } else { @@ -1197,7 +1150,7 @@ can_do_full_row (struct active_list *active) while (NULL != e) { if (e->height_left < min_height) min_height = e->height_left; - is_vertical &= e->vertical; + is_vertical &= e->dy == 0; e = e->next; } @@ -1210,19 +1163,27 @@ can_do_full_row (struct active_list *active) /* Check for intersections as no edges end during the next row. */ for (e = active->head.next; e != &active->tail; e = e->next) { - struct quorem x = e->x; - - if (! e->vertical) { - x.quo += e->dxdy_full.quo; - x.rem += e->dxdy_full.rem; - if (x.rem >= 0) - ++x.quo; - } + int cell; + + if (e->dy) { + struct quorem x = e->x; + x.quo += e->dxdy_full.quo - e->dxdy.quo/2; + x.rem += e->dxdy_full.rem - e->dxdy.rem/2; + if (x.rem < 0) { + x.quo--; + x.rem += e->dy; + } else if (x.rem >= e->dy) { + x.quo++; + x.rem -= e->dy; + } + cell = x.quo + (x.rem >= e->dy/2); + } else + cell = e->cell; - if (x.quo < prev_x) + if (cell < prev_x) return 0; - prev_x = x.quo; + prev_x = cell; } return 1; @@ -1237,7 +1198,7 @@ active_list_merge_edges_from_bucket(struct active_list *active, active->head.next = merge_unsorted_edges (active->head.next, edges); } -inline static void +inline static int polygon_fill_buckets (struct active_list *active, struct edge *edge, int y, @@ -1245,6 +1206,7 @@ polygon_fill_buckets (struct active_list *active, { grid_scaled_y_t min_height = active->min_height; int is_vertical = active->is_vertical; + int max_suby = 0; while (edge) { struct edge *next = edge->next; @@ -1256,12 +1218,34 @@ polygon_fill_buckets (struct active_list *active, buckets[suby] = edge; if (edge->height_left < min_height) min_height = edge->height_left; - is_vertical &= edge->vertical; + is_vertical &= edge->dy == 0; edge = next; + if (suby > max_suby) + max_suby = suby; } active->is_vertical = is_vertical; active->min_height = min_height; + + return max_suby; +} + +static void step (struct edge *edge) +{ + if (edge->dy == 0) + return; + + edge->x.quo += edge->dxdy.quo; + edge->x.rem += edge->dxdy.rem; + if (edge->x.rem < 0) { + --edge->x.quo; + edge->x.rem += edge->dy; + } else if (edge->x.rem >= edge->dy) { + ++edge->x.quo; + edge->x.rem -= edge->dy; + } + + edge->cell = edge->x.quo + (edge->x.rem >= edge->dy/2); } inline static void @@ -1277,29 +1261,24 @@ sub_row (struct active_list *active, while (&active->tail != edge) { struct edge *next = edge->next; - int xend = edge->x.quo; + int xend = edge->cell; if (--edge->height_left) { - edge->x.quo += edge->dxdy.quo; - edge->x.rem += edge->dxdy.rem; - if (edge->x.rem >= 0) { - ++edge->x.quo; - edge->x.rem -= edge->dy; - } + step (edge); - if (edge->x.quo < prev_x) { + if (edge->cell < prev_x) { struct edge *pos = edge->prev; pos->next = next; next->prev = pos; do { pos = pos->prev; - } while (edge->x.quo < pos->x.quo); + } while (edge->cell < pos->cell); pos->next->prev = edge; edge->next = pos->next; edge->prev = pos; pos->next = edge; } else - prev_x = edge->x.quo; + prev_x = edge->cell; active->min_height = -1; } else { edge->prev->next = next; @@ -1308,7 +1287,7 @@ sub_row (struct active_list *active, winding += edge->dir; if ((winding & mask) == 0) { - if (next->x.quo != xend) { + if (next->cell != xend) { cell_list_add_subspan (coverages, xstart, xend); xstart = INT_MIN; } @@ -1329,18 +1308,6 @@ inline static void dec (struct active_list *a, struct edge *e, int h) } } -inline static void full_step (struct edge *e) -{ - if (! e->vertical) { - e->x.quo += e->dxdy_full.quo; - e->x.rem += e->dxdy_full.rem; - if (e->x.rem >= 0) { - ++e->x.quo; - e->x.rem -= e->dy; - } - } -} - static void full_row (struct active_list *active, struct cell_list *coverages, @@ -1360,7 +1327,7 @@ full_row (struct active_list *active, dec (active, right, GRID_Y); winding += right->dir; - if ((winding & mask) == 0 && right->next->x.quo != right->x.quo) + if ((winding & mask) == 0 && right->next->cell != right->cell) break; full_step (right); @@ -1482,10 +1449,96 @@ glitter_scan_converter_reset( #define INPUT_TO_GRID_general(in, out, grid_scale) do { \ long long tmp__ = (long long)(grid_scale) * (in); \ + tmp__ += 1 << (GLITTER_INPUT_BITS-1); \ tmp__ >>= GLITTER_INPUT_BITS; \ (out) = tmp__; \ } while (0) +inline static void +polygon_add_edge (struct polygon *polygon, + const cairo_edge_t *edge) +{ + struct edge *e; + grid_scaled_y_t ytop, ybot; + const cairo_point_t *p1, *p2; + + INPUT_TO_GRID_Y (edge->top, ytop); + if (ytop < polygon->ymin) + ytop = polygon->ymin; + + INPUT_TO_GRID_Y (edge->bottom, ybot); + if (ybot > polygon->ymax) + ybot = polygon->ymax; + + if (ybot <= ytop) + return; + + e = pool_alloc (polygon->edge_pool.base, sizeof (struct edge)); + + e->ytop = ytop; + e->height_left = ybot - ytop; + if (edge->line.p2.y > edge->line.p1.y) { + e->dir = edge->dir; + p1 = &edge->line.p1; + p2 = &edge->line.p2; + } else { + e->dir = -edge->dir; + p1 = &edge->line.p2; + p2 = &edge->line.p1; + } + + if (p2->x == p1->x) { + e->cell = p1->x; + e->x.quo = p1->x; + e->x.rem = 0; + e->dxdy.quo = e->dxdy.rem = 0; + e->dxdy_full.quo = e->dxdy_full.rem = 0; + e->dy = 0; + } else { + int64_t Ex, Ey, tmp; + + Ex = (int64_t)(p2->x - p1->x) * GRID_X; + Ey = (int64_t)(p2->y - p1->y) * GRID_Y * (2 << GLITTER_INPUT_BITS); + + e->dxdy.quo = Ex * (2 << GLITTER_INPUT_BITS) / Ey; + e->dxdy.rem = Ex * (2 << GLITTER_INPUT_BITS) % Ey; + + tmp = (int64_t)(2*ytop + 1) << GLITTER_INPUT_BITS; + tmp -= (int64_t)p1->y * GRID_Y * 2; + tmp *= Ex; + e->x.quo = tmp / Ey; + e->x.rem = tmp % Ey; + +#if GRID_X_BITS == GLITTER_INPUT_BITS + e->x.quo += p1->x; +#else + tmp = (int64_t)p1->x * GRID_X; + e->x.quo += tmp >> GLITTER_INPUT_BITS; + e->x.rem += ((tmp & ((1 << GLITTER_INPUT_BITS) - 1)) * Ey) / (1 << GLITTER_INPUT_BITS); +#endif + + if (e->x.rem < 0) { + e->x.quo--; + e->x.rem += Ey; + } else if (e->x.rem >= Ey) { + e->x.quo++; + e->x.rem -= Ey; + } + + if (e->height_left >= GRID_Y) { + tmp = Ex * (2 * GRID_Y << GLITTER_INPUT_BITS); + e->dxdy_full.quo = tmp / Ey; + e->dxdy_full.rem = tmp % Ey; + } else + e->dxdy_full.quo = e->dxdy_full.rem = 0; + + e->cell = e->x.quo + (e->x.rem >= Ey/2); + e->dy = Ey; + } + + _polygon_insert_edge_into_its_y_bucket (polygon, e); +} + /* Add a new polygon edge from pixel (x1,y1) to (x2,y2) to the scan * converter. The coordinates represent pixel positions scaled by * 2**GLITTER_PIXEL_BITS. If this function fails then the scan @@ -1495,25 +1548,7 @@ I void glitter_scan_converter_add_edge (glitter_scan_converter_t *converter, const cairo_edge_t *edge) { - cairo_edge_t e; - - INPUT_TO_GRID_Y (edge->top, e.top); - INPUT_TO_GRID_Y (edge->bottom, e.bottom); - if (e.top >= e.bottom) - return; - - /* XXX: possible overflows if GRID_X/Y > 2**GLITTER_INPUT_BITS */ - INPUT_TO_GRID_Y (edge->line.p1.y, e.line.p1.y); - INPUT_TO_GRID_Y (edge->line.p2.y, e.line.p2.y); - if (e.line.p1.y == e.line.p2.y) - e.line.p2.y++; /* little fudge to prevent a div-by-zero */ - - INPUT_TO_GRID_X (edge->line.p1.x, e.line.p1.x); - INPUT_TO_GRID_X (edge->line.p2.x, e.line.p2.x); - - e.dir = edge->dir; - - polygon_add_edge (converter->polygon, &e); + polygon_add_edge (converter->polygon, edge); } static void @@ -1699,7 +1734,15 @@ glitter_scan_converter_render(glitter_scan_converter_t *converter, /* Determine if we can ignore this row or use the full pixel * stepper. */ - if (! polygon->y_buckets[i]) { + if (polygon_fill_buckets (active, + polygon->y_buckets[i], + (i+ymin_i)*GRID_Y, + buckets) == 0) { + if (buckets[0]) { + active_list_merge_edges_from_bucket (active, buckets[0]); + buckets[0] = NULL; + } + if (active->head.next == &active->tail) { active->min_height = INT_MAX; active->is_vertical = 1; @@ -1729,18 +1772,12 @@ glitter_scan_converter_render(glitter_scan_converter_t *converter, } else { int sub; - polygon_fill_buckets (active, - polygon->y_buckets[i], - (i+ymin_i)*GRID_Y, - buckets); - /* Subsample this row. */ for (sub = 0; sub < GRID_Y; sub++) { if (buckets[sub]) { active_list_merge_edges_from_bucket (active, buckets[sub]); buckets[sub] = NULL; } - sub_row (active, coverages, winding_mask); } } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tor22-scan-converter.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tor22-scan-converter.c index 4cec5ee4f37..4cec5ee4f37 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tor22-scan-converter.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tor22-scan-converter.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-toy-font-face.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-toy-font-face.c index 363b9a284bb..4fe94ab0919 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-toy-font-face.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-toy-font-face.c @@ -342,7 +342,7 @@ cairo_toy_font_face_create (const char *family, } slim_hidden_def (cairo_toy_font_face_create); -static void +static cairo_bool_t _cairo_toy_font_face_destroy (void *abstract_face) { cairo_toy_font_face_t *font_face = abstract_face; @@ -352,10 +352,10 @@ _cairo_toy_font_face_destroy (void *abstract_face) /* All created objects must have been mapped in the hash table. */ assert (hash_table != NULL); - if (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&font_face->base.ref_count)) { + if (! _cairo_reference_count_dec_and_test (&font_face->base.ref_count)) { /* somebody recreated the font whilst we waited for the lock */ _cairo_toy_font_face_hash_table_unlock (); - return; + return FALSE; } /* Font faces in SUCCESS status are guaranteed to be in the @@ -369,6 +369,7 @@ _cairo_toy_font_face_destroy (void *abstract_face) _cairo_toy_font_face_hash_table_unlock (); _cairo_toy_font_face_fini (font_face); + return TRUE; } static cairo_status_t diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps-compositor.c index 988d23c8d64..3414fc2684a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps-compositor.c @@ -307,10 +307,11 @@ __clip_to_surface (const cairo_traps_compositor_t *compositor, if (unlikely (status)) return status; - mask = _cairo_surface_create_similar_scratch (composite->surface, - CAIRO_CONTENT_ALPHA, - extents->width, - extents->height); + mask = _cairo_surface_create_scratch (composite->surface, + CAIRO_CONTENT_ALPHA, + extents->width, + extents->height, + NULL); if (unlikely (mask->status)) { _cairo_traps_fini (&traps); return status; @@ -371,11 +372,11 @@ traps_get_clip_surface (const cairo_traps_compositor_t *compositor, status = __clip_to_surface (compositor, composite, extents, &surface); if (status == CAIRO_INT_STATUS_UNSUPPORTED) { - surface = _cairo_surface_create_similar_solid (composite->surface, - CAIRO_CONTENT_ALPHA, - extents->width, - extents->height, - CAIRO_COLOR_WHITE); + surface = _cairo_surface_create_scratch (composite->surface, + CAIRO_CONTENT_ALPHA, + extents->width, + extents->height, + CAIRO_COLOR_WHITE); if (unlikely (surface->status)) return surface; @@ -430,9 +431,10 @@ create_composite_mask (const cairo_traps_compositor_t *compositor, TRACE ((stderr, "%s\n", __FUNCTION__)); - surface = _cairo_surface_create_similar_scratch (dst, CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + surface = _cairo_surface_create_scratch (dst, CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (surface->status)) return surface; @@ -590,9 +592,10 @@ clip_and_composite_combine (const cairo_traps_compositor_t *compositor, TRACE ((stderr, "%s\n", __FUNCTION__)); - tmp = _cairo_surface_create_similar_scratch (dst, dst->content, - extents->bounded.width, - extents->bounded.height); + tmp = _cairo_surface_create_scratch (dst, dst->content, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (tmp->status)) return tmp->status; @@ -1206,7 +1209,9 @@ composite_aligned_boxes (const cairo_traps_compositor_t *compositor, &extents->source_sample_area)) { cairo_clip_t *recording_clip; - cairo_pattern_t *source = &extents->source_pattern.base; + const cairo_pattern_t *source = &extents->source_pattern.base; + const cairo_matrix_t *m; + cairo_matrix_t matrix; /* XXX could also do tiling repeat modes... */ @@ -1225,10 +1230,17 @@ composite_aligned_boxes (const cairo_traps_compositor_t *compositor, return status; } + m = &source->matrix; + if (_cairo_surface_has_device_transform (dst)) { + cairo_matrix_multiply (&matrix, + &source->matrix, + &dst->device_transform); + m = &matrix; + } + recording_clip = _cairo_clip_from_boxes (boxes); status = _cairo_recording_surface_replay_with_clip (recording_pattern_get_surface (source), - &source->matrix, - dst, recording_clip); + m, dst, recording_clip); _cairo_clip_destroy (recording_clip); return status; @@ -1381,7 +1393,7 @@ boxes_for_traps (cairo_boxes_t *boxes, cairo_traps_t *traps, cairo_antialias_t antialias) { - int i; + int i, j; /* first check that the traps are rectilinear */ if (antialias == CAIRO_ANTIALIAS_NONE) { @@ -1405,23 +1417,25 @@ boxes_for_traps (cairo_boxes_t *boxes, _cairo_boxes_init (boxes); - boxes->num_boxes = traps->num_traps; boxes->chunks.base = (cairo_box_t *) traps->traps; - boxes->chunks.count = traps->num_traps; boxes->chunks.size = traps->num_traps; if (antialias != CAIRO_ANTIALIAS_NONE) { - for (i = 0; i < traps->num_traps; i++) { + for (i = j = 0; i < traps->num_traps; i++) { /* Note the traps and boxes alias so we need to take the local copies first. */ cairo_fixed_t x1 = traps->traps[i].left.p1.x; cairo_fixed_t x2 = traps->traps[i].right.p1.x; cairo_fixed_t y1 = traps->traps[i].top; cairo_fixed_t y2 = traps->traps[i].bottom; - boxes->chunks.base[i].p1.x = x1; - boxes->chunks.base[i].p1.y = y1; - boxes->chunks.base[i].p2.x = x2; - boxes->chunks.base[i].p2.y = y2; + if (x1 == x2 || y1 == y2) + continue; + + boxes->chunks.base[j].p1.x = x1; + boxes->chunks.base[j].p1.y = y1; + boxes->chunks.base[j].p2.x = x2; + boxes->chunks.base[j].p2.y = y2; + j++; if (boxes->is_pixel_aligned) { boxes->is_pixel_aligned = @@ -1432,7 +1446,7 @@ boxes_for_traps (cairo_boxes_t *boxes, } else { boxes->is_pixel_aligned = TRUE; - for (i = 0; i < traps->num_traps; i++) { + for (i = j = 0; i < traps->num_traps; i++) { /* Note the traps and boxes alias so we need to take the local copies first. */ cairo_fixed_t x1 = traps->traps[i].left.p1.x; cairo_fixed_t x2 = traps->traps[i].right.p1.x; @@ -1440,12 +1454,16 @@ boxes_for_traps (cairo_boxes_t *boxes, cairo_fixed_t y2 = traps->traps[i].bottom; /* round down here to match Pixman's behavior when using traps. */ - boxes->chunks.base[i].p1.x = _cairo_fixed_round_down (x1); - boxes->chunks.base[i].p1.y = _cairo_fixed_round_down (y1); - boxes->chunks.base[i].p2.x = _cairo_fixed_round_down (x2); - boxes->chunks.base[i].p2.y = _cairo_fixed_round_down (y2); + boxes->chunks.base[j].p1.x = _cairo_fixed_round_down (x1); + boxes->chunks.base[j].p1.y = _cairo_fixed_round_down (y1); + boxes->chunks.base[j].p2.x = _cairo_fixed_round_down (x2); + boxes->chunks.base[j].p2.y = _cairo_fixed_round_down (y2); + j += (boxes->chunks.base[j].p1.x != boxes->chunks.base[j].p2.x && + boxes->chunks.base[j].p1.y != boxes->chunks.base[j].p2.y); } } + boxes->chunks.count = j; + boxes->num_boxes = j; return CAIRO_INT_STATUS_SUCCESS; } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps-private.h index 7fef062a44a..dcaf40d1863 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps-private.h @@ -91,8 +91,9 @@ cairo_private void _cairo_traps_translate (cairo_traps_t *traps, int x, int y); cairo_private void -_cairo_traps_tessellate_triangle (cairo_traps_t *traps, - const cairo_point_t t[3]); +_cairo_traps_tessellate_triangle_with_edges (cairo_traps_t *traps, + const cairo_point_t t[3], + const cairo_point_t edges[4]); cairo_private void _cairo_traps_tessellate_convex_quad (cairo_traps_t *traps, @@ -106,7 +107,8 @@ _cairo_traps_tessellate_rectangle (cairo_traps_t *traps, cairo_private void _cairo_traps_add_trap (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bottom, - cairo_line_t *left, cairo_line_t *right); + const cairo_line_t *left, + const cairo_line_t *right); cairo_private int _cairo_traps_contain (const cairo_traps_t *traps, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps.c index 9f1d4a7f5a5..3aa0052f91f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-traps.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-traps.c @@ -42,6 +42,7 @@ #include "cairo-box-inline.h" #include "cairo-boxes-private.h" #include "cairo-error-private.h" +#include "cairo-line-private.h" #include "cairo-region-private.h" #include "cairo-slope-private.h" #include "cairo-traps-private.h" @@ -149,10 +150,15 @@ _cairo_traps_grow (cairo_traps_t *traps) void _cairo_traps_add_trap (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bottom, - cairo_line_t *left, cairo_line_t *right) + const cairo_line_t *left, + const cairo_line_t *right) { cairo_trapezoid_t *trap; + assert (left->p1.y != left->p2.y); + assert (right->p1.y != right->p2.y); + assert (bottom > top); + if (unlikely (traps->num_traps == traps->traps_size)) { if (unlikely (! _cairo_traps_grow (traps))) return; @@ -168,7 +174,8 @@ _cairo_traps_add_trap (cairo_traps_t *traps, static void _cairo_traps_add_clipped_trap (cairo_traps_t *traps, cairo_fixed_t _top, cairo_fixed_t _bottom, - cairo_line_t *_left, cairo_line_t *_right) + const cairo_line_t *_left, + const cairo_line_t *_right) { /* Note: With the goofy trapezoid specification, (where an * arbitrary two points on the lines can specified for the left @@ -386,23 +393,73 @@ _cairo_traps_tessellate_convex_quad (cairo_traps_t *traps, } } -/* A triangle is simply a degenerate case of a convex - * quadrilateral. We would not benefit from having any distinct - * implementation of triangle vs. quadrilateral tessellation here. */ -void -_cairo_traps_tessellate_triangle (cairo_traps_t *traps, - const cairo_point_t t[3]) +static void add_tri (cairo_traps_t *traps, + int y1, int y2, + const cairo_line_t *left, + const cairo_line_t *right) { - cairo_point_t quad[4]; + if (y2 < y1) { + int tmp = y1; + y1 = y2; + y2 = tmp; + } - quad[0] = t[0]; - quad[1] = t[0]; - quad[2] = t[1]; - quad[3] = t[2]; + if (cairo_lines_compare_at_y (left, right, y1) > 0) { + const cairo_line_t *tmp = left; + left = right; + right = tmp; + } - _cairo_traps_tessellate_convex_quad (traps, quad); + _cairo_traps_add_clipped_trap (traps, y1, y2, left, right); } +void +_cairo_traps_tessellate_triangle_with_edges (cairo_traps_t *traps, + const cairo_point_t t[3], + const cairo_point_t edges[4]) +{ + cairo_line_t lines[3]; + + if (edges[0].y <= edges[1].y) { + lines[0].p1 = edges[0]; + lines[0].p2 = edges[1]; + } else { + lines[0].p1 = edges[1]; + lines[0].p2 = edges[0]; + } + + if (edges[2].y <= edges[3].y) { + lines[1].p1 = edges[2]; + lines[1].p2 = edges[3]; + } else { + lines[1].p1 = edges[3]; + lines[1].p2 = edges[2]; + } + + if (t[1].y == t[2].y) { + add_tri (traps, t[0].y, t[1].y, &lines[0], &lines[1]); + return; + } + + if (t[1].y <= t[2].y) { + lines[2].p1 = t[1]; + lines[2].p2 = t[2]; + } else { + lines[2].p1 = t[2]; + lines[2].p2 = t[1]; + } + + if (((t[1].y - t[0].y) < 0) ^ ((t[2].y - t[0].y) < 0)) { + add_tri (traps, t[0].y, t[1].y, &lines[0], &lines[2]); + add_tri (traps, t[0].y, t[2].y, &lines[1], &lines[2]); + } else if (abs(t[1].y - t[0].y) < abs(t[2].y - t[0].y)) { + add_tri (traps, t[0].y, t[1].y, &lines[0], &lines[1]); + add_tri (traps, t[1].y, t[2].y, &lines[2], &lines[1]); + } else { + add_tri (traps, t[0].y, t[2].y, &lines[1], &lines[0]); + add_tri (traps, t[1].y, t[2].y, &lines[2], &lines[0]); + } +} /** * _cairo_traps_init_boxes: diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tristrip-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tristrip-private.h index ccd28799e82..ccd28799e82 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tristrip-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tristrip-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tristrip.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tristrip.c index bb4972f5003..bb4972f5003 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-tristrip.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-tristrip.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-truetype-subset-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-truetype-subset-private.h index dc9573216f3..dc9573216f3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-truetype-subset-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-truetype-subset-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-truetype-subset.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-truetype-subset.c index 18ee685c625..645a89abf21 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-truetype-subset.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-truetype-subset.c @@ -1564,40 +1564,11 @@ _cairo_truetype_read_font_name (cairo_scaled_font_t *scaled_font, goto fail; } - free (name); + status = _cairo_escape_ps_name (&ps_name); + if (unlikely(status)) + goto fail; - /* Ensure PS name is a valid PDF/PS name object. In PDF names are - * treated as UTF8 and non ASCII bytes, ' ', and '#' are encoded - * as '#' followed by 2 hex digits that encode the byte. By also - * encoding the characters in the reserved string we ensure the - * name is also PS compatible. */ - if (ps_name) { - static const char *reserved = "()<>[]{}/%#\\"; - char buf[128]; /* max name length is 127 bytes */ - char *src = ps_name; - char *dst = buf; - - while (*src && dst < buf + 127) { - unsigned char c = *src; - if (c < 0x21 || c > 0x7e || strchr (reserved, c)) { - if (dst + 4 > buf + 127) - break; - - snprintf (dst, 4, "#%02X", c); - src++; - dst += 3; - } else { - *dst++ = *src++; - } - } - *dst = 0; - free (ps_name); - ps_name = strdup (buf); - if (ps_name == NULL) { - status = _cairo_error (CAIRO_STATUS_NO_MEMORY); - goto fail; - } - } + free (name); *ps_name_out = ps_name; *font_name_out = family_name; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-fallback.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-fallback.c index 4a657413e48..4a657413e48 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-fallback.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-fallback.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-glyph-names.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-glyph-names.c index 80ccb96269e..80ccb96269e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-glyph-names.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-glyph-names.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-private.h index 1630397bca6..1630397bca6 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-subset.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-subset.c index 4b64403028e..b15663509d3 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type1-subset.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type1-subset.c @@ -53,7 +53,6 @@ #include "cairo-output-stream-private.h" #include <ctype.h> -#include <locale.h> #define TYPE1_STACKSIZE 24 /* Defined in Type 1 Font Format */ @@ -309,12 +308,10 @@ cairo_type1_font_subset_get_matrix (cairo_type1_font_subset_t *font, const char *start, *end, *segment_end; int ret, s_max, i, j; char *s; - struct lconv *locale_data; const char *decimal_point; int decimal_point_len; - locale_data = localeconv (); - decimal_point = locale_data->decimal_point; + decimal_point = cairo_get_locale_decimal_point (); decimal_point_len = strlen (decimal_point); assert (decimal_point_len != 0); @@ -407,6 +404,7 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font) const char *start, *end, *segment_end; char *s; int i; + cairo_status_t status; segment_end = font->header_segment + font->header_segment_size; start = find_token (font->header_segment, segment_end, "/FontName"); @@ -419,6 +417,9 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font) if (end == NULL) return CAIRO_INT_STATUS_UNSUPPORTED; + while (end > start && _cairo_isspace(end[-1])) + end--; + s = malloc (end - start + 1); if (unlikely (s == NULL)) return _cairo_error (CAIRO_STATUS_NO_MEMORY); @@ -447,13 +448,9 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font) if (unlikely (font->base.base_font == NULL)) return _cairo_error (CAIRO_STATUS_NO_MEMORY); - s = font->base.base_font; - while (*s && !is_ps_delimiter(*s)) - s++; - - *s = 0; + status = _cairo_escape_ps_name (&font->base.base_font); - return CAIRO_STATUS_SUCCESS; + return status; } static cairo_status_t @@ -1128,7 +1125,7 @@ write_used_glyphs (cairo_type1_font_subset_t *font, cairo_status_t status; char buffer[256]; int length; - int subset_id; + unsigned int subset_id; int ch; const char *wa_name; @@ -1142,13 +1139,14 @@ write_used_glyphs (cairo_type1_font_subset_t *font, * font with the standard name. **/ subset_id = font->glyphs[glyph_number].subset_index; - if (subset_id > 0) { + /* Any additional glyph included for use by the seac operator + * will either have subset_id >= font->scaled_font_subset->num_glyphs + * or will not map to a winansi name (wa_name = NULL). In this + * case the original name is used. + */ + if (subset_id > 0 && subset_id < font->scaled_font_subset->num_glyphs) { ch = font->scaled_font_subset->to_latin_char[subset_id]; wa_name = _cairo_winansi_to_glyphname (ch); - /* If this subset contains any seac glyphs, additional non - * winansi glyphs (wa_name = NULL) may be included in the - * subset. In this case the original name is used. - */ if (wa_name) { name = wa_name; name_length = strlen(name); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type3-glyph-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type3-glyph-surface-private.h index 6cd37de5c0d..6cd37de5c0d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type3-glyph-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type3-glyph-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type3-glyph-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type3-glyph-surface.c index 5bb6bfc444a..5bb6bfc444a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-type3-glyph-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-type3-glyph-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-types-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-types-private.h index 3c2d21a3884..3d15d968e4b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-types-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-types-private.h @@ -113,7 +113,7 @@ struct _cairo_observer { }; /** - * cairo_hash_entry_t: + * _cairo_hash_entry: * * A #cairo_hash_entry_t contains both a key and a value for * #cairo_hash_table_t. User-derived types for #cairo_hash_entry_t must @@ -158,7 +158,7 @@ struct _cairo_array { }; /** - * cairo_lcd_filter_t: + * _cairo_lcd_filter: * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for * font backend and target device * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-unicode.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-unicode.c index 88de39516b6..88de39516b6 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-unicode.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-unicode.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-uninstalled.pc.in b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-uninstalled.pc.in index 9dc3231ae45..9dc3231ae45 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-uninstalled.pc.in +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-uninstalled.pc.in diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-user-font-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-user-font-private.h index d54ef78b44e..d54ef78b44e 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-user-font-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-user-font-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-user-font.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-user-font.c index 297f21c913c..6d2de2097d5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-user-font.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-user-font.c @@ -507,7 +507,7 @@ _cairo_user_font_face_scaled_font_create (void *abstract_ const cairo_font_face_backend_t _cairo_user_font_face_backend = { CAIRO_FONT_TYPE_USER, _cairo_user_font_face_create_for_toy, - NULL, /* destroy */ + _cairo_font_face_destroy, _cairo_user_font_face_scaled_font_create }; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-version.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-version.c index d9ad240bf9b..e493c815c7a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-version.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-version.c @@ -137,6 +137,7 @@ * </programlisting></informalexample> * </para> * </refsect2> + * <para> **/ /** diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-version.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-version.h index 51008003f98..51008003f98 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-version.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-version.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-vg-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-vg-surface.c index 6e0d9a0ed69..6e0d9a0ed69 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-vg-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-vg-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-vg.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-vg.h index f9a62e51c69..f9a62e51c69 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-vg.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-vg.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wgl-context.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wgl-context.c index 48723744648..48723744648 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wgl-context.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wgl-context.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint-private.h index 3f5491bb1c0..3f5491bb1c0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint-type-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint-type-private.h index 84a3cbab0d2..84a3cbab0d2 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint-type-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint-type-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint.c index bba266b2489..2e056fa36a2 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-wideint.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-wideint.c @@ -654,16 +654,16 @@ _cairo_uint128_divrem (cairo_uint128_t num, cairo_uint128_t den) return qr; } -cairo_int128_t -_cairo_int128_negate (cairo_int128_t a) +cairo_uint128_t +_cairo_uint128_negate (cairo_uint128_t a) { a.lo = _cairo_uint64_not (a.lo); a.hi = _cairo_uint64_not (a.hi); return _cairo_uint128_add (a, _cairo_uint32_to_uint128 (1)); } -cairo_int128_t -_cairo_int128_not (cairo_int128_t a) +cairo_uint128_t +_cairo_uint128_not (cairo_uint128_t a) { a.lo = _cairo_uint64_not (a.lo); a.hi = _cairo_uint64_not (a.hi); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-win32.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-win32.h index 3d2e1c60169..3d2e1c60169 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-win32.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-win32.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-core.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-core.c index ae7c023e1ad..e01dc1a8361 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-core.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-core.c @@ -268,8 +268,6 @@ _cairo_xcb_connection_put_subimage (cairo_xcb_connection_t *connection, if (rows > height) rows = height; - length = rows * cpp * width; - _cairo_xcb_connection_do_put_subimage (connection, dst, gc, src_x, src_y, width, rows, cpp, stride, dst_x, dst_y, depth, _data); @@ -283,32 +281,20 @@ _cairo_xcb_connection_put_subimage (cairo_xcb_connection_t *connection, } } -cairo_status_t +xcb_get_image_reply_t * _cairo_xcb_connection_get_image (cairo_xcb_connection_t *connection, xcb_drawable_t src, int16_t src_x, int16_t src_y, uint16_t width, - uint16_t height, - xcb_get_image_reply_t **reply) + uint16_t height) { - xcb_generic_error_t *error; - - *reply = xcb_get_image_reply (connection->xcb_connection, - xcb_get_image (connection->xcb_connection, - XCB_IMAGE_FORMAT_Z_PIXMAP, - src, - src_x, src_y, - width, height, - (uint32_t) -1), - - &error); - if (error) { - free (error); - - free (*reply); - *reply = NULL; - } - - return CAIRO_STATUS_SUCCESS; + return xcb_get_image_reply (connection->xcb_connection, + xcb_get_image (connection->xcb_connection, + XCB_IMAGE_FORMAT_Z_PIXMAP, + src, + src_x, src_y, + width, height, + (uint32_t) -1), + NULL); } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-render.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-render.c index 61119653e9a..61119653e9a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-render.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-render.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-shm.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-shm.c index 8c1d5069870..7720bbbd25b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection-shm.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection-shm.c @@ -82,7 +82,6 @@ _cairo_xcb_connection_shm_get_image (cairo_xcb_connection_t *connection, uint32_t offset) { xcb_shm_get_image_reply_t *reply; - xcb_generic_error_t *error; assert (connection->flags & CAIRO_XCB_HAS_SHM); reply = xcb_shm_get_image_reply (connection->xcb_connection, @@ -93,12 +92,11 @@ _cairo_xcb_connection_shm_get_image (cairo_xcb_connection_t *connection, (uint32_t) -1, XCB_IMAGE_FORMAT_Z_PIXMAP, shmseg, offset), - &error); + NULL); free (reply); - if (error) { + if (!reply) { /* an error here should be impossible */ - free (error); return _cairo_error (CAIRO_STATUS_READ_ERROR); } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection.c index b48add17b6a..2d51e14493f 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-connection.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-connection.c @@ -77,6 +77,8 @@ typedef struct _cairo_xcb_xid { #define XCB_RENDER_HAS_PICTURE_TRANSFORM(surface) XCB_RENDER_AT_LEAST((surface), 0, 6) #define XCB_RENDER_HAS_FILTERS(surface) XCB_RENDER_AT_LEAST((surface), 0, 6) +#define XCB_RENDER_HAS_FILTER_GOOD(surface) FALSE +#define XCB_RENDER_HAS_FILTER_BEST(surface) FALSE #define XCB_RENDER_HAS_EXTENDED_REPEAT(surface) XCB_RENDER_AT_LEAST((surface), 0, 10) #define XCB_RENDER_HAS_GRADIENTS(surface) XCB_RENDER_AT_LEAST((surface), 0, 10) @@ -390,6 +392,12 @@ _cairo_xcb_connection_query_render (cairo_xcb_connection_t *connection) if (XCB_RENDER_HAS_FILTERS (version)) connection->flags |= CAIRO_XCB_RENDER_HAS_FILTERS; + if (XCB_RENDER_HAS_FILTER_GOOD (version)) + connection->flags |= CAIRO_XCB_RENDER_HAS_FILTER_GOOD; + + if (XCB_RENDER_HAS_FILTER_BEST (version)) + connection->flags |= CAIRO_XCB_RENDER_HAS_FILTER_BEST; + if (XCB_RENDER_HAS_PDF_OPERATORS (version)) connection->flags |= CAIRO_XCB_RENDER_HAS_PDF_OPERATORS; @@ -882,6 +890,8 @@ cairo_xcb_device_debug_cap_xrender_version (cairo_device_t *device, CAIRO_XCB_RENDER_HAS_COMPOSITE_TRAPEZOIDS | CAIRO_XCB_RENDER_HAS_PICTURE_TRANSFORM | CAIRO_XCB_RENDER_HAS_FILTERS | + CAIRO_XCB_RENDER_HAS_FILTER_GOOD | + CAIRO_XCB_RENDER_HAS_FILTER_BEST | CAIRO_XCB_RENDER_HAS_PDF_OPERATORS | CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT | CAIRO_XCB_RENDER_HAS_GRADIENTS); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-private.h index f6cb34ecdcd..1e1d1ee7048 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-private.h @@ -75,6 +75,7 @@ typedef struct _cairo_xcb_surface cairo_xcb_surface_t; typedef struct _cairo_xcb_picture cairo_xcb_picture_t; typedef struct _cairo_xcb_shm_mem_pool cairo_xcb_shm_mem_pool_t; typedef struct _cairo_xcb_shm_info cairo_xcb_shm_info_t; +typedef struct _cairo_xcb_resources cairo_xcb_resources_t; struct _cairo_xcb_shm_info { cairo_xcb_connection_t *connection; @@ -199,6 +200,9 @@ struct _cairo_xcb_screen { cairo_list_t link; cairo_list_t surfaces; cairo_list_t pictures; + + cairo_bool_t has_font_options; + cairo_font_options_t font_options; }; struct _cairo_xcb_connection { @@ -236,6 +240,14 @@ struct _cairo_xcb_connection { cairo_list_t link; }; +struct _cairo_xcb_resources { + cairo_bool_t xft_antialias; + int xft_lcdfilter; + cairo_bool_t xft_hinting; + int xft_hintstyle; + int xft_rgba; +}; + enum { CAIRO_XCB_HAS_RENDER = 0x0001, CAIRO_XCB_RENDER_HAS_FILL_RECTANGLES = 0x0002, @@ -247,6 +259,8 @@ enum { CAIRO_XCB_RENDER_HAS_PDF_OPERATORS = 0x0080, CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT = 0x0100, CAIRO_XCB_RENDER_HAS_GRADIENTS = 0x0200, + CAIRO_XCB_RENDER_HAS_FILTER_GOOD = 0x0400, + CAIRO_XCB_RENDER_HAS_FILTER_BEST = 0x0800, CAIRO_XCB_HAS_SHM = 0x80000000, @@ -259,7 +273,9 @@ enum { CAIRO_XCB_RENDER_HAS_FILTERS | CAIRO_XCB_RENDER_HAS_PDF_OPERATORS | CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT | - CAIRO_XCB_RENDER_HAS_GRADIENTS, + CAIRO_XCB_RENDER_HAS_GRADIENTS | + CAIRO_XCB_RENDER_HAS_FILTER_GOOD | + CAIRO_XCB_RENDER_HAS_FILTER_BEST, CAIRO_XCB_SHM_MASK = CAIRO_XCB_HAS_SHM }; @@ -267,6 +283,21 @@ enum { cairo_private extern const cairo_surface_backend_t _cairo_xcb_surface_backend; +/** + * _cairo_surface_is_xcb: + * @surface: a #cairo_surface_t + * + * Checks if a surface is an #cairo_xcb_surface_t + * + * Return value: %TRUE if the surface is an xcb surface + **/ +static inline cairo_bool_t +_cairo_surface_is_xcb (const cairo_surface_t *surface) +{ + /* _cairo_surface_nil sets a NULL backend so be safe */ + return surface->backend && surface->backend->type == CAIRO_SURFACE_TYPE_XCB; +} + cairo_private cairo_xcb_connection_t * _cairo_xcb_connection_get (xcb_connection_t *connection); @@ -342,6 +373,9 @@ _cairo_xcb_screen_get_gc (cairo_xcb_screen_t *screen, cairo_private void _cairo_xcb_screen_put_gc (cairo_xcb_screen_t *screen, int depth, xcb_gcontext_t gc); +cairo_private cairo_font_options_t * +_cairo_xcb_screen_get_font_options (cairo_xcb_screen_t *screen); + cairo_private cairo_status_t _cairo_xcb_screen_store_linear_picture (cairo_xcb_screen_t *screen, const cairo_linear_pattern_t *linear, @@ -505,14 +539,13 @@ _cairo_xcb_connection_put_subimage (cairo_xcb_connection_t *connection, uint8_t depth, void *data); -cairo_private cairo_status_t +cairo_private xcb_get_image_reply_t * _cairo_xcb_connection_get_image (cairo_xcb_connection_t *connection, xcb_drawable_t src, int16_t src_x, int16_t src_y, uint16_t width, - uint16_t height, - xcb_get_image_reply_t **reply); + uint16_t height); cairo_private void _cairo_xcb_connection_poly_fill_rectangle (cairo_xcb_connection_t *connection, @@ -759,4 +792,8 @@ slim_hidden_proto_no_warn (cairo_xcb_device_debug_set_precision); slim_hidden_proto_no_warn (cairo_xcb_device_debug_cap_xrender_version); #endif +cairo_private void +_cairo_xcb_resources_get (cairo_xcb_screen_t *screen, + cairo_xcb_resources_t *resources); + #endif /* CAIRO_XCB_PRIVATE_H */ diff --git a/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-resources.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-resources.c new file mode 100644 index 00000000000..62c27efc7f1 --- /dev/null +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-resources.c @@ -0,0 +1,304 @@ +/* Cairo - a vector graphics library with display and print output + * + * Copyright © 2014 Lukas Lalinsky + * Copyright © 2005 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * Authors: + * Lukas Lalinsky <lukas@oxygene.sk> + * + * Partially on code from xftdpy.c + * + * Copyright © 2000 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include "cairoint.h" + +#include "cairo-xcb-private.h" + +#include "cairo-fontconfig-private.h" + +static void +parse_boolean (const char *v, cairo_bool_t *out) +{ + char c0, c1; + + c0 = *v; + if (c0 == 't' || c0 == 'T' || c0 == 'y' || c0 == 'Y' || c0 == '1') + *out = TRUE; + if (c0 == 'f' || c0 == 'F' || c0 == 'n' || c0 == 'N' || c0 == '0') + *out = FALSE; + if (c0 == 'o') { + c1 = v[1]; + if (c1 == 'n' || c1 == 'N') + *out = TRUE; + if (c1 == 'f' || c1 == 'F') + *out = FALSE; + } +} + +static void +parse_integer (const char *v, int *out) +{ + char *e; + int value; + +#if CAIRO_HAS_FC_FONT + if (FcNameConstant ((FcChar8 *) v, out)) + return; +#endif + + value = strtol (v, &e, 0); + if (e != v) + *out = value; +} + +static char * +skip_spaces(char *str) +{ + while (*str == ' ' || *str == '\t' || *str == '\n') + str++; + return str; +} + +struct resource_parser { + int buffer_size; + int bytes_in_buffer; + char* buffer; + cairo_xcb_resources_t *resources; +}; + +static cairo_bool_t +resource_parse_line (char *name, cairo_xcb_resources_t *resources) +{ + char *value; + + value = strchr (name, ':'); + if (value == NULL) + return FALSE; + + *value++ = 0; + + name = skip_spaces (name); + value = skip_spaces (value); + + if (strcmp (name, "Xft.antialias") == 0) + parse_boolean (value, &(resources->xft_antialias)); + else if (strcmp (name, "Xft.lcdfilter") == 0) + parse_integer (value, &(resources->xft_lcdfilter)); + else if (strcmp (name, "Xft.rgba") == 0) + parse_integer (value, &(resources->xft_rgba)); + else if (strcmp (name, "Xft.hinting") == 0) + parse_boolean (value, &(resources->xft_hinting)); + else if (strcmp (name, "Xft.hintstyle") == 0) + parse_integer (value, &(resources->xft_hintstyle)); + + return TRUE; +} + +static int +resource_parse_lines (struct resource_parser *parser) +{ + char *line, *newline; + + line = parser->buffer; + while (1) { + newline = strchr (line, '\n'); + if (newline == NULL) + break; + + *newline++ = 0; + + if (! resource_parse_line (line, parser->resources)) + break; + + line = newline; + } + + return line - parser->buffer; +} + +static void +resource_parser_init (struct resource_parser *parser, cairo_xcb_resources_t *resources) +{ + parser->buffer_size = 0; + parser->bytes_in_buffer = 0; + parser->buffer = NULL; + parser->resources = resources; +} + +static cairo_bool_t +resource_parser_update (struct resource_parser *parser, const char *data, int length) +{ + int bytes_parsed; + + if (parser->bytes_in_buffer + length + 1 > parser->buffer_size) { + parser->buffer_size = parser->bytes_in_buffer + length + 1; + parser->buffer = realloc(parser->buffer, parser->buffer_size); + if (! parser->buffer) { + parser->buffer_size = 0; + parser->bytes_in_buffer = 0; + return FALSE; + } + } + + memmove (parser->buffer + parser->bytes_in_buffer, data, length); + parser->bytes_in_buffer += length; + parser->buffer[parser->bytes_in_buffer] = 0; + + bytes_parsed = resource_parse_lines (parser); + + if (parser->bytes_in_buffer > bytes_parsed) { + memmove (parser->buffer, parser->buffer + bytes_parsed, parser->bytes_in_buffer - bytes_parsed); + parser->bytes_in_buffer -= bytes_parsed; + } else { + parser->bytes_in_buffer = 0; + } + + return TRUE; +} + +static void +resource_parser_done (struct resource_parser *parser) +{ + if (parser->bytes_in_buffer > 0) { + parser->buffer[parser->bytes_in_buffer] = 0; + resource_parse_line (parser->buffer, parser->resources); + } + + free (parser->buffer); +} + +static void +get_resources(xcb_connection_t *connection, xcb_screen_t *screen, cairo_xcb_resources_t *resources) +{ + xcb_get_property_cookie_t cookie; + xcb_get_property_reply_t *reply; + struct resource_parser parser; + int offset; + cairo_bool_t has_more_data; + + resources->xft_antialias = TRUE; + resources->xft_lcdfilter = -1; + resources->xft_hinting = TRUE; + resources->xft_hintstyle = FC_HINT_FULL; + resources->xft_rgba = FC_RGBA_UNKNOWN; + + resource_parser_init (&parser, resources); + + offset = 0; + has_more_data = FALSE; + do { + cookie = xcb_get_property (connection, 0, screen->root, XCB_ATOM_RESOURCE_MANAGER, XCB_ATOM_STRING, offset, 1024); + reply = xcb_get_property_reply (connection, cookie, NULL); + + if (reply) { + if (reply->format == 8 && reply->type == XCB_ATOM_STRING) { + char *value = (char *) xcb_get_property_value (reply); + int length = xcb_get_property_value_length (reply); + + offset += length / 4; /* X needs the offset in 'long' units */ + has_more_data = reply->bytes_after > 0; + + if (! resource_parser_update (&parser, value, length)) + has_more_data = FALSE; /* early exit on error */ + } + + free (reply); + } + } while (has_more_data); + + resource_parser_done (&parser); +} + +#if 0 && XCB_RENDER_MAJOR_VERSION > 99 && XCB_RENDER_MINOR_VERSION > 99 +static void +get_rgba_from_render (xcb_connection_t *connection, xcb_screen_t *screen, cairo_xcb_resources_t *resources) +{ + /* this is a mock-up of what the function might look like, + xcb_render_query_sub_pixel is not actually implemented in XCB (yet) */ + + xcb_render_query_sub_pixel_order_cookie_t cookie; + xcb_render_query_sub_pixel_order_reply_t *reply; + + cookie = xcb_render_query_sub_pixel (connection, screen); + reply = xcb_render_query_sub_pixel_reply (connection, cookie, NULL); + + if (reply) { + switch (reply->sub_pixel_order) { + case XCB_RENDER_SUB_PIXEL_UNKNOWN: + resources->xft_rgba = FC_RGBA_UNKNOWN; + break; + case XCB_RENDER_SUB_PIXEL_HORIZONTAL_RGB: + resources->xft_rgba = FC_RGBA_RGB; + break; + case XCB_RENDER_SUB_PIXEL_HORIZONTAL_BGR: + resources->xft_rgba = FC_RGBA_BGR; + break; + case XCB_RENDER_SUB_PIXEL_VERTICAL_RGB: + resources->xft_rgba = FC_RGBA_VRGB; + break; + case XCB_RENDER_SUB_PIXEL_VERTICAL_BGR: + resources->xft_rgba = FC_RGBA_VBGR; + break; + case XCB_RENDER_SUB_PIXEL_NONE: + resources->xft_rgba = FC_RGBA_NONE; + break; + } + + free(reply); + } +} +#endif + +void +_cairo_xcb_resources_get (cairo_xcb_screen_t *screen, cairo_xcb_resources_t *resources) +{ + get_resources (screen->connection->xcb_connection, screen->xcb_screen, resources); + +#if 0 && XCB_RENDER_MAJOR_VERSION > 99 && XCB_RENDER_MINOR_VERSION > 99 + if (resources->xft_rgba == FC_RGBA_UNKNOWN) { + get_rgba_from_render (screen->connection->xcb_connection, screen->xcb_screen, resources); + } +#endif +} diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-screen.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-screen.c index 2858d23fba3..69ea4599b3c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-screen.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-screen.c @@ -35,6 +35,96 @@ #include "cairo-xcb-private.h" #include "cairo-list-inline.h" +#include "cairo-fontconfig-private.h" + +static void +_cairo_xcb_init_screen_font_options (cairo_xcb_screen_t *screen) +{ + cairo_xcb_resources_t res; + cairo_antialias_t antialias; + cairo_subpixel_order_t subpixel_order; + cairo_lcd_filter_t lcd_filter; + cairo_hint_style_t hint_style; + + _cairo_xcb_resources_get (screen, &res); + + /* the rest of the code in this function is copied from + _cairo_xlib_init_screen_font_options in cairo-xlib-screen.c */ + + if (res.xft_hinting) { + switch (res.xft_hintstyle) { + case FC_HINT_NONE: + hint_style = CAIRO_HINT_STYLE_NONE; + break; + case FC_HINT_SLIGHT: + hint_style = CAIRO_HINT_STYLE_SLIGHT; + break; + case FC_HINT_MEDIUM: + hint_style = CAIRO_HINT_STYLE_MEDIUM; + break; + case FC_HINT_FULL: + hint_style = CAIRO_HINT_STYLE_FULL; + break; + default: + hint_style = CAIRO_HINT_STYLE_DEFAULT; + } + } else { + hint_style = CAIRO_HINT_STYLE_NONE; + } + + switch (res.xft_rgba) { + case FC_RGBA_RGB: + subpixel_order = CAIRO_SUBPIXEL_ORDER_RGB; + break; + case FC_RGBA_BGR: + subpixel_order = CAIRO_SUBPIXEL_ORDER_BGR; + break; + case FC_RGBA_VRGB: + subpixel_order = CAIRO_SUBPIXEL_ORDER_VRGB; + break; + case FC_RGBA_VBGR: + subpixel_order = CAIRO_SUBPIXEL_ORDER_VBGR; + break; + case FC_RGBA_UNKNOWN: + case FC_RGBA_NONE: + default: + subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT; + } + + switch (res.xft_lcdfilter) { + case FC_LCD_NONE: + lcd_filter = CAIRO_LCD_FILTER_NONE; + break; + case FC_LCD_DEFAULT: + lcd_filter = CAIRO_LCD_FILTER_FIR5; + break; + case FC_LCD_LIGHT: + lcd_filter = CAIRO_LCD_FILTER_FIR3; + break; + case FC_LCD_LEGACY: + lcd_filter = CAIRO_LCD_FILTER_INTRA_PIXEL; + break; + default: + lcd_filter = CAIRO_LCD_FILTER_DEFAULT; + break; + } + + if (res.xft_antialias) { + if (subpixel_order == CAIRO_SUBPIXEL_ORDER_DEFAULT) + antialias = CAIRO_ANTIALIAS_GRAY; + else + antialias = CAIRO_ANTIALIAS_SUBPIXEL; + } else { + antialias = CAIRO_ANTIALIAS_NONE; + } + + cairo_font_options_set_hint_style (&screen->font_options, hint_style); + cairo_font_options_set_antialias (&screen->font_options, antialias); + cairo_font_options_set_subpixel_order (&screen->font_options, subpixel_order); + _cairo_font_options_set_lcd_filter (&screen->font_options, lcd_filter); + cairo_font_options_set_hint_metrics (&screen->font_options, CAIRO_HINT_METRICS_ON); +} + struct pattern_cache_entry { cairo_cache_entry_t key; cairo_xcb_screen_t *screen; @@ -152,6 +242,7 @@ _cairo_xcb_screen_get (xcb_connection_t *xcb_connection, screen->connection = connection; screen->xcb_screen = xcb_screen; + screen->has_font_options = FALSE; _cairo_freelist_init (&screen->pattern_cache_entry_freelist, sizeof (struct pattern_cache_entry)); @@ -362,3 +453,26 @@ _cairo_xcb_screen_lookup_radial_picture (cairo_xcb_screen_t *screen, return picture; } + +cairo_font_options_t * +_cairo_xcb_screen_get_font_options (cairo_xcb_screen_t *screen) +{ + if (! screen->has_font_options) { + _cairo_font_options_init_default (&screen->font_options); + _cairo_font_options_set_round_glyph_positions (&screen->font_options, CAIRO_ROUND_GLYPH_POS_ON); + + /* XXX: This is disabled because something seems to be merging + font options incorrectly for xcb. This effectively reverts + the changes brought in git e691d242, and restores ~150 tests + to resume passing. See mailing list archives for Sep 17, + 2014 for more discussion. */ + if (0 && ! _cairo_xcb_connection_acquire (screen->connection)) { + _cairo_xcb_init_screen_font_options (screen); + _cairo_xcb_connection_release (screen->connection); + } + + screen->has_font_options = TRUE; + } + + return &screen->font_options; +} diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-shm.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-shm.c index 2be2dac5bf9..2be2dac5bf9 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-shm.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-shm.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface-core.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface-core.c index c608c9ac4af..9c0c0a0957d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface-core.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface-core.c @@ -406,7 +406,7 @@ _cairo_xcb_surface_pixmap (cairo_xcb_surface_t *target, if (pixmap != NULL && pixmap->screen == target->screen) return (cairo_xcb_pixmap_t *) cairo_surface_reference (&pixmap->base); - if (source->type == CAIRO_SURFACE_TYPE_XCB && + if (_cairo_surface_is_xcb(source) && ((cairo_xcb_surface_t *) source)->screen == target->screen) { cairo_xcb_surface_t *xcb_source = (cairo_xcb_surface_t *) source; @@ -573,7 +573,7 @@ _cairo_xcb_surface_core_copy_boxes (cairo_xcb_surface_t *dst, src->x0 + x1, src->y0 + y1, x1, y1, - x2 - x2, y2 - x2); + x2 - x1, y2 - y1); } } } diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface-render.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface-render.c index 2d52be9cf01..21a89cc0fc0 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface-render.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface-render.c @@ -37,6 +37,7 @@ #include "cairo-clip-inline.h" #include "cairo-clip-private.h" #include "cairo-composite-rectangles-private.h" +#include "cairo-image-surface-inline.h" #include "cairo-image-surface-private.h" #include "cairo-list-inline.h" #include "cairo-region-private.h" @@ -393,11 +394,6 @@ _pattern_is_supported (uint32_t flags, if (pattern->type == CAIRO_PATTERN_TYPE_SOLID) return TRUE; - if (! _cairo_matrix_is_integer_translation (&pattern->matrix, NULL, NULL)) { - if ((flags & CAIRO_XCB_RENDER_HAS_PICTURE_TRANSFORM) == 0) - return FALSE; - } - switch (pattern->extend) { default: ASSERT_NOT_REACHED; @@ -411,19 +407,22 @@ _pattern_is_supported (uint32_t flags, } if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE) { - cairo_filter_t filter; - - filter = pattern->filter; - if (_cairo_matrix_has_unity_scale (&pattern->matrix) && - _cairo_matrix_is_integer_translation (&pattern->matrix, NULL, NULL)) - { - filter = CAIRO_FILTER_NEAREST; - } - - if (! (filter == CAIRO_FILTER_NEAREST || filter == CAIRO_FILTER_FAST)) { - if ((flags & CAIRO_XCB_RENDER_HAS_FILTERS) == 0) - return FALSE; + switch (pattern->filter) { + case CAIRO_FILTER_FAST: + case CAIRO_FILTER_NEAREST: + return (flags & CAIRO_XCB_RENDER_HAS_PICTURE_TRANSFORM) || + _cairo_matrix_is_integer_translation (&pattern->matrix, NULL, NULL); + case CAIRO_FILTER_GOOD: + return flags & CAIRO_XCB_RENDER_HAS_FILTER_GOOD; + case CAIRO_FILTER_BEST: + return flags & CAIRO_XCB_RENDER_HAS_FILTER_BEST; + case CAIRO_FILTER_BILINEAR: + case CAIRO_FILTER_GAUSSIAN: + default: + return flags & CAIRO_XCB_RENDER_HAS_FILTERS; } + } else if (pattern->type == CAIRO_PATTERN_TYPE_MESH) { + return FALSE; } else { /* gradient */ if ((flags & CAIRO_XCB_RENDER_HAS_GRADIENTS) == 0) return FALSE; @@ -435,9 +434,8 @@ _pattern_is_supported (uint32_t flags, { return FALSE; } + return TRUE; } - - return pattern->type != CAIRO_PATTERN_TYPE_MESH; } static void @@ -1033,9 +1031,7 @@ _cairo_xcb_surface_setup_surface_picture(cairo_xcb_picture_t *picture, filter = pattern->base.filter; if (filter != CAIRO_FILTER_NEAREST && - _cairo_matrix_has_unity_scale (&pattern->base.matrix) && - _cairo_fixed_is_integer (_cairo_fixed_from_double (pattern->base.matrix.x0)) && - _cairo_fixed_is_integer (_cairo_fixed_from_double (pattern->base.matrix.y0))) + _cairo_matrix_is_pixel_exact (&pattern->base.matrix)) { filter = CAIRO_FILTER_NEAREST; } @@ -1101,11 +1097,11 @@ record_to_picture (cairo_surface_t *target, return _cairo_xcb_transparent_picture ((cairo_xcb_surface_t *) target); /* Now draw the recording surface to an xcb surface */ - tmp = _cairo_surface_create_similar_solid (target, - source->content, - limit.width, - limit.height, - CAIRO_COLOR_TRANSPARENT); + tmp = _cairo_surface_create_scratch (target, + source->content, + limit.width, + limit.height, + CAIRO_COLOR_TRANSPARENT); if (tmp->status != CAIRO_STATUS_SUCCESS) { return (cairo_xcb_picture_t *) tmp; } @@ -1154,7 +1150,7 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target, if (source->type == CAIRO_SURFACE_TYPE_XCB) { - if (source->backend->type == CAIRO_SURFACE_TYPE_XCB) { + if (_cairo_surface_is_xcb(source)) { cairo_xcb_surface_t *xcb = (cairo_xcb_surface_t *) source; if (xcb->screen == target->screen && xcb->fallback == NULL) { picture = _copy_to_picture ((cairo_xcb_surface_t *) source); @@ -1350,7 +1346,7 @@ _render_fill_boxes (void *abstract_dst, cairo_boxes_t *boxes) { cairo_xcb_surface_t *dst = abstract_dst; - xcb_rectangle_t stack_xrects[CAIRO_STACK_ARRAY_LENGTH (sizeof (xcb_rectangle_t))]; + xcb_rectangle_t stack_xrects[CAIRO_STACK_ARRAY_LENGTH (xcb_rectangle_t)]; xcb_rectangle_t *xrects = stack_xrects; xcb_render_color_t render_color; int render_op = _render_operator (op); @@ -1693,11 +1689,11 @@ get_clip_surface (const cairo_clip_t *clip, cairo_surface_t *surface; cairo_status_t status; - surface = _cairo_surface_create_similar_solid (&target->base, - CAIRO_CONTENT_ALPHA, - clip->extents.width, - clip->extents.height, - CAIRO_COLOR_WHITE); + surface = _cairo_surface_create_scratch (&target->base, + CAIRO_CONTENT_ALPHA, + clip->extents.width, + clip->extents.height, + CAIRO_COLOR_WHITE); if (unlikely (surface->status)) return (cairo_xcb_surface_t *) surface; @@ -2789,7 +2785,7 @@ _upload_image_inplace (cairo_xcb_surface_t *surface, return CAIRO_INT_STATUS_UNSUPPORTED; pattern = (const cairo_surface_pattern_t *) source; - if (pattern->surface->type != CAIRO_SURFACE_TYPE_IMAGE) + if (! _cairo_surface_is_image (pattern->surface)) return CAIRO_INT_STATUS_UNSUPPORTED; /* Have we already upload this image to a pixmap? */ @@ -2904,27 +2900,29 @@ _boxes_for_traps (cairo_boxes_t *boxes, cairo_traps_t *traps, cairo_antialias_t antialias) { - int i; + int i, j; _cairo_boxes_init (boxes); - boxes->num_boxes = traps->num_traps; boxes->chunks.base = (cairo_box_t *) traps->traps; - boxes->chunks.count = traps->num_traps; boxes->chunks.size = traps->num_traps; if (antialias != CAIRO_ANTIALIAS_NONE) { - for (i = 0; i < traps->num_traps; i++) { + for (i = j = 0; i < traps->num_traps; i++) { /* Note the traps and boxes alias so we need to take the local copies first. */ cairo_fixed_t x1 = traps->traps[i].left.p1.x; cairo_fixed_t x2 = traps->traps[i].right.p1.x; cairo_fixed_t y1 = traps->traps[i].top; cairo_fixed_t y2 = traps->traps[i].bottom; - boxes->chunks.base[i].p1.x = x1; - boxes->chunks.base[i].p1.y = y1; - boxes->chunks.base[i].p2.x = x2; - boxes->chunks.base[i].p2.y = y2; + if (x1 == x2 || y1 == y2) + continue; + + boxes->chunks.base[j].p1.x = x1; + boxes->chunks.base[j].p1.y = y1; + boxes->chunks.base[j].p2.x = x2; + boxes->chunks.base[j].p2.y = y2; + j++; if (boxes->is_pixel_aligned) { boxes->is_pixel_aligned = @@ -2935,7 +2933,7 @@ _boxes_for_traps (cairo_boxes_t *boxes, } else { boxes->is_pixel_aligned = TRUE; - for (i = 0; i < traps->num_traps; i++) { + for (i = j = 0; i < traps->num_traps; i++) { /* Note the traps and boxes alias so we need to take the local copies first. */ cairo_fixed_t x1 = traps->traps[i].left.p1.x; cairo_fixed_t x2 = traps->traps[i].right.p1.x; @@ -2943,12 +2941,18 @@ _boxes_for_traps (cairo_boxes_t *boxes, cairo_fixed_t y2 = traps->traps[i].bottom; /* round down here to match Pixman's behavior when using traps. */ - boxes->chunks.base[i].p1.x = _cairo_fixed_round_down (x1); - boxes->chunks.base[i].p1.y = _cairo_fixed_round_down (y1); - boxes->chunks.base[i].p2.x = _cairo_fixed_round_down (x2); - boxes->chunks.base[i].p2.y = _cairo_fixed_round_down (y2); + boxes->chunks.base[j].p1.x = _cairo_fixed_round_down (x1); + boxes->chunks.base[j].p1.y = _cairo_fixed_round_down (y1); + boxes->chunks.base[j].p2.x = _cairo_fixed_round_down (x2); + boxes->chunks.base[j].p2.y = _cairo_fixed_round_down (y2); + + j += (boxes->chunks.base[j].p1.x != boxes->chunks.base[j].p2.x && + boxes->chunks.base[j].p1.y != boxes->chunks.base[j].p2.y); } } + + boxes->num_boxes = j; + boxes->chunks.count = j; } static cairo_status_t @@ -3121,6 +3125,9 @@ _clip_and_composite_boxes (cairo_xcb_surface_t *dst, clip = _cairo_clip_copy (extents->clip); clip = _cairo_clip_intersect_boxes (clip, boxes); + if (_cairo_clip_is_all_clipped (clip)) + return CAIRO_INT_STATUS_NOTHING_TO_DO; + status = _cairo_clip_get_polygon (clip, &polygon, &fill_rule, &antialias); _cairo_clip_path_destroy (clip->path); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface.c index 746fb453483..d7e0d734ea5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb-surface.c @@ -382,13 +382,10 @@ _get_image (cairo_xcb_surface_t *surface, } } - status = _cairo_xcb_connection_get_image (connection, - surface->drawable, - x, y, - width, height, - &reply); - if (unlikely (status)) - goto FAIL; + reply =_cairo_xcb_connection_get_image (connection, + surface->drawable, + x, y, + width, height); if (reply == NULL && ! surface->owns_pixmap) { /* xcb_get_image_t from a window is dangerous because it can @@ -422,15 +419,11 @@ _get_image (cairo_xcb_surface_t *surface, _cairo_xcb_screen_put_gc (surface->screen, surface->depth, gc); - status = _cairo_xcb_connection_get_image (connection, - pixmap, - 0, 0, - width, height, - &reply); + reply = _cairo_xcb_connection_get_image (connection, + pixmap, + 0, 0, + width, height); _cairo_xcb_connection_free_pixmap (connection, pixmap); - - if (unlikely (status)) - goto FAIL; } if (unlikely (reply == NULL)) { @@ -537,9 +530,9 @@ static void _cairo_xcb_surface_get_font_options (void *abstract_surface, cairo_font_options_t *options) { - /* XXX copy from xlib */ - _cairo_font_options_init_default (options); - _cairo_font_options_set_round_glyph_positions (options, CAIRO_ROUND_GLYPH_POS_ON); + cairo_xcb_surface_t *surface = abstract_surface; + + *options = *_cairo_xcb_screen_get_font_options (surface->screen); } static cairo_status_t @@ -1439,7 +1432,7 @@ cairo_xcb_surface_set_size (cairo_surface_t *abstract_surface, } - if (abstract_surface->type != CAIRO_SURFACE_TYPE_XCB) { + if ( !_cairo_surface_is_xcb(abstract_surface)) { _cairo_surface_set_error (abstract_surface, _cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH)); return; @@ -1493,7 +1486,7 @@ cairo_xcb_surface_set_drawable (cairo_surface_t *abstract_surface, } - if (abstract_surface->type != CAIRO_SURFACE_TYPE_XCB) { + if ( !_cairo_surface_is_xcb(abstract_surface)) { _cairo_surface_set_error (abstract_surface, _cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH)); return; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb.h index e321d8482c2..e321d8482c2 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xcb.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xcb.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-core-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-core-compositor.c index 9398079b4d6..5babcc81bed 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-core-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-core-compositor.c @@ -292,9 +292,7 @@ render_boxes (cairo_xlib_surface_t *dst, const cairo_pattern_t *pattern, cairo_boxes_t *boxes) { - double pad; - - if (_cairo_pattern_analyze_filter (pattern, &pad) != CAIRO_FILTER_NEAREST) + if (pattern->filter != CAIRO_FILTER_NEAREST) return fallback_boxes (dst, pattern, boxes); switch (pattern->extend) { diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-display.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-display.c index c505db4d10b..a2a3bc7924b 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-display.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-display.c @@ -291,7 +291,7 @@ _cairo_xlib_device_create (Display *dpy) * * 1. The original bug that led to the buggy_repeat * workaround. This was a bug that Owen Taylor investigated, - * understood well, and characterized against carious X + * understood well, and characterized against various X * servers. Confirmed X servers with this bug include: * * "XFree86" <= 40500000 @@ -491,12 +491,6 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display, { XRenderPictFormat *xrender_format; -#if ! ATOMIC_OP_NEEDS_MEMORY_BARRIER - xrender_format = display->cached_xrender_formats[format]; - if (likely (xrender_format != NULL)) - return xrender_format; -#endif - xrender_format = display->cached_xrender_formats[format]; if (xrender_format == NULL) { int pict_format = PictStandardNUM; @@ -574,7 +568,7 @@ _cairo_xlib_display_has_gradients (cairo_device_t *device) * * Restricts all future Xlib surfaces for this devices to the specified version * of the RENDER extension. This function exists solely for debugging purpose. - * It let's you find out how cairo would behave with an older version of + * It lets you find out how cairo would behave with an older version of * the RENDER extension. * * Use the special values -1 and -1 for disabling the RENDER extension. diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-fallback-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-fallback-compositor.c index ed2845db57d..ed2845db57d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-fallback-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-fallback-compositor.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-private.h index 4fd725f9331..6d37896c319 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-private.h @@ -81,7 +81,7 @@ struct _cairo_xlib_display { int render_major; int render_minor; - XRenderPictFormat *cached_xrender_formats[CAIRO_FORMAT_RGB16_565 + 1]; + XRenderPictFormat *cached_xrender_formats[CAIRO_FORMAT_RGB30 + 1]; int force_precision; @@ -373,6 +373,8 @@ _cairo_xlib_font_close (cairo_xlib_font_t *font); #define CAIRO_RENDER_HAS_PICTURE_TRANSFORM(surface) CAIRO_RENDER_AT_LEAST((surface), 0, 6) #define CAIRO_RENDER_HAS_FILTERS(surface) CAIRO_RENDER_AT_LEAST((surface), 0, 6) +#define CAIRO_RENDER_HAS_FILTER_GOOD(surface) FALSE +#define CAIRO_RENDER_HAS_FILTER_BEST(surface) FALSE #define CAIRO_RENDER_HAS_EXTENDED_REPEAT(surface) CAIRO_RENDER_AT_LEAST((surface), 0, 10) #define CAIRO_RENDER_HAS_GRADIENTS(surface) CAIRO_RENDER_AT_LEAST((surface), 0, 10) diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-render-compositor.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-render-compositor.c index 68e7ce5a55c..e90df09fdfa 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-render-compositor.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-render-compositor.c @@ -100,7 +100,7 @@ set_clip_region (void *_surface, _cairo_xlib_surface_ensure_picture (surface); if (region != NULL) { - XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))]; + XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)]; XRectangle *rects = stack_rects; int n_rects, i; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-screen.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-screen.c index 57beeaab426..57beeaab426 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-screen.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-screen.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-source.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-source.c index 746001ed4d6..81cc028e85d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-source.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-source.c @@ -288,10 +288,11 @@ render_pattern (cairo_xlib_surface_t *dst, cairo_rectangle_int_t map_extents; src = (cairo_xlib_surface_t *) - _cairo_surface_create_similar_scratch (&dst->base, - is_mask ? CAIRO_CONTENT_ALPHA : CAIRO_CONTENT_COLOR_ALPHA, - extents->width, - extents->height); + _cairo_surface_create_scratch (&dst->base, + is_mask ? CAIRO_CONTENT_ALPHA : CAIRO_CONTENT_COLOR_ALPHA, + extents->width, + extents->height, + NULL); if (src->base.type != CAIRO_SURFACE_TYPE_XLIB) { cairo_surface_destroy (&src->base); return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); @@ -750,10 +751,11 @@ subsurface_source (cairo_xlib_surface_t *dst, source = &src->embedded_source; } else { src = (cairo_xlib_surface_t *) - _cairo_surface_create_similar_scratch (&dst->base, - sub->base.content, - sub->extents.width, - sub->extents.height); + _cairo_surface_create_scratch (&dst->base, + sub->base.content, + sub->extents.width, + sub->extents.height, + NULL); if (src->base.type != CAIRO_SURFACE_TYPE_XLIB) { cairo_surface_destroy (&src->base); return _cairo_surface_create_in_error (CAIRO_STATUS_NO_MEMORY); @@ -898,10 +900,11 @@ record_source (cairo_xlib_surface_t *dst, } src = (cairo_xlib_surface_t *) - _cairo_surface_create_similar_scratch (&dst->base, - pattern->surface->content, - upload.width, - upload.height); + _cairo_surface_create_scratch (&dst->base, + pattern->surface->content, + upload.width, + upload.height, + NULL); if (src->base.type != CAIRO_SURFACE_TYPE_XLIB) { cairo_surface_destroy (&src->base); return _cairo_surface_create_in_error (CAIRO_STATUS_NO_MEMORY); @@ -1001,10 +1004,11 @@ surface_source (cairo_xlib_surface_t *dst, } xsrc = (cairo_xlib_surface_t *) - _cairo_surface_create_similar_scratch (&dst->base, - src->content, - upload.width, - upload.height); + _cairo_surface_create_scratch (&dst->base, + src->content, + upload.width, + upload.height, + NULL); if (xsrc->base.type != CAIRO_SURFACE_TYPE_XLIB) { cairo_surface_destroy (src); cairo_surface_destroy (&xsrc->base); @@ -1089,17 +1093,22 @@ pattern_is_supported (cairo_xlib_display_t *display, return FALSE; } - if (! CAIRO_RENDER_HAS_PICTURE_TRANSFORM (display)) { - if (!_cairo_matrix_is_integer_translation (&pattern->matrix, NULL, NULL)) - return FALSE; - } - - if (! CAIRO_RENDER_HAS_FILTERS (display)) { - /* No filters implies no transforms, so we optimise away BILINEAR */ + switch (pattern->filter) { + case CAIRO_FILTER_FAST: + case CAIRO_FILTER_NEAREST: + return CAIRO_RENDER_HAS_PICTURE_TRANSFORM (display) || + _cairo_matrix_is_integer_translation (&pattern->matrix, NULL, NULL); + case CAIRO_FILTER_GOOD: + return CAIRO_RENDER_HAS_FILTER_GOOD (display); + case CAIRO_FILTER_BEST: + return CAIRO_RENDER_HAS_FILTER_BEST (display); + case CAIRO_FILTER_BILINEAR: + case CAIRO_FILTER_GAUSSIAN: + default: + return CAIRO_RENDER_HAS_FILTERS (display); } - - return TRUE; } + cairo_surface_t * _cairo_xlib_source_create_for_pattern (cairo_surface_t *_dst, const cairo_pattern_t *pattern, diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface-private.h index 87db6962b31..87db6962b31 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface-shm.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface-shm.c index fa7d3eb9b28..84b46d89a52 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface-shm.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface-shm.c @@ -893,7 +893,7 @@ _cairo_xlib_surface_update_shm (cairo_xlib_surface_t *surface) } if (damage->region) { - XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))]; + XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)]; XRectangle *rects = stack_rects; cairo_rectangle_int_t r; int n_rects, i; @@ -1081,7 +1081,7 @@ _cairo_xlib_surface_put_shm (cairo_xlib_surface_t *surface) TRACE ((stderr, "%s: flushing damage x %d\n", __FUNCTION__, damage->region ? cairo_region_num_rectangles (damage->region) : 0)); if (damage->status == CAIRO_STATUS_SUCCESS && damage->region) { - XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))]; + XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)]; XRectangle *rects = stack_rects; cairo_rectangle_int_t r; int n_rects, i; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface.c index 029a542b946..029a542b946 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-visual.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-visual.c index 863822eebbd..863822eebbd 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-visual.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-visual.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xcb-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xcb-surface.c index 9c0d4b41389..9c0d4b41389 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xcb-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xcb-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xrender-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xrender-private.h index bf3199c4c9d..90769467b2d 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xrender-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xrender-private.h @@ -96,6 +96,10 @@ __attribute__((__unused__)) static void _void_consume_free (Display *p, XID #define PictOpBlendMaximum 0x3e #endif +#if !HAVE_XRENDERCREATESOLIDFILL +#define XRenderCreateSolidFill _int_consume +#endif + #if !HAVE_XRENDERCREATELINEARGRADIENT #define XRenderCreateLinearGradient _int_consume diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xrender.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xrender.h index b34b057de4c..b34b057de4c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib-xrender.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib-xrender.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib.h index ecf8d6c86be..ecf8d6c86be 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xlib.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xlib.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xml-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xml-surface.c index c9473c24c54..6dbafdba2ba 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xml-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xml-surface.c @@ -460,10 +460,9 @@ to_xml (cairo_xml_surface_t *surface) static cairo_status_t _cairo_xml_surface_emit_clip_boxes (cairo_xml_surface_t *surface, - cairo_clip_t *clip) + const cairo_clip_t *clip) { cairo_box_t *box; - cairo_status_t status; cairo_xml_t *xml; int n; @@ -521,7 +520,7 @@ _cairo_xml_surface_emit_clip_boxes (cairo_xml_surface_t *surface, static cairo_status_t _cairo_xml_surface_emit_clip_path (cairo_xml_surface_t *surface, - cairo_clip_path_t *clip_path) + const cairo_clip_path_t *clip_path) { cairo_box_t box; cairo_status_t status; diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xml.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xml.h index 9ae76e90aae..9ae76e90aae 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo-xml.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo-xml.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo.c b/Build/source/libs/cairo/cairo-1.14.0/src/cairo.c index 82396d22155..e3acf4d46c7 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo.c @@ -152,7 +152,9 @@ static const cairo_t _cairo_nil[] = { DEFINE_NIL_CONTEXT (CAIRO_STATUS_DEVICE_TYPE_MISMATCH), DEFINE_NIL_CONTEXT (CAIRO_STATUS_DEVICE_ERROR), DEFINE_NIL_CONTEXT (CAIRO_STATUS_INVALID_MESH_CONSTRUCTION), - DEFINE_NIL_CONTEXT (CAIRO_STATUS_DEVICE_FINISHED) + DEFINE_NIL_CONTEXT (CAIRO_STATUS_DEVICE_FINISHED), + DEFINE_NIL_CONTEXT (CAIRO_STATUS_JBIG2_GLOBAL_MISSING) + }; COMPILE_TIME_ASSERT (ARRAY_LENGTH (_cairo_nil) == CAIRO_STATUS_LAST_STATUS - 1); @@ -228,6 +230,8 @@ cairo_create (cairo_surface_t *target) return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_NULL_POINTER)); if (unlikely (target->status)) return _cairo_create_in_error (target->status); + if (unlikely (target->finished)) + return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_FINISHED)); if (target->backend->create_context == NULL) return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_WRITE_ERROR)); diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairo.h index a2f5aa37e7a..3104d47e4c4 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo.h @@ -290,6 +290,8 @@ typedef struct _cairo_user_data_key { * cairo_mesh_pattern_begin_patch()/cairo_mesh_pattern_end_patch() * pair (Since 1.12) * @CAIRO_STATUS_DEVICE_FINISHED: target device has been finished (Since 1.12) + * @CAIRO_STATUS_JBIG2_GLOBAL_MISSING: %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image + * but no image provided %CAIRO_MIME_TYPE_JBIG2_GLOBAL (Since 1.14) * @CAIRO_STATUS_LAST_STATUS: this is a special value indicating the number of * status values defined in this enumeration. When using this value, note * that the version of cairo at run-time may have additional status values @@ -345,6 +347,7 @@ typedef enum _cairo_status { CAIRO_STATUS_DEVICE_ERROR, CAIRO_STATUS_INVALID_MESH_CONSTRUCTION, CAIRO_STATUS_DEVICE_FINISHED, + CAIRO_STATUS_JBIG2_GLOBAL_MISSING, CAIRO_STATUS_LAST_STATUS } cairo_status_t; @@ -2208,6 +2211,15 @@ cairo_surface_create_for_rectangle (cairo_surface_t *target, double width, double height); +/** + * cairo_surface_observer_mode_t: + * @CAIRO_SURFACE_OBSERVER_NORMAL: no recording is done + * @CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS: operations are recorded + * + * Whether operations should be recorded. + * + * Since: 1.12 + **/ typedef enum { CAIRO_SURFACE_OBSERVER_NORMAL = 0, CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS = 0x1 @@ -2419,6 +2431,9 @@ cairo_surface_set_user_data (cairo_surface_t *surface, #define CAIRO_MIME_TYPE_JP2 "image/jp2" #define CAIRO_MIME_TYPE_URI "text/x-uri" #define CAIRO_MIME_TYPE_UNIQUE_ID "application/x-cairo.uuid" +#define CAIRO_MIME_TYPE_JBIG2 "application/x-cairo.jbig2" +#define CAIRO_MIME_TYPE_JBIG2_GLOBAL "application/x-cairo.jbig2-global" +#define CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID "application/x-cairo.jbig2-global-id" cairo_public void cairo_surface_get_mime_data (cairo_surface_t *surface, @@ -2456,6 +2471,16 @@ cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface, int height); cairo_public void +cairo_surface_set_device_scale (cairo_surface_t *surface, + double x_scale, + double y_scale); + +cairo_public void +cairo_surface_get_device_scale (cairo_surface_t *surface, + double *x_scale, + double *y_scale); + +cairo_public void cairo_surface_set_device_offset (cairo_surface_t *surface, double x_offset, double y_offset); @@ -3023,6 +3048,17 @@ cairo_matrix_transform_point (const cairo_matrix_t *matrix, **/ typedef struct _cairo_region cairo_region_t; +/** + * cairo_region_overlap_t: + * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10) + * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10) + * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and + * partially outside the region. (Since 1.10) + * + * Used as the return value for cairo_region_contains_rectangle(). + * + * Since: 1.10 + **/ typedef enum _cairo_region_overlap { CAIRO_REGION_OVERLAP_IN, /* completely inside region */ CAIRO_REGION_OVERLAP_OUT, /* completely outside region */ diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairo.pc.in b/Build/source/libs/cairo/cairo-1.14.0/src/cairo.pc.in index b361edf18fb..b361edf18fb 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairo.pc.in +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairo.pc.in diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/cairoint.h b/Build/source/libs/cairo/cairo-1.14.0/src/cairoint.h index 861e2f712fa..b4e8ac87fb5 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/cairoint.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/cairoint.h @@ -424,7 +424,7 @@ _cairo_cogl_context_reset_static_data (void); /* the font backend interface */ struct _cairo_unscaled_font_backend { - void (*destroy) (void *unscaled_font); + cairo_bool_t (*destroy) (void *unscaled_font); }; /* #cairo_toy_font_face_t - simple family/slant/weight font faces used for @@ -583,7 +583,7 @@ struct _cairo_font_face_backend { /* The destroy() function is allowed to resurrect the font face * by re-referencing. This is needed for the FreeType backend. */ - void + cairo_bool_t (*destroy) (void *font_face); cairo_warn cairo_status_t @@ -793,6 +793,9 @@ cairo_private void _cairo_font_face_init (cairo_font_face_t *font_face, const cairo_font_face_backend_t *backend); +cairo_private cairo_bool_t +_cairo_font_face_destroy (void *abstract_face); + cairo_private cairo_status_t _cairo_font_face_set_error (cairo_font_face_t *font_face, cairo_status_t status); @@ -868,6 +871,9 @@ _cairo_intern_string (const char **str_inout, int len); cairo_private void _cairo_intern_string_reset_static_data (void); +cairo_private const char * +cairo_get_locale_decimal_point (void); + /* cairo-path-fixed.c */ cairo_private cairo_path_fixed_t * _cairo_path_fixed_create (void); @@ -1288,21 +1294,15 @@ _cairo_surface_set_resolution (cairo_surface_t *surface, double y_res); cairo_private cairo_surface_t * -_cairo_surface_create_similar_scratch (cairo_surface_t *other, - cairo_content_t content, - int width, - int height); - -cairo_private cairo_surface_t * _cairo_surface_create_for_rectangle_int (cairo_surface_t *target, const cairo_rectangle_int_t *extents); cairo_private cairo_surface_t * -_cairo_surface_create_similar_solid (cairo_surface_t *other, - cairo_content_t content, - int width, - int height, - const cairo_color_t *color); +_cairo_surface_create_scratch (cairo_surface_t *other, + cairo_content_t content, + int width, + int height, + const cairo_color_t *color); cairo_private void _cairo_surface_init (cairo_surface_t *surface, @@ -1324,7 +1324,7 @@ cairo_private cairo_image_surface_t * _cairo_surface_map_to_image (cairo_surface_t *surface, const cairo_rectangle_int_t *extents); -cairo_private cairo_int_status_t +cairo_private_no_warn cairo_int_status_t _cairo_surface_unmap_image (cairo_surface_t *surface, cairo_image_surface_t *image); @@ -1420,11 +1420,6 @@ cairo_private_no_warn cairo_bool_t _cairo_surface_get_extents (cairo_surface_t *surface, cairo_rectangle_int_t *extents); -cairo_private void -_cairo_surface_set_device_scale (cairo_surface_t *surface, - double sx, - double sy); - cairo_private cairo_bool_t _cairo_surface_has_device_transform (cairo_surface_t *surface) cairo_pure; @@ -1617,18 +1612,18 @@ _cairo_polygon_limit_to_clip (cairo_polygon_t *polygon, cairo_private void _cairo_polygon_fini (cairo_polygon_t *polygon); -cairo_private cairo_status_t +cairo_private_no_warn cairo_status_t _cairo_polygon_add_line (cairo_polygon_t *polygon, const cairo_line_t *line, int top, int bottom, int dir); -cairo_private cairo_status_t +cairo_private_no_warn cairo_status_t _cairo_polygon_add_external_edge (void *polygon, const cairo_point_t *p1, const cairo_point_t *p2); -cairo_private cairo_status_t +cairo_private_no_warn cairo_status_t _cairo_polygon_add_contour (cairo_polygon_t *polygon, const cairo_contour_t *contour); @@ -1955,6 +1950,7 @@ slim_hidden_proto (cairo_surface_destroy); slim_hidden_proto (cairo_surface_finish); slim_hidden_proto (cairo_surface_flush); slim_hidden_proto (cairo_surface_get_device_offset); +slim_hidden_proto (cairo_surface_get_device_scale); slim_hidden_proto (cairo_surface_get_font_options); slim_hidden_proto (cairo_surface_get_mime_data); slim_hidden_proto (cairo_surface_has_show_text_glyphs); @@ -1962,6 +1958,7 @@ slim_hidden_proto (cairo_surface_mark_dirty); slim_hidden_proto (cairo_surface_mark_dirty_rectangle); slim_hidden_proto_no_warn (cairo_surface_reference); slim_hidden_proto (cairo_surface_set_device_offset); +slim_hidden_proto (cairo_surface_set_device_scale); slim_hidden_proto (cairo_surface_set_fallback_resolution); slim_hidden_proto (cairo_surface_set_mime_data); slim_hidden_proto (cairo_surface_show_page); @@ -2012,10 +2009,6 @@ slim_hidden_proto (cairo_surface_write_to_png_stream); #endif -cairo_private_no_warn cairo_filter_t -_cairo_pattern_analyze_filter (const cairo_pattern_t *pattern, - double *pad_out); - CAIRO_END_DECLS #include "cairo-mutex-private.h" diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-def.sh b/Build/source/libs/cairo/cairo-1.14.0/src/check-def.sh index beefb46a333..beefb46a333 100755 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-def.sh +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-def.sh diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-doc-syntax.awk b/Build/source/libs/cairo/cairo-1.14.0/src/check-doc-syntax.awk index 5fdabdac9a9..1fa8b8d2232 100755 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-doc-syntax.awk +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-doc-syntax.awk @@ -1,5 +1,3 @@ -#!/usr/bin/awk -f - BEGIN { name_found = 1 SECTION_DOC = 0 diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-doc-syntax.sh b/Build/source/libs/cairo/cairo-1.14.0/src/check-doc-syntax.sh index c74fb875d37..762a48429b0 100755 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-doc-syntax.sh +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-doc-syntax.sh @@ -72,7 +72,7 @@ fi >&2 # Only run the syntax checker on the source files (not doc/) if test -e ./check-doc-syntax.awk; then - if echo $FILES | xargs ./check-doc-syntax.awk ; then + if echo $FILES | xargs awk -f ./check-doc-syntax.awk ; then : else stat=1 diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-has-hidden-symbols.c b/Build/source/libs/cairo/cairo-1.14.0/src/check-has-hidden-symbols.c index 12041277692..12041277692 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-has-hidden-symbols.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-has-hidden-symbols.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-headers.sh b/Build/source/libs/cairo/cairo-1.14.0/src/check-headers.sh index 61232954bae..61232954bae 100755 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-headers.sh +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-headers.sh diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-link.c b/Build/source/libs/cairo/cairo-1.14.0/src/check-link.c index 66ca1b2413c..66ca1b2413c 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-link.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-link.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-plt.sh b/Build/source/libs/cairo/cairo-1.14.0/src/check-plt.sh index 5a9dae1269d..5a9dae1269d 100755 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-plt.sh +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-plt.sh diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/check-preprocessor-syntax.sh b/Build/source/libs/cairo/cairo-1.14.0/src/check-preprocessor-syntax.sh index c4154151d54..b718f604ee7 100755 --- a/Build/source/libs/cairo/cairo-1.12.16/src/check-preprocessor-syntax.sh +++ b/Build/source/libs/cairo/cairo-1.14.0/src/check-preprocessor-syntax.sh @@ -9,10 +9,10 @@ stat=0 HEADERS=$all_cairo_headers -test "x$HEADERS" = x && HEADERS=`find . -name 'cairo*.h' ! -name 'cairo*-private.h' ! -name 'cairoint.h'` +test "x$HEADERS" = x && HEADERS=`find . -name 'cairo*.h' ! -name 'cairo*-private.h' ! -name 'cairo*-inline.h' ! -name 'cairoint.h'` PRIVATE=$all_cairo_private -test "x$PRIVATE" = x && PRIVATE=`find . -name 'cairo*-private.h' -or -name 'cairoint.h'` +test "x$PRIVATE" = x && PRIVATE=`find . -name 'cairo*-private.h' -or -name 'cairo*-inline.h' -or -name 'cairoint.h'` SOURCES=$all_cairo_sources test "x$SOURCES" = x && SOURCES=`find . -name 'cairo*.c' -or -name 'cairo*.cpp'` diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-base-compositor-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/test-base-compositor-surface.c index ff84b10aff7..ff84b10aff7 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-base-compositor-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-base-compositor-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface-private.h b/Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface-private.h index 491f241bacc..491f241bacc 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface-private.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface-private.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface.c index 1cc5f692120..1cc5f692120 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface.h b/Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface.h index 8d8af2d5409..8d8af2d5409 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-compositor-surface.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-compositor-surface.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-null-compositor-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/test-null-compositor-surface.c index 2301055e30a..2301055e30a 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-null-compositor-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-null-compositor-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-null-compositor-surface.h b/Build/source/libs/cairo/cairo-1.14.0/src/test-null-compositor-surface.h index 52d864b28df..52d864b28df 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-null-compositor-surface.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-null-compositor-surface.h diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-paginated-surface.c b/Build/source/libs/cairo/cairo-1.14.0/src/test-paginated-surface.c index 0a7c79b37bf..0a7c79b37bf 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-paginated-surface.c +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-paginated-surface.c diff --git a/Build/source/libs/cairo/cairo-1.12.16/src/test-paginated-surface.h b/Build/source/libs/cairo/cairo-1.14.0/src/test-paginated-surface.h index 2bd98aa5eee..2bd98aa5eee 100644 --- a/Build/source/libs/cairo/cairo-1.12.16/src/test-paginated-surface.h +++ b/Build/source/libs/cairo/cairo-1.14.0/src/test-paginated-surface.h diff --git a/Build/source/libs/cairo/configure b/Build/source/libs/cairo/configure index f8dbfe1be92..c7c69947a0a 100755 --- a/Build/source/libs/cairo/configure +++ b/Build/source/libs/cairo/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cairo (TeX Live) 1.12.16. +# Generated by GNU Autoconf 2.69 for cairo (TeX Live) 1.14.0. # # Report bugs to <tex-k@tug.org>. # @@ -580,12 +580,12 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='cairo (TeX Live)' PACKAGE_TARNAME='cairo--tex-live-' -PACKAGE_VERSION='1.12.16' -PACKAGE_STRING='cairo (TeX Live) 1.12.16' +PACKAGE_VERSION='1.14.0' +PACKAGE_STRING='cairo (TeX Live) 1.14.0' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' -ac_unique_file="cairo-1.12.16/src/cairo.h" +ac_unique_file="cairo-1.14.0/src/cairo.h" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -1348,7 +1348,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures cairo (TeX Live) 1.12.16 to adapt to many kinds of systems. +\`configure' configures cairo (TeX Live) 1.14.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1419,7 +1419,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cairo (TeX Live) 1.12.16:";; + short | recursive ) echo "Configuration of cairo (TeX Live) 1.14.0:";; esac cat <<\_ACEOF @@ -1522,7 +1522,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cairo (TeX Live) configure 1.12.16 +cairo (TeX Live) configure 1.14.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2128,7 +2128,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cairo (TeX Live) $as_me 1.12.16, which was +It was created by cairo (TeX Live) $as_me 1.14.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4382,7 +4382,7 @@ fi # Define the identity of the package. PACKAGE='cairo--tex-live-' - VERSION='1.12.16' + VERSION='1.14.0' cat >>confdefs.h <<_ACEOF @@ -6564,7 +6564,7 @@ LIBS=$kpse_save_LIBS echo timestamp >config.force fi -CAIRO_TREE=cairo-1.12.16 +CAIRO_TREE=cairo-1.14.0 ac_config_files="$ac_config_files Makefile cairo/Makefile" @@ -7221,7 +7221,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cairo (TeX Live) $as_me 1.12.16, which was +This file was extended by cairo (TeX Live) $as_me 1.14.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7287,7 +7287,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cairo (TeX Live) config.status 1.12.16 +cairo (TeX Live) config.status 1.14.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/cairo/version.ac b/Build/source/libs/cairo/version.ac index d63203075f3..44fd0b1d61a 100644 --- a/Build/source/libs/cairo/version.ac +++ b/Build/source/libs/cairo/version.ac @@ -1,5 +1,5 @@ dnl -dnl Copyright (C) 2012, 2013 Peter Breitenlohner <tex-live@tug.org> +dnl Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current cairo version -m4_define([cairo_version], [1.12.16]) +m4_define([cairo_version], [1.14.0]) |