summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-06 21:06:15 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-07 14:49:48 +0100
commit7efd71616ec5efedbe626a986a707c35d3cac323 (patch)
tree0223e8271d9d18763efd743f43f98b8b8b9e5c2e /gfx
parentbbc2206a0fda053a6f5071b457bd209dab9ed268 (diff)
downloadUXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar.gz
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar.lz
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar.xz
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.zip
Issue #1274 - Part 1: Adopt the cairo version as our own.
- Move header licensing from tri-license to MPL 2.0. MPL-compatible other licensing has been retained where originally present. - Remove individual superseded licensing terms. - Remove patches, outdated readmes & incomplete patch summaries. - Remove incomplete cairo release notes (only went up to 1.6.4 anyway). - Rewrite COPYING to indicate the current state of the library in tree.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/cairo/README256
-rw-r--r--gfx/cairo/add-a-stash-of-cairo_t-s.patch75
-rw-r--r--gfx/cairo/avoid-extend-none.patch39
-rw-r--r--gfx/cairo/bgr.patch104
-rw-r--r--gfx/cairo/buggy-repeat.patch39
-rw-r--r--gfx/cairo/cache-size.patch19
-rw-r--r--gfx/cairo/cairo-clamp-boundary.patch71
-rw-r--r--gfx/cairo/cairo-mask-extends-bug.patch41
-rw-r--r--gfx/cairo/cairo-qt-compile.patch21
-rw-r--r--gfx/cairo/cairo-region-clip.patch34
-rw-r--r--gfx/cairo/cairo-version-fixes.patch26
-rw-r--r--gfx/cairo/cairo-x-visual.patch160
-rw-r--r--gfx/cairo/cairo/COPYING24
-rw-r--r--gfx/cairo/cairo/COPYING-LGPL-2.1510
-rw-r--r--gfx/cairo/cairo/COPYING-MPL-1.1470
-rw-r--r--gfx/cairo/cairo/NEWS5121
-rw-r--r--gfx/cairo/cairo/src/cairo-analysis-surface-private.h36
-rw-r--r--gfx/cairo/cairo/src/cairo-analysis-surface.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-arc-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-arc.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-array.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-atomic-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-atomic.c35
-rw-r--r--gfx/cairo/cairo/src/cairo-base64-stream.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-base85-stream.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-bentley-ottmann-rectangular.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-bentley-ottmann-rectilinear.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-bentley-ottmann.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-beos-surface.cpp38
-rw-r--r--gfx/cairo/cairo/src/cairo-beos.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-botor-scan-converter.c43
-rw-r--r--gfx/cairo/cairo/src/cairo-boxes-private.h35
-rw-r--r--gfx/cairo/cairo/src/cairo-boxes.c35
-rw-r--r--gfx/cairo/cairo/src/cairo-cache-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-cache.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-cff-subset.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-clip-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-clip.c43
-rw-r--r--gfx/cairo/cairo/src/cairo-color.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-combsort-private.h36
-rw-r--r--gfx/cairo/cairo/src/cairo-compiler-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-composite-rectangles-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-composite-rectangles.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-d2d-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-d2d-surface.cpp39
-rw-r--r--gfx/cairo/cairo/src/cairo-debug.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-deflate-stream.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-deprecated.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-device-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-device.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-directfb-surface.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-directfb.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-drm.h34
-rw-r--r--gfx/cairo/cairo/src/cairo-dwrite-font.cpp38
-rw-r--r--gfx/cairo/cairo/src/cairo-dwrite-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-eagle-context.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-error-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-features.h.in38
-rw-r--r--gfx/cairo/cairo/src/cairo-fixed-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-fixed-type-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-fixed.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-font-face-twin.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-font-face.c42
-rw-r--r--gfx/cairo/cairo/src/cairo-font-options.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-fontconfig-private.h43
-rw-r--r--gfx/cairo/cairo/src/cairo-freed-pool-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-freed-pool.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-ft-font.c42
-rw-r--r--gfx/cairo/cairo/src/cairo-ft-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-ft.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-gl-glyphs.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-gl-private.h43
-rw-r--r--gfx/cairo/cairo/src/cairo-gl-shaders.c41
-rw-r--r--gfx/cairo/cairo/src/cairo-gl-surface.c42
-rw-r--r--gfx/cairo/cairo/src/cairo-gl.h35
-rw-r--r--gfx/cairo/cairo/src/cairo-glitz-private.h34
-rw-r--r--gfx/cairo/cairo/src/cairo-glitz-surface.c28
-rw-r--r--gfx/cairo/cairo/src/cairo-glitz.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-glx-context.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-gstate-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-gstate.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-hash-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-hash.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-hull.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-image-info-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-image-info.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-image-surface.c41
-rw-r--r--gfx/cairo/cairo/src/cairo-list-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-lzw.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-malloc-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-matrix.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-meta-surface-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-misc.c42
-rw-r--r--gfx/cairo/cairo/src/cairo-mutex-impl-private.h43
-rw-r--r--gfx/cairo/cairo/src/cairo-mutex-list-private.h35
-rw-r--r--gfx/cairo/cairo/src/cairo-mutex-private.h42
-rw-r--r--gfx/cairo/cairo/src/cairo-mutex-type-private.h42
-rw-r--r--gfx/cairo/cairo/src/cairo-mutex.c35
-rw-r--r--gfx/cairo/cairo/src/cairo-observer.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-os2-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-os2-surface.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-os2.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-output-stream-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-output-stream.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-paginated-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-paginated-surface-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-paginated-surface.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-path-bounds.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-path-fill.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-path-fixed-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-path-fixed.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-path-in-fill.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-path-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-path-stroke.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-path.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-pattern.c32
-rw-r--r--gfx/cairo/cairo/src/cairo-pdf-operators-private.h43
-rw-r--r--gfx/cairo/cairo/src/cairo-pdf-operators.c43
-rw-r--r--gfx/cairo/cairo/src/cairo-pdf-surface-private.h43
-rw-r--r--gfx/cairo/cairo/src/cairo-pdf-surface.c43
-rw-r--r--gfx/cairo/cairo/src/cairo-pdf.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-pen.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-platform.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-png.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-polygon.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-ps-surface-private.h42
-rw-r--r--gfx/cairo/cairo/src/cairo-ps-surface.c45
-rw-r--r--gfx/cairo/cairo/src/cairo-ps.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-qt-surface.cpp38
-rw-r--r--gfx/cairo/cairo/src/cairo-qt.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-quartz-font.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-quartz-image-surface.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-quartz-image.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-quartz-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-quartz-surface.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-quartz.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-recording-surface-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-recording-surface.c41
-rw-r--r--gfx/cairo/cairo/src/cairo-rectangle.c41
-rw-r--r--gfx/cairo/cairo/src/cairo-rectangular-scan-converter.c35
-rw-r--r--gfx/cairo/cairo/src/cairo-reference-count-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-region-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-region.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-rtree-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-rtree.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-scaled-font-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-scaled-font-subsets-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-scaled-font-subsets.c44
-rw-r--r--gfx/cairo/cairo/src/cairo-scaled-font.c42
-rw-r--r--gfx/cairo/cairo/src/cairo-script-surface.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-script.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-skia.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-slope-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-slope.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-spans-private.h1
-rw-r--r--gfx/cairo/cairo/src/cairo-spans.c1
-rw-r--r--gfx/cairo/cairo/src/cairo-spline.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-stroke-style.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-clipper-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-clipper.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-fallback-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-fallback.c42
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-offset-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-offset.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-private.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-snapshot-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-snapshot.c41
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-subsurface-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-subsurface.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-wrapper-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-surface-wrapper.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-surface.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-svg-surface-private.h42
-rw-r--r--gfx/cairo/cairo/src/cairo-svg-surface.c43
-rw-r--r--gfx/cairo/cairo/src/cairo-svg.h33
-rw-r--r--gfx/cairo/cairo/src/cairo-system.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-tee-surface-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-tee-surface.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-tee.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-tor-scan-converter.c3
-rw-r--r--gfx/cairo/cairo/src/cairo-toy-font-face.c43
-rw-r--r--gfx/cairo/cairo/src/cairo-traps.c41
-rw-r--r--gfx/cairo/cairo/src/cairo-truetype-subset-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-truetype-subset.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-type1-fallback.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-type1-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-type1-subset.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-type3-glyph-surface-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-type3-glyph-surface.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-types-private.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-unicode.c44
-rw-r--r--gfx/cairo/cairo/src/cairo-user-font-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-user-font.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-version.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-vg-surface.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-vg.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-wideint-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-wideint-type-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-wideint.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-win32-font.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-win32-printing-surface.c39
-rw-r--r--gfx/cairo/cairo/src/cairo-win32-private.h37
-rw-r--r--gfx/cairo/cairo/src/cairo-win32-refptr.h39
-rw-r--r--gfx/cairo/cairo/src/cairo-win32-surface.c40
-rw-r--r--gfx/cairo/cairo/src/cairo-win32.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-xcb-surface.c42
-rw-r--r--gfx/cairo/cairo/src/cairo-xcb-xrender.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-xcb.h40
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-display.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-screen.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-surface-private.h34
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-surface.c43
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-visual.c37
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-xrender-private.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib-xrender.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-xlib.h38
-rw-r--r--gfx/cairo/cairo/src/cairo-xml-surface.c38
-rw-r--r--gfx/cairo/cairo/src/cairo-xml.h37
-rw-r--r--gfx/cairo/cairo/src/cairo.c40
-rw-r--r--gfx/cairo/cairo/src/cairo.h39
-rw-r--r--gfx/cairo/cairo/src/cairoint.h39
-rw-r--r--gfx/cairo/cairo/src/test-fallback-surface.c37
-rw-r--r--gfx/cairo/cairo/src/test-fallback-surface.h37
-rw-r--r--gfx/cairo/cairo/src/test-meta-surface.c37
-rw-r--r--gfx/cairo/cairo/src/test-meta-surface.h37
-rw-r--r--gfx/cairo/cairo/src/test-paginated-surface.c37
-rw-r--r--gfx/cairo/cairo/src/test-paginated-surface.h37
-rw-r--r--gfx/cairo/cairo_qt_a8_fallback.diff68
-rw-r--r--gfx/cairo/cairo_qt_glyphs.patch256
-rw-r--r--gfx/cairo/clip-invariant.patch1255
-rw-r--r--gfx/cairo/clip-rects-surface-extents.patch163
-rw-r--r--gfx/cairo/copyarea-with-alpha.patch110
-rw-r--r--gfx/cairo/d2d-gradient-ensure-stops.patch32
-rw-r--r--gfx/cairo/d2d-repeating-gradients.patch271
-rw-r--r--gfx/cairo/d2d.patch465
-rw-r--r--gfx/cairo/dasharray-zero-gap.patch60
-rw-r--r--gfx/cairo/disable-previous-scaled-font-cache.patch16
-rw-r--r--gfx/cairo/disable-printing.patch27
-rw-r--r--gfx/cairo/disable-server-gradients.patch21
-rw-r--r--gfx/cairo/disable-subpixel-antialiasing.patch519
-rw-r--r--gfx/cairo/dwrite-font-match-robustness.patch26
-rw-r--r--gfx/cairo/dwrite-font-printing.patch157
-rw-r--r--gfx/cairo/dwrite-glyph-extents.patch44
-rw-r--r--gfx/cairo/empty-clip-extents.patch59
-rw-r--r--gfx/cairo/empty-clip-rectangles.patch28
-rw-r--r--gfx/cairo/ensure-text-flushed.patch16
-rw-r--r--gfx/cairo/expose-snapshot.patch528
-rw-r--r--gfx/cairo/fix-build-with-Werror=return-type.patch21
-rw-r--r--gfx/cairo/fix-cairo-surface-wrapper-flush-build-warning.patch19
-rw-r--r--gfx/cairo/fix-cairo-win32-print-gdi-error.diff26
-rw-r--r--gfx/cairo/fix-clip-copy.patch30
-rw-r--r--gfx/cairo/fix-clip-region-simplification.patch1
-rw-r--r--gfx/cairo/fix-clip-test.patch15
-rw-r--r--gfx/cairo/fix-ps-output.patch19
-rw-r--r--gfx/cairo/fix-unnecessary-fallback.patch14
-rw-r--r--gfx/cairo/fix-win32-font-assertion.patch27
-rw-r--r--gfx/cairo/fix-win32-show-glyphs-clipping.patch19
-rw-r--r--gfx/cairo/fix-xcopyarea-with-clips.patch38
-rw-r--r--gfx/cairo/fix-zero-length-gradient.patch1
-rw-r--r--gfx/cairo/fixup-unbounded.patch22
-rw-r--r--gfx/cairo/ft-no-subpixel-if-surface-disables.patch46
-rw-r--r--gfx/cairo/gdi-RGB24-ARGB32.patch141
-rw-r--r--gfx/cairo/handle-a1.patch25
-rw-r--r--gfx/cairo/handle-multi-path-clip.patch57
-rw-r--r--gfx/cairo/ignore-rank0.patch20
-rw-r--r--gfx/cairo/lround-c99-only.patch46
-rw-r--r--gfx/cairo/max-font-size.patch28
-rw-r--r--gfx/cairo/missing-cairo-clip-init.diff21
-rw-r--r--gfx/cairo/moz.build11
-rw-r--r--gfx/cairo/native-clipping.patch189
-rw-r--r--gfx/cairo/no-pixman-image-reuse-across-threads.patch242
-rw-r--r--gfx/cairo/nonfatal-assertions.patch17
-rw-r--r--gfx/cairo/on-edge.patch70
-rw-r--r--gfx/cairo/pattern_get_surface-no-error.patch29
-rw-r--r--gfx/cairo/pixman-16-bit-pipeline.patch1242
-rw-r--r--gfx/cairo/pixman-8888-over-565.patch712
-rw-r--r--gfx/cairo/pixman-android-cpu-detect.patch29
-rw-r--r--gfx/cairo/pixman-bilinear-fastpath.patch287
-rw-r--r--gfx/cairo/pixman-component-alpha.patch34
-rw-r--r--gfx/cairo/pixman-dither.patch310
-rw-r--r--gfx/cairo/pixman-enable-altivec-acceleration.patch38
-rw-r--r--gfx/cairo/pixman-export.patch37
-rw-r--r--gfx/cairo/pixman-image-transform.patch52
-rw-r--r--gfx/cairo/pixman-limits.patch18
-rw-r--r--gfx/cairo/pixman-lowres-interp.patch222
-rw-r--r--gfx/cairo/pixman-rename-and-endian.patch22
-rw-r--r--gfx/cairo/pixman-xp-dll-workaround27
-rw-r--r--gfx/cairo/premultiply-alpha-solid-gradients.patch46
-rw-r--r--gfx/cairo/quartz-cache-CGImageRef.patch173
-rw-r--r--gfx/cairo/quartz-cg-layers-fix-fallback.patch42
-rw-r--r--gfx/cairo/quartz-cglayers.patch715
-rw-r--r--gfx/cairo/quartz-check-imageSurfaceEquiv.patch36
-rw-r--r--gfx/cairo/quartz-const-globals.patch134
-rw-r--r--gfx/cairo/quartz-create-for-data.patch309
-rw-r--r--gfx/cairo/quartz-fallback.patch70
-rw-r--r--gfx/cairo/quartz-first-stop.patch57
-rw-r--r--gfx/cairo/quartz-fix-PAD.patch64
-rw-r--r--gfx/cairo/quartz-get-image-performance.patch43
-rw-r--r--gfx/cairo/quartz-get-image.patch127
-rw-r--r--gfx/cairo/quartz-glyph-extents.patch19
-rw-r--r--gfx/cairo/quartz-is-clear.patch28
-rw-r--r--gfx/cairo/quartz-layers-content.patch125
-rw-r--r--gfx/cairo/quartz-mark-dirty.patch56
-rw-r--r--gfx/cairo/quartz-mask-non-OVER.patch80
-rw-r--r--gfx/cairo/quartz-minimize-gradient-repeat.patch561
-rw-r--r--gfx/cairo/quartz-optimize-OVER.patch71
-rw-r--r--gfx/cairo/quartz-refactor-surface-setup.patch290
-rw-r--r--gfx/cairo/quartz-remove-snapshot.patch62
-rw-r--r--gfx/cairo/quartz-repeating-radial-gradients.patch305
-rw-r--r--gfx/cairo/quartz-state.patch1190
-rw-r--r--gfx/cairo/quartz-support-color-emoji-font.patch432
-rw-r--r--gfx/cairo/quartz-surface-mask-patch79
-rw-r--r--gfx/cairo/setlcdfilter_in_tree.patch30
-rw-r--r--gfx/cairo/support-new-style-atomic-primitives.patch121
-rw-r--r--gfx/cairo/surface-clipper.patch26
-rw-r--r--gfx/cairo/tee-surfaces-pointwise.patch278
-rw-r--r--gfx/cairo/text-path-filling-threshold.patch90
-rw-r--r--gfx/cairo/unicode-printing.patch333
-rw-r--r--gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch42
-rw-r--r--gfx/cairo/win32-ExtCreatePen-zero-size.patch85
-rw-r--r--gfx/cairo/win32-avoid-extend-pad-fallback.patch109
-rw-r--r--gfx/cairo/win32-canvas-glyph-position.patch31
-rw-r--r--gfx/cairo/win32-cleartype-clipping.patch23
-rw-r--r--gfx/cairo/win32-composite-src-mod.patch44
-rw-r--r--gfx/cairo/win32-d3dsurface9.patch465
-rw-r--r--gfx/cairo/win32-ddb-dib.patch181
-rw-r--r--gfx/cairo/win32-ffs-gcc.patch25
-rw-r--r--gfx/cairo/win32-gdi-font-cache-no-HFONT.patch145
-rw-r--r--gfx/cairo/win32-gdi-font-cache.patch375
-rw-r--r--gfx/cairo/win32-inline-cpp-keyword.patch24
-rw-r--r--gfx/cairo/win32-logical-font-scale.patch12
-rw-r--r--gfx/cairo/win32-printing-axis-swap.patch292
-rw-r--r--gfx/cairo/win32-raster.patch262
-rw-r--r--gfx/cairo/win32-transparent-surface.patch129
-rw-r--r--gfx/cairo/win32-vertically-offset-glyph.patch23
-rw-r--r--gfx/cairo/wrap-source_image.patch105
-rw-r--r--gfx/cairo/xlib-flush-glyphs.patch66
-rw-r--r--gfx/cairo/xlib-glyph-clip-region.patch40
-rw-r--r--gfx/cairo/xlib-initialize-members.patch19
-rw-r--r--gfx/cairo/zero-sized.patch39
-rw-r--r--gfx/cairo/zombie-face.patch119
343 files changed, 650 insertions, 31460 deletions
diff --git a/gfx/cairo/README b/gfx/cairo/README
deleted file mode 100644
index 91e2d1982..000000000
--- a/gfx/cairo/README
+++ /dev/null
@@ -1,256 +0,0 @@
-Snapshots of cairo and glitz for mozilla usage.
-
-We only include the relevant parts of each release (generally, src/*.[ch]),
-as we have Makefile.in's that integrate into the Mozilla build system. For
-documentation and similar, please see the official tarballs at
-http://www.cairographics.org/.
-
-VERSIONS:
-
- cairo (12d521df8acc483b2daa844d4f05dc2fe2765ba6)
- pixman (0.24.2)
-
-==== Patches ====
-
-Some specific things:
-
-max-font-size.patch: Clamp freetype font size to 1000 to avoid overflow issues
-
-win32-logical-font-scale.patch: set CAIRO_WIN32_LOGICAL_FONT_SCALE to 1
-
-nonfatal-assertions.patch: Make assertions non-fatal
-
-buggy-repeat.patch: Unconditionally turn on buggy-repeat handling to bandaid bug 413583.
-
-cairo-version-fixes.patch: fix up cairo-version.c/cairo-version.h for in-place builds
-
-win32-ddb-dib.patch: fix for bug 455513; not upstream yet pending feebdack
-
-win32-vertically-offset-glyph.patch: bug 454098; vertical positioning errors when drawing glyph runs including delta-y offsets on screen via GDI
-
-ignore-rank0.patch: bug 474886; Not redrawing the background when changing page on flickr
-
-win32-canvas-glyph-position.patch: bug 475092; horizontal positioning errors when drawing glyph runs with delta-y offsets to canvas through win32-font
-
-win32-cleartype-clipping.patch: bug 445087; some glyphs are clipped, mainly on right-hand edge, when ClearType is enabled and drawing to RGBA canvas
-
-on-edge.patch: reverts the in-fill semantic change.
-
-wrap-source_image.patch: make sure we don't free the source image until we're done with it.
-
-zero-sized.patch: deal with zero sized surface in ways less likely to crash.
-
-text-path-filling-threshold.patch: use path filling instead of platform glyph rasterization at a smaller size threshold of 256 device pixels, if the backend supports native filling (which we assume will be fast).
-
-zombie-face.patch: bug 486974; leak and possible crash with @font-face{src:url()}. Upstream commit: 0238fe2cafea2e1ed19bb222117bd73ee6898d4d
-
-win32-raster.patch: bug 498689; use scanline rasterizer on win32
-
-quartz-falback.patch: try to fix Quartz fallback-to-pixman path; possiby incorrect and obsoleted by Andrea Canciani patch
-
-quartz-repeating-radial-gradients.patch: use Quartz to render repeating radial gradients instead of falling back
-
-quartz-const-globals.patch: make some Quartz color function data const globals instead of local variables
-
-quartz-minimze-gradient-repeat.patch: reduce the number of gradient stop repetitions we use, to improve quality of Quartz's gradient rendering
-
-quartz-first-stop.patch: return the first stop for negative positions on the gradient line of a nonrepeating linear gradient
-
-quartz-glyph-extents.patch: bug 534260; work around incorrect glyph extents returned by quartz for anomalous empty glyphs
-
-quartz-state.patch: bug 522859; refactor cairo-quartz-surface so that state local to a drawing operation is stored in a cairo_quartz_drawing_state_t instead of the surface
-
-quartz-cache-CGImageRef.patch: cache CGImageRef for a CGBitmapContext; when we reuse it, Quartz will cache stuff, improving performance
-
-quartz-remove-snapshot.patch: remove broken implementation of backend snapshot
-
-quartz-cglayers.patch: add support for cairo surfaces backed by CGLayers
-
-quartz-cglayers-fix-fallback.patch: Bug 572912; fix bug in fallback code in previous patch
-
-quartz-get-image.patch: Bug 575521; add a way to get the image surface associated with a surface
-
-quartz-create-for-data.patch: Bug 575521; add a way to create quartz surfaces backed with application-provided data
-
-premultiply-alpha-solid-gradients.patch: bug 539165; multiply the solid color by the alpha component before using it for a solid surface
-
-xlib-initialize-members.path: bug 548793; initialize XRender version if the server doesn't have the extension
-
-remove-comma: remove a comma from enum
-
-d2d.patch: add d2d support
-
-fix-zero-len-graident.patch: fix zero length gradients
-
-fix-clip-copy.patch: fix clip copying
-
-fix-clip-region-simplification.patch: fixes a bug in clip region simplifications
-
-expand-in-stroke-limits.patch: expand the in-stroke limits to avoid a bug
-
-d2d-dwrite.patch: update the d2d/dwrite stuff
-
-add-a-stash-of-cairo_t-s.patch: use the stash to avoid malloc/freeing cairo_t's
-
-bgr.patch: fix image wrapping
-
-disable-server-graidents.patch: disable server-side gradients
-
-clip-invariant.patch: make rasterization closer to being clip invariant
-
-fix-unnecessary-fallback.patch: avoid unnecessary fallback
-
-handle-a1-upload.patch: handle a1 image uploads through converter
-
-surface-clipper.patch: remove an incorrect optimization
-
-fix-win32-show-glyphs-clipping.patch: fix a clipping bug
-
-native-clipping.patch: Add support for a native clipping api
-
-quartz-is-clear.patch: Propagate the quartz is_clear flag.
-
-cairo-qt-compile.patch: Fix compile error, return not reached, and clone_similar interface
-
-dwrite-glyph-extents.patch: Add padding to extents of antialiased glyphs, to avoid unwanted clipping. (bug 568191)
-
-fix-ps-output.patch: PS: Add missing 'q' when resetting clip path (42b5cac7668625c9761113ff72b47af5cfd10377)
-
-ensure-text-flushed.patch: PDF-operators: ensure text operations flushed before emitting clip (42b5cac7668625c9761113ff72b47af5cfd10377)
-
-fix-xcopyarea-with-clips.patch: 5d07307b691afccccbb15f773d5231669ba44f5a
-
-cairo-x-visual.patch: make valid visua for cairo_xlib_surface_create_with_xrender_format (55037bfb2454a671332d961e061c712ab5471580)
-
-win32-transparent-surface.patch: add API so we can create a win32 surface for an HDC and indicate the surface has an alpha channel
-
-cairo_qt_glyphs.patch: Drop X surface from Qt surface, add support for new qt glyphs api
-
-empty-clip-rectangles.patch: f2fa15680ec3ac95cb68d4957557f06561a7dc55
-
-empty-clip-extents.patch: b79ea8a6cab8bd28aebecf6e1e8229d5ac017264
-
-clip-rects-surface-extents.patch: 108b1c7825116ed3f93aa57384bbd3290cdc9181
-
-disable-previous-scaled-font-cache.patch: Disable the previous-scaled-font-cache until we figure out our ctm handling (#583035)
-
-copyarea-with-alpha.patch: support simple overlapping self copies in (some) color_alpha xlib surfaces. https://bugs.freedesktop.org/show_bug.cgi?id=29250
-
-fix-clip-test.patch: Use y 498c10032ea3f8631a928cd7df96766f2c8ddca4
-
-quartz-refactor-surface-setup.patch: Extract the surface-source setup chunk of _cairo_quartz_setup_state into its own function
-
-quartz-fix-PAD.patch: Treat PAD like NONE instead of REPEAT
-
-quartz-mask-non-OVER.patch: Don't use CGContextSetAlpha to optimize alpha masking for non-OVER operators
-
-quartz-layers-content.patch: Store cairo content type in CGLayer surfaces
-
-quartz-optimize-OVER.patch: Optimize OVER to SOURCE for opaque patterns
-
-quartz-check-imageSurfaceEquiv.patch: Drop cairo_quartz_surface_t's "imageSurfaceEquiv" member variable if we have problems creating it
-
-disable-subpixel-antialiasing.patch: Add API to disable subpixel antialiasing completely for a target surface
-
-tee-surfaces-pointwise.patch: Composite tee subsurfaces pointwise if possible
-
-pattern_get_surface-no-error.patch: Don't put a pattern into error if cairo_pattern_get_surface fails
-
-missing-cairo-clip-init.diff: Missing cairo_clip_init call in cairo_gstate_show_text_glyphs lead to crash
-
-fix-cairo-win32-print-gdi-error.diff: Don't use fwprintf with char* format. Flush stderr so that all error messages appears before exit.
-
-pixman-image-transform.patch: Reset the transform on pixman images when using them as destinations.
-
-fix-cairo-surface-wrapper-flush-build-warning.patch: Ensures that _cairo_surface_wrapper_flush always returns a status, to silence the build warning
-
-fixup-unbounded.patch: Hack to work around bad assumption.
-
-quartz-get-image-performance: Make cairo_quartz_get_image faster in the failure case by not flushing unless we are going to succeed.
-
-lround-c99-only.patch: Only use lround in C99 programs.
-
-unicode-printing.patch: Print as unicode (bug 454532)
-
-quartz-mark-dirty.patch: Add a quartz implementation of mark_dirty_rectangle (bug 715704)
-
-expose-snapshot.patch: Make functions to add snapshots public, as well as allow creating null surfaces publically. (bug 715658)
-
-fix-build-with-Werror=return-type.patch: Fix builds with -Werror=return-type (bug 737909)
-
-avoid-extend-none.patch: Avoid incorrectly using EXTEND_NONE (bug 751668)
-
-win32-ExtCreatePen-zero-size.patch: Don't pass zero width or dash lengths to ExtCreatePen (bug 768348)
-
-d2d-repeating-gradients.patch: Minimize number of gradient stops added to handle repeating with path fills (bug 768775)
-
-xlib-glyph-clip-region.patch: bug 709477, addressed upstream by be1ff2f45fdbc69537e513834fcffa0435e63073
-
-gdi-RGB24-ARGB32.patch: bug 788794
-
-dwrite-font-printing.patch: bug 468568; don't substitute a GDI font for a DWrite font if the name tables aren't equal
-
-d2d-gradient-ensure-stops.patch: bug 792903, ensure we don't set num_stops to 0
-
-setlcdfilter_in_tree.patch: bug 790139; force cairo to use FT_Library_SetLcdFilter from our in tree library rather than picking it up from the system
-
-dwrite-font-match-robustness.patch: bug 717178, don't crash when _name_tables_match is passed a nil scaled-font
-
-handle-multi-path-clip.patch: bug 813124, handle multiple clip paths correctly
-
-win32-gdi-font-cache.patch: Bug 717178, cache GDI font faces to reduce usage of GDI resources
-
-win32-gdi-font-cache-no-HFONT.patch: Bug 717178, don't cache GDI font faces when an HFONT belonging to the caller is passed in
-
-fix-win32-font-assertion.patch: Bug 838617, fix assertion from bug 717178 that was in the wrong place
-
-xlib-flush-glyphs.patch: bug 839745, flush glyphs when necessary
-
-dasharray-zero-gap.patch: bug 885585, ensure strokes get painted when the gaps in a dash array are all zero length
-
-cairo-mask-extends-bug.patch: bug 918671, sometimes when building a mask we wouldn't clear it properly. This is fixed in cairo 1.12
-
-ft-no-subpixel-if-surface-disables.patch: bug 929451, don't use subpixel aa for ft fonts on surfaces that don't support it
-
-win32-printing-axis-swap.patch: bug 1205854, workaround for Windows printer drivers that can't handle swapped X and Y axes
-
-no-pixman-image-reuse-across-threads.patch: bug 1273701, picked from 71e8a4c23019b01aa43b334fcb2784c70daae9b5
-
-==== pixman patches ====
-
-pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv.
-
-pixman-rename-and-endian.patch: include cairo-platform.h for renaming of external symbols and endian macros
-
-NOTE: we previously supported ARM assembler on MSVC, this has been removed because of the maintenance burden
-
-pixman-export.patch: use cairo_public for PIXMAN_EXPORT to make sure pixman symbols are not exported in libxul
-
-pixman-limits.patch: include limits.h for SIZE_MAX
-
-pixman-lowres-interp.patch: Use lower quality interpolation for more speed.
-
-pixman-bilinear-fastpath.patch: Bilinear fast paths for non-neon
-
-pixman-16-bit-pipeline.patch: 16 bit pipeline for dithering
-
-pixman-dither.patch: Add dithering of 16 bit gradients
-
-quartz-support-color-emoji-font.patch: support Apple Color Emoji font in cairo-quartz backend
-
-use-show-text-glyphs-if-glyph-path-fails.patch: fall back to show_text_glyphs even at huge sizes if scaled_font_glyph_path didn't work
-
-pixman-enable-altivec-acceleration.patch: enable building the altivec acceleration
-
-win32-d3dsurface9.patch: Create a win32 d3d9 surface to support LockRect
-
-win32-avoid-extend-pad-fallback: Avoid falling back to pixman when using EXTEND_PAD
-
-support-new-style-atomic-primitives.patch: Support the __atomic_* primitives for atomic operations
-
-==== disable printing patch ====
-
-disable-printing.patch: allows us to use NS_PRINTING to disable printing.
-
-==== cairo clamp bounday patch ====
-cairo-clamp-boundary.patch: don't call pixman_fill with negative starts or negative sizes
diff --git a/gfx/cairo/add-a-stash-of-cairo_t-s.patch b/gfx/cairo/add-a-stash-of-cairo_t-s.patch
deleted file mode 100644
index c6fcdd9d8..000000000
--- a/gfx/cairo/add-a-stash-of-cairo_t-s.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-commit dfec2c249915560cedd2b49326c6629ad8a0b0f2
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Tue Mar 2 16:01:41 2010 -0500
-
- add a stash of cairo_t's
-
-diff --git a/src/cairo.c b/src/cairo.c
-index 3c9d892..4b27b83 100644
---- a/src/cairo.c
-+++ b/src/cairo.c
-@@ -119,7 +119,63 @@ _cairo_set_error (cairo_t *cr, cairo_status_t status)
- _cairo_status_set_error (&cr->status, _cairo_error (status));
- }
-
--#if HAS_ATOMIC_OPS
-+#if defined(_MSC_VER)
-+#pragma intrinsic(_BitScanForward)
-+static __forceinline int
-+ffs(int x)
-+{
-+ unsigned long i;
-+
-+ if (_BitScanForward(&i, x) != 0)
-+ return i + 1;
-+
-+ return 0;
-+}
-+#endif
-+
-+
-+#if CAIRO_NO_MUTEX
-+/* We keep a small stash of contexts to reduce malloc pressure */
-+#define CAIRO_STASH_SIZE 4
-+static struct {
-+ cairo_t pool[CAIRO_STASH_SIZE];
-+ int occupied;
-+} _context_stash;
-+
-+static cairo_t *
-+_context_get (void)
-+{
-+ int avail, old, new;
-+
-+ old = _context_stash.occupied;
-+ avail = ffs (~old) - 1;
-+ if (avail >= CAIRO_STASH_SIZE)
-+ return malloc (sizeof (cairo_t));
-+
-+ new = old | (1 << avail);
-+ _context_stash.occupied = new;
-+
-+ return &_context_stash.pool[avail];
-+}
-+
-+static void
-+_context_put (cairo_t *cr)
-+{
-+ int old, new, avail;
-+
-+ if (cr < &_context_stash.pool[0] ||
-+ cr >= &_context_stash.pool[CAIRO_STASH_SIZE])
-+ {
-+ free (cr);
-+ return;
-+ }
-+
-+ avail = ~(1 << (cr - &_context_stash.pool[0]));
-+ old = _context_stash.occupied;
-+ new = old & avail;
-+ _context_stash.occupied = new;
-+}
-+#elif HAS_ATOMIC_OPS
- /* We keep a small stash of contexts to reduce malloc pressure */
- #define CAIRO_STASH_SIZE 4
- static struct {
diff --git a/gfx/cairo/avoid-extend-none.patch b/gfx/cairo/avoid-extend-none.patch
deleted file mode 100644
index b3606cc2e..000000000
--- a/gfx/cairo/avoid-extend-none.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-changeset: 93076:25d0c8a38d7d
-tag: none
-tag: qbase
-tag: qtip
-tag: tip
-user: Jeff Muizelaar <jmuizelaar@mozilla.com>
-date: Thu May 03 15:21:52 2012 -0400
-summary: Bug 751668. Avoid incorrectly using EXTEND_NONE. r=joe
-
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -1390,25 +1390,16 @@ static pixman_image_t *
- cairo_image_surface_t *source = (cairo_image_surface_t *) pattern->surface;
- cairo_surface_type_t type;
-
- if (source->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT)
- source = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) pattern->surface)->target;
-
- type = source->base.backend->type;
- if (type == CAIRO_SURFACE_TYPE_IMAGE) {
-- if (extend != CAIRO_EXTEND_NONE &&
-- sample.x >= 0 &&
-- sample.y >= 0 &&
-- sample.x + sample.width <= source->width &&
-- sample.y + sample.height <= source->height)
-- {
-- extend = CAIRO_EXTEND_NONE;
-- }
--
- if (sample.width == 1 && sample.height == 1) {
- if (sample.x < 0 ||
- sample.y < 0 ||
- sample.x >= source->width ||
- sample.y >= source->height)
- {
- if (extend == CAIRO_EXTEND_NONE)
- return _pixman_transparent_image ();
-
diff --git a/gfx/cairo/bgr.patch b/gfx/cairo/bgr.patch
deleted file mode 100644
index af72fa237..000000000
--- a/gfx/cairo/bgr.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-commit d2120bdb06c9aacc470bb346d6bc2071c2e0749d
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Fri Mar 12 15:32:09 2010 -0500
-
- BGR
-
-diff --git a/src/cairo-surface.c b/src/cairo-surface.c
-index 332e3ab..4a1d6a0 100644
---- a/src/cairo-surface.c
-+++ b/src/cairo-surface.c
-@@ -1501,7 +1501,9 @@ static void
- _wrap_release_source_image (void *data)
- {
- struct acquire_source_image_data *acquire_data = data;
-- _cairo_surface_release_source_image (acquire_data->src, acquire_data->image, acquire_data->image_extra);
-+ _cairo_surface_release_source_image (acquire_data->src,
-+ acquire_data->image,
-+ acquire_data->image_extra);
- free(data);
- }
-
-@@ -1515,42 +1517,47 @@ _wrap_image (cairo_surface_t *src,
- cairo_image_surface_t *surface;
- cairo_status_t status;
-
-- struct acquire_source_image_data *data = malloc(sizeof(*data));
-+ struct acquire_source_image_data *data = malloc (sizeof (*data));
-+ if (unlikely (data == NULL))
-+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- data->src = src;
- data->image = image;
- data->image_extra = image_extra;
-
-- surface = (cairo_image_surface_t*)cairo_image_surface_create_for_data (image->data,
-- image->format,
-- image->width,
-- image->height,
-- image->stride);
-+ surface = (cairo_image_surface_t*)
-+ _cairo_image_surface_create_with_pixman_format (image->data,
-+ image->pixman_format,
-+ image->width,
-+ image->height,
-+ image->stride);
- status = surface->base.status;
-- if (status)
-+ if (status) {
-+ free (data);
- return status;
-+ }
-
- status = _cairo_user_data_array_set_data (&surface->base.user_data,
-- &wrap_image_key,
-- data,
-- _wrap_release_source_image);
-+ &wrap_image_key,
-+ data,
-+ _wrap_release_source_image);
- if (status) {
- cairo_surface_destroy (&surface->base);
-+ free (data);
- return status;
- }
--/*
-- pixman_image_set_component_alpha (surface->pixman_image,
-- pixman_image_get_component_alpha (image->pixman_image));
--*/
-+
-+ pixman_image_set_component_alpha (
-+ surface->pixman_image,
-+ pixman_image_get_component_alpha (image->pixman_image));
-+
- *out = surface;
- return CAIRO_STATUS_SUCCESS;
- }
-
--
- /**
- * _cairo_surface_clone_similar:
- * @surface: a #cairo_surface_t
- * @src: the source image
-- * @content: target content mask
- * @src_x: extent for the rectangle in src we actually care about
- * @src_y: extent for the rectangle in src we actually care about
- * @width: extent for the rectangle in src we actually care about
-@@ -1627,12 +1634,12 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
- _cairo_surface_release_source_image (src, image, image_extra);
- } else {
- status =
-- surface->backend->clone_similar (surface, &image->base,
-- src_x, src_y,
-- width, height,
-- clone_offset_x,
-- clone_offset_y,
-- clone_out);
-+ surface->backend->clone_similar (surface, &image->base,
-+ src_x, src_y,
-+ width, height,
-+ clone_offset_x,
-+ clone_offset_y,
-+ clone_out);
- cairo_surface_destroy(&image->base);
- }
- }
diff --git a/gfx/cairo/buggy-repeat.patch b/gfx/cairo/buggy-repeat.patch
deleted file mode 100644
index 3d27b8f9b..000000000
--- a/gfx/cairo/buggy-repeat.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-xlib-display.c b/gfx/cairo/cairo/src/cairo-xlib-display.c
---- a/gfx/cairo/cairo/src/cairo-xlib-display.c
-+++ b/gfx/cairo/cairo/src/cairo-xlib-display.c
-@@ -216,6 +216,8 @@ _cairo_xlib_display_get (Display *dpy)
- XExtCodes *codes;
- int major_unused, minor_unused;
-
-+ static int buggy_repeat_force = -1;
-+
- /* There is an apparent deadlock between this mutex and the
- * mutex for the display, but it's actually safe. For the
- * app to call XCloseDisplay() while any other thread is
-@@ -308,6 +310,26 @@ _cairo_xlib_display_get (Display *dpy)
- if (VendorRelease (dpy) <= 40500000)
- display->buggy_repeat = TRUE;
- }
-+
-+ /* XXX workaround; see https://bugzilla.mozilla.org/show_bug.cgi?id=413583 */
-+ /* If buggy_repeat_force == -1, then initialize.
-+ * - set to -2, meaning "nothing was specified", and we trust the above detection.
-+ * - if MOZ_CAIRO_BUGGY_REPEAT is '0' (exactly), then force buggy repeat off
-+ * - if MOZ_CAIRO_BUGGY_REPEAT is '1' (exactly), then force buggy repeat on
-+ */
-+ if (buggy_repeat_force == -1) {
-+ const char *flag = getenv("MOZ_CAIRO_FORCE_BUGGY_REPEAT");
-+
-+ buggy_repeat_force = -2;
-+
-+ if (flag && flag[0] == '0')
-+ buggy_repeat_force = 0;
-+ else if (flag && flag[0] == '1')
-+ buggy_repeat_force = 1;
-+ }
-+
-+ if (buggy_repeat_force != -2)
-+ display->buggy_repeat = (buggy_repeat_force == 1);
-
- display->next = _cairo_xlib_display_list;
- _cairo_xlib_display_list = display;
diff --git a/gfx/cairo/cache-size.patch b/gfx/cairo/cache-size.patch
deleted file mode 100644
index 2371046aa..000000000
--- a/gfx/cairo/cache-size.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit c32b57b9ada7a57ec20648629ecb83de5688682a
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Mon Mar 23 11:28:12 2009 -0400
-
- shrink cache size
-
-diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
-index 249ab6c..aa7fc11 100644
---- a/src/cairo-scaled-font.c
-+++ b/src/cairo-scaled-font.c
-@@ -63,7 +63,7 @@
- */
-
- /* XXX: This number is arbitrary---we've never done any measurement of this. */
--#define MAX_GLYPH_PAGES_CACHED 512
-+#define MAX_GLYPH_PAGES_CACHED 256
- static cairo_cache_t *cairo_scaled_glyph_page_cache;
-
- #define CAIRO_SCALED_GLYPH_PAGE_SIZE 32
diff --git a/gfx/cairo/cairo-clamp-boundary.patch b/gfx/cairo/cairo-clamp-boundary.patch
deleted file mode 100644
index 990f1161a..000000000
--- a/gfx/cairo/cairo-clamp-boundary.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-# HG changeset patch
-# User Milan Sreckovic <msreckovic@mozilla.com>
-# Date 1362078121 18000
-# Node ID e9e6d97b153d8ec17ee03bb1deef1dec24c7a17c
-# Parent c65d59d33aa86b7e75bc420ea3beda6201e0aceb
-Bug 825721: clamp negative box starts and disallow negative sizes. r=jmuizelaar
-
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -1846,16 +1846,20 @@ static cairo_status_t
- if (likely (status == CAIRO_STATUS_SUCCESS)) {
- for (chunk = &clear.chunks; chunk != NULL; chunk = chunk->next) {
- for (i = 0; i < chunk->count; i++) {
- int x1 = _cairo_fixed_integer_part (chunk->base[i].p1.x);
- int y1 = _cairo_fixed_integer_part (chunk->base[i].p1.y);
- int x2 = _cairo_fixed_integer_part (chunk->base[i].p2.x);
- int y2 = _cairo_fixed_integer_part (chunk->base[i].p2.y);
-
-+ x1 = (x1 < 0 ? 0 : x1);
-+ y1 = (y1 < 0 ? 0 : y1);
-+ if (x2 <= x1 || y2 <= y1)
-+ continue;
- pixman_fill ((uint32_t *) dst->data, dst->stride / sizeof (uint32_t),
- PIXMAN_FORMAT_BPP (dst->pixman_format),
- x1, y1, x2 - x1, y2 - y1,
- 0);
- }
- }
- }
-
-@@ -2669,16 +2673,18 @@ static cairo_status_t
- const cairo_box_t *box = chunk->base;
-
- for (i = 0; i < chunk->count; i++) {
- int x1 = _cairo_fixed_integer_ceil (box[i].p1.x);
- int y1 = _cairo_fixed_integer_ceil (box[i].p1.y);
- int x2 = _cairo_fixed_integer_floor (box[i].p2.x);
- int y2 = _cairo_fixed_integer_floor (box[i].p2.y);
-
-+ x1 = (x1 < 0 ? 0 : x1);
-+ y1 = (y1 < 0 ? 0 : y1);
- if (x2 > x1 && y2 > y1) {
- cairo_box_t b;
-
- pixman_fill ((uint32_t *) dst->data,
- dst->stride / sizeof (uint32_t),
- PIXMAN_FORMAT_BPP (dst->pixman_format),
- x1, y1, x2 - x1, y2 - y1,
- pixel);
-@@ -2929,17 +2935,19 @@ static cairo_status_t
- cairo_box_t *box = chunk->base;
-
- for (i = 0; i < chunk->count; i++) {
- int x1 = _cairo_fixed_integer_round_down (box[i].p1.x);
- int y1 = _cairo_fixed_integer_round_down (box[i].p1.y);
- int x2 = _cairo_fixed_integer_round_down (box[i].p2.x);
- int y2 = _cairo_fixed_integer_round_down (box[i].p2.y);
-
-- if (x2 == x1 || y2 == y1)
-+ x1 = (x1 < 0 ? 0 : x1);
-+ y1 = (y1 < 0 ? 0 : y1);
-+ if (x2 <= x1 || y2 <= y1)
- continue;
-
- pixman_fill ((uint32_t *) dst->data, dst->stride / sizeof (uint32_t),
- PIXMAN_FORMAT_BPP (dst->pixman_format),
- x1, y1, x2 - x1, y2 - y1,
- pixel);
- }
- }
diff --git a/gfx/cairo/cairo-mask-extends-bug.patch b/gfx/cairo/cairo-mask-extends-bug.patch
deleted file mode 100644
index 325772d82..000000000
--- a/gfx/cairo/cairo-mask-extends-bug.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -1788,18 +1788,35 @@ static cairo_status_t
- cairo_boxes_t *boxes)
- {
- cairo_boxes_t clear;
- cairo_box_t box;
- cairo_status_t status;
- struct _cairo_boxes_chunk *chunk;
- int i;
-
-- if (boxes->num_boxes < 1 && clip_region == NULL)
-- return _cairo_image_surface_fixup_unbounded (dst, extents, NULL);
-+ // If we have no boxes then we need to clear the entire extents
-+ // because we have nothing to draw.
-+ if (boxes->num_boxes < 1 && clip_region == NULL) {
-+ int x = extents->unbounded.x;
-+ int y = extents->unbounded.y;
-+ int width = extents->unbounded.width;
-+ int height = extents->unbounded.height;
-+
-+ pixman_color_t color = { 0 };
-+ pixman_box32_t box = { x, y, x + width, y + height };
-+
-+ if (! pixman_image_fill_boxes (PIXMAN_OP_CLEAR,
-+ dst->pixman_image,
-+ &color,
-+ 1, &box)) {
-+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-+ }
-+ return CAIRO_STATUS_SUCCESS;
-+ }
-
- _cairo_boxes_init (&clear);
-
- box.p1.x = _cairo_fixed_from_int (extents->unbounded.x + extents->unbounded.width);
- box.p1.y = _cairo_fixed_from_int (extents->unbounded.y);
- box.p2.x = _cairo_fixed_from_int (extents->unbounded.x);
- box.p2.y = _cairo_fixed_from_int (extents->unbounded.y + extents->unbounded.height);
-
diff --git a/gfx/cairo/cairo-qt-compile.patch b/gfx/cairo/cairo-qt-compile.patch
deleted file mode 100644
index f839c7988..000000000
--- a/gfx/cairo/cairo-qt-compile.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-# HG changeset patch
-# Parent 2563fa2763b0ea83394e785340afa4c564ceab57
-diff -r 2563fa2763b0 -r 9ab15e95a354 gfx/cairo/cairo/src/cairo-qt-surface.cpp
---- a/gfx/cairo/cairo/src/cairo-qt-surface.cpp Thu Apr 29 06:55:11 2010 +0300
-+++ b/gfx/cairo/cairo/src/cairo-qt-surface.cpp Thu Apr 29 06:55:51 2010 +0300
-@@ -204,6 +204,7 @@
- case CAIRO_OPERATOR_HSL_LUMINOSITY:
- ASSERT_NOT_REACHED;
- }
-+ return QPainter::CompositionMode_Source;
- }
-
- static bool
-@@ -668,7 +669,6 @@
- static cairo_status_t
- _cairo_qt_surface_clone_similar (void *abstract_surface,
- cairo_surface_t *src,
-- cairo_content_t content,
- int src_x,
- int src_y,
- int width,
diff --git a/gfx/cairo/cairo-region-clip.patch b/gfx/cairo/cairo-region-clip.patch
deleted file mode 100644
index a0eb2d265..000000000
--- a/gfx/cairo/cairo-region-clip.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-# HG changeset patch
-# User Matt Woodrow <mwoodrow@mozilla.com>
-# Date 1408674084 -43200
-# Fri Aug 22 14:21:24 2014 +1200
-# Node ID 2b819b882c3b26c02d821e8d713591a9b56f1728
-# Parent ffd1fc7e7d5a85e4823b5f2067b4a24d358a0e41
-Bug 1050788 - Fix cairo clip path region construction when the first path generates no traps. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-clip.c b/gfx/cairo/cairo/src/cairo-clip.c
---- a/gfx/cairo/cairo/src/cairo-clip.c
-+++ b/gfx/cairo/cairo/src/cairo-clip.c
-@@ -590,16 +590,22 @@ static cairo_int_status_t
- status = _cairo_path_fixed_fill_rectilinear_to_traps (&clip_path->path,
- clip_path->fill_rule,
- &traps);
- if (unlikely (_cairo_status_is_error (status)))
- return status;
- if (status == CAIRO_INT_STATUS_UNSUPPORTED)
- goto UNSUPPORTED;
-
-+ if (unlikely (traps.num_traps == 0)) {
-+ clip_path->region = cairo_region_create ();
-+ clip_path->flags |= CAIRO_CLIP_PATH_HAS_REGION;
-+ return CAIRO_STATUS_SUCCESS;
-+ }
-+
- if (traps.num_traps > ARRAY_LENGTH (stack_boxes)) {
- boxes = _cairo_malloc_ab (traps.num_traps, sizeof (cairo_box_t));
- if (unlikely (boxes == NULL))
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- }
-
- for (n = 0; n < traps.num_traps; n++) {
- boxes[n].p1.x = traps.traps[n].left.p1.x;
diff --git a/gfx/cairo/cairo-version-fixes.patch b/gfx/cairo/cairo-version-fixes.patch
deleted file mode 100644
index f55e85731..000000000
--- a/gfx/cairo/cairo-version-fixes.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-version.c b/gfx/cairo/cairo/src/cairo-version.c
---- a/gfx/cairo/cairo/src/cairo-version.c
-+++ b/gfx/cairo/cairo/src/cairo-version.c
-@@ -42,7 +42,7 @@
-
- /* get the "real" version info instead of dummy cairo-version.h */
- #undef CAIRO_VERSION_H
--#include "../cairo-version.h"
-+#include "cairo-features.h"
-
- /**
- * cairo_version:
-diff --git a/gfx/cairo/cairo/src/cairo-version.h b/gfx/cairo/cairo/src/cairo-version.h
---- a/gfx/cairo/cairo/src/cairo-version.h
-+++ b/gfx/cairo/cairo/src/cairo-version.h
-@@ -7,8 +7,10 @@
- #ifndef CAIRO_VERSION_H
- #define CAIRO_VERSION_H
-
-+#if 0
- #define CAIRO_VERSION_MAJOR USE_cairo_version_OR_cairo_version_string_INSTEAD
- #define CAIRO_VERSION_MINOR USE_cairo_version_OR_cairo_version_string_INSTEAD
- #define CAIRO_VERSION_MICRO USE_cairo_version_OR_cairo_version_string_INSTEAD
-+#endif
-
- #endif
diff --git a/gfx/cairo/cairo-x-visual.patch b/gfx/cairo/cairo-x-visual.patch
deleted file mode 100644
index 29f6c737e..000000000
--- a/gfx/cairo/cairo-x-visual.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-diff -r c1195334f839 gfx/cairo/cairo/src/cairo-xlib-surface.c
---- a/gfx/cairo/cairo/src/cairo-xlib-surface.c Fri May 21 17:42:55 2010 +0300
-+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c Fri May 21 19:12:29 2010 +0300
-@@ -189,16 +189,57 @@ static const XTransform identity = { {
-
- #define CAIRO_SURFACE_RENDER_HAS_PDF_OPERATORS(surface) CAIRO_SURFACE_RENDER_AT_LEAST((surface), 0, 11)
-
- #define CAIRO_SURFACE_RENDER_SUPPORTS_OPERATOR(surface, op) \
- ((op) <= CAIRO_OPERATOR_SATURATE || \
- (CAIRO_SURFACE_RENDER_HAS_PDF_OPERATORS(surface) && \
- (op) <= CAIRO_OPERATOR_HSL_LUMINOSITY))
-
-+static Visual *
-+_visual_for_xrender_format(Screen *screen,
-+ XRenderPictFormat *xrender_format)
-+{
-+ int d, v;
-+ for (d = 0; d < screen->ndepths; d++) {
-+ Depth *d_info = &screen->depths[d];
-+ if (d_info->depth != xrender_format->depth)
-+ continue;
-+
-+ for (v = 0; v < d_info->nvisuals; v++) {
-+ Visual *visual = &d_info->visuals[v];
-+
-+ switch (visual->class) {
-+ case TrueColor:
-+ if (xrender_format->type != PictTypeDirect)
-+ continue;
-+ break;
-+ case DirectColor:
-+ /* Prefer TrueColor to DirectColor.
-+ (XRenderFindVisualFormat considers both TrueColor and
-+ DirectColor Visuals to match the same PictFormat.) */
-+ continue;
-+ case StaticGray:
-+ case GrayScale:
-+ case StaticColor:
-+ case PseudoColor:
-+ if (xrender_format->type != PictTypeIndexed)
-+ continue;
-+ break;
-+ }
-+
-+ if (xrender_format ==
-+ XRenderFindVisualFormat (DisplayOfScreen(screen), visual))
-+ return visual;
-+ }
-+ }
-+
-+ return NULL;
-+}
-+
- static cairo_status_t
- _cairo_xlib_surface_set_clip_region (cairo_xlib_surface_t *surface,
- cairo_region_t *region)
- {
- cairo_bool_t had_clip_rects = surface->clip_region != NULL;
-
- if (had_clip_rects == FALSE && region == NULL)
- return CAIRO_STATUS_SUCCESS;
-@@ -313,16 +354,19 @@ _cairo_xlib_surface_create_similar (void
- * visual/depth etc. as possible. */
- pix = XCreatePixmap (src->dpy, src->drawable,
- width <= 0 ? 1 : width, height <= 0 ? 1 : height,
- xrender_format->depth);
-
- visual = NULL;
- if (xrender_format == src->xrender_format)
- visual = src->visual;
-+ else
-+ visual = _visual_for_xrender_format(src->screen->screen,
-+ xrender_format);
-
- surface = (cairo_xlib_surface_t *)
- _cairo_xlib_surface_create_internal (src->screen, pix,
- visual,
- xrender_format,
- width, height,
- xrender_format->depth);
- }
-@@ -3178,28 +3222,32 @@ cairo_xlib_surface_create_with_xrender_f
- Screen *scr,
- XRenderPictFormat *format,
- int width,
- int height)
- {
- cairo_xlib_screen_t *screen;
- cairo_surface_t *surface;
- cairo_status_t status;
-+ Visual *visual;
-
- if (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX)
- return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
-
- status = _cairo_xlib_screen_get (dpy, scr, &screen);
- if (unlikely (status))
- return _cairo_surface_create_in_error (status);
-
- X_DEBUG ((dpy, "create_with_xrender_format (drawable=%x)", (unsigned int) drawable));
-
-+ if (format)
-+ visual = _visual_for_xrender_format (scr, format);
-+
- surface = _cairo_xlib_surface_create_internal (screen, drawable,
-- NULL, format,
-+ visual, format,
- width, height, 0);
- _cairo_xlib_screen_destroy (screen);
-
- return surface;
- }
- slim_hidden_def (cairo_xlib_surface_create_with_xrender_format);
-
- /**
-@@ -3413,33 +3461,37 @@ cairo_xlib_surface_get_screen (cairo_sur
-
- return surface->screen->screen;
- }
-
- /**
- * cairo_xlib_surface_get_visual:
- * @surface: a #cairo_xlib_surface_t
- *
-- * Get the X Visual used for underlying X Drawable.
-+ * Gets the X Visual associated with @surface, suitable for use with the
-+ * underlying X Drawable. If @surface was created by
-+ * cairo_xlib_surface_create(), the return value is the Visual passed to that
-+ * constructor.
- *
-- * Return value: the visual.
-+ * Return value: the Visual or %NULL if there is no appropriate Visual for
-+ * @surface.
- *
- * Since: 1.2
- **/
- Visual *
--cairo_xlib_surface_get_visual (cairo_surface_t *abstract_surface)
-+cairo_xlib_surface_get_visual (cairo_surface_t *surface)
- {
-- cairo_xlib_surface_t *surface = (cairo_xlib_surface_t *) abstract_surface;
--
-- if (! _cairo_surface_is_xlib (abstract_surface)) {
-+ cairo_xlib_surface_t *xlib_surface = (cairo_xlib_surface_t *) surface;
-+
-+ if (! _cairo_surface_is_xlib (surface)) {
- _cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
- return NULL;
- }
-
-- return surface->visual;
-+ return xlib_surface->visual;
- }
-
- /**
- * cairo_xlib_surface_get_depth:
- * @surface: a #cairo_xlib_surface_t
- *
- * Get the number of bits used to represent each pixel value.
- *
diff --git a/gfx/cairo/cairo/COPYING b/gfx/cairo/cairo/COPYING
index 145e62966..26feb1096 100644
--- a/gfx/cairo/cairo/COPYING
+++ b/gfx/cairo/cairo/COPYING
@@ -1,17 +1,11 @@
Cairo is free software.
-Every source file in the implementation of cairo is available to be
-redistributed and/or modified under the terms of either the GNU Lesser
-General Public License (LGPL) version 2.1 or the Mozilla Public
-License (MPL) version 1.1. Some files are available under more
-liberal terms, but we believe that in all cases, each file may be used
-under either the LGPL or the MPL.
-
-See the following files in this directory for the precise terms and
-conditions of either license:
-
- COPYING-LGPL-2.1
- COPYING-MPL-1.1
-
-Please see each file in the implementation for Copyright and licensing
-information.
+This (modified) version of the cairo implementation is available to be
+redistributed and/or modified under the terms of either the Mozilla
+Public License (MPL) version 2.0. Some files in the original cairo
+source code are available under more liberal terms, but we believe that
+in all cases, each file may be used under the MPL 2.0.
+
+Where the original code was not explicitly MPL licensed, the original
+more liberal license information and copyright has been retained for
+clarity of licensing and authorship.
diff --git a/gfx/cairo/cairo/COPYING-LGPL-2.1 b/gfx/cairo/cairo/COPYING-LGPL-2.1
deleted file mode 100644
index b124cf581..000000000
--- a/gfx/cairo/cairo/COPYING-LGPL-2.1
+++ /dev/null
@@ -1,510 +0,0 @@
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
- To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James
- Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/gfx/cairo/cairo/COPYING-MPL-1.1 b/gfx/cairo/cairo/COPYING-MPL-1.1
deleted file mode 100644
index 7714141d1..000000000
--- a/gfx/cairo/cairo/COPYING-MPL-1.1
+++ /dev/null
@@ -1,470 +0,0 @@
- MOZILLA PUBLIC LICENSE
- Version 1.1
-
- ---------------
-
-1. Definitions.
-
- 1.0.1. "Commercial Use" means distribution or otherwise making the
- Covered Code available to a third party.
-
- 1.1. "Contributor" means each entity that creates or contributes to
- the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the Original
- Code, prior Modifications used by a Contributor, and the Modifications
- made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications or the
- combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
- accepted in the software development community for the electronic
- transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than Source
- Code.
-
- 1.6. "Initial Developer" means the individual or entity identified
- as the Initial Developer in the Source Code notice required by Exhibit
- A.
-
- 1.7. "Larger Work" means a work which combines Covered Code or
- portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.8.1. "Licensable" means having the right to grant, to the maximum
- extent possible, whether at the time of the initial grant or
- subsequently acquired, any and all of the rights conveyed herein.
-
- 1.9. "Modifications" means any addition to or deletion from the
- substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original Code or
- previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software code
- which is described in the Source Code notice required by Exhibit A as
- Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
- hereafter acquired, including without limitation, method, process,
- and apparatus claims, in any patent Licensable by grantor.
-
- 1.11. "Source Code" means the preferred form of the Covered Code for
- making modifications to it, including all modules it contains, plus
- any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or source code
- differential comparisons against either the Original Code or another
- well known, available Covered Code of the Contributor's choice. The
- Source Code can be in a compressed or archival form, provided the
- appropriate decompression or de-archiving software is widely available
- for no charge.
-
- 1.12. "You" (or "Your") means an individual or a legal entity
- exercising rights under, and complying with all of the terms of, this
- License or a future version of this License issued under Section 6.1.
- For legal entities, "You" includes any entity which controls, is
- controlled by, or is under common control with You. For purposes of
- this definition, "control" means (a) the power, direct or indirect,
- to cause the direction or management of such entity, whether by
- contract or otherwise, or (b) ownership of more than fifty percent
- (50%) of the outstanding shares or beneficial ownership of such
- entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Initial Developer to use, reproduce,
- modify, display, perform, sublicense and distribute the Original
- Code (or portions thereof) with or without Modifications, and/or
- as part of a Larger Work; and
-
- (b) under Patents Claims infringed by the making, using or
- selling of Original Code, to make, have made, use, practice,
- sell, and offer for sale, and/or otherwise dispose of the
- Original Code (or portions thereof).
-
- (c) the licenses granted in this Section 2.1(a) and (b) are
- effective on the date Initial Developer first distributes
- Original Code under the terms of this License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent license is
- granted: 1) for code that You delete from the Original Code; 2)
- separate from the Original Code; or 3) for infringements caused
- by: i) the modification of the Original Code or ii) the
- combination of the Original Code with other software or devices.
-
- 2.2. Contributor Grant.
- Subject to third party intellectual property claims, each Contributor
- hereby grants You a world-wide, royalty-free, non-exclusive license
-
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Contributor, to use, reproduce, modify,
- display, perform, sublicense and distribute the Modifications
- created by such Contributor (or portions thereof) either on an
- unmodified basis, with other Modifications, as Covered Code
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making, using, or
- selling of Modifications made by that Contributor either alone
- and/or in combination with its Contributor Version (or portions
- of such combination), to make, use, sell, offer for sale, have
- made, and/or otherwise dispose of: 1) Modifications made by that
- Contributor (or portions thereof); and 2) the combination of
- Modifications made by that Contributor with its Contributor
- Version (or portions of such combination).
-
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
- effective on the date Contributor first makes Commercial Use of
- the Covered Code.
-
- (d) Notwithstanding Section 2.2(b) above, no patent license is
- granted: 1) for any code that Contributor has deleted from the
- Contributor Version; 2) separate from the Contributor Version;
- 3) for infringements caused by: i) third party modifications of
- Contributor Version or ii) the combination of Modifications made
- by that Contributor with other software (except as part of the
- Contributor Version) or other devices; or 4) under Patent Claims
- infringed by Covered Code in the absence of Modifications made by
- that Contributor.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version
- of this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this
- License or the recipients' rights hereunder. However, You may include
- an additional document offering the additional rights described in
- Section 3.5.
-
- 3.2. Availability of Source Code.
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License
- either on the same media as an Executable version or via an accepted
- Electronic Distribution Mechanism to anyone to whom you made an
- Executable version available; and if made available via Electronic
- Distribution Mechanism, must remain available for at least twelve (12)
- months after the date it initially became available, or at least six
- (6) months after a subsequent version of that particular Modification
- has been made available to such recipients. You are responsible for
- ensuring that the Source Code version remains available even if the
- Electronic Distribution Mechanism is maintained by a third party.
-
- 3.3. Description of Modifications.
- You must cause all Covered Code to which You contribute to contain a
- file documenting the changes You made to create that Covered Code and
- the date of any change. You must include a prominent statement that
- the Modification is derived, directly or indirectly, from Original
- Code provided by the Initial Developer and including the name of the
- Initial Developer in (a) the Source Code, and (b) in any notice in an
- Executable version or related documentation in which You describe the
- origin or ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
- (a) Third Party Claims.
- If Contributor has knowledge that a license under a third party's
- intellectual property rights is required to exercise the rights
- granted by such Contributor under Sections 2.1 or 2.2,
- Contributor must include a text file with the Source Code
- distribution titled "LEGAL" which describes the claim and the
- party making the claim in sufficient detail that a recipient will
- know whom to contact. If Contributor obtains such knowledge after
- the Modification is made available as described in Section 3.2,
- Contributor shall promptly modify the LEGAL file in all copies
- Contributor makes available thereafter and shall take other steps
- (such as notifying appropriate mailing lists or newsgroups)
- reasonably calculated to inform those who received the Covered
- Code that new knowledge has been obtained.
-
- (b) Contributor APIs.
- If Contributor's Modifications include an application programming
- interface and Contributor has knowledge of patent licenses which
- are reasonably necessary to implement that API, Contributor must
- also include this information in the LEGAL file.
-
- (c) Representations.
- Contributor represents that, except as disclosed pursuant to
- Section 3.4(a) above, Contributor believes that Contributor's
- Modifications are Contributor's original creation(s) and/or
- Contributor has sufficient rights to grant the rights conveyed by
- this License.
-
- 3.5. Required Notices.
- You must duplicate the notice in Exhibit A in each file of the Source
- Code. If it is not possible to put such notice in a particular Source
- Code file due to its structure, then You must include such notice in a
- location (such as a relevant directory) where a user would be likely
- to look for such a notice. If You created one or more Modification(s)
- You may add your name as a Contributor to the notice described in
- Exhibit A. You must also duplicate this License in any documentation
- for the Source Code where You describe recipients' rights or ownership
- rights relating to Covered Code. You may choose to offer, and to
- charge a fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Code. However, You
- may do so only on Your own behalf, and not on behalf of the Initial
- Developer or any Contributor. You must make it absolutely clear than
- any such warranty, support, indemnity or liability obligation is
- offered by You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty,
- support, indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered Code,
- and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License,
- including a description of how and where You have fulfilled the
- obligations of Section 3.2. The notice must be conspicuously included
- in any notice in an Executable version, related documentation or
- collateral in which You describe recipients' rights relating to the
- Covered Code. You may distribute the Executable version of Covered
- Code or ownership rights under a license of Your choice, which may
- contain terms different from this License, provided that You are in
- compliance with the terms of this License and that the license for the
- Executable version does not attempt to limit or alter the recipient's
- rights in the Source Code version from the rights set forth in this
- License. If You distribute the Executable version under a different
- license You must make it absolutely clear that any terms which differ
- from this License are offered by You alone, not by the Initial
- Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by
- the Initial Developer or such Contributor as a result of any such
- terms You offer.
-
- 3.7. Larger Works.
- You may create a Larger Work by combining Covered Code with other code
- not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to
- statute, judicial order, or regulation then You must: (a) comply with
- the terms of this License to the maximum extent possible; and (b)
- describe the limitations and the code they affect. Such description
- must be included in the LEGAL file described in Section 3.4 and must
- be included with all distributions of the Source Code. Except to the
- extent prohibited by statute or regulation, such description must be
- sufficiently detailed for a recipient of ordinary skill to be able to
- understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has
- attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
- Netscape Communications Corporation ("Netscape") may publish revised
- and/or new versions of the License from time to time. Each version
- will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
- Once Covered Code has been published under a particular version of the
- License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms
- of any subsequent version of the License published by Netscape. No one
- other than Netscape has the right to modify the terms applicable to
- Covered Code created under this License.
-
- 6.3. Derivative Works.
- If You create or use a modified version of this License (which you may
- only do in order to apply it to code which is not already Covered Code
- governed by this License), You must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
- license (except to note that your license differs from this License)
- and (b) otherwise make it clear that Your version of the license
- contains terms which differ from the Mozilla Public License and
- Netscape Public License. (Filling in the name of the Initial
- Developer, Original Code or Contributor in the notice described in
- Exhibit A shall not of themselves be deemed to be modifications of
- this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- 8.1. This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall
- survive any termination of this License. Provisions which, by their
- nature, must remain in effect beyond the termination of this License
- shall survive.
-
- 8.2. If You initiate litigation by asserting a patent infringement
- claim (excluding declatory judgment actions) against Initial Developer
- or a Contributor (the Initial Developer or Contributor against whom
- You file such action is referred to as "Participant") alleging that:
-
- (a) such Participant's Contributor Version directly or indirectly
- infringes any patent, then any and all rights granted by such
- Participant to You under Sections 2.1 and/or 2.2 of this License
- shall, upon 60 days notice from Participant terminate prospectively,
- unless if within 60 days after receipt of notice You either: (i)
- agree in writing to pay Participant a mutually agreeable reasonable
- royalty for Your past and future use of Modifications made by such
- Participant, or (ii) withdraw Your litigation claim with respect to
- the Contributor Version against such Participant. If within 60 days
- of notice, a reasonable royalty and payment arrangement are not
- mutually agreed upon in writing by the parties or the litigation claim
- is not withdrawn, the rights granted by Participant to You under
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
- the 60 day notice period specified above.
-
- (b) any software, hardware, or device, other than such Participant's
- Contributor Version, directly or indirectly infringes any patent, then
- any rights granted to You by such Participant under Sections 2.1(b)
- and 2.2(b) are revoked effective as of the date You first made, used,
- sold, distributed, or had made, Modifications made by that
- Participant.
-
- 8.3. If You assert a patent infringement claim against Participant
- alleging that such Participant's Contributor Version directly or
- indirectly infringes any patent where such claim is resolved (such as
- by license or settlement) prior to the initiation of patent
- infringement litigation, then the reasonable value of the licenses
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
- into account in determining the amount or value of any payment or
- license.
-
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
- all end user license agreements (excluding distributors and resellers)
- which have been validly granted by You or any distributor hereunder
- prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
- software" and "commercial computer software documentation," as such
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
- all U.S. Government End Users acquire Covered Code with only those
- rights set forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. This License shall be governed by
- California law provisions (except to the extent applicable law, if
- any, provides otherwise), excluding its conflict-of-law provisions.
- With respect to disputes in which at least one party is a citizen of,
- or an entity chartered or registered to do business in the United
- States of America, any litigation relating to this License shall be
- subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys' fees and
- expenses. The application of the United Nations Convention on
- Contracts for the International Sale of Goods is expressly excluded.
- Any law or regulation which provides that the language of a contract
- shall be construed against the drafter shall not apply to this
- License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or indirectly,
- out of its utilization of rights under this License and You agree to
- work with Initial Developer and Contributors to distribute such
- responsibility on an equitable basis. Nothing herein is intended or
- shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
- Initial Developer may designate portions of the Covered Code as
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
- Developer permits you to utilize portions of the Covered Code under
- Your choice of the NPL or the alternative licenses, if any, specified
- by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
- ``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/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations
- under the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is ________________________.
- Portions created by ______________________ are Copyright (C) ______
- _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________.
-
- Alternatively, the contents of this file may be used under the terms
- of the _____ license (the "[___] License"), in which case the
- provisions of [______] License are applicable instead of those
- above. If you wish to allow use of your version of this file only
- under the terms of the [____] License and not to allow others to use
- your version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice and
- other provisions required by the [___] License. If you do not delete
- the provisions above, a recipient may use your version of this file
- under either the MPL or the [___] License."
-
- [NOTE: The text of this Exhibit A may differ slightly from the text of
- the notices in the Source Code files of the Original Code. You should
- use the text of this Exhibit A rather than the text found in the
- Original Code Source Code for Your Modifications.]
-
diff --git a/gfx/cairo/cairo/NEWS b/gfx/cairo/cairo/NEWS
deleted file mode 100644
index 9be4062ca..000000000
--- a/gfx/cairo/cairo/NEWS
+++ /dev/null
@@ -1,5121 +0,0 @@
-Release 1.6.4 (2008-04-11 Carl Worth <cworth@cworth.org>)
-=========================================================
-The cairo community is wildly embarrassed to announce the 1.6.4
-release of the cairo graphics library. This release reverts the xlib
-locking change introduced in 1.6.4, (and the application crashes that
-it caused). The community would be glad to sack its current release
-manager and is accepting applications for someone who could do the job
-with more discipline.
-
-Revert 'add missing locking in cairo-xlib'
-------------------------------------------
-This change was introduced in cairo 1.6.2, but also introduced a bug
-which causes many cairo-xlib applications to crash, (with a
-segmentation fault inside of XSetClipMask). Instead of attempting
-another fix for the broken fix, the change in 1.6.2 has been
-reverted. The original bug which the change was addressing has been
-present since at least cairo 1.4, so it is not expected that leaving
-this bug unfixed will cause any new problems for applications moving
-from cairo 1.4 to cairo 1.6.
-
-At this point, the code of cairo 1.6.4 differs from cairo 1.6.0 only
-in the fix for the PostScript-printer crashes.
-
-Tweak build to avoid linking with g++
--------------------------------------
-Cairo 1.6.4 avoids a quirk in automake that was causing the cairo
-library to be linked with g++ and linked against libstdc++ even when
-only C source files were compiled for the library.
-
-Release 1.6.2 (2008-04-11 Carl Worth <cworth@cworth.org>)
-=========================================================
-The cairo community is pleased (but somewhat sheepish) to announce the
-1.6.2 release of the cairo graphics library. This is an update to
-yesterday's 1.6.0 release with an important fix to prevent cairo's
-PostScript output from crashing some printers. This release also
-includes a locking fix for cairo's xlib backend to improve thread
-safety. There are no changes beyond these two fixes.
-
-Fix for PostScript printer crash
---------------------------------
-Adrian Johnson discovered that cairo 1.6.0 was being a bit hard on
-PostScript printers, by changing the font matrix very frequently. This
-causes some PostScript interpreters to allocate new font objects every
-few glyphs, eventually exhausting available resources. The fix
-involves leaving translational components of the font matrix as zero,
-so that the PostScript interpreter sees an identical font matrix
-repeatedly, and can more easily share internal font object resources.
-
-This fix has been tested to resolve the bugs posted here, (for both
-Xerox and Dell printers):
-
- Printing some PDFs from evince is crashing our Xerox printer
- http://bugs.freedesktop.org/show_bug.cgi?id=15348
-
- Cairo-generated postscript blocks Dell 5100cn
- http://bugs.freedesktop.org/show_bug.cgi?id=15445
-
-Add missing locking in cairo-xlib
----------------------------------
-Chris Wilson noticed that cairo 1.6.0 was manipulating an internal
-cache of GC object within cairo's Xlib backend without proper
-locking. The missing locking could cause failures for multi-threaded
-applications. He fixed this in 1.6.2 by adding the missing locks.
-
-Release 1.6.0 (2008-04-10 Carl Worth <cworth@cworth.org>)
-=========================================================
-The cairo community is quite pleased to announce the 1.6.0 release of
-the cairo graphics library. This is a major update to cairo, with new
-features and enhanced functionality which maintains compatibility for
-applications written using cairo 1.4, 1.2, or 1.0. We recommend that
-anybody using a previous version of cairo upgrade to cairo 1.6.0.
-
-The most significant new features in this release are dramatically
-improved PDF and PostScript[*] output, support for arbitrary X server
-visuals (including PseudoColor), a new Quartz backend, and and a new
-"win32 printing" backend. See below for more details on these and
-other new features.
-
-New dependency on external pixman library (Thanks, Søren!)
-----------------------------------------------------------
-As of cairo 1.6, cairo now depends on the pixman library, for which
-the latest release can be obtained alongside cairo:
-
- http://cairographics.org/releases/pixman-0.10.0.tar.gz
-
-This library provides all software rendering for cairo, (the
-implementation of the image backend as well as any image fallbacks
-required for other backends). This is the same code that was
-previously included as part of cairo itself, but is now an external
-library so that it can be shared by both cairo and by the X server,
-(which is where the code originated).
-
-Improved PDF, PostScript, and SVG output (Thanks, Adrian!)
-----------------------------------------------------------
-Users of the cairo-pdf, cairo-ps, and cairo-svg should see a dramatic
-improvement from cairo 1.2/1.4 to 1.6. With this release there are now
-almost no operations that will result in unnecessary rasterization in
-the PDF and PostScript. Rasterized "image fallbacks" are restricted
-only to minimal portions of the document where something is being
-drawn with cairo that is beyond the native capabilities of the
-document, (this is rare for PDF or SVG, but occurs when blending
-translucent objects for PostScript).
-
-This means that the final output will be of higher quality, and will
-also be much smaller, and therefore will print more quickly. The
-machinery for doing analysis and minimal fallbacks also benefits the
-win32-printing surface described below.
-
-In addition to doing less rasterization, the PostScript and PDF output
-also has several other improvements to make the output more efficient
-and more compatible with specifications.
-
-[*] Note: Just before this release, a bug has been reported that the
-PostScript output from cairo can crash some printers, (so far the
-following models have been reported as problematic Xerox Workcentre
-7228 or 7328 and Dell 5100cn). We will implement a workaround as soon
-as we can learn exactly what in cairo's output these printers object
-to, (and we could use help from users that have access to misbehaving
-printers). This bug is being tracked here:
-
- Printing some PDFs from evince is crashing our Xerox printer
- http://bugs.freedesktop.org/show_bug.cgi?id=15348
-
-New support for arbitrary X server visuals (Thanks, Keith and Behdad!)
-----------------------------------------------------------------------
-As of cairo 1.6, cairo should now work with an arbitrary TrueColor or
-8-bit PseudoColor X server visual. Previous versions of cairo did not
-support these X servers and refused to draw anything. We're pleased to
-announce that this limitation has been lifted and people stuck with
-ancient display systems need no longer be stuck with ancient software
-just because of cairo.
-
-New, supported Quartz backend for Mac OS X (Thanks, Brian and Vladimir!)
-------------------------------------------------------------------------
-As of cairo 1.6, the cairo-quartz backend is now marked as "supported"
-rather than "experimental" as in previous cairo releases. Its API now
-has guarantees of API stability into future cairo releases, and its
-output quality is comparable to other backends. There have been
-significant improvements to cairo-quartz since 1.4. It now uses many
-fewer image fallbacks, (meaning better performance), and has greatly
-improved text rendering.
-
-New, "win32 printing" backend (Thanks, Adrian and Vladimir!)
-------------------------------------------------------------
-A new win32-printing surface has been added with an interface very
-similar to the original win32 surface, (both accept an HDC
-parameter). But this new surface should only be called with a printing
-DC, and will result in all drawing commands being stored into a
-meta-surface and emitted after each page is complete. This allows
-cairo to analyze the contents, (as it does with PDF, PostScript, and
-SVG backends), and to do minimal image-based fallbacks as
-necessary. The analysis keeps things as efficient as possible, while
-the presence of fallbacks, (when necessary), ensure the consistent,
-high-quality output expected from cairo.
-
-Robustness fixes (Thanks, Chris!)
----------------------------------
-There has been a tremendous number of improvements to cairo's
-robustness. Areas that have been improved include:
-
- * Proper reporting of errors
-
- * Responding correctly to invalid input
-
- * Avoiding integer overflows
-
- * Avoiding memory leaks on error-recovery paths
-
- * Making reference counting thread safe
-
- * Exhaustive testing of memory allocation points
-
-Other fixes (Thanks, everybody!)
---------------------------------
-Cairo's internal fixed-point representation has been changed from
-16.16 to 24.8. This has a direct impact on applications as it allows
-much larger objects to be drawn before internal limits in cairo make
-the drawing not work.
-
-The CAIRO_EXTEND_PAD mode is now fully supported by surface
-patterns. This mode allows applications to use cairo_rectangle and
-cairo_fill to draw scaled images with high-quality bilinear filtering
-for the internal of the image, but without any objectionably blurry
-edges, (as would happen with the default EXTEND_NONE and cairo_paint).
-
-Rendering with CAIRO_ANTIALIAS_NONE has been fixed to be more
-predictable, (previously image rendering and geometry rendering would
-be slightly misaligned with respect to each other).
-
-The reference manual at http://cairographics.org/manual now documents
-100% of the functions and types in cairo's public API.
-
-API additions
--------------
-Several small features have been added to cairo with new API functions:
-
-cairo_format_stride_for_width
-
- Must be called to compute a properly aligned stride value before
- calling cairo_image_surface_create_for_data.
-
-cairo_has_current_point
-
- Allows querying if there is a current point defined for the
- current path.
-
-cairo_path_extents
-
- Allows querying for path extents, (independent of any fill or
- stroke parameters).
-
-cairo_surface_copy_page
-cairo_surface_show_page
-
- Allow beginning a new document page without requiring a cairo_t
- object.
-
-cairo_ps_surface_restrict_to_level
-cairo_ps_get_levels
-cairo_ps_level_to_string
-cairo_ps_surface_set_eps
-
- Allow controlling the Post PostScript level, (2 or 3), to
- target, as well as to generate Encapsulated PostScript (EPS).
-
-cairo_quartz_font_face_create_for_cgfont
-
- Create a quartz-specific cairo_font_face_t from a CGFontRef.
-
-cairo_win32_font_face_create_for_logfontw_hfont
-
- Create a win32-specific cairo_font_face from a LOGFONTW and an
- HFONT together.
-
-Thanks, Everyone!
------------------
-I've accounted for 32 distinct people with attributed code added to
-cairo between 1.4.14 and 1.6.0, (their names are below). That's an
-impressive number, but there are certainly dozens more that
-contributed with testing, suggestions, clarifying questions, and
-encouragement. I'm grateful for the friendships that have developed as
-we have worked on cairo together. Thanks to everyone for making this
-all so much fun!
-
-Adrian Johnson, Alp Toker, Antoine Azar, Behdad Esfahbod,
-Benjamin Otte, Bernardo Innocenti, Bertram Felgenhauer,
-Boying Lu, Brian Ewins, Carl Worth, Chris Heath, Chris Wilson,
-Claudio Ciccani, Emmanuel Pacaud, Jeff Muizelaar, Jeremy Huddleston,
-Jim Meyering, Jinghua Luo, Jody Goldberg, Jonathan Gramain,
-Keith Packard, Ken Herron, Kouhei Sutou, Kristian Høgsberg,
-Larry Ewing, Martin Ejdestig, Nis Martensen, Peter Weilbacher,
-Richard Hult, Shailendra Jain, Søren Sandmann Pedersen,
-Vladimir Vukicevic
-
-Snapshot 1.5.20 (2008-04-04 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the tenth snapshot in cairo's unstable 1.5 series. It comes
-just two days (and only one working day) after the 1.5.18
-snapshot. The quick snapshot is due to two embarrassing bugs (both
-affecting cairo-xlib) that had been introduced in the 1.5.18
-snapshot. The fixes for these are described below along with a few
-other fixes, (which hopefully aren't introducing new bugs this time).
-
-cairo-xlib
-----------
-Revert fix from 1.5.18 to allow pattern expansion based on the filter
-mode. This fix seemed so boring, (the use case it addresses is almost
-never used in practice), that it didn't even get mentioned in the
-1.5.18 release notes. However, the "fix" happened to break rendering
-that is always used resulting in corrupt image rendering in mozilla,
-evolution, and probably everything else that uses cairo.
-
-Fix to avoid BadMatch errors in cairo_surface_create_similar. These
-were introduced, (inadvertently, of course), as part of the fix in
-1.5.18 for creating similar surfaces without the Render
-extension. Again, thanks to mozilla, (and Vladimir Vukicevic in
-particular), for noticing our mistake.
-
-general
--------
-Correctly handle an in-error surface in
-cairo_surface_write_to_png. Previously this function would cause an
-assertion failure if you gave it a finished surface. Now it cleanly
-returns a CAIRO_STATUS_SURFACE_FINISHED result instead.
-
-Avoid potentially infinite wandering through memory inside
-_cairo_hull_prev_valid. Thanks to Jonathan Watt for noticing this
-problem:
-
- https://bugzilla.mozilla.org/show_bug.cgi?id=306649#c21
-
-cairo-pdf
----------
-Fix generation of "soft" masks made by drawing to a similar surface
-and then calling cairo_mask_surface() with it.
-
-cairo-svg
----------
-Fix for code that uses cairo_mask() on an intermediate surface which
-is later passed to cairo_mask_surface().
-
-Snapshot 1.5.18 (2008-04-05 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the ninth snapshot in cairo's unstable 1.5 series. It comes
-just 4 days after the 1.5.16 snapshot. We had hoped to not need
-another snapshot before the final 1.6.0 release, but several critical
-bugs were found and fixed in the last few days, so we thought it
-important to let people test the fixes with this snapshot. See below
-for details.
-
-documentation
--------------
-The README now lists necessary dependencies.
-
-Various graphics state defaults are now documented, (source pattern is
-opaque black, line width is 2.0, line join is miter, line cap is butt,
-miter limit is 10.0, etc.).
-
-general
--------
-Several cleanups have been made along many error-path returns,
-(carefully propagating up the original error status values, cleaning
-up memory leaks during error recovery, etc.). This is yet another in
-Chris "ickle" Wilson's long series of error-handling cleanups during
-the 1.5 series.
-
-Avoid undesired clipping when drawing scaled surface patterns with
-bilinear filtering.
-
-cairo-pdf
----------
-Fix emission of 1-bit alpha masks in PDF output.
-
-Fix a bug that would cause glyphs to be misplaced along the Y axis:
-
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23474136
-
- Originally, an issue about a crash, but later leading to the
- misplaced glyphs issue being discovered.
-
-cairo-ps
---------
-Fix misplaced glyphs in cairo's PostScript output.
-
- This issue occurs when consecutive glyphs are placed far
- apart. This case is exercised by the new ft-show-glyphs-table test
- case, which was originally inspired by the Debian bug #23474136
- mentioned above.
-
-Fix more misplaced glyphs in cairo's PostScript output:
-
- The issue here showed up under very particular circumstance, (when
- converting a PDF file with a CFF font with CID Identity-H encoding
- and using glyph 0, (defined by the CFF specification as .notdef)
- as a space instead). More concretely, this problem appeared when
- converting the UbuntuDesktop.pdf file mentioned in this bug
- report:
-
- https://bugs.freedesktop.org/show_bug.cgi?id=15348#c3
-
- As usual with arcane font-encoding-specific bugs like this, many
- thanks to Adrian Johnson for his magical ability to dive into
- specifications and emerge almost instantaneously with fixes. And
- thanks to Sebastien Bacher for bringing the bug to our attention.
-
-cairo-xlib
-----------
-Fix serious failure on X servers without the Render extension.
-
- Since the 1.5.14 snapshot (with support for PseudoColor visuals),
- any application attempting to create a "similar" xlib surface would
- fail on an X server without the Render extension. Thanks to
- Frederic Crozat for pointing out that cairo's test suite was
- entirely failing when run against Xvfb.
-
-Avoid crashing cairo-xlib applications for too-large glyphs
-
- Naively sending glyphs of any size to the X server will eventually
- violate the X limit on maximum request sizes. We now properly
- detect when a glyph would be too large and use existing fallbacks
- to render the glyph rather than trying to send it to the X server.
-
-Enable the buggy_repeat workaround for Xorg servers < 1.4
-
- We have determined that Xorg 1.3.0 (as packaged in Fedora 8 at
- least) has a bug that can result in an X server crash when cairo
- uses certain X Render repeat operations, (as exercised by cairo's
- extend-reflect test). We avoid this crash by using fallbacks
- whenever a repeating surface is needed for any Xorg server with a
- version less than 1.4. This is slower, but should prevent the
- crash.
-
- (Meanwhile, there appears to be a separate bug where some X
- servers or specific X-server drivers will use random pixmap data
- when asked to draw a repeating surface. The buggy_repeat
- workaround would also avoid those problems, but we have not yet
- characterized whether the new "version < 1.4" is a good
- characterization of those problems or not.)
-
-cairo-quartz-font
------------------
-Implement cairo_font_extents for this backend.
-
-The cairo-quartz-font implementation added in the 1.5.14 snapshot was
-entirely missing support for the cairo_font_extents function. Thanks to
-Richard Hult for pointing out this obvious shortcoming, (and obvious
-lack of coverage in our test suite):
-
- CGFont backend returns 0 font extents
- https://bugs.freedesktop.org/show_bug.cgi?id=15319
-
-Snapshot 1.5.16 (2008-04-01 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the eighth snapshot in cairo's unstable 1.5 series. It comes
-less than two weeks after the 1.5.14 snapshot and it really is a
-legitimate snapshot, (in spite of sharing this date with that of many
-bogus announcements). The major change in this snapshot is that the
-cairo-quartz backend is now officially "supported", including new API
-to construct a font face from a CGFontRef . Also several bug fixes
-have been fixed in many backends. See below for details.
-
-general
--------
-Cairo now depends on pixman 0.10.0 which was recently released. The
-latest pixman release can always be found alongside cairo releases at:
-
- http://cairographics.org/releases
-
-Increase the precision of color stops for gradients. This fixes a
-regression in gradient rendering that had been present since the
-1.5.12 snapshot.
-
-paginated (all of ps, pdf, svg, and win32-printing)
----------------------------------------------------
-Fix assertion failure when some drawing elements are outside the page
-boundaries, (this bug was noticed when using Inkscape to print a
-drawing with landscape orientation to a portrait-oriented piece of
-paper).
-
-cairo-ps
---------
-Fix of bug causing incorrect glyph positioning.
-
-Fix handling of CAIRO_OPERATOR_SOURCE.
-
-cairo-pdf
----------
-More reduction of unnecessary digits of precision in PDF output.
-
-Fix handling of CAIRO_OPERATOR_SOURCE.
-
-cairo-svg
----------
-Fix bug in usage of libpng that was preventing cairo_mask from working
-with the svg backend.
-
-Fix transformation of source pattern for cairo_stroke().
-
-cairo-win32-printing
---------------------
-Fix fallback resolution, (thanks again to inkscape users/developers
-for helping us find this one).
-
-cairo-quartz
-------------
-Mark the cairo-quartz backend as "supported" rather than
-"experimental". This means the following:
-
- * The backend will now be built by default (if possible).
-
- * We are committing that the backend-specific API (as published in
- cairo-quartz.h) are stable and will be supported in all future
- cairo 1.x releases.
-
- * We are committing that the output quality of this backend
- compares favorably with other cairo backends, (and that quality
- is ensured by good results from the cairo test suite).
-
- * We recommend that distributions build and distribute this
- backend when possible.
-
-Note that the cairo_quartz_image API (in cairo-quartz-image.h) is
-still experimental, will not build by default, (pass
---enable-quartz-image to configure to build it), and may see API
-changes before it is marked as "supported" in a future release.
-
-Put the CAIRO_FONT_TYPE_ATSUI name back into
-cairo-deprecated.h. Without this, the cairo 1.5.14 snapshot broke all
-builds for applications using the C++ cairomm bindings (and perhaps
-others) which have the CAIRO_FONT_TYPE_ATSUI name in their header
-files. This breakage happened even for applications not using
-cairo-quartz at all.
-
- Note: Even though the CAIRO_FONT_TYPE_ATSUI name is provided to
- avoid this build breakage, we still recommend that bindings and
- applications move to the new, and more accurate,
- CAIRO_FONT_TYPE_QUARTZ name.
-
-Replace the implementation of cairo-quartz-font to use CFFont instead
-of ATSUI. The CGFont API is a better fit than ATSUI, and this new
-implementation is also more correct than the old one as well.
-
-This also adds the following new API call:
-
- cairo_public cairo_font_face_t *
- cairo_quartz_font_face_create_for_cgfont (CGFontRef font);
-
-The previous cairo_quartz_font_face_create_for_atsu_font_id function
-continues to exist and is part of the supported API going
-forward. (However, the old name of that same function, which was
-cairo_atsui_font_face_create_for_atsu_font_id is officially
-deprecated. Any source code using the old name should be updated to
-use the new name.)
-
-Fix transformation of source pattern for cairo_stroke().
-
-cairo-win32
------------
-Avoid crash in create_similar is cairo_win32_surface_create fails.
-
-Snapshot 1.5.14 (2008-03-20 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the seventh snapshot in cairo's unstable 1.5 series. It comes
-3 weeks after the 1.5.12 snapshot. This snapshot includes support for
-arbitrary X server visuals, (including PseudoColor), which was the
-final remaining cairo-specific item on the cairo 1.6 roadmap. It also
-includes a huge number of improvements to the cairo-quartz backend. So
-this is effectively a cairo 1.6 release candidate. We expect very few
-changes from now until 1.6 and only for specific bug fixes.
-
-API Change
-----------
-Rename ATSUI font backend to Quartz font backend. This affects the
-following usage:
-
- --enable-atsui -> --enable-quartz-font
- CAIRO_HAS_ATSUI_FONT -> CAIRO_HAS_QUARTZ_FONT
- CAIRO_FONT_TYPE_ATSUI -> CAIRO_FONT_TYPE_QUARTZ
-
- cairo_atsui_font_face_create_for_atsu_font_id ->
- cairo_quartz_font_font_create_for_atsu_font_id
-
-This API change is justified by the cairo-quartz backend still be
-marked as "experimental" rather than "supported", (though this is one
-step toward making the change to "supported" before 1.6). Cairo will
-still provide ABI compatibility with the old symbol name, however.
-
-paginated (all of ps, pdf, svg, and win32-printing)
----------------------------------------------------
-Optimize by not analyzing an image surface for transparency more than
-once, (previously all images were analyzed twice).
-
-cairo-ps and cairo-pdf
-----------------------
-Avoiding emitting a matrix into the stroke output when unnecessary,
-(making output size more efficient).
-
-Reduce rounding error of path shapes by factoring large scale factors
-out of the path matrix, (ensuring that a fixed-number of printed
-digits for path coordinates contains as much information as possible).
-
-Reduce excess digits for text position coordinates. This makes the
-output file size much smaller without making the result any less
-correct.
-
-cairo-ps
---------
-Eliminate bug causing extraneous text repetition on Linux PostScript
-output in some cases.
-
- See: Mozilla Bug 419917 – Printed page contents are reflected
- inside bordered tables (Linux-only)
-
- https://bugzilla.mozilla.org/show_bug.cgi?id=419917
-
-Optimize output when EXTEND_PAD is used.
-
-cairo-pdf
----------
-Fix to not use fill-stroke operator with transparent fill, (else PDF
-output doesn't match the cairo-defined correct result). See:
-
- https://bugs.launchpad.net/inkscape/+bug/202096
-
-cairo-svg
----------
-Fix stroke of path with a non-solid-color source pattern:
-
- http://bugs.freedesktop.org/show_bug.cgi?id=14556
-
-cairo-quartz
-------------
-Fix text rendering with gradient or image source pattern.
-
-Handling antialiasing correctly for cairo_stroke(), cairo_clip(), and
-cairo_show_text()/cairo_show_glyphs().
-
-Correctly handle gradients with non-identity transformations:
-
- Fixes http://bugs.freedesktop.org/show_bug.cgi?id=14248
-
-Add native implementation of REPEAT and REFLECT extend modes for
-gradients.
-
-Fix implementation for the "unbounded" operators, (CAIRO_OPERATOR_OUT,
-_IN, _DEST_IN, and _DEST_ATOP).
-
-Correctly handle endiannees in multi-architecture compiles on Mac OS
-X.
-
-Avoid behavior which would cause Core Graphics to print warnings to
-the console in some cases.
-
-cairo-win32
------------
-Fix handling of miter limit.
-
-cairo-win32-printing
---------------------
-Fix to not use a 1bpp temporary surface in some cases while printing,
-(so grayscale data is preserved rather than just becoming black and
-white).
-
-cairo-xlib
-----------
-Add support for rendering to arbitrary TrueColor X server
-visuals. This fixes at least the following bugs:
-
- cairo doesn't support 8-bit truecolor visuals
- https://bugs.freedesktop.org/show_bug.cgi?id=7735
-
- cairo doesn't support 655 xlib format
- https://bugs.freedesktop.org/show_bug.cgi?id=9719
-
-Add support for rendering to 8-bit PseudoColor X server visuals. This
-fixes the following bug:
-
- Cairo doesn't support 8-bit pseudocolor visuals
- https://bugs.freedesktop.org/show_bug.cgi?id=4945
-
-Snapshot 1.5.12 (2008-02-28 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the sixth snapshot in cairo's unstable 1.5 series. It comes 1
-week after the 1.5.10 snapshot. This snapshot includes the
-long-awaited change from 16.16 to 24.8 fixed-point values, (see below
-for why you should care). It also includes several backend-specific
-bug fixes.
-
-24.8 fixed-point format
------------------------
-Cairo has always converted path coordinates to a fixed-point
-representation very early in its processing. Historically, this has
-been a 32-bit representation with 16 bits of integer for the
-device-pixel grid and 16 bits of sub-pixel positioning. The choice of
-16 bits for the integer coordinate space was based on the 16-bit limit
-for X Window drawables.
-
-This 16-bit limit has proven problematic for many applications. It's
-an especially vexing problem when targeting non-X backends that don't
-have any 16-bit restriction. But even when targeting cairo-xlib, it's
-often desirable to draw a large shape, (say a background rectangle),
-that extends beyond the surface bounds and expect it to fill the
-surface completely, (rather than overflowing and triggering random
-behavior).
-
-Meanwhile, nobody has ever really needed 16 bits of sub-pixel
-precision.
-
-With this snapshot, the fixed-point system is still in place and is
-still using a 32-bit representation, (future versions of cairo might
-move entirely to floating-point when targeting PDF output for
-example). But the representation now provides 24 bits of pixel
-addressing and only 8 bits of sub-pixel positioning. This should give
-a much less stifling space to many applications.
-
-However, the underlying pixman library still has 16-bit limitations in
-many places, (it has its roots in the X server as well). Until those
-are also fixed, applications targeting cairo image surfaces, or
-hitting software fallbacks when targeting other surfaces will still
-encounter problems with device-space values needing more than 16
-integer bits.
-
-generic fixes
--------------
-Add a few tests to the test suite to increase coverage.
-
-Cleanup a few error-handling paths, (propagate error correctly).
-
-cairo-ft
---------
-Fix handling of font sizes smaller than 1 device pixel.
-
-cairo-pdf
----------
-Fix to properly save/restore clip when analyzing meta-surface
-patterns, (fixing a couple of test-suite failures).
-
-Implement native support for CAIRO_OPERATOR_SOURCE when the source
-pattern is opaque.
-
-Emit rectangles as PDF rectangles ("re" operator) rather than as
-general paths.
-
-cairo-ps
---------
-Fix to work properly with the 16.16->24.8 change.
-
-cairo-svg
----------
-Fix CAIRO_EXTEND_REFLECT by using an image fallback, (there's no
-direct SVG support for reflected patterns).
-
-Fix the use of alpha-only masks, (such as CAIRO_FORMAT_A8).
-
-cairo-quartz
-------------
-Add new API for efficiently using image data as a source:
-
- cairo_surface_t *
- cairo_quartz_image_surface_create (cairo_surface_t *image_surface);
-
- cairo_surface_t *
- cairo_quartz_image_surface_get_image (cairo_surface_t *surface);
-
-For full documentation, see:
-
- http://cairographics.org/manual/cairo-Quartz-Surfaces.html#cairo-quartz-image-surface-create
-
-Several fixes for cairo_mask().
-
-cairo-atsui
------------
-Change default from from Monaco to Helvetica to be more consistent
-with other font backends.
-
-Snapshot 1.5.10 (2008-02-20 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the fifth snapshot in cairo's unstable 1.5 series. It comes 3
-weeks after the 1.5.8 snapshot. This snapshot adds one new API
-function, (cairo_has_current_point), and the usual mix of
-improvements, (more efficient PostScript/PDF output, optimized
-stroking), and fixes (more robust error-handling, etc.). See below for
-details.
-
-New API
--------
-Add a new function to query if there is a current point:
-
- cairo_bool_t
- cairo_has_current_point (cairo_t *cr);
-
-There is no current point immediately after cairo_create(), nor after
-cairo_new_path() or cairo_new_sub_path(). There is a current point
-after any of the path-creation functions, (cairo_move_to,
-cairo_line_to, cairo_curve_to, etc.).
-
-With this new function, we also revert the change of the return type
-of cairo_get_current_point from cairo 1.5.8, (it's now a void function
-again).
-
-Optimizations
--------------
-Optimize stroking code to avoid repeated calculation of redundant
-values, (particularly significant for very large, offscreen paths).
-
-General fixes
--------------
-Patch a few more potential buffer overruns, (due to integer
-overflow).
-
-Many fixes and improvements to cairo's error-handling, (ensure that
-correct error values are returned, clean up memory leaks on
-error-handling paths, etc.).
-
-Fix a potential infinite loop when stroking a spline with a pen that
-has been transformed to a line segment.
-
-Remove treating NULL as a synonym for a valid cairo_font_options_t*
-with default values, (a change that had been introduced as of cairo
-1.5.8).
-
-Remove the altered handling of tolerance and fallback-resolution that
-had been introduced as of cairo 1.5.4.
-
-cairo-xlib
-----------
-Pass the original Drawable, (as opposed to the root window), to
-XCreatePixmap when creating a similar surface. This gives the X server
-more information so that it can be clever and efficient.
-
-cairo-pdf
----------
-Fix the rendering of repeating and reflecting patterns.
-
-Ensure miter limit is always >= 1, (smaller limits are not meaningful,
-but they can cause some PDF viewers to fail to display pages).
-
-Generate more efficient output when the same path is used for both
-fill and stroke.
-
-cairo-ps
---------
-Start sharing much of the cairo-pdf code rather than implementing very
-similar code in cairo-ps.
-
-Implement native support for repeating and reflecting linear
-gradients.
-
-Implement reflected surface patterns.
-
-Ensure miter limit is always >= 1, (smaller limits are not meaningful,
-but they can cause some PostScript viewers to crash).
-
-Generate PostScript that will perform more efficiently and use less
-memory on printers, (use currentfile instead of a giant string array
-for image data, and avoid using PostScript patterns for paint() and
-fill() when possible).
-
-cairo-svg
----------
-Avoid unnecessary rasterization when copying a "similar" surface to
-another svg surface, (allow the SOURCE operator to be implemented with
-all-vector operations if there are no underlying objects).
-
-cairo-atsui
------------
-Eliminate infinite loop when attempting to render an empty string.
-
-Snapshot 1.5.8 (2008-01-30 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the fourth snapshot in cairo's unstable 1.5 series. It comes 2
-weeks after the 1.5.6 snapshot. It adds a few new API functions. Most
-notably all callers of cairo_image_surface_create_for_data should now
-be calling cairo_format_stride_for_width to compute a legal stride
-value. See below for more details.
-
-New API in cairo 1.5.8
-----------------------
-We've added a new function that should be called to compute a legal
-stride value before allocating data to be used with
-cairo_image_surface_create_for_data:
-
- int
- cairo_format_stride_for_width (cairo_format_t format,
- int width);
-
-We've also added a new cairo_path_extents function that can be used to
-compute a bounding box for geometry such as a single line segment,
-(contrast with cairo_path_extents and cairo_stroke_extents):
-
- void
- cairo_path_extents (cairo_t *cr,
- double *x1, double *y1,
- double *x2, double *y2);
-
-And finally, we've added a function to allow for querying the
-XRenderPictFormat of a cairo-xlib surface:
-
- XRenderPictFormat *
- cairo_xlib_surface_get_xrender_format (cairo_surface_t *surface);
-
-API changes
------------
-Fix return types of cairo_surface_show_page and
-cairo_surface_copy_page. This is an API change to functions that are
-new in the 1.5 series, so not an API break compared to any stable
-cairo release, (1.0.x, 1.2.x, 1.4.x).
-
-Change the return type of cairo_get_current_point() from void to
-cairo_status_t. This allows the caller to receive a
-CAIRO_STATUS_NO_CURRENT_POINT value to distinguish the a current point
-at the origin from no current point existing.
-
-Performance improvement
------------------------
-Improve performance of clipping by using an optimized code path
-internally, (with the ADD operator instead of IN).
-
-General bug fixes
------------------
-Fix various cairo_*_extents functions to initialize the return-value
-variables even in the case of a cairo_t in error.
-
-Treat NULL as a legitimate value for cairo_font_options_t*. [NOTE:
-On discussion afterwards, we decided against this change so it has
-been removed as of cairo 1.5.10.]
-
-Fix rendering with CAIRO_ANTIALIAS_NONE to be more predictable, (that
-is, to avoid seams appearing when geometry and imagery share an
-identical edge). Portions of this fix are in the pixman library and
-will appear in a future release of that library.
-
-Avoid triggering an error for a font size of 0.
-
-Miscellaneous changes
----------------------
-Require pixman >= 0.9.6.
-
-There has been a tremendous amount improvement to cairo's
-documentation. We're delighted that 100% of the public API has at
-least some documentation in the API reference manual. Many thanks to
-Behdad Esfahbod and Nis Martensen for leading this effort.
-
-cairo-pdf and cairo-ps
-----------------------
-Eliminate failure when a Type 1 font is embedded with an explicit
-glyph 0.
-
-cairo-pdf
----------
-Implement a more correct and more efficient approach for patterns with
-an extend mode of CAIRO_EXTEND_REFLECT.
-
-cairo-ps
---------
-Fix image masks to properly pack and pad mask bits.
-
-cairo-quartz
-------------
-Take care to only use DrawTiledImage for integer-aligned images, (and
-use slower paths to get the correct result in other cases).
-
-cairo-win32
------------
-Fix for older versions of mingw.
-
-Improve the handling of the clipping with the win32 and win32-printing
-surfaces.
-
-Fix rendering of non black/white text.
-
-Snapshot 1.5.6 (2008-01-15 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the third snapshot in cairo's unstable 1.5 series. It comes
-about 6 weeks after the 1.5.4 snapshot. The only API addition compared
-to 1.5.4 is very minor, (a new value CAIRO_STATUS_TEMP_FILE_ERROR).
-The remainder of the changes are the usual accumulation of bug fixes
-and improvements. See below for details.
-
-General bug fixes
------------------
-Fix handling of fonts that contain a mixture of outline and bitmapped
-glyphs. There was a change in this handling in 1.5.4 that improved
-some cases and also regressed other cases. Now, all cases should be
-handled quite well.
-
-Fix alignment issues that were causing SIGBUS failures on SPARC.
-
-Fix a regression (which first appeared in 1.5.2) where stroking under
-a large scale would sometimes incorrectly replace a miter join with a
-bevel join. (Thanks to Keith Packard.)
-
-Fix reporting of zero-sized extents to be {0,0} rather than
-{INT_MAX,INT_MIN}. This avoids several integer overflow and
-allocations of massive regions in some cases.
-
-Fix failures of gradients with no stops, (quartz, ps, and pdf).
-
-Fix handling of Type 1 fonts on Windows platforms.
-
-Fix handling of Type 1 fonts with no specific family name in the font
-itself, (generate a CairoFont-x-y name).
-
-Handle NULL string values in cairo_show_text, cairo_show_glyphs, and
-friends.
-
-Many robustness improvements along error-handling paths, (thanks as
-always, to Chris "ickle" Wilson).
-
-Various other minor fixes.
-
-Paginated backends (PDF/PostScript/win32-printing)
---------------------------------------------------
-Avoid unnecessary rasterization when using a paginated surface as a
-source, (such as drawing from one pdf surface to another).
-
-Fix replaying of paginated surface with more than one level of push/pop
-group.
-
-cairo-xlib
-----------
-Fix xlib backend to not consider recent X server release as having a
-buggy repeat implementation in the Render extension.
-
-cairo-pdf
----------
-Fix PDF output to avoid triggering very slow rendering in PDF viewers,
-(avoid starting and stopping the content stream for each pattern
-emission).
-
-Support CAIRO_OPERATOR_SOURCE in cases where there is nothing below
-the object being drawn.
-
-Fix to avoid seams appearing between multiple fallback regions.
-
-cairo-ps (PostScript)
----------------------
-Use correct bounding box in Type 3 fonts.
-
-Fix several bugs in cairo's PostScript output. These include making
-the PostScript output more compatible with recent versions of
-ghostscript that are more strict about Type 3 fonts, for
-example.
-
-Fix for win32 to not attempt to create temporary files in the root
-directory, (where the user may not have write permission).
-
-Avoid generating Level 3 PostScript if Level 2 is sufficient. Also,
-add code in output documents to alert the user if Level 3 PostScript
-is handed to a device that cannot handle PostScript beyond Level
-2.
-
-cairo-directfb
---------------
-Various performance optimizations.
-
-Fixed support for small surfaces (less than 8x8).
-
-Provide support for environment variables CAIRO_DIRECTFB_NO_ACCEL to
-disable acceleration and CAIRO_DIRECTFB_ARGB_FONT to enable ARGB fonts
-instead of A8.
-
-cairo-os2
----------
-Allow OS/2 APIs instead of C library allocation functions.
-
-Snapshot 1.5.4 (2007-12-05 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the second snapshot in cairo's unstable 1.5 series. It comes
-just over 1 month after the 1.5.2 snapshot. There are no API changes
-or additions in 1.5.4 compared to 1.5.2, but there are several bug
-fixes, and some optimizations. Most of these apply to particular
-backends. See below for details.
-
-General improvements
---------------------
-Use less memory for spline approximation calculations.
-
-Change how the tolerance value is interpreted with regard to
-fallback-resolution. [Note: On further discussion, we decided against
-this change for now. It is removed as of cairo 1.5.10.]
-
-Fix precision of floating-point values in vector-output backends to
-avoid rounding errors with very small numbers.
-
-Xlib improvements
------------------
-Fix bug in glyph rendering with xlib, (due to everything being clipped
-out). This was a regression in the 1.5.2 snapshot that was visible in
-the GIMP, for example. See:
-
- cairo 1.5.2 causes font problems in GIMP 2.4 status bar and evolution 2.12.1
- https://bugs.freedesktop.org/show_bug.cgi?id=13084
-
-PostScript improvements
------------------------
-Fix bug leading to invalid PostScript files when rendering
-text, (need "0 0 xyshow" instead of "0 xyshow").
-
-Fix many issues with Type 3 fonts, including making the resulting text
-extractable.
-
-Quartz improvements
--------------------
-Fix font metrics height value for ATSUI, (helps webkit on GTK+ OS X
-layout nicely).
-
-Fix gradients.
-
-Fix EXTEND_NONE mode for patterns.
-
-Fix cairo_quartz_surface_create to properly clear the new surface
-in cairo_quartz_surface_create.
-
-Fix to correctly handle 0x0 sized surfaces.
-
-Optimize drawing of ExtendMode::REPEAT patterns for OS X 10.5.
-
-Snapshot 1.5.2 (2007-10-30 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the first snapshot in cairo's unstable 1.5 series. It comes 4
-months after the 1.4.10 release. This snapshot includes significant
-improvements to PDF and PostScript output, which is one of the things
-in which we're most interested in getting feedback. There are a couple
-of minor API additions, and several optimizations, (primarily in the
-"print/vector" backends). And there are dozens of bug fixes and
-robustness improvements.
-
-New dependency on external pixman library
------------------------------------------
-A significant change in this snapshot compared to all previous cairo
-releases is that cairo now depends on an external "pixman" library for
-its software rendering. Previously this same code was compiled
-internally as part of cairo, but now the code is separate so that both
-cairo and the X server can now share common code, (thanks very much to
-Søren Sandmann for his work on separating pixman and maintaining it).
-
-So users will need to acquire and build pixman before being able to
-build cairo. The current release is 0.9.6 and can be obtained from
-here:
-
- http://cairographics.org/releases/pixman-0.9.6.tar.gz
-
- which can be verified with:
-
- http://cairographics.org/releases/pixman-0.9.6.tar.gz.sha1
- 66f01a682c64403a3d7a855ba5aa609ed93bcb9e pixman-0.9.6.tar.gz
-
- http://cairographics.org/releases/pixman-0.9.6.tar.gz.sha1.asc
- (signed by Carl Worth)
-
-Major PDF/PostScript improvements
----------------------------------
-Adrian Johnson has done some long-awaited work to make cairo's PDF and
-PostScript output more interesting than ever before. First, many
-operations that previously triggered image fallbacks will now be
-rendered as native vectors. These operations include:
-
- PDF: cairo_push_group, cairo_surface_create_similar,
- cairo_mask, A8/A1 surface sources, repeating/reflecting linear
- gradients.
-
- PostScript: cairo_push_group, cairo_surface_create_similar,
- gradients, bilevel alpha masks, (for example, all values either 0 or
- 255 for an A8 mask).
-
-Not only that, but when an image fallback is required, it will now be
-limited to only the necessary region. For example, a tiny translucent
-image overlaying a small portion of text would previously caused an
-entire PostScript page to be rendered as a giant image. Now, the
-majority of that page will be nice text, and there will only be a tiny
-image in the output.
-
-Additionally, the PostScript output now carefully encodes text so that
-if it is subsequently converted to PDF, the text will be
-selectable.
-
-This is very exciting progress, and we're hoping to hear from users
-during the 1.5 series about how things have improved, (for example,
-inkscape users doing cairo-based PDF export: please let us know how
-things look). And feel free to pass your thanks along to Adrian for his excellent work.
-
-NOTE: This much improved PDF output makes more sophisticated use of
-functionality in the PDF specification. This means that cairo's output
-will sometimes expose bugs in some free software PDF viewers, (evince,
-poppler, and xpdf, for example), that are not yet ready for such PDF
-files. We're working with the poppler maintainers to get these bugs
-fixed as quickly as possible. In the meantime, please double-check
-with other PDF viewers if cairo-generated PDF files are not being
-rendered correctly. It may be due to a bug in the viewer rather than
-in the PDF file that cairo has created.
-
-Robustness improvements
------------------------
-Chris Wilson has made the largest contribution by far to cairo 1.5.2,
-(in number of commits). His more than 150 commits include a huge
-number of fixes to increase cairo's robustness. These fixes make cairo
-more robust against invalid and degenerate input, (NaN, empty path,
-etc.), against size-0 malloc calls, against memory leaks on
-error-recovery paths, and against other failures during error
-handling. He also implemented atomic operations to cairo, and used
-them to fix cairo's previously non-thread-safe reference counting,
-again improving robustness.
-
-Chris has put a tremendous amount of time and effort into writing
-analysis tools for this work, and in running those tools and fixing
-the problems they report. We're very grateful for this work, and hope
-that all cairo users appreciate the more robust implementation that
-results from it.
-
-This work is largely thankless, so it might make sense to notice
-sometime that cairo has been running quite smoothly for you, and when
-you do, send a quick "thank you" off to Chris Wilson, since it
-is all definitely running smoother thanks to his work.
-
-New API
--------
-There are no major additions to cairo's core API. The only new,
-generic functions are:
-
- void
- cairo_surface_copy_page (cairo_surface_t *surface);
-
- void
- cairo_surface_show_page (cairo_surface_t *surface);
-
-which can now be used much more conveniently than the existing
-cairo_copy_page and cairo_show_page functions in some
-situations. These functions act identically, but require only a
-cairo_surface_t* and not a cairo_t*.
-
-All other API additions are specific to particular backends.
-
-New cairo-win32 API (new font face function and "win32 printing" surface)
--------------------------------------------------------------------------
-There is a new function for creating a win32 font face for both a
-logfontw and an hfont together. This complements the existing
-functions for creating a font face from one or the other:
-
- cairo_font_face_t *
- cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont,
- HFONT font);
-
-There is also a new "win32 printing" surface:
-
- cairo_surface_t *
- cairo_win32_printing_surface_create (HDC hdc);
-
-This interface looks identical to the original
-cairo_win32_surface_create, (both accept and HDC), but the behavior of
-this new surface is very different. It should only be called with a
-printing DC, and will result in all drawing commands being stored into
-a meta-surface and emitted after each page is complete, with analysis
-to do as minimal image-based fallbacks as necessary. The behavior and
-implementation shares much with the PDF and PostScript backends.
-
-New cairo-ps API (EPS and PostScript level control)
----------------------------------------------------
-An often requested feature has been the ability to generate
-Encapsulated PostScript (EPS) with cairo. We have that now with the
-following very simple API. Just do cairo_ps_surface_create as usual
-then call this function with a true value:
-
- void
- cairo_ps_surface_set_eps (cairo_surface_t *surface,
- cairo_bool_t eps);
-
-[NOTE: As always with snapshots, it's possible---though not very
-likely---that the API could still be modified before a final
-release. For example, this is the first public cairo function that
-accepts a Boolean parameter. I'm generally opposed to Boolean
-parameters, but this is probably the one case where I'm willing to
-accept one, (namely a "set" function that accepts a single Boolean).]
-
-Also, it is now possible to control what PostScript level to target,
-(either level 2 or level 3), with the following new API:
-
- typedef enum _cairo_ps_level {
- CAIRO_PS_LEVEL_2,
- CAIRO_PS_LEVEL_3
- } cairo_ps_level_t;
-
- void
- cairo_ps_surface_restrict_to_level (cairo_surface_t *surface,
- cairo_ps_level_t level);
-
- void
- cairo_ps_get_levels (cairo_ps_level_t const **levels,
- int *num_levels);
-
- const char *
- cairo_ps_level_to_string (cairo_ps_level_t level);
-
-Improvement for cairo-quartz
-----------------------------
-Brian Ewins had contributed several improvements to cairo-quartz. These
-include an implementation of EXTEND_NONE for linear and radial
-gradients, (so this extend mode will no longer trigger image fallbacks
-for these gradients), as well as native surface-mask clipping, (only
-on OS X 10.4+ where the CGContextClipToMask function is available).
-
-He also fixed a semantic mismatch between cairo and quartz for dashing
-with an odd number of entries in the dash array.
-
-We're grateful for Brian since not many quartz-specific improvements
-to cairo would be happening without him.
-
-Optimizations
--------------
-Optimize SVG output for when the same path is both filled and stroked,
-and avoid unnecessary identity matrix in SVG output. (Emmanuel Pacaud).
-
-Optimize PS output to take less space (Ken Herron).
-
-Make PS output more compliant with DSC recommendations (avoid initclip
-and copy_page) (Adrian Johnson).
-
-Make PDF output more compact (Adrian Johnson).
-
-Release glyph surfaces after uploading them to the X server, (should
-save some memory for many xlib-using cairo application). (Behdad
-Esfahbod).
-
-Optimize cairo-win32 to use fewer GDI objects (Vladimir Vukicevic).
-
-win32-printing: Avoid falling back to images when alpha == 255
-everywhere. (Adrian Johnson).
-
-win32-printing: Avoid falling back for cairo_push_group and
-cairo_surface_create_similar. (Adrian Johnson)
-
-Bug fixes
----------
-Avoid potential integer overflows when allocating large buffers
-(Vladimir Vukicevic).
-
-Preparations to allow the 16.16 fixed-point format to change to
-24.8 (Vladimir Vukicevic).
-
-Fix bugs for unsupported X server visuals (rgb565, rgb555, bgr888, and
-abgr8888). (Carl Worth and Vladimir Vukicevic)
-
-Fix bugs in PDF gradients (Adrian Johnson).
-
-Fix cairo-xlib to build without requiring Xrender header
-files (Behdad Esfahbod).
-
-Make cairo more resilient in the case of glyphs not being available in
-the current font. (Behdad Esfahbod)
-
-Prevent crashes when both atsui and ft font backends are compiled in
-(Brian Ewins).
-
-Make font subsetting code more robust against fonts that don't include
-optional tables (Adrian Johnson).
-
-Fix CFF subsetting bug, (which manifested by generating PDF files that
-Apple's Preview viewer could not read) (Adrian Johnson).
-
-Fixed error handling for quartz and ATSUI backends (Brian Ewins).
-
-Avoid rounding problems by pre-transforming to avoid integer-only
-restrictions on transformation in GDI (Adrian Johnson).
-
-Fixed an obscure bug (#7245) computing extents for some stroked
-paths (Carl Worth).
-
-Fix crashes due to extreme transformation of the pen, (seems to show
-up in many .swf files for some reason) (Carl Worth).
-
-Release 1.4.10 (2007-06-27 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the fifth update in cairo's stable 1.4 series. It comes
-roughly three weeks after the 1.4.8 release. The most significant
-change in this release is a fix to avoid an X error in certain cases,
-(that were causing OpenOffice.org to crash in Fedora). There is also a
-semantic change to include child window contents when using an xlib
-surface as a source, an optimization when drawing many rectangles, and
-several minor fixes.
-
-Eliminate X errors that were killing OO.o (Chris Wilson)
---------------------------------------------------------
-Cairo is fixed to avoid the X errors propagated when cleaning up
-Render Pictures after the application had already destroyed the
-Drawable they reference. (It would be nice if the X server wouldn't
-complain that some cleanup work is already done, but there you have
-it.) This fixes the bug causing OpenOffice.org to crash as described
-here:
-
- XError on right click menus in OOo.
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=243811
-
-Use IncludeInferiors when using xlib surface as a source (Ryan Lortie)
-----------------------------------------------------------------------
-When an xlib surface is used as the source of a draw operation the
-contents of child windows are now included in the source data. The
-semantics of drawing to xlib surfaces are unchanged (ie: draws are
-still clipped by child windows overlapping the destination window).
-
-Optimize drawing of many rectangles (Vladimir Vukicevic)
---------------------------------------------------------
-Avoid O(N*N) loop when filling many axis-aligned rectangles, (either
-many rectangles as separate sub-paths or due to dashing).
-
-Miscellaneous fixes
--------------------
-Fix cairo-perf on Solaris by linking to librt. (Behdad Esfahbod)
-
-Fix make check for systems that require executable files to have a
-particular extension. (Behdad Esfahbod)
-
-Eliminate some warnings in cairo-quartz. (Brian Ewins)
-
-Fix build-breaking typo for cairo-directfb. (Chris Wilson)
-
-Release 1.4.8 (2007-06-07 Carl Worth <cworth@cworth.org>)
-=========================================================
-This is the fourth update in cairo's stable 1.4 series. It comes just
-over five weeks after the 1.4.6 release. This release includes a
-thread-safe surface-cache for solid patterns which significantly
-improves text rendering with the xlib backend. Also, dozens of error
-paths in cairo have been fixed thanks to extensive fault-injection
-testing by Chris Wilson.
-
-Surface cache for solid patterns
---------------------------------
-Originally written by Jorn Baayen, the introduction of a small cache
-for surfaces created for solid patterns improves performance
-dramatically. For example, this reduces the volume of X requests
-during text rendering to the same level as Xft.
-
-This cache first made its appearance in a 1.3.x snapshot, but was
-removed before appearing in any previous major release due to
-complications with multi-threaded programs. For example, programs like
-evince that would carefully restrict usage of cairo-xlib to a single
-thread were unpleasantly surprised to find that using cairo-image in a
-separate thread could trigger X requests.
-
-Behdad Esfahbod designed a fix which was implemented by Chris
-Wilson. Now, the necessary X requests are queued up until the next
-time the application directly operates on an xlib surface.
-
-Improved error handling paths
-------------------------------
-Chris Wilson continued the excellent work he started in cairo 1.4.4 to
-make cairo much more robust against out-of-memory and other errors. He
-applied his memory allocation fault injection cairo's main test suite,
-(previously he had applied it to cairo's performance suite).
-
-Chris's testing found dozens of bugs which he fixed. Many of these
-bugs had perhaps never been hit by any users. But at least one was
-hit by the gnome-about program which resulted in dozens of duplicated
-bug reports against that program:
-
- http://bugzilla.gnome.org/show_bug.cgi?id=431990
-
-We were very pleasantly surprised to see this bug get fixed as a
-side-effect of Chris's work. Well done, Chris!
-
-Other fixes
------------
-Cleanup of mutex declarations (Behdad Esfahbod)
-
-Remove unnecessary clip region from SVG output (Emmanuel Pacaud)
-
-Remove Xsun from the buggy_repeat blacklist (Elaine Xiong)
-
-ATSUI: Fix glyph measurement: faster and more correct (Brian Ewins)
-
-Quartz: fixed 'extend' behaviour for patterns, improved pattern performance,
-and a few smaller correctness fixes. (Brian Ewins, Vladimir Vukicevic)
-
-Release 1.4.6 (2007-05-01 Carl Worth <cworth@cworth.org>)
-=========================================================
-This is the third update in cairo's stable 1.4 series. It comes a
-little less than three weeks since the 1.4.4 release. This release
-fixes the broken mutex initialization that made cairo 1.4.4 unusable
-on win32, OS/2, and BeOS systems. This release also adds significant
-improvements to cairo's PDF backend, (native gradients!), and a couple
-of performance optimizations, (one of which is very significant for
-users of the xlib backend). See below for more details.
-
-Repaired mutex initialization
------------------------------
-We apologize that cairo 1.4.4 did little more than crash on many
-platforms which are less-frequently used by the most regular cairo
-maintainers, (win32, OS/2, and BeOS). The mutex initialization
-problems that caused those crashes should be fixed now. And to avoid
-similar problems in the future, we've now started posting pre-release
-snapshots to get better testing, (subscribe to cairo@cairographics.org
-if you're interested in getting notified of those and testing them).
-
-PDF Improvements
-----------------
-Thanks to Adrian Johnson, (cairo PDF hacker extraordinaire), we have
-several improvements to cairo's PDF backend to announce:
-
-Native gradients:
-
- As of cairo 1.4.6, cairo will now generate native PDF gradients in
- many cases, (previously, the presence of a gradient on any page
- would force rasterized output for that page). Currently, only
- gradients with extend types of PAD (the default) or NONE will
- generate native PDF gradients---others will still trigger
- rasterization, (but look for support for other extend modes in a
- future release). Many thanks to Miklós Erdélyi as well, who did the
- initial work for this support.
-
-Better compatibility with PDF viewers:
-
- The PDF output from cairo should now be displayed correctly by a
- wider range of PDF viewers. Adrian tested cairo's PDF output against
- many PDF viewers, identified a common bug in many of those viewers
- (ignoring the CTM matrix in some cases), and modified cairo's output
- to avoid triggering that bugs (pre-transforming coordinates and
- using an identity matrix).
-
-Better OpenType/CFF subsetting:
-
- Cairo will now embed CFF and TrueType fonts as CID fonts.
-
-Performance optimizations
--------------------------
-Faster cairo_paint_with_alpha:
-
- The cairo_paint_with_alpha call is used to apply a uniform alpha
- mask to a pattern. For example, it can be used to gradually fade an
- image out or in. Jeff Muizelaar fixed some missing/broken
- optimizations within the implementation of this function resulting
- in cairo_paint_with_alpha being up to 4 times faster when using
- cairo's image backend.
-
-Optimize rendering of "off-screen" geometry:
-
- Something that applications often do is to ask cairo to render
- things that are either partially or wholly outside the current clip
- region. Since 1.4.0 the image backend has been fixed to not waste
- too much time in this case. But other backends have still been
- suffering.
-
- In particular, the xlib backend has often performed quite badly in
- this situation. This is due to a bug in the implementation of
- trapezoid rasterization in many X servers.
-
- Now, in cairo 1.4.6 there is a higher-level fix for this
- situation. Cairo now eliminates or clips trapezoids that are wholly
- or partially outside the clip region before handing the trapezoids
- to the backend. This means that the X server's performance bug is
- avoided in almost all cases.
-
- The net result is that doing an extreme zoom-in of vector-based
- objects drawn with cairo might have previously brought the X server
- to its knees as it allocated buffers large enough to fit all of the
- geometry, (whether visible or not). But now the memory usage should
- be bounded and performance should be dramatically better.
-
-Miscellaneous
--------------
-Behdad contributed an impressively long series of changes that
-organizes cairo's internals in several ways that will be very
-beneficial to cairo developers. Thanks, Behdad!
-
-Behdad has also provided a utility for generating malloc statistics,
-(which was used during the great malloc purges of 1.4.2 and
-1.4.4). This utility isn't specific to cairo so may be of benefit to
-others. It is found in cairo/util/malloc-stats.c and here are Behdad's
-notes on using it:
-
- To build, do:
-
- make malloc-stats.so
-
- inside util/, and to use, run:
-
- LD_PRELOAD=malloc-stats.so some-program
-
- For binaries managed by libtool, eg, cairo-perf, do:
-
- ../libtool --mode=execute /bin/true ./cairo-perf
- LD_PRELOAD="../util/malloc-stats.so" .libs/lt-cairo-perf
-
-Finally, the cairo-perf-diff-files utility was enhanced to allow for
-generating performance reports from several runs of the same backend
-while some system variables were changed. For example, this is now
-being used to allow cairo-perf to measure the performance of various
-different acceleration architectures and configuration options of the
-X.org X server.
-
-Release 1.4.4 (2007-04-13 Carl Worth <cworth@cworth.org>)
-=========================================================
-This is the second update release in cairo's stable 1.4 series. It
-comes just less than a month after 1.4.2. The changes since 1.4.2
-consist primarily of bug fixes, but also include at least one
-optimization. See below for details.
-
-Of all the work that went into the 1.4.4 release
-
-There have been lots of individuals doing lots of great work on cairo,
-but two efforts during the 1.4.4 series deserve particular mention:
-
-Internal cleanup of error handling, (Chris Wilson)
---------------------------------------------------
-Chris contributed a tremendous series of patches (74 patches!) to
-improve cairo's handling of out-of-memory and other errors. He began
-by adding gcc's warn_unused_attribute to as many functions as
-possible, and then launched into the ambitious efforts of adding
-correct code to quiet the dozens of resulting warnings.
-
-Chris also wrote a custom valgrind skin to systematically inject
-malloc failures into cairo, and did all the work necessary to verify
-that cairo's performance test suite runs to completion without
-crashing.
-
-The end result is a much more robust implementation. Previously, many
-error conditions would have gone unnoticed and would have led to
-assertion failures, segmentation faults, or other harder-to-diagnose
-problems. Now, more than ever, cairo should cleanly let the user know
-of problems through cairo_status and other similar status
-functions. Well done, Chris!
-
-More malloc reduction, (Mathias Hasselmann)
--------------------------------------------
-After 1.4.0, Behdad launched an effort to chase down excessive calls
-to malloc within the implementation of cairo. He fixed a lot of
-malloc-happy objects for 1.4.2, but one of the worst offenders,
-(pixman regions), was left around. Mathias contributed an excellent
-series of 15 patches to finish off this effort.
-
-The end result is a cairo that calls malloc much less often than it
-did before. Compared to 1.4.2, 55% of the calls to malloc have been
-eliminate, (and 60% have been eliminated compared to 1.4.0). Well
-done, Mathias!
-
-Other improvements since 1.4.2
-------------------------------
-• Centralize mutex declarations (will reduce future build breaks),
- (Mathias Hasselmann)
-
-• Reduce malloc by caching recently freed pattern objects (Chris
- Wilson)
-
-• Fix some broken composite operations (David Reveman)
- https://bugs.freedesktop.org/show_bug.cgi?id=5777
-
-Backend-specific fixes
-----------------------
-PDF:
- • Use TJ operator for more compact representation of glyphs (Adrian
- Johnson)
-
- • Fix glyph positioning bug when glyphs are not horizontal
- http://lists.freedesktop.org/archives/cairo/2007-April/010337.html
-
-win32:
- • Fix crash when rendering with bitmap fonts (Carl Worth)
- https://bugzilla.mozilla.org/show_bug.cgi?id=376498
-
-xlib:
- • Turn metrics-hinting on by default (Behdad Esfahbod)
-
- • Fix edge-effect problem with transformed images drawn to xlib
- (Behdad Esfahbod)
- https://bugs.freedesktop.org/show_bug.cgi?id=10508
-
- • Avoid dereferencing a NULL screen. (Chris Wilson)
- https://bugs.freedesktop.org/show_bug.cgi?id=10517
-
-Quartz/ATSUI:
- • Fix scaling of glyph surfaces
- (Brian Ewins)
- https://bugs.freedesktop.org/show_bug.cgi?id=9568
-
- • Fix compilation failure when both xlib and quartz enabled
- (Brian Ewins)
-
- • Fix rounding bug leading to incorrectly positioned glyphs
- (Robert O'Callahan)
- https://bugs.freedesktop.org/show_bug.cgi?id=10531
-
-Release 1.4.2 (2007-03-19 Carl Worth <cworth@cworth.org>)
-=========================================================
-This is the first update release in cairo's stable 1.4 series. It
-comes just less than 2 weeks after 1.4.0. We hadn't anticipated an
-update this early, but we've managed to collect some important fixes
-that we wanted to get out to cairo users as soon as possible, (6 fixes
-for crashes, 1 case where graphical elements would not be drawn at
-all, a handful of backend-specific bugs, and several important build
-fixes).
-
-There's almost nothing but bug fixes in this release, (see below one
-optimization that Behdad did sneak in), so we recommend that everyone
-upgrade to this release when possible.
-
-Thanks to the many people that worked to fix these bugs, and those
-that did the work to report them and to test the fixes, (wherever
-possible both names are credited below).
-
-Critical fixes
---------------
-• Fix a crash due to a LOCK vs. UNLOCK typo (M. Drochner fixing Carl
- Worth's embarrassing typo).
-
- http://bugs.freedesktop.org/show_bug.cgi?id=10235
-
-• Fix potential buffer overflow, which on some systems with a checking
- variant of snprintf would lead to a crash (Adrian Johnson, Stanislav
- Brabec, and sangu).
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10267
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=232576
-
-• Fix a crash in cairo_stroke_extents or cairo_in_stroke when line
- width is 0.0. (Carl Worth and Sebastien Bacher)
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10231
-
-• Fix a crash on certain combinations of X server/video drivers (Carl
- Worth and Tomas Carnecky).
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10250
-
-• Fix a crash due to mishandling of invalid user input (Carl Worth and
- Alexander Darovsky).
-
- https://bugs.freedesktop.org/show_bug.cgi?id=9844
-
-• xlib: Cleanup server-side glyph caches on XCloseDisplay. This
- eliminated a crash detected by the perf suite, (and that
- applications could have run into as well). (Chris Wilson)
-
-Other bug fixes
----------------
-• Fix for some geometry which simply disappeared under some
- transformations---a stroked line with an extreme skew in X, for
- example (Carl Worth and Jonathan Watt).
-
- https://bugzilla.mozilla.org/show_bug.cgi?id=373632
-
-• SVG: Fix radial gradients for CAIRO_EXTEND_REFLECT and when r0 > r1
- (Emmanuel Pacaud).
-
-• PDF: Set page group color space to DeviceRGB.
-
- This fixes incorrect (muddy) transparent colors when rendering cairo
- PDF output in some viewers. (Adrian Johnson, Adam Goode, and
- MenTaLguY).
-
- http://lists.freedesktop.org/archives/cairo/2006-November/008551.html
-
-• win32: Return correct metrics when hinting is off, and fix font
- descent computation (Behdad Esfahbod).
-
-• quartz: Fix glyph interfaces to correctly return user-space rather
- than device-space coordinates (Brian Ewins).
-
- https://bugs.freedesktop.org/show_bug.cgi?id=9568
-
-• xcb: Fix parameter-order confusion with xcb_create_pixmap, which now
- makes all tests that pass with xlib now pass with xcb (Carl Worth,
- Jamey Sharp).
-
-• Fix some memory leaks in the perf suite (Chris Wilson).
-
-• Fix perf suite to consider changes in pixman/src (Mathias
- Hasselmann).
-
-Build fixes
------------
-• Don't include pre-generated cairo-features.h file. This was causing
- build failures when building with the directfb backend enabled
- (Behdad Esfahbod).
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10189
-
-• Eliminate use of maintainer mode from cairo's automake/configure
- script. This means that updates to files such as Makefile.am will
- take effect, (by rerunning automake and friends as necessary) when
- invoking make rather than being silently ignored. (Behdad Esfahbod)
-
-• Don't compile cairo-deflate-stream.c, which depends on zlib, unless
- building the pdf backend which requires it. (Carl Worth, Tor
- Lillqvist)
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10202
-
-• Don't make the ps backend link against zlib anymore, since it
- doesn't require it (Carl Worth).
-
-• Use "find !" rather than "find -not" for better portability (Thomas
- Klausner).
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10226
-
-• Don't use unsupported visibility attribute "hidden" on Solaris
- (Gilles Dauphin, Thomas Klausner).
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10227
-
-Optimization
-------------
-• It was Behdad that suggested we focus strictly on bug fixes now that
- we shipped so many performance improvements in 1.4.0, but it was
- also Behdad that got distracted by the chance to remove a lot of
- mallocs from cairo. Paths, gstates, trapezoids, splines, polygons,
- and gradient color stops will now use small, stack-allocated buffers
- in the most common cases rather than calling malloc as
- often. (Behdad Esfahbod). And look for more from Mathias Hasselmann
- soon.
-
-Release 1.4.0 (2007-03-06 Carl Worth <cworth@cworth.org>)
-=========================================================
-The many people[*] who have been working hard on cairo are very
-pleased to announce the long-awaited release of cairo 1.4. This
-release comes 4 months after the last stable update release (1.2.6)
-and 9 months since the initial release of 1.2.0.
-
-The release notes below are intended to capture the highlights of the
-changes that have occurred from the 1.2 series to the new 1.4.0
-release.
-
-Performance improvements
-------------------------
-Within the cairo project, the last 6 months or so has seen an intense
-effort focusing on the performance of cairo itself. That effort has
-paid off considerably, as can be seen in the following highlights of
-some of the performance differences from cairo 1.2.6 to cairo 1.4.0.
-
-(Note: The performance results reported here were measured on an x86
-laptop. Many of the improvements in 1.4---particular those involving
-text rendering---are even more dramatic on embedded platforms without
-hardware floating-point units. Such devices played an important part
-of many of the optimizations that found their way into cairo over the
-last few months.)
-
-• Dramatic improvement when drawing objects that are mostly off-screen
- with the image backend (with the xlib backend this case is still
- slow due to an X server bug):
-
- image-rgba long-lines-uncropped-100 479.64 -> 4.98: 96.24x speedup
- ███████████████████████████████████████████████▋
-
-• Dramatic improvement when copying a small fraction of an image
- surface to an xlib surface:
-
- xlib-rgba subimage_copy-512 3.93 -> 0.07: 54.52x speedup
- ██████████████████████████▊
-
-• Dramatic improvement to tessellation speed for complex objects:
-
- image-rgb tessellate-256-100 874.16 -> 34.79: 25.13x speedup
- ████████████â–
- xlib-rgba zrusin_another_fill-415 148.40 -> 13.85: 10.72x speedup
- ████▉
- xlib-rgb world_map-800 680.20 -> 345.54: 1.97x speedup
- ▌
-
-• Dramatic improvement to the speed of stroking rectilinear shapes,
- (such as the outline of a rectangle or "box"):
-
- image-rgb box-outline-stroke-100 0.18 -> 0.01: 24.22x speedup
- ███████████▋
- xlib-rgb box-outline-stroke-100 0.46 -> 0.06: 8.05x speedup
- ███▌
-
-
-• Dramatic improvements to text rendering speeds:
-
- xlib-rgba text_image_rgba_over-256 63.12 -> 9.61: 6.57x speedup
- ██▊
-
-• 3x improvements to floating-point to fixed-point conversion speeds:
-
- image-rgba pattern_create_radial-16 9.29 -> 3.44: 2.70x speedup
- â–‰
-
-• 2x improvements to linear gradient computation:
-
- image-rgb paint_linear_rgb_source-512 26.22 -> 11.61: 2.26x speedup
- â–‹
-
-• 2x improvement to a case common in PDF rendering:
-
- image-rgb unaligned_clip-100 0.10 -> 0.06: 1.81x speedup
- â–
-
-• 1.3x improvement to rectangle filling speed (note: this improvement
- is new since 1.3.16---previously this test case was a 1.3x slowdown
- compared to 1.2.6):
-
- image-rgba rectangles-512 6.19 -> 4.37: 1.42x speedup
- â–Ž
- xlib-rgba rectangles-512 7.48 -> 5.58: 1.34x speedup
- â–
-
-NOTE: In spite of our best efforts, there are some measurable
-performance regressions in 1.4 compared to 1.2. It appears that the
-primary problem is the increased overhead of the new tessellator when
-drawing many, very simple shapes. The following test cases capture
-some of that slowdown:
-
- image-rgba mosaic_tessellate_lines-800 11.03 -> 14.29: 1.30x slowdown
- â–
- image-rgba box-outline-fill-100 0.01 -> 0.01: 1.26x slowdown
- â–
- image-rgba fill_solid_rgb_over-64 0.20 -> 0.22: 1.12x slowdown
-
- image-rgba fill_image_rgba_over-64 0.23 -> 0.25: 1.10x slowdown
-
- xlib-rgb paint_image_rgba_source-256 3.24 -> 3.47: 1.07x slowdown
-
-We did put some special effort into eliminating this slowdown for the
-very common case of drawing axis-aligned rectangles with an identity
-matrix (see the box-outline-stroke and rectangles speedup numbers
-above). Eliminating the rest of this slowdown will be a worthwhile
-project going forward.
-
-Also note that the "box-outline-fill" case is a slowdown while
-"box-outline-stroke" is a (huge) speedup. These two test cases
-resulted from the fact that some GTK+ theme authors were filling
-between two rectangles to avoid slow performance from the more natural
-means of achieving the same shape by stroking a single rectangle. With
-1.4 that workaround should definitely be eliminated as it will now
-cause things to perform more slowly.
-
-Greatly improved PDF output
----------------------------
-We are very happy to be able to announce that cairo-generated PDF
-output will now have text that can be selected, cut-and-pasted, and
-searched with most capable PDF viewer applications. This is something
-that was not ever possible with cairo 1.2.
-
-Also, the PDF output now has much more compact encoding of text than
-before. Cairo is now much more careful to not embed multiple copies of
-the same font at different sizes. It also compresses text and font
-streams within the PDF output.
-
-API additions
--------------
-There are several new functions available in 1.4 that were not
-available in 1.2. Curiously, almost all of the new functions simply
-allow the user to query state that has been set in cairo (many new
-"get" functions) rather than providing any fundamentally new
-operations. The new functionality is:
-
-• Getting information about the current clip region
-
- cairo_clip_extents
- cairo_copy_clip_rectangle_list
- cairo_rectangle_list_destroy
-
-• Getting information about the current dash setting
-
- cairo_get_dash_count
- cairo_get_dash
-
-• Getting information from a pattern
-
- cairo_pattern_get_rgba
- cairo_pattern_get_surface
- cairo_pattern_get_color_stop_rgba
- cairo_pattern_get_color_stop_count
- cairo_pattern_get_linear_points
- cairo_pattern_get_radial_circles
-
-• Getting the current scaled font
-
- cairo_get_scaled_font
-
-• Getting reference counts
-
- cairo_get_reference_count
- cairo_surface_get_reference_count
- cairo_pattern_get_reference_count
- cairo_font_face_get_reference_count
- cairo_scaled_font_get_reference_count
-
-• Setting/getting user data on objects
-
- cairo_set_user_data
- cairo_get_user_data
- cairo_pattern_set_user_data
- cairo_pattern_get_user_data
- cairo_scaled_font_set_user_data
- cairo_scaled_font_get_user_data
-
-• New cairo-win32 functions:
-
- cairo_win32_surface_create_with_ddb
- cairo_win32_surface_get_image
- cairo_win32_scaled_font_get_logical_to_device
- cairo_win32_scaled_font_get_device_to_logical
-
-API deprecation
----------------
-The CAIRO_FORMAT_RGB16_565 enum value has been deprecated. It never
-worked as a format value for cairo_image_surface_create, and it wasn't
-necessary for supporting 16-bit 565 X server visuals.
-
-A sampling of bug fixes in cairo 1.4
-------------------------------------
- • Fixed radial gradients
- • Fixed dashing (degenerate and "leaky" cases)
- • Fixed transformed images in PDF/PS output (eliminate bogus repeating)
- • Eliminate errors from CAIRO_EXTEND_REFLECT and CAIRO_EXTEND_PAD
- • cairo_show_page no longer needed for single-page output
- • SVG: Fix bug preventing text from appearing in many viewers
- • cairo-ft: Return correct metrics when hinting is off
- • Eliminate crash in cairo_create_similar if nil surface is returned
- • Eliminate crash after INVALID_RESTORE error
- • Fix many bugs related to multi-threaded use and locking
- • Fix for glyph spacing 32 times larger than desired (cairo-win32)
- • Fixed several problems in cairo-atsui (assertion failures)
- • Fix PDF output to avoid problems when printing from Acrobat Reader
- • Fix segfault on Mac OS X (measuring a zero-length string)
- • Fix text extents to not include the size of non-inked characters
- • Fix for glyph cache race condition in glitz backend (Jinghua Luo)
- • Fix make check to work on OPD platforms (IA64 or PPC64)
- • Fix compilation problems of cairo "wideint" code on some platforms
- • Many, many others...
-
-Experimental backends (quartz, XCB, OS/2, BeOS, directfb)
----------------------------------------------------------
-None of cairo's experimental backends are graduating to "supported"
-status with 1.4.0, but two of them in particular (quartz and xcb), are
-very close.
-
-The quartz baceknd has been entirely rewritten and is now much more
-efficient. The XCB backend has been updated to track the latest XCB
-API (which recently had a 1.0 release).
-
-We hope to see these backends become supported in a future release,
-(once they are passing all the tests in cairo's test suite).
-
-The experimental OS/2 backend is new in cairo 1.4 compared to cairo
-1.2.
-
-Documentation improvements
---------------------------
-We have added documentation for several functions and types that
-were previously undocumented, and improved documentation on other
-ones. As of this release, there remain only two undocumented
-symbols: cairo_filter_t and cairo_operator_t.
-
-[*]Thanks to everyone
----------------------
-I've accounted for 41 distinct people with attributed code added to
-cairo between 1.2.6 and 1.4.0, (their names are below). That's an
-impressive number, but there are certainly dozens more that
-contributed with testing, suggestions, clarifying questions, and
-encouragement. I'm grateful for the friendships that have developed as
-we have worked on cairo together. Thanks to everyone for making this
-all so much fun!
-
-Adrian Johnson, Alfred Peng, Alp Toker, Behdad Esfahbod,
-Benjamin Otte, Brian Ewins, Carl Worth, Christian Biesinger,
-Christopher (Monty) Montgomery, Daniel Amelang, Dan Williams,
-Dave Yeo, David Turner, Emmanuel Pacaud, Eugeniy Meshcheryakov,
-Frederic Crozat, Hans Breuer, Ian Osgood, Jamey Sharp, Jeff Muizelaar,
-Jeff Smith, Jinghua Luo, Jonathan Watt, Joonas Pihlaja, Jorn Baayen,
-Kalle Vahlman, Kjartan Maraas, Kristian Høgsberg, M Joonas Pihlaja,
-Mathias Hasselmann, Mathieu Lacage, Michael Emmel, Nicholas Miell,
-Pavel Roskin, Peter Weilbacher, Robert O'Callahan,
-Soren Sandmann Pedersen, Stuart Parmenter, T Rowley,
-Vladimir Vukicevic
-
-Snapshot 1.3.16 (2007-03-02 Carl Worth <cworth@cworth.org>)
-===========================================================
-New API functions
------------------
-A few new public functions have been added to the cairo API since the
-1.3.14 snapshot. These include a function to query the current scaled
-font:
-
- cairo_get_scaled_font
-
-New functions to query the reference count of all cairo objects:
-
- cairo_get_reference_count
-
- cairo_surface_get_reference_count
- cairo_pattern_get_reference_count
-
- cairo_font_face_get_reference_count
- cairo_scaled_font_get_reference_count
-
-And new functions to allow the use of user_data with any cairo object,
-(previously these were only available on cairo_surface_t and
-cairo_font_face_t objects):
-
- cairo_set_user_data
- cairo_get_user_data
-
- cairo_pattern_set_user_data
- cairo_pattern_get_user_data
-
- cairo_scaled_font_set_user_data
- cairo_scaled_font_get_user_data
-
-Usability improvement for PDF/PS/SVG generation
------------------------------------------------
-In previous versions of cairo, generating single-page output with the
-cairo-pdf, cairo-ps, or cairo-svg backends required a final call to
-cairo_show_page. This was often quite confusing as people would port
-functional code from a non-paginated backend and be totally mystified
-as to why the output was blank until they learned to add this call.
-
-Now that call to cairo_show_page is optional, (it will be generated
-implicitly if the user does not call it). So cairo_show_page is only
-needed to explicitly separate multiple pages.
-
-Greatly improved PDF output
----------------------------
-We are very happy to be able to announce that cairo-generated PDF
-output will now have text that can be selected, cut-and-paste, and
-searched with most capable PDF viewer applications. This is something
-that was not ever possible with cairo 1.2.
-
-Also, the PDF output now has much more compact encoding of text than
-before. Cairo is now much more careful to not embed multiple copies of
-the same font at different sizes. It also compresses text and font
-streams within the PDF output.
-
-Major bug fixes
----------------
- • Fixed radial gradients
-
- The rendering of radial gradients has been greatly improved. In
- the cairo 1.2 series, there was a serious regression affecting
- radial gradients---results would be very incorrect unless one of
- the gradient circles had a radius of 0.0 and a center point within
- the other circle. These bugs have now been fixed.
-
- • Fixed dashing
-
- Several fixes have been made to the implementation of dashed
- stroking. Previously, some dashed, stroked rectangles would
- mis-render and fill half of the rectangle with a large triangular
- shape. This bug has now been fixed.
-
- • Fixed transformed images in PDF/PS output
-
- In previous versions of cairo, painting with an image-based source
- surface pattern to the PDF or PS backends would cause many kinds
- of incorrect results. One of the most common problems was that an
- image would be repeated many times even when the user had
- explicitly requested no repetition with CAIRO_EXTEND_NONE. These
- bugs have now been fixed.
-
- • Eliminate errors from CAIRO_EXTEND_REFLECT and CAIRO_EXTEND_PAD
-
- In the 1.2 version of cairo any use of CAIRO_EXTEND_REFLECT or
- CAIRO_EXTEND_PAD with a surface-based pattern resulted in an
- error, (cairo would stop rendering). This bug has now been
- fixed.
-
- Now, CAIRO_EXTEND_REFLECT should work properly with surface
- patterns.
-
- CAIRO_EXTEND_PAD is still not working correctly, but it will now
- simply behave as CAIRO_EXTEND_NONE rather than triggering the
- error.
-
-New rewrite of quartz backend (still experimental)
---------------------------------------------------
-Cairo's quartz backend has been entirely rewritten and is now much
-more efficient. This backend is still marked as experimental, not
-supported, but it is now much closer to becoming an officially
-supported backend. (For people that used the experimental nquartz
-backend in previous snapshots, that implementation has now been
-renamed from "nquartz" to "quartz" and has replaced the old quartz
-backend.)
-
-Documentation improvements
---------------------------
-We have added documentation for several functions and types that
-were previously undocumented, and improved documentation on other
-ones. As of this release, there remain only two undocumented
-symbols: cairo_filter_t and cairo_operator_t.
-
-Other bug fixes
----------------
- • cairo-svg: Fix bug that was preventing text from appearing in many
- viewers
-
- • cairo-ft: Return correct metrics when hinting is off
-
- • Cairo 1.3.14 deadlocks in cairo_scaled_font_glyph_extents or
- _cairo_ft_unscaled_font_lock_face
-
- https://bugs.freedesktop.org/show_bug.cgi?id=10035
-
- • cairo crashes in cairo_create_similar if nil surface returned by
- other->backend->create_similar
-
- https://bugs.freedesktop.org/show_bug.cgi?id=9844
-
- • evolution crash in _cairo_gstate_backend_to_user()
- https://bugs.freedesktop.org/show_bug.cgi?id=9906
-
- • Fix memory leak in rectilinear stroking code
-
-Things not in this release
---------------------------
- • Solid-surface-pattern cache: This patch had been applied during
- the 1.3.x series, but it was reverted due to some inter-thread
- problems it caused. The patch is interesting since it made a big
- benefit for text rendering performance---so we'll work to bring a
- corrected version of this patch back as soon as possible.
-
-Snapshot 1.3.14 (2006-02-13 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the seventh development snapshot in the 1.3 series, (and there
-likely won't be many more before the 1.4.0 release). It comes just
-over 3 weeks after the 1.3.12 snapshot.
-
-Since we're so close to the 1.4.0 release, there are not a lot of new
-features nor even a lot of new performance improvements in this
-snapshot. Instead, there are a great number of bug fixes. Some are
-long-standing bugs that we're glad to say goodbye to, and several are
-fixes for regressions that were introduced as part of the optimization
-efforts during the 1.3.x series.
-
-PDF text selection fixed
-------------------------
-The inability to correctly select text in cairo-generated PDF has been
-a defect ever since the initial support for the PDF backend in the
-cairo 1.2.0 release. With the 1.3.14 snapshot, in most situations, and
-with most PDF viewer applications, the PDF generated by cairo will
-allow text to be correctly selected for copy-and-paste, (as well as
-searching).
-
-We're very excited about this new functionality, (and very grateful to
-Adrian Johnson, Behdad Esfahbod, and others that have put a lot of
-work into this lately). Please test this new ability and give feedback
-on the cairo@cairographics.org list.
-
-Many thread-safety issues fixed
--------------------------------
-We've discovered that no release of cairo has ever provided safe text
-rendering from a multi-threaded application. With the 1.3.14 snapshot
-a huge number of the bugs in this area have been fixed, and multiple
-application dvelopers have now reported success at writing
-multi-threaded applications with cairo.
-
-Other fixes
------------
-Fixed a bug that was causing glyph spacing to be 32 times larger than
-desired when using cairo-win32.
-
-Fixed a regression in the rendering of linear gradients that had been
-present since the 1.3.8 snapshot.
-
-Fixed several problems in cairo-atsui that were leading to assertion
-failures when rendering text.
-
-Fix corrupted results when rendering a transformed source image
-surface to an xlib surface. This was a regression that had been
-present since the 1.3.2 snapshot.
-
-Fixed PDF output to prevent problems printing from some versions of
-Acrobat Reader, (a single glyph was being substituted for every
-glyph).
-
-And many other fixes as well, (see the logs for details).
-
-Snapshot 1.3.12 (2007-01-20 Carl Worth <cworth@cworth.org>)
-===========================================================
-The relentless march toward the cairo 1.4 release continues, (even if
-slightly late out of the starting blocks in 2007). This is the sixth
-development snapshot in the 1.3 series. It comes 4 weeks after the
-1.3.10 snapshot.
-
-Performance
------------
-As usual, this snapshot has some fun performance improvements to show
-off:
-
-image-rgba long-lines-uncropped-100 470.08 -> 4.95: 94.91x speedup
-███████████████████████████████████████████████
-image-rgb long-lines-uncropped-100 461.60 -> 4.96: 93.02x speedup
-██████████████████████████████████████████████
-
-This 100x improvement, (and yes, that's 100x, not 100%), in the image
-backend occurs when drawing large shapes where only a fraction of the
-shape actually appears in the final result, (the rest being outside
-the bounds of the destination surface). Many applications should see
-speedups here, and the actual amount of speedup depends on the ratio
-of non-visible to visible portions of geometry.
-
-[Note: There remains a similar performance bug when drawing mostly
-non-visible objects with the xlib backend. This is due to a similar
-bug in the X server itself, but we hope a future cairo snapshot will
-workaround that bug to get a similar speedup with the xlib backend.]
-
-image-rgba unaligned_clip-100 0.09 -> 0.06: 1.67x speedup
-â–
-image-rgb unaligned_clip-100 0.09 -> 0.06: 1.66x speedup
-â–
-
-This speedup is due to further MMX optimization by Soeren Sandmann for
-a case commonly hit when rendering PDF files, (and thanks to Jeff
-Muizelaar for writing code to extract the test case for us).
-
-There's another MMX optimization in this snapshot (without a fancy
-speedup chart) by Dan Williams which improves compositing performance
-specifically for the OLPC machine.
-
-Thanks to Adrian Johnson, cairo's PDF output is now much more
-efficient in the way it encodes text output. By reducing redundant
-information and adding compression to text output streams, Adrian
-achieved a ~25x improvement in the efficiency of encoding text in PDF
-files, (was ~45 bytes per glyph and is now ~1.6 bytes per glyph).
-
-Bug fixes
----------
-In addition to those performance improvements, this snapshot includes
-several bug fixes:
-
- * A huge number of bug fixes for cairo-atsui text rendering, (for mac
- OS X). These bugs affect font selection, glyph positioning, glyph
- rendering, etc. One noteworthy bug fixes is that
- cairo_select_font_face will no longer arbitrarily select bold nor
- italic when not requested, (at least not when using a standard CSS2
- font family name such as "serif", "sans-serif", "monospace", etc.).
- All these fixes are thanks to Brian Ewins who continues to do a
- great job as the new cairo-atsui maintainer.
-
- * Fix PDF output so that images that are scaled down no longer
- mysteriously repeat (Carl Worth).
-
- * Fix segfault on Mac OS X dues to attempt to measure extents of a
- zero-length string (Behdad Esfahbod).
-
- * Fix text extents to not include the size of initial/trailing
- non-inked characters (Behdad Esfahbod).
-
-API tweaks
-----------
-Three functions have had API changes to improve consistency. Note that
-the API functions being changed here are all functions that were
-introduced as new functions during these 1.3.x snapshots. As always,
-there will not be any API changes to functions included in a major
-release (1.2.x, 1.4.x, etc.) of cairo.
-
-The changes are as follows:
-
- * Rename of cairo_copy_clip_rectangles to cairo_copy_clip_rectangle_list.
-
- * Change cairo_get_dash_count to return an int rather than accepting a
- pointer to an int for the return value.
-
- * Change cairo_get_dash to have a void return type rather than
- returning cairo_status_t.
-
-It's possible there will be one more round of changes to these
-functions, (and perhaps cairo_get_color_stop as well), as we seek to
-establish a unifying convention for returning lists of values.
-
-Snapshot 1.3.10 (2006-12-23 Carl Worth <cworth@cworth.org>)
-===========================================================
-Santa Claus is coming just a little bit early this year, and he's
-bringing a shiny new cairo snapshot for all the good little boys and
-girls to play with.
-
-This is the fifth development snapshot in the 1.3 series. It comes 9
-days after the 1.3.8 snapshot, and still well within our goal of
-having a new snapshot every week, (though don't expect one next
-week---we'll all be too stuffed with sugar plums).
-
-Speaking of sugar plums, there's a sweet treat waiting in this cairo
-snapshot---greatly improved performance for stroking rectilinear
-shapes, like the ever common rectangle:
-
-image-rgb box-outline-stroke-100 0.18 -> 0.01: 25.58x speedup
-████████████████████████▋
-image-rgba box-outline-stroke-100 0.18 -> 0.01: 25.57x speedup
-████████████████████████▋
-xlib-rgb box-outline-stroke-100 0.49 -> 0.06: 8.67x speedup
-███████▋
-xlib-rgba box-outline-stroke-100 0.22 -> 0.04: 5.39x speedup
-████â–
-
-In past releases of cairo, some people had noticed that using
-cairo_stroke to draw rectilinear shapes could be awfully slow. Many
-people had worked around this by using cairo_fill with a more complex
-path and gotten a 5-15x performance benefit from that.
-
-If you're one of those people, please rip that workaround out, as now
-the more natural use of cairo_stroke should be 1.2-2x faster than the
-unnatural use of cairo_fill.
-
-And if you hadn't ever implemented that workaround, then you just
-might get to see your stroked rectangles now get drawn 5-25x faster.
-
-Beyond that performance fix, there are a handful of bug fixes in this
-snapshot:
-
- * Fix for glyph cache race condition in glitz backend (Jinghua Luo)
-
- * Many fixes for ATSUI text rendering (Brian Ewins)
-
- * Un-break recent optimization-triggered regression in rendering text
- with a translation in the font matrix (Behdad Esfahbod)
-
- * Fix make check to work on OPD platforms (IA64 or PPC64)
- (Frederic Crozat)
-
- * Fix a couple of character spacing issues on Windows
- (Jonathan Watt)
-
-Have fun with that, everybody, and we'll be back for more in the new
-year, (with a plan to add the last of our performance improvements in
-this round, fix a few bad, lingering bugs, and then finish off a nice,
-stable 1.4 release before the end of January).
-
--Carl
-
-Snapshot 1.3.8 (2006-12-14 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the fourth development snapshot in the 1.3 series. It comes
-just slightly more than one week after the 1.3.6 snapshot.
-
-After the bug fixes in 1.3.6, we're back to our original program of
-weekly snapshots, each one faster than the one from the week
-before. Cairo 1.3.8 brings a 2x improvement in the speed of rendering
-linear gradients (thanks to David Turner), and a significant reduction
-in X traffic when rendering text (thanks to Xan Lopez and Behdad
-Esfahbod), making cairo behave very much like Xft does.
-
-A few other things in the 1.3.8 snapshot worth noting include a more
-forgiving image comparator in the test suite, (using the "perceptual
-diff" metric and GPL implementation by Hector Yee[*]), a bug fix for
-broken linking on x86_64 (thanks to M Joonas Pihlaja) and an even
-better implementation of _cairo_lround, (not faster, but supporting a
-more complete input range), from Daniel Amelang.
-
-[*] http://pdiff.sourceforge.net/
-
-Snapshot 1.3.6 (2006-12-06 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the third development snapshot in the 1.3 series. It comes two
-weeks after the 1.3.4 snapshot.
-
-We don't have fancy performance charts this week as the primary
-changes in this snapshot are bug fixes. The performance work continues
-and the next snapshot (planned for one week from today) should include
-several improvements. The bug fixes in this snapshot include:
-
- * Fix undesirable rounding in glyph positioning (Dan Amelang)
-
- This bug was noticed by several users, most commonly by seeing
- improper text spacing or scrambled glyphs as drawn by nautilus. For
- example:
-
- Update to cairo-1.3.4 worsen font rendering
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217819
-
- * Fix reduced range of valid input coordinates to tessellator
- (M Joonas Pihlaja)
-
- This bug was causing lots of assertion failures in mozilla as
- mentioned here:
-
- CAIRO_BO_GUARD_BITS and coordinate space?
- http://lists.freedesktop.org/archives/cairo/2006-December/008743.html
-
- * Fix several regressions in new tessellator (M Joonas Pihlaja)
-
- Joonas just had a good eye for detail here. I don't think any
- external cairo users had noticed any of these bugs yet.
-
- * Fix compilation problems of cairo "wideint" code on some platforms
- (Mathieu Lacage)
-
- * Fix failed configure due to broken grep (Dan Amelang)
-
- This bug was reported here:
-
- AX_C_FLOAT_WORDS_BIGENDIAN doesn't work because grep doesn't
- work with binary file
- https://bugs.freedesktop.org/show_bug.cgi?id=9124
-
- * Remove the pkg-config minimum version requirement (Behdad Esfahbod)
-
- Some systems ship with pkg-config 0.15 and there was really no good
- reason for cairo to insist on having version 0.19 before it would
- build.
-
-There is also one new (but inert) feature in this snapshot. There's a
-new option that can be passed to cairo's configure script:
-
- --disable-some-floating-point
-
- Disable certain code paths that rely heavily on double precision
- floating-point calculation. This option can improve
- performance on systems without a double precision floating-point
- unit, but might degrade performance on those that do.
-
-As of this snapshot, this option does not make any change to cairo,
-but it is possible that future versions of cairo will respect this
-option and change the implementation of various functions as
-appropriate.
-
-Snapshot 1.3.4 (2006-11-22 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the second development snapshot in the 1.3 series. It comes
-one week after the 1.3.2 snapshot.
-
-This snapshot has a couple of significant performance improvements,
-and also adds new support for producing multi-page SVG output, (when
-targeting SVG 1.2)---thanks to Emmanuel Pacaud. The details of the
-performance improvements are as follows:
-
-1. The long-awaited "new tessellator".
-
- The credit for this being an improvement goes to Joonas Pihlaja. He
- took my really slow code and really put it through its paces to get
- the dramatic performance improvement seen below (up to 38x faster
- on realistic cases, and more than 10x faster for the zrusin_another
- test).
-
- His own writeup of the work he did is quite thorough, but more than
- can be quoted here. Please see his post for the interesting details:
-
- http://lists.freedesktop.org/archives/cairo/2006-November/008483.html
-
- (Though note that this snapshot also includes some additional,
- significant improvements that were only sketched out in that
- email---see "Generating fewer trapezoids").
-
-2. More floating-point improvements
-
- Daniel Amelang continues to work the magic he began in the 1.3.2
- snapshot. This time he short-circuits floating-point
- transformations by identity matrices and applies the earlier
- floating-to-fixed-point technique to the problem of rounding.
-
- The improvements here will primarily benefit text performance, and
- will benefit platforms without hardware floating-point more than
- those that have it, (some text tests show 20% improvement on an x86
- machine and closer to 80% improvement on arm).
-
-The performance chart comparing 1.3.2 to 1.3.4 really speaks for
-itself, (this is on an x86 laptop). This is quite a lot of progress
-for one week:
-
- xlib-rgb stroke_similar_rgba_over-256 74.99 1.45% -> 2.03 68.38%: 36.86x speedup
-███████████████████████████████████▉
- xlib-rgb stroke_similar_rgba_source-256 78.23 1.43% -> 3.30 67.05%: 23.71x speedup
-██████████████████████▊
- xlib-rgba tessellate-256-100 820.42 0.15% -> 35.06 2.84%: 23.40x speedup
-██████████████████████â–
-image-rgba tessellate-256-100 819.55 0.32% -> 35.04 3.56%: 23.39x speedup
-██████████████████████â–
- xlib-rgb stroke_image_rgba_over-256 78.10 1.43% -> 4.33 65.56%: 18.04x speedup
-█████████████████
- xlib-rgb stroke_image_rgba_source-256 80.11 1.63% -> 5.75 63.99%: 13.94x speedup
-█████████████
- xlib-rgba zrusin_another_tessellate-415 89.22 0.35% -> 8.38 5.23%: 10.65x speedup
-█████████▋
-image-rgba zrusin_another_tessellate-415 87.38 0.89% -> 8.37 5.22%: 10.44x speedup
-█████████â–
-image-rgba zrusin_another_fill-415 117.67 1.34% -> 12.88 2.77%: 9.14x speedup
-████████â–
- xlib-rgba zrusin_another_fill-415 140.52 1.57% -> 15.79 2.88%: 8.90x speedup
-███████▉
-image-rgba tessellate-64-100 9.68 3.42% -> 1.42 0.60%: 6.82x speedup
-█████▉
- xlib-rgba tessellate-64-100 9.78 4.35% -> 1.45 0.83%: 6.72x speedup
-█████▊
- xlib-rgb stroke_linear_rgba_over-256 46.01 2.44% -> 7.74 54.51%: 5.94x speedup
-█████
- xlib-rgb stroke_linear_rgba_source-256 48.09 2.15% -> 9.14 53.00%: 5.26x speedup
-████▎
- xlib-rgb stroke_radial_rgba_over-256 50.96 2.34% -> 12.46 47.99%: 4.09x speedup
-███â–
- xlib-rgb stroke_radial_rgba_source-256 53.06 1.57% -> 13.96 46.57%: 3.80x speedup
-██▊
-image-rgba paint_similar_rgba_source-256 0.12 1.57% -> 0.08 9.92%: 1.42x speedup
-â–
-image-rgba paint_image_rgba_source-256 0.12 2.49% -> 0.08 10.70%: 1.41x speedup
-â–
-image-rgba world_map-800 356.28 0.46% -> 275.72 1.15%: 1.29x speedup
-â–Ž
- xlib-rgba world_map-800 456.81 0.39% -> 357.95 1.39%: 1.28x speedup
-â–Ž
-image-rgb tessellate-16-100 0.09 0.57% -> 0.07 3.43%: 1.23x speedup
-â–Ž
-image-rgba tessellate-16-100 0.09 0.06% -> 0.07 2.46%: 1.23x speedup
-â–Ž
-image-rgba text_solid_rgb_over-256 5.39 4.01% -> 4.47 0.70%: 1.21x speedup
-â–Ž
-image-rgba text_solid_rgba_over-256 5.37 0.82% -> 4.45 0.75%: 1.21x speedup
-â–Ž
-image-rgba text_image_rgb_over-64 0.78 0.10% -> 0.65 0.74%: 1.20x speedup
-â–Ž
-image-rgba text_image_rgba_over-64 0.78 0.29% -> 0.65 0.68%: 1.19x speedup
-â–Ž
-image-rgb text_solid_rgb_over-64 0.76 2.45% -> 0.63 0.81%: 1.19x speedup
-â–Ž
-image-rgba text_solid_rgba_over-64 0.76 0.33% -> 0.64 0.66%: 1.19x speedup
-â–Ž
-image-rgba text_similar_rgba_over-256 5.99 4.72% -> 5.04 1.09%: 1.19x speedup
-â–Ž
-
-We should point out that there is some potential for slowdown in this
-snapshot. The following are the worst slowdowns reported by the cairo
-performance suite when comparing 1.3.2 to 1.3.4:
-
-image-rgba subimage_copy-256 0.01 0.87% -> 0.01 3.61%: 1.45x slowdown
-▌
- xlib-rgb paint_solid_rgb_over-256 0.31 10.23% -> 0.38 0.33%: 1.26x slowdown
-â–Ž
-image-rgba box-outline-fill-100 0.01 0.30% -> 0.01 2.52%: 1.21x slowdown
-â–Ž
-image-rgba fill_solid_rgb_over-64 0.20 1.22% -> 0.22 1.59%: 1.12x slowdown
-â–
-image-rgb fill_similar_rgb_over-64 0.21 1.04% -> 0.24 1.06%: 1.11x slowdown
-â–
-image-rgba fill_image_rgb_over-64 0.21 1.19% -> 0.24 0.72%: 1.11x slowdown
-â–
-image-rgba fill_similar_rgb_over-64 0.21 0.18% -> 0.24 0.30%: 1.11x slowdown
-â–
-image-rgb fill_solid_rgba_over-64 0.22 1.66% -> 0.24 1.15%: 1.11x slowdown
-â–
-image-rgb fill_image_rgb_over-64 0.21 0.14% -> 0.24 0.80%: 1.11x slowdown
-â–
-image-rgba fill_image_rgba_over-64 0.22 1.34% -> 0.25 0.20%: 1.11x slowdown
-â–
-image-rgba fill_solid_rgba_over-64 0.22 1.48% -> 0.24 0.95%: 1.11x slowdown
-â–
-image-rgb fill_similar_rgba_over-64 0.22 1.13% -> 0.25 1.25%: 1.10x slowdown
-â–
-
-The 45% slowdown for subimage_copy is an extreme case. It's unlikely
-to hit many applications unless they often use cairo_rectangle;
-cairo_fill to copy a single pixel at a time. In any case, it shows a
-worst-case impact of the overhead of the new tessellator. The other
-slowdowns (~ 10%) are probably more realistic, and still very
-concerning.
-
-We will work to ensure that performance regressions like these are not
-present from one major release of cairo to the next, (for example,
-from 1.2 to 1.4).
-
-But we're putting this 1.3.4 snapshot out there now, even with this
-potential slowdown so that people can experiment with it. If you've
-got complex geometry, we hope you will see some benefit from the new
-tessellator. If you've got primarily simple geometry, we hope things
-won't slowdown too much, but please let us know what slowdown you see,
-if any, so we can calibrate our performance suite against real-world
-impacts.
-
-Thanks, and have fun with cairo!
-
-Snapshot 1.3.2 (2006-11-14 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the first development snapshot since the 1.2 stable series
-branched off shortly after the 1.2.4 release in August 2006.
-
-This snapshot includes all the bug fixes from the 1.2.6 release,
-(since they originated here on the 1.3 branch first and were
-cherry-picked over to 1.2). But more importantly, it contains some new
-API in preparation for a future 1.4 release, and most importantly, it
-contains several performance improvements.
-
-The bug fixes will not be reviewed here, as most of them are already
-described in the 1.2.6 release notes. But details for the new API and
-some performance improvements are included here.
-
-As with all snapshots, this is experimental code, and the new API
-added here is still experimental and is not guaranteed to appear
-unchanged in any future release of cairo.
-
-API additions
--------------
-Several new API additions are available in this release. There is a
-common theme among all the additions in that they allow cairo to
-advertise information about its state that it was refusing to
-volunteer earlier. So this isn't groundbreaking new functionality, but
-it is essential for easily achieving several tasks.
-
-The new functions can be divided into three categories:
-
- Getting information about the current clip region
- -------------------------------------------------
- cairo_clip_extents
- cairo_copy_clip_rectangles
- cairo_rectangle_list_destroy
-
- Getting information about the current dash setting
- --------------------------------------------------
- cairo_get_dash_count
- cairo_get_dash
-
- Getting information from a pattern
- ----------------------------------
- cairo_pattern_get_rgba
- cairo_pattern_get_surface
- cairo_pattern_get_color_stop_rgba
- cairo_pattern_get_color_stop_count
- cairo_pattern_get_linear_points
- cairo_pattern_get_radial_circles
-
-In each of these areas, we have new API for providing a list of
-uniform values from cairo. The closest thing we had to this before was
-cairo_copy_path, (which is rather unique in providing a list of
-non-uniform data).
-
-The copy_clip_rectangles/rectangle_list_destroy functions follow a
-style similar to that of cairo_copy_path. Meanwhile, the dash and
-pattern color stop functions introduce a new style in which there is a
-single call to return the number of elements available (get_dash_count
-and get_color_stop_count) and then a function to be called once to get
-each element (get_dash and get_color_stop_rgba).
-
-I'm interested in hearing feedback from users of these new API
-functions, particularly from people writing language bindings. One
-open question is whether the clip "getter" functionality should adopt
-a style similar to that of the new dash and color_stop interfaces.
-
-API deprecation
----------------
-The CAIRO_FORMAT_RGB16_565 enum value has been deprecated. It never
-worked as a format value for cairo_image_surface_create, and it wasn't
-necessary for supporting 16-bit 565 X server visuals.
-
-XCB backend changes
--------------------
-The XCB backend has been updated to track the latest XCB API (which
-recently had a 1.0 release).
-
-New quartz backend
-------------------
-Vladimir Vukicevic has written a new "native quartz" backend which
-will eventually replace the current "image-surface wrapping" quartz
-backend. For now, both backends are available, (the old one is
-"quartz" and the new one is "nquartz"). But it is anticipated that the
-new backend will replace the old one and take on the "quartz" name
-before this backend is marked as supported in a release of cairo.
-
-New OS/2 backend
-----------------
-Doodle and Peter Weilbacher have contributed a new, experimental
-backend for using cairo on OS/2 systems.
-
-Performance improvements
-------------------------
-Here are some highlights from cairo's performance suite showing
-improvements from cairo 1.2.6 to cairo 1.3.2. The command used to
-generate this data is:
-
- ./cairo-perf-diff 1.2.6 HEAD
-
-available in the perf/ directory of a recent checkout of cairo's
-source, (the cairo-perf-diff script does require a git checkout and
-will not work from a tar file---though ./cairo-perf can still be used
-to generate a single report there and ./cairo-perf-diff-files can be
-used to compare two reports).
-
-Results are described below both for an x86 laptop (with an old Radeon
-video card, recent X.org build, XAA, free software drivers), as well
-as for a Nokia 770. First the x86 results with comments on each, (all
-times are reported in milliseconds).
-
-Copying subsets of an image surface to an xlib surface (much faster)
---------------------------------------------------------------------
- xlib-rgba subimage_copy-512 10.50 -> : 53.97x speedup
-█████████████████████████████████████████████████████
-
-Thanks to Christopher (Monty) Montgomery for this big performance
-improvement. Any application which has a large image surface and is
-copying small pieces of it at a time to an xlib surface, (imagine an
-application that loads a single image containing all the "sprites" for
-that application), will benefit from this fix. The larger the ratio of
-the image surface to the portion being copied, the larger the benefit.
-
-Floating-point conversion (3x faster)
--------------------------------------
- xlib-rgba pattern_create_radial-16 27.75 -> 3.93 : 2.94x speedup
-██
-image-rgb pattern_create_radial-16 26.06 -> 3.74 : 2.90x speedup
-█▉
-
-Thanks to Daniel Amelang, (and others who had contributed the idea
-earlier), for this nice improvement in the speed of converting
-floating-point values to fixed-point.
-
-Text rendering (1.3 - 2x faster)
-------------------------------
- xlib-rgba text_image_rgba_source-256 319.73 -> 62.40 : 2.13x speedup
-â–ˆâ–
-image-rgb text_solid_rgba_over-64 2.85 -> 0.88 : 1.35x speedup
-â–
-
-I don't think we've ever set out to improve text performance
-specifically, but we did it a bit anyway. I believe the extra
-improvement in the xlib backend is due to Monty's image copying fix
-above, and the rest is due to the floating-point conversion speedup.
-
-Thin stroke improvements (1.5x faster)
----------------------------------------------
-image-rgb world_map-800 1641.09 -> 414.77 : 1.65x speedup
-â–‹
- xlib-rgba world_map-800 1939.66 -> 529.94 : 1.52x speedup
-▌
-
-The most modest stuff to announce in this release is the 50%
-improvement I made in the world_map case. This is in improvement that
-should help basically anything that is doing strokes with many
-straight line segments, (and the thinner the better, since that makes
-tessellation dominate rasterization). The fixes here are to use a
-custom quadrilateral tessellator rather than the generic tessellator
-for straight line segments and the miter joins.
-
-Performance results from the Nokia 770
---------------------------------------
- xlib-rgba subimage_copy-512 55.88 -> 2.04 : 27.34x speedup
-██████████████████████████â–
- xlib-rgb text_image_rgb_over-256 1487.58 -> 294.43 : 5.05x speedup
-████
-image-rgb pattern_create_radial-16 187.13 -> 91.86 : 2.04x speedup
-â–ˆ
- xlib-rgba world_map-800 21261.41 -> 15628.02 : 1.36x speedup
-â–
-
-Here we see that the subimage_copy improvement was only about half as
-large as the corresponding improvement on my laptop, (27x faster
-compared to 54x) and the floating-point conversion fix also was quite
-as significant, (2x compared to 3x). Oddly the improvement to text
-rendering performance was more than twice as good (5x compared to
-2x). I don't know what the reason for that is, but I don't think it's
-anything anybody should complain about.
-
-Release 1.2.6 (2006-11-02 Behdad Esfahbod <behdad@behdad.org>)
-==============================================================
-This is the third bug fix release in the 1.2 series, coming less than
-two months after the 1.2.4 release made on August 18.
-
-The 1.2.4 release turned out to be a pretty solid one, except for a crasher
-bug when forwarding an X connection where the client and the server have
-varying byte orders, eg. from a PPC to an i686. Other than that, various
-other small bugs have been fixed.
-
-Various improvements have been made in the testing infrastructure to prevent
-false positives, and to make sure the generated cairo shared object behaves as
-expected in terms of exported symbols and relocations.
-
-There were a total of 89 changes since 1.2.4. The following list the most
-important ones:
-
-Common fixes
-------------
-- Avoid unsigned loop control variable to eliminate infinite,
- memory-scribbling loop. (#7593)
-- Fix cairo_image_surface_create to report INVALID_FORMAT errors.
- Previously the detected error was being lost and a nil surface was
- returned that erroneously reported CAIRO_STATUS_NO_MEMORY.
-- Change _cairo_color_compute_shorts to not rely on any particular
- floating-point epsilon value. (#7497)
-- Fix infinite-join test case (bug #8379)
-- Pass correct surface to create_similar in _cairo_clip_init_deep_copy().
-
-PS/PDF fixes
-------------
-- Fix Type 1 embedding in PDF.
-- Correct the value of /LastChar in the PDF Type 1 font dictionary.
-- Improve error checking in TrueType subsetting.
-- Compute right index when looking up left side bearing. (bug #8180)
-- Correct an unsigned to signed conversion problem in truetype subsetting
- bbox.
-- Type1 subsetting: Don't put .notdef in Encoding when there are 256 glyphs.
-- Add cairo version to PS header / PDF document info dictionary.
-- Set CTM before path construction.
-
-Win32 fixes
------------
-- Get correct unhinted outlines on win32. (bug 7603)
-- Make cairo as a win32 static library possible.
-- Use CAIRO_FORMAT_RGB24 for BITSPIXEL==32 surfaces too.
-
-Build system fixes
-------------------
-- Define WINVER if it's not defined. (bug 6456)
-- Fix the AMD64 final link by removing SLIM from pixman.
-- Misc win32 compilation fixes.
-- Add Sun Pro C definition of pixman_private.
-- Use pixman_private consistently as prefix not suffix.
-- Added three tests check-plt.sh, check-def.sh, and check-header.sh that check
- that the shared object, the .def file, and the public headers agree about
- the exported symbols.
-- Require pkg-config 0.19. (#8686)
-
-
-Release 1.2.4 (2006-08-18 Carl Worth <cworth@cworth.org>)
-=========================================================
-This is the second bug fix release in the 1.2 series, coming less than
-two weeks after the 1.2.2 release made on August 8.
-
-The big motivation for a quick release was that there were a log of
-build system snags that people ran into with the 1.2.2 release. But,
-by the time we got those all done, we found that we had a bunch of
-fixes for cairo's rendering as well. So there's a lot of goodness in
-here for such a short time period.
-
-Rendering fixes
----------------
-Fix image surfaces to not be clipped when used as a source (Vladimir Vukicevic)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=72e25648c4c4bc82ddd938aa4e05887a293f0d8b
-
-Fix a couple of corner cases in dashing degenerate paths (Jeff Muizelaar)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=fbb1758ba8384650157b2bbbc93d161b0c2a05f0
-
-Fix support for type1 fonts on win32 (Adrian Johnson)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=da1019c9138695cb838a54f8b871bbfd0e8996d7
-
-Fix assertion failure when rotating bitmap fonts (Carl Worth)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=0bfa6d4f33b8ddb5dc55bbe419c15df4af856ff9
-
-Fix assertion failure when calling cairo_text_path with bitmap fonts (Carl Worth)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=9878a033531e6b96b5f27e69e10e90dee7440cd9
-
-Fix mis-handling of cairo_close_path in some situations (Tim Rowley, Carl Worth)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=53f74e59faf1af78f2f0741ccf1f23aa5dad4efc
-
-Respect font_matrix translation in _cairo_gstate_glyph_path (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=f183b835b111d23e838889178aa8106ec84663b3
-
-Fix vertical metrics adjustment to work with non-identity shapes (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=b7bc263842a798d657a95e539e1693372448837f
-
-[PS] Set correct ImageMatrix in _cairo_ps_surface_emit_bitmap_glyph_data (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=d47388ad759b0a1a0869655a87d9b5eb6ae2445d
-
-Build system fixes
-------------------
-Fix xlib detection to prefer pkg-config to avoid false libXt dependency (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=0e78e7144353703cbd28aae6a67cd9ca261f1d68
-
-Fix typos causing win32 build problem with PS,PDF, and SVG backends (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=aea83b908d020e26732753830bb3056e6702a774
-
-Fix configure cache to not use stale results (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=6d0e3260444a2d5b6fb0cb223ac79f1c0e7b3a6e
-
-Fix to not pass unsupported warning options to the compiler (Jens Granseuer)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=97524a8fdb899de1ae4a3e920fb7bda6d76c5571
-
-Fix to allow env. variables such as png_REQUIRES to override configure detection (Jens Granseuer)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=abd16e47d6331bd3811c908e524b4dcb6bd23bf0
-
-Fix test suite to not use an old system cairo when converting svg2png (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=6122cc85c8f71b1ba2df3ab86907768edebe1781
-
-Fix test suite to not require signal.h to be present (Behdad Esfahbod)
-http://gitweb.freedesktop.org/?p=cairo;a=commit;h=6f8cf53b1e1ccdbe1ab6a275656b19c6e5120e40
-
-Code cleanups
--------------
-Many useful warnings cleanups from sparse, valgrind, and careful eyes
-(Kjartan Maraas, Pavel Roskin)
-
-Release 1.2.2 (2006-08-08 Carl Worth <cworth@cworth.org>)
-=========================================================
-This is the first bug fix release in the 1.2 series since the original
-1.2.0 release made six weeks ago.
-
-There were some very serious bugs in the 1.2.0 release, (see below),
-so everybody is encouraged to upgrade from 1.2.0 to 1.2.2. The 1.2.2
-release maintains source and binary compatibility with 1.2.0 and does
-not make any API additions.
-
-Fix crashes with BGR X servers
-------------------------------
-With cairo 1.2.0 many people reported problems with all cairo-using
-programs, (including all GTK+ programs with GTK+ >= 2.8) immediately
-crashing with a complaint about an unsupported image format. This bug
-affected X servers that do not provide the Render extension and that
-provide a visual with BGR rather than RGB channel order.
-
-report: https://bugs.freedesktop.org/show_bug.cgi?id=7294
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=9ae66174e774b57f16ad791452ed44efc2770a59
-
-Fix the "disappearing text" bug
--------------------------------
-With cairo 1.2.0 many people reported that text would disappear from
-applications, sometimes reappearing with mouse motion or
-selection. The text would disappear after the first space in a string
-of text. This bug was caused by an underlying bug in (very common) X
-servers, and only affected text rendered without antialiasing, (either
-a bitmap font or a vector font with antialiasing disabled). The bug
-was also exacerbated by a KDE migration bug that caused antialiasing
-to be disabled more than desired.
-
-report: https://bugs.freedesktop.org/show_bug.cgi?id=7494
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=456cdb3058f3b416109a9600167cd8842300ae14
-see also:
-Xorg: https://bugs.freedesktop.org/show_bug.cgi?id=7681
-KDE: http://qa.mandriva.com/show_bug.cgi?id=23990
-
-Fix broken image fallback scaling (aka. "broken printing")
-----------------------------------------------------------
-The various "print" backends, (pdf, ps, and svg), sometimes fallback
-to using image-based rendering for some operations. In cairo 1.2.0
-these image fallbacks were scaled improperly. Applications using cairo
-can influence the resolution of the image fallbacks with
-cairo_surface_set_fallback_resolution. With the bug, any value other
-than 72.0 would lead to incorrect results, (larger values would lead
-to increasingly shrunken output).
-
-report: https://bugs.freedesktop.org/show_bug.cgi?id=7533
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=1feb4291cf7813494355459bb547eec604c54ffb
-
-Fix inadvertent semantic change of font matrix translation (Behdad Esfahbod)
-----------------------------------------------------------------------------
-The 1.2.0 release introduced an inadvertent change to how the
-translation components of a font matrix are interpreted. In the 1.0
-series, font matrix translation could be used to offset the glyph
-origin, (though glyph metrics were reported incorrectly in
-1.0). However in 1.2.0, the translation was applied to the advance
-values between each glyph. The 1.2.0 behavior is fairly useless in
-practice, and it was not intentional to introduce a semantic
-change. With 1.2.2 we return to the 1.0 semantics, with a much better
-implementation that provides correct glyph metrics.
-
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=84840e6bba6e72aa88fad7a0ee929e8955ba9051
-
-Fix create_similar to preserve fallback resolution and font options (Behdad Esfahbod)
--------------------------------------------------------------------------------------
-There has been a long-standing issue with cairo_surface_create_similar
-such that font options and other settings from the original
-destination surface would not be preserved to the intermediate
-"similar" surface. This could result in incorrect rendering
-(particularly with respect to text hinting/antialiasing) with
-fallbacks, for example.
-
-report: https://bugs.freedesktop.org/show_bug.cgi?id=4106
-fixes: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=9fcb3c32c1f16fe6ab913e27eb54d18b7d9a06b0
- http://gitweb.freedesktop.org/?p=cairo;a=commit;h=bdb4e1edadb78a2118ff70b28163f8bd4317f1ec
-
-xlib: Fix text performance regression from 1.0 to 1.2.0 (Vladimir Vukicevic)
-----------------------------------------------------------------------------
-Several people noticed that upgrading from cairo 1.0 to cairo 1.2.0
-caused a significant performance regression when using the xlib
-backend. This performance regression was particularly noticeable when
-doing lots of text rendering and when using a high-latency connection
-to the X server, (such as a remote X server over an ssh
-connection). The slowdown was identified and fixed in 1.2.2.
-
-report: https://bugs.freedesktop.org/show_bug.cgi?id=7514
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=b7191885c88068dad57d68ced69a752d1162b12c
-
-PDF: Eliminate dependency on FreeType library dependency (Adrian Johnson)
--------------------------------------------------------------------------
-The cairo 1.2 series adds a supported pdf backend to cairo. In cairo
-1.2.0 this backend required the freetype library, which was an
-undesirable dependency on systems such as win32, (cairo is designed to
-always prefer the "native" font system). As of cairo 1.2.2 the
-freetype library is not required to use the pdf backend on the win32
-platform.
-
-report: https://bugs.freedesktop.org/show_bug.cgi?id=7538
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=a0989f427be87c60415963dd6822b3c5c3781691
-
-PDF: Fix broken output on amd64 (Adrian Johnson)
-------------------------------------------------
-report: http://bugzilla.gnome.org/show_bug.cgi?id=349826
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=f4b12e497b7ac282b2f6831b8fb68deebc412e60
-
-PS: Fix broken output for truetype fonts > 64k (Adrian Johnson)
----------------------------------------------------------------
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=067d97eb1793a6b0d0dddfbd0b54117844511a94
-
-PDF: Fix so that dashing doesn't get stuck on (Kent Worsnop)
-------------------------------------------------------------
-Kent notices that with the PDF backend in cairo 1.2.0 as soon as a
-stroke was performed with dashing, all subsequent strokes would also
-be dashed. There was no way to turn dashing off again.
-
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=778c4730a86296bf0a71080cf7008d7291792256
-
-Fix memory leaks in failure paths in gradient creation (Alfred Peng)
---------------------------------------------------------------------
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=db06681b487873788b51a6766894fc619eb8d8f2
-
-Fix memory leak in _cairo_surface_show_glyphs (Chris Wilson)
-------------------------------------------------------------
-report: https://bugs.freedesktop.org/show_bug.cgi?id=7766
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=e2fddcccb43d06486d3680a19cfdd5a54963fcbd
-
-Solaris: Add definition of cairo_private for some Sun compilers (Alfred Peng)
------------------------------------------------------------------------------
-report: https://bugzilla.mozilla.org/show_bug.cgi?id=341874
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=04757a3aa8deeff3265719ebe01b021638990ec6
-
-Solaris: Change version number of Sun's Xorg server with buggy repeat (Brian Cameron)
--------------------------------------------------------------------------------------
-report: https://bugs.freedesktop.org/show_bug.cgi?id=7483
-fix: http://gitweb.freedesktop.org/?p=cairo;a=commit;h=e0ad1aa995bcec4246c0b8ab0d5a5a79871ce235
-
-Various memory leak fixes
--------------------------
-Fix memory leak in _cairo_surface_show_glyphs (bug 7766)
-Fix file handle leak in failure path (bug 7616)
-Fix some memory leaks in the test cases.
-Fix some memory leaks in font subsetting code used in print backends.
-
-Documentation improvements (Behdad Esfahbod)
---------------------------------------------
-Added new documentation for several functions (cairo_show_page,
-cairo_copy_page, cairo_in_stroke, cairo_in_fill).
-
-Fixed some syntax errors that were preventing some existing
-documentation from being published.
-
-Fixed several minor typographical errors.
-
-Added an index for new symbols in 1.2.
-
-Release 1.2.0 (2006-06-27 Carl Worth <cworth@cworth.org>)
-=========================================================
-This is the culmination of the work that has gone on within the 1.1
-branch of cairo.
-
-There has been one API addition since the cairo 1.1.10 snapshot:
-
- cairo_xlib_surface_get_width
- cairo_xlib_surface_get_height
-
-There's also a new feature without any API change:
-
- Dots can now be drawn by using CAIRO_LINE_CAP_ROUND with
- degenerate sub-paths, (cairo_move_to() followed by either
- cairo_close_path() or a cairo_line_to() to the same location).
-
-And at least the following bugs have been fixed:
-
- 6759 fontconfig option AntiAlias doesn't work in cairo 1.1.2
- 6955 Some characters aren't displayed when using xlib (cache u...
- 7268 positive device_offset values don't work as source
- * PDF emit_glyph function needs to support bitmapped glyphs
- * PS emit_glyph function needs to support bitmapped glyphs
- * SVG emit_glyph function needs to support bitmapped glyphs
- * PDF: minefield page one is falling back unnecessarily
- * PS/PDF: Fix broken placement for vertical glyphs
- * PS: Fix to not draw BUTT-capped zero-length dash segments
- * Do device offset before float->fixed conversion
- http://bugzilla.gnome.org/show_bug.cgi?id=332266
- * PS: Fix source surfaces with transformations
- * PS: Fix to not draw BUTT-capped degnerate sub-paths
- * PS: Don't walk off end of array when printing "~>"
- * Fix some memory leaks in the test suite rig
- * SVG: Fix memory leak when using cairo_mask
- * Fix ExtendMode::REFLECT and EXTEND_PAD to not crash (though these are
- still not yet fully implemented for surface patterns).
-
-This has been a tremendous effort by everyone, and I'm proud to have
-been a part of it. Congratulations to all contributors to cairo!
-
-Snapshot 1.1.10 (2006-06-16 Carl Worth <cworth@cworth.org>)
-===========================================================
-This is the fifth in a series of snapshots working toward the 1.2
-release of cairo.
-
-The primary motivation for this snapshot is to fix a long-standing bug
-that had long been silent, but as of the 1.1.8 snapshot started
-causing crashes when run against 16-bit depth X servers, (often Xvnc
-or Xnest). The fix for this adds a new CAIRO_FORMAT_RGB16_565 to the
-API.
-
-This snapshot also includes a rewrite of cairo's SVG backend to
-eliminate the dependency on libxml2. With this in place, cairo 1.2
-will not depend on any libraries that cairo 1.0 did not.
-
-As usual, there are also a few fixes for minor bugs.
-
-Snapshot 1.1.8 (2006-06-14 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the fourth in a series of snapshots working toward the 1.2
-release of cairo. At this point, all major features of the 1.2 release
-are in place, leaving just a few bug fixes left.
-
-In particular, there well be no additional API changes between this
-1.1.8 snapshot and the 1.2 release.
-
-The announcement for 1.1.6 mentioned several API changes being
-considered. Only one of these changes was actually implemented
-(set_dpi -> fallback_resolution). This change does introduce one
-source-level incompatibility with respect to previous 1.1.x snapshots,
-so see below for details.
-
-Here is an abbreviated summary of changes since the 1.1.6 snapshot:
-
-** API Change **
-----------------
-According to the plan mentioned in the 1.1.6 notes, one source-level
-incompatible change has been implemented. The following three
-functions have been removed from cairo's API:
-
- cairo_pdf_surface_set_dpi
- cairo_ps_surface_set_dpi
- cairo_svg_surface_set_dpi
-
-and in their place the following function has been added:
-
- cairo_surface_set_fallback_resolution
-
-The signature and semantics of the function remains the same, so it is
-a simple matter of changing the name of the function when calling
-it. As a transition mechanism, this snapshot will (on many systems)
-build to include the old symbols so that code previously compiled will
-still run. However, all source code using the old names must be
-updated before it will compile. And the upcoming 1.2 release is not
-anticipated to include the old symbols.
-
-Finally, it should be pointed out that the old symbols never existed
-in the supported API of any stable release of cairo. (In the stable
-1.0 releases the PDF, PS, and SVG backends were advertised as
-experimental and unstable.)
-
-And, as always, cairo continues to maintain source and binary
-compatibility between major releases. So applications compiled against
-supported backends in a stable release of cairo (1.0.4 say) will
-continue to compile and run without modification against new major
-releases (1.2.0 say) without modification.
-
-API additions
--------------
-The following new functions have been added to cairo's API:
-
- cairo_surface_get_content
- cairo_debug_reset_static_data
- cairo_image_surface_get_data
- cairo_image_surface_get_format
- cairo_image_surface_get_stride
- cairo_win32_font_face_create_for_hfont
-
-New, backend-specific pkg-config files
---------------------------------------
-In addition to the original cairo.pc file, cairo will also now install
-a pkg-config files for each configured backend, (for example
-cairo-pdf.pc, cairo-svg.pc, cairo-xlib.pc, cairo-win32.pc, etc.) this
-also includes optional font backends (such as cairo-ft.pc) and the
-optional png functionality (cairo-png.pc).
-
-These new pkg-config files should be very convenient for allowing
-cairo-using code to easily check for the existing of optional
-functionality in cairo without having to write complex rules to grub
-through cairo header files or the compiled library looking for
-symbols.
-
-Printing backend (PS, PDF, and SVG)
------------------------------------
-Improving the quality of the "printing" backends has been a priority
-of the development between cairo 1.1.6 and cairo 1.1.8.
-
-The big improvement here is in the area of text output. Previously, at
-best, text was output as paths without taking advantage of any font
-support available in the output file format.
-
-Now, at the minimum text paths will be shared by using type3 fonts
-(for PS and PDF---and similarly, defs for SVG). Also, if possible,
-type3 and truetype fonts will be embedded in PostScript and PDF
-output. There are still some known bugs with this, (for example,
-selecting text in a cairo-generated PDF file with an embedded truetype
-font does not work). So there will be some more changes in this area
-before cairo 1.2, but do try test this feature out as it exists so
-far.
-
-Many thanks to Kristian Høgsberg for the truetype and type1 font
-embedding.
-
-win32 backend
--------------
-Performance improvements by preferring GDI over pixman rendering when possible.
-Fixes for text rendering.
-
-xlib backend
-------------
-Fix potentially big performance bug by making xlib's create_similar
-try harder to create a pixmap of a depth matching that of the screen.
-
-Bug fixes
----------
-Among various other fixes, the following bugs listed in bugzilla have
-been fixed:
-
- Bug 2488: Patch to fix pixman samping location bug (#2488).
- https://bugs.freedesktop.org/show_bug.cgi?id=2488
-
- Bug 4196: undef MIN an MAX before defining to avoid duplicate definition
- https://bugs.freedesktop.org/show_bug.cgi?id=4196
-
- Bug 4723: configure.in: Fix m4 quoting when examining pkg-config version
- https://bugs.freedesktop.org/show_bug.cgi?id=4723
-
- Bug 4882: Flag Sun's X server has having buggy_repeat.
- https://bugs.freedesktop.org/show_bug.cgi?id=4882
-
- Bug 5306: test/pdf2png: Add missing include of stdio.h
- https://bugs.freedesktop.org/show_bug.cgi?id=5306
-
- Bug 7075: Fix make clean to remove cairo.def
- https://bugs.freedesktop.org/show_bug.cgi?id=7075
-
-(Many thanks to Behdad Esfahbod for helping us track down and fix many
-of these.)
-
-Snapshot 1.1.6 (2006-05-04 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the third in a series of snapshots working toward the imminent
-1.2 release of cairo. For a list of items still needing work on the
-cairo 1.2 roadmap, please see:
-
- http://cairographics.org/ROADMAP
-
-As can be seen in that list, there are no longer any API additions
-left on the roadmap. Instead, there is a feature (PDF type 3 fonts) a
-performance optimization (X server gradients) and a list of bug
-fixes. This gives us a fair amount of freedom to cut the 1.2 release
-at almost any point by deciding to defer remaining bug fixes to
-subsequent maintenance releases such as 1.2.2 and 1.2.4.
-
-Before we will do that, we must first be wiling to commit to all the
-new API additions. As a heads-up, there are a couple of potential API
-changes being considered. (Note that these are changes to new API
-introduced during 1.1 so these will not introduce API
-incompatibilities compared to the stable 1.0 series). The changes
-being considered are:
-
- cairo_get_group_target: may acquire x and y offset return
- parameters. May also be eliminated in favor of
- cairo_get_target assuming its role
-
- cairo_pdf_surface_set_dpi:
- cairo_ps_surface_set_dpi:
- cairo_svg_surface_set_dpi: These functions may be removed in favor
- of a new cairo_surface_set_fallback_resolution
-
-Additionally there is the possibility of a slight change in the
-semantics of cairo_set_line_width. We believe the current behavior of the sequence:
-
- cairo_set_line_width; ... change CTM ...; cairo_stroke;
-
-is buggy. It is currently behaving the same as:
-
- ... change CTM ...; cairo_set_line_width; cairo_stroke;
-
-We are considering fixing this bug before 1.2 with the hope that
-nobody is already relying on the buggy behavior described here. Do
-shout if you suspect you might be in that position.
-
-The items included in this snapshot (since the 1.1.4 snapshot) are
-described below.
-
-API additions
--------------
-The long-awaited group-rendering support is now available with the
-following function calls:
-
- cairo_push_group
- cairo_push_group_with_content
- cairo_pop_group
- cairo_pop_group_to_source
- cairo_get_group_target
-
-This API provides a much more convenient mechanism for doing rendering
-to an intermediate surface without the need to manually create a
-temporary cairo_surface_t and a temporary cairo_t and clean them up
-afterwards.
-
-Add the following missing get function to complement
-cairo_surface_set_device_offset:
-
- cairo_surface_get_device_offset
-
-PDF backend (API addition)
---------------------------
-The PDF backend now provides for per-page size changes, (similar to
-what the PostScript backend got in the 1.1.4 snapshot). The new API
-is:
-
- cairo_pdf_surface_set_size
-
-Xlib backend (API additions)
-----------------------------
-The following functions have been added to allow the extraction of
-Xlib surface:
-
- cairo_xlib_surface_get_display
- cairo_xlib_surface_get_drawable
- cairo_xlib_surface_get_screen
- cairo_xlib_surface_get_visual
- cairo_xlib_surface_get_depth
-
-XCB backend (experimental)
---------------------------
-Update backend so that it now compiles with the recent XCB 0.9 release.
-
-Bug fixes and memory leak cleanup
----------------------------------
-Various little things, nothing too significant though.
-
-Snapshot 1.1.4 (2006-05-03 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the second in a series of snapshots working toward the
-upcoming 1.2 release of cairo. For a list of items still needing work
-on the cairo 1.2 roadmap, please see:
-
- http://cairographics.org/ROADMAP
-
-The items included in this snapshot (since the 1.1.2 snapshot) are
-described below.
-
-PostScript backend: new printing-oriented API
----------------------------------------------
-We anticipate that with cairo 1.2, toolkits will begin to use cairo
-for printing on systems that use PostScript as the spool format. To
-support this use case, we have added 4 new function calls that are
-specific to the PostScript backend:
-
- cairo_ps_surface_set_size
- cairo_ps_surface_dsc_comment
- cairo_ps_surface_dsc_begin_setup
- cairo_ps_surface_dsc_begin_page_setup
-
-These functions allow variation of the page size/orientation from one
-page to the next in the PostScript output. They also allow the toolkit
-to provide per-document and per-page printer control options in a
-device-independent way, (for example, by using PPD options and
-emitting them as DSC comments into the PostScript output). This should
-allow toolkits to provide very fine-grained control of many options
-available in printers, (media size, media type, tray selection, etc.).
-
-SVG backend: builds by default, version control
------------------------------------------------
-The SVG backend continues to see major improvements. It is expected
-that the SVG backend will be a supported backend in the 1.2
-release. This backend will now be built by default if its dependencies
-(freetype and libxml2) are met.
-
-Additionally, the SVG backend now has flexibility with regard to what
-version of SVG it targets. It will target SVG 1.1 by default, which
-will require image fallbacks for some of the "fancier" cairo
-compositing operators. Or with the following new function calls:
-
- cairo_svg_surface_restrict_to_version
- cairo_svg_get_versions
- cairo_svg_version_to_string
-
-it can be made to target SVG 1.2 in which there is native support for
-these compositing operators.
-
-Bug fixes
----------
-At least the following bugs have been fixed since the 1.1.2 snapshot:
-
-crash at XRenderAddGlyphs
-https://bugs.freedesktop.org/show_bug.cgi?id=4705
-
-Can't build cairo-1.1.2 on opensolaris due to " void function cannot return value"
-https://bugs.freedesktop.org/show_bug.cgi?id=6792
-
-Missing out-of-memory check at gfx/cairo/cairo/src/cairo-atsui-font.c:185
-https://bugzilla.mozilla.org/show_bug.cgi?id=336129
-
-A couple of memory leaks.
-
-Snapshot 1.1.2 (2006-04-25 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is the first in a series of snapshots working toward the upcoming
-1.2 release of cairo. (Subsequent snapshot will use successive even
-numbers for the third digit, 1.1.4, 1.1.6, etc.) This snapshot is
-backwards-compatible with the 1.0 series---it makes a few API
-additions but does not remove any API.
-
-PostScript and PDF backends are no longer "experimental"
---------------------------------------------------------
-The major theme of the 1.2 release is improved PostScript and PDF
-backends for cairo. Unlike the 1.0 series, in the 1.2 series these
-backends will not be marked as experimental and will be enabled by
-default. We encourage people to test this snapshot and the PS/PDF
-backends in particular as much as possible.
-
-The PostScript and PDF output is not yet ideal.
-
- * One major problem with the PostScript output is that image
- fallbacks are used more often than strictly necessary, and the
- image fallbacks are at a lower resolution than desired, (the
- cairo_ps_surface_set_dpi call is ignored).
-
- * The major drawback of the current PDF backend implementation is
- its text support. Every glyph is represented by a filled path in
- the PDF file. The causes file sizes to be much larger and
- rendering to be much slower than desired.
-
-It is anticipated that both of these shortcomings will see some
-improvements before the final 1.2 release.
-
-In spite of those shortcomings, we hope that the PS and PDF backends
-will yield faithful results for pretty much any cairo operations you
-can throw at them. Please let us know if you are getting obviously
-"different" results from the PS/PDF backends than from the image or
-xlib backends.
-
-Other new experimental backends
--------------------------------
-This snapshot includes three new backends that did not exist in the
-1.0 series:
-
- * beos backend
-
- * directfb backend
-
- * svg backend
-
-These are all currently marked "experimental" and are disabled by
-default. But the SVG backend in particular has seen a lot of recent
-development and is very close to passing the entire cairo test
-suite. It is possible that this backend will become a fully supported
-backend by the time of the cairo 1.2 release.
-
-Public API additions
---------------------
-There have been a few new API functions added to cairo, including:
-
-New get_type functions for querying sub-types of object:
-
- cairo_surface_get_type
- cairo_pattern_get_type
- cairo_font_face_get_type
- cairo_scaled_font_get_type
-
-More convenience in working with cairo_scaled_font_t with new getter
-functions:
-
- cairo_scaled_font_get_font_face
- cairo_scaled_font_get_font_matrix
- cairo_scaled_font_get_ctm
- cairo_scaled_font_get_font_options
-
-As well as a convenience function for setting a scaled font into a
-cairo context:
-
- cairo_set_scaled_font
-
-and a function to allow text extents to be queried directly from a
-scaled font, (without requiring a cairo_surface_t or a cairo_t):
-
- cairo_scaled_font_text_extents
-
-These new scaled font functions were motivated by the needs of the
-pango library.
-
-Finally, a new path-construction function was added which clears the
-current point in preparation for a new sub path. This makes cairo_arc
-easier to use in some situations:
-
- cairo_new_sub_path
-
-Before the 1.2 release is final we do still plan a few more API
-additions specifically motivated by the needs of Mozilla/Firefox.
-
-Optimizations and bug fixes
----------------------------
-Shortly after the 1.0 maintenance series branched off the mainline
-there was a major rework of the cairo font internals. This should
-provide some good performance benefits, but it's also another area
-people should look at closely for potential regressions.
-
-There has not yet been any widespread, systematic optimization of
-cairo, but various performance improvements have been made, (and some
-of them are fairly significant). So if some things seem faster than
-1.0 then things are good. If there are any performance regressions
-compared to 1.0 then there is a real problem and we would like to hear
-about that.
-
-There has been a huge number of bug fixes---too many to mention in
-detail. Again, things should be better, and never worse compared to
-1.0. Please let us know if your testing shows otherwise.
-
-Release 1.0.2 (2005-10-03 Carl Worth <cworth@cworth.org>)
-=========================================================
-For each bug number XXXX below, see:
-
- https://bugs.freedesktop.org/show_bug.cgi?id=XXXX
-
-for more details.
-
-General bug fixes
------------------
- * 4408 - Add support for dashing of stroked curves
- (Carl Worth)
-
- * 4409 - Fix dashing so that each dash is capped on both ends
- (Carl Worth)
-
- * 4414 - Prevent SIGILL failures (proper use of -mmmx and -msse flags)
- (Sebastien Bacher, Billy Biggs)
-
- * 4299 - Fix crashes with text display in multi-threaded program
- (Alexey Shabalin, Carl Worth)
-
- * 4401 - Do not use sincos function since it is buggy on some platforms)
- (Tim Mooney, Carl Worth)
-
- * 4245 - Fix several bugs in the test suite exposed by amd64 systems
- (Seemant Kulleen, Carl Worth)
-
- * 4321 - Add missing byteswapping on GetImage/PutImage
- (Sjoerd Simons, Owen Taylor)
-
- * 4220 - Make the check for rectangular trapezoids simpler and more accurate
- (Richard Stellingwerff, Owen Taylor)
-
- * 4260 - Add missing channel-order swapping for antialised fonts
- (Barbie LeVile, Owen Taylor)
-
- * 4283 - Fix compilation failure with aggressive inlining (gcc -O3)
- (Marco Manfredini, Owen Taylor)
-
- * 4208 - Fix some warnings from sparse
- (Kjartan Maraas, Billy Biggs)
-
- * 4269 - Fix to not crash when compiled with -fomit-frame-pointer
- (Ronald Wahl, Owen Taylor)
-
- * 4263 - Improve performance for vertical gradients
- (Richard Stellingwerff, Owen Taylor)
-
- * 4231
- * 4298 - Accomodate gentoo and Mandriva versions in X server vendor string check
- (Billy Biggs, Frederic Crozat, Owen Taylor)
-
-win32-specific fixes
---------------------
- * 4599 - Fix "missing wedges" on some stroked paths (win32)
- (Tim Rowley, Jonathan Watt, Bertram Felgenhauer, Carl Worth, Keith Packard)
-
- * 4612 - Fix disappearing text if first character out of surface (win32)
- (Tim Rowley)
-
- * 4602 - Fix shutdown of cairo from failing intermediate, size-0 bitmaps (win32)
- Aka. the "white rectangles" bug from mozilla-svg testing
- (Tim Rowley)
-
- * Various portability improvements for win32
- (Hans Breuer, Owen Taylor, Carl Worth)
-
- * 4593 - Fix font sizes to match user expectations (win32)
- (Tor Lillqvist, Owen Taylor)
-
- * 3927 - Fix to report metrics of size 0 for glyph-not-available (win32)
- (Hans Breuer, Owen Taylor, Tor Lillqvist)
-
- * Add locking primitives for win32
- (Hans Breuer)
-
-xlib-specific fixes
--------------------
- * Fix crash from size-0 pixmap due to empty clip region (xlib)
- (Radek Doulík, Carl Worth)
-
-Release 1.0.0 (2005-08-24 Carl Worth <cworth@cworth.org>)
-=========================================================
-Experimental backends
----------------------
- * The Glitz, PS, PDF, Quartz, and XCB backends have been declared
- experimental, and are not part of the API guarantees that accompany
- this release. They are not built by default, even when the required
- libraries are available, and must be enabled explicitly with
- --enable-ps, --enable-pdf, --enable-quartz or --enable-xcb.
-
- It is very painful for us to be pushing out a major release without
- these backends enabled. There has been a tremendous amount of work
- put into each one and all are quite functional to some
- extent. However, each also has some limitations. And none of these
- backends have been tested to the level of completeness and
- correctness that we expect from cairo backends.
-
- We do encourage people to experiment with these backends and report
- success, failure, or means of improving them.
-
-Operator behavior
------------------
- * Prior to 0.9.0 the SOURCE, CLEAR and a number of other operators
- behaved in an inconsistent and buggy fashion and could affect areas
- outside the clip mask. In 0.9.0, these six "unbounded" operators
- were fixed to consistently clear areas outside the shape but within
- the clip mask. This is useful behavior for an operator such as IN,
- but not what was expected for SOURCE and CLEAR. So, in this release
- the behavior of SOURCE and CLEAR has been changed again. They now
- affect areas only within both the source and shape. We can write
- the new operators as:
-
- SOURCE: dest' = (mask IN clip) ? source : dest
- CLEAR: dest' = (mask IN clip) ? 0 : dest
-
-Behavior and API changes
-------------------------
- * Setting the filter on a gradient pattern would change the
- interpolation between color stops away from the normal linear
- interpolation. This dubious behavior has been removed.
-
- * The CAIRO_CONTENT_VALID() and CAIRO_FORMAT_VALID() macros --
- implementation details that leaked into cairo.h -- have been moved
- into an internal header.
-
- * The cairo_show_text function now advances the current point
- according to the total advance values of the string.
-
-API additions
--------------
- * cairo_set_dash can now detect error and can set
- CAIRO_STATUS_INVALID_DASH.
-
-Features
---------
- * When compiled against recent versions of fontconfig and FreeType,
- artificial bold fonts can now be turned on from fonts.conf using
- the FC_EMBOLDEN fontconfig key.
-
-Optimization
-------------
- * The compositing code from the 'xserver' code tree has now been
- completely merged into libpixman. This includes MMX optimization of
- common operations.
-
- * The image transformation code in libpixman has been improved and
- now performs significantly faster.
-
-Bug fixes
----------
- * Several crashes related to corruption in the font caches have been
- fixed.
-
- * All test cases now match pixel-for-pixel on x86 and PPC; this
- required fixing bugs in the compositing, stroking, and pattern
- rendering code.
-
- * Negative dash offsets have been fixed to work correctly.
-
- * The stroking of paths with mutiple subpaths has now been fixed to
- apply caps to all subpaths rather than just the last one.
-
- * Many build fixes for better portability on various systems.
-
- * Lots of other bug fixes, but we're too tired to describe them in
- more detail here.
-
-Release 0.9.2 (2005-08-13 Carl Worth <cworth@cworth.org>)
-=========================================================
-Release numbering
------------------
- * You will notice that this release jumped from 0.9.0 to 0.9.2. We've
- decided to use an odd micro version number (eg. 0.9.1) to indicate
- in-progress development between releases. As soon as 0.9.2 is
- tagged, the version will be incremented in CVS to 0.9.3 where it
- will stay until just before 0.9.4 is built, uploaded, and tagged.
-
- So, even-micro == a released version, odd-micro == something in-between.
-
-Libpixman dependency dropped
-----------------------------
- * As of this release, the dependency on an external libpixman has
- been dropped. Instead, the code from libpixman needed for cairo has
- been incorporated into the cairo source tree. The motivation for
- this change is that while cairo's API is stable and ready to be
- maintained after the 1.0 release, libpixman's API is not, so we do
- not want to expose it at this time.
-
- Also, the incorporation of libpixman into cairo also renames all
- previously-public libpixman symbols in order to avoid any conflict
- with a future release of libpixman
-
-API additions
--------------
- * Macros and functions have been added so that the version of cairo
- can be queried at either compile-time or at run-time. The version
- is made available as both a human-readable string and as a single
- integer:
-
- CAIRO_VERSION_STRING eg. "0.9.2"
- CAIRO_VERSION eg. 000902
-
- const char*
- cairo_version_string (void); /* eg. "0.9.2" */
-
- int
- cairo_version (void); /* eg. 000902 */
-
- A macro is provided to convert a three-part component version into
- the encoded single-integer form:
-
- CAIRO_VERSION_ENCODE(X,Y,Z)
-
- For example, the CAIRO_VERSION value of 000902 is obtained as
- CAIRO_VERSION_ENCODE(0,9,2). The intent is to make version
- comparisons easy, either at compile-time:
-
- #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(0,9,2)
- ...
- #endif
-
- Or at run-time:
-
- if (cairo_version() >= CAIRO_VERSION_ENCODE(0,9,2)) { /* ... */ }
-
-Thread safety
--------------
- * This release adds pthread-based locking (when available) to make
- the caches used by cairo safe for threaded programs. Some may
- remember a failed experiment with this locking between the 0.5.1
- and 0.5.2 snapshots, (where even single-threaded programs that
- linked with -lpthread would deadlock). We believe that that problem
- has been fixed, so we are looking forward to testing and reports
- from users with threaded applications.
-
-Bug fixes
----------
- * The XCB and Quartz backends failed to compiled in the 0.9.0 release
- due to minor syntax errors. These have now been fixed.
-
- * Various crashes in glitz and pixman due to size 0 glyphs have been
- fixed.
-
-Release 0.9.0 (2005-08-08 Carl Worth <cworth@cworth.org>)
-=========================================================
-Soname change
--------------
- * In all prior snapshots, the libtool library versioning was set to
- 1:0:0. As this release is intended to mark the beginning of
- backwards-compatible releases, the versioning has been incremented
- to 2:0:0. You will notice that the numeric extension on the
- installed library filename will change similarly.
-
- This change will also require all cairo-using applications to be
- recompiled. We recognize that this may cause some frustration since
- this release is backwards-compatible with 0.6.0 and in that sense
- "shouldn't" require re-compilation. However, since all historical
- snapshots have used the same 1:0:0 version in spite of incompatible
- API changes between them, it was essential that the upcoming 1.0
- release series have distinct library versioning.
-
- All future releases will use the library versioning to properly
- indicate compatibility between releases. So, any application
- re-compiled now to work with the 0.9.0 will not need to be
- recompiled when a compatible 1.0 release of cairo is made in the
- future.
-
-API additions
--------------
- * Add new function calls to set/get the current antialiasing mode in
- the graphics state:
-
- cairo_set_antialias
- cairo_get_antialias
-
- This call accepts the same modes recently added for font options
- (NONE or GRAY) but affects the rendering of geometry other than
- text. The intent of this call is to enable more precise control of
- which pixels are affected by each operation, for example to allow
- for full-scene antialiasing for seam-free rendering. It is not
- expected that non-antialiased rendering will perform better than
- anti-aliased rendering.
-
- * Three new functions were added to provide support for mixed cairo-
- and non-cairo drawing to the same surface:
-
- cairo_surface_mark_dirty
- cairo_surface_mark_dirty_rectangle
- cairo_surface_flush
-
- * The return type of the several "reference" functions was change,
- (API compatibly), from void to the same type as the argument. The
- affected functions are:
-
- cairo_font_face_reference
- cairo_scaled_font_reference
- cairo_pattern_reference
- cairo_surface_reference
- cairo_reference
-
- This allows a convenient way to assign and reference in a single
- statement.
-
-Semantic changes
-----------------
- * The behavior of cairo_set_source with a pattern with a non-identity
- matrix was previously not well-defined. The new behavior is as
- follows:
-
- The pattern's transformation matrix will be locked to the
- user space in effect at the time of cairo_set_source(). This means
- that further modifications of the CTM will not affect the source
- pattern.
-
-cairo-win32
------------
- * Some portability improvements, (eg. workaround for missing stdint.h).
-
-cairo-ft
---------
- * Updated to allow compilation with older versions of freetype.
-
-Bug fixes
----------
- * Fix the unbounded operators to actually produce a correct result,
- (previously the results were artificially restricted to the
- bounding box of whatever shape was being drawn rather than
- extending out infinitely). The fixed operators are:
-
- CAIRO_OPERATOR_CLEAR
- CAIRO_OPERATOR_SOURCE
- CAIRO_OPERATOR_OUT
- CAIRO_OPERATOR_IN
- CAIRO_OPERATOR_DEST_IN
- CAIRO_OPERATOR_DEST_ATOP
-
- * Fix cairo_mask and cairo_mask_surface to transform the mask by the
- current transformation matrix (CTM).
-
- * Fix cairo_set_source to lock the CTM used to transform the pattern.
-
- * Workaround for X server Render bug involving repeating patterns
- with a general transformation matrix.
-
- * cairo_get_font_face fixed to return a "nil" font face object rather
- than NULL on error.
-
- * cairo_set_font_face fixed to not crash if given a NULL font face,
- (which is the documented interface for restoring the default font
- face).
-
- * Fix xlib glyphset caching to not try to free a NULL glyph.
-
-Snapshot 0.6.0 (2005-07-28 Carl Worth <cworth@cworth.org>)
-==========================================================
-API changes
------------
-* The prototypes of the following functions have changed:
-
- cairo_xlib_surface_create_with_xrender_format
- cairo_xlib_surface_create_for_bitmap
-
- A Screen* parameter has been added to each. This allows the cairo
- xlib backend to work correctly with multi-head X servers.
-
-* The following function has been modified:
-
- cairo_scaled_font_create
-
- to accept a cairo_font_options_t*. See below fore more details.
-
-* All opaque, reference-counted cairo objects have now been moved to a
- standard error-handling scheme. The new objects to receive this
- treatment are cairo_font_face_t, cairo_scaled_font_t, and
- cairo_surface_t. (Previous snapshots already provided this scheme
- for cairo_t, cairo_path_t, and cairo_pattern_t.)
-
- This changes two functions to have a return type of void rather than
- cairo_status_t:
-
- cairo_scaled_font_extent
- cairo_surface_finish
-
- And significantly, none of the create functions for any of the
- objects listed above will return NULL. The pointer returned from any
- function will now always be a valid pointer and should always be
- passed to the corresponding destroy function when finished
-
- The simplest strategy for porting code is to switch from:
-
- object = cairo_<object>_create ();
- if (object == NULL)
- goto BAILOUT;
-
- /* act on object */
-
- cairo_<object>_destroy (object);
-
- to:
-
- object = cairo_<object>_create ();
- if (cairo_<object>_status (object))
- goto BAILOUT;
-
- /* act on object */
-
- cairo_<object>_destroy (object);
-
- But significantly, it is not required to check for an error status
- before the "act on object" portions of the code above. All
- operations on an object with an error status are, by definition,
- no-ops without side effect. So new code might be written in an
- easier-to-read style of:
-
- object = cairo_<object>_create ();
-
- /* act on object */
-
- cairo_<object>_destroy (object);
-
- with cairo_<object>_status checks placed only at strategic
- locations. For example, passing an error object to another object,
- (eg. cairo_set_source with an in-error pattern), will propagate the
- error to the subsequent object (eg. the cairo_t). This means that
- error checking can often be deferred even beyond the destruction of
- a temporary object.
-
-API additions
--------------
-* New functions for checking the status of objects that have been
- switched to the common error-handling scheme:
-
- cairo_font_face_status
- cairo_scaled_font_status
- cairo_surface_status
-
-* The _cairo_error function which was added in 0.5.1 has now been made
- much more useful. In 0.5.1 only errors on cairo_t objects passed
- through _cairo_error. Now, an error on any object should pass
- through _cairo_error making it much more reliable as a debugging
- mechanism for finding when an error first occurs.
-
-* Added new font options support with a myriad of functions:
-
- cairo_font_options_create
- cairo_font_options_copy
- cairo_font_options_destroy
-
- cairo_font_options_status
-
- cairo_font_options_merge
- cairo_font_options_equal
- cairo_font_options_hash
-
- cairo_font_options_set_antialias
- cairo_font_options_get_antialias
- cairo_font_options_set_subpixel_order
- cairo_font_options_get_subpixel_order
- cairo_font_options_set_hint_style
- cairo_font_options_get_hint_style
- cairo_font_options_set_hint_metrics
- cairo_font_options_get_hint_metrics
-
- cairo_surface_get_font_options
-
- cairo_ft_font_options_substitute
-
- cairo_set_font_options
- cairo_get_font_options
-
- This new font options support allows the application to have much
- more fine-grained control over how fonts are rendered.
- Significantly, it also allows surface backends to have some
- influence over the process. For example, the xlib backend now
- queries existing Xft properties to set font option defaults.
-
-* New function:
-
- cairo_xlib_surface_set_drawable
-
- which allows the target drawable for an xlib cairo_surface_t to be
- changed to another with the same format, screen, and display. This
- is necessary in certain double-buffering techniques.
-
-New features
-------------
-* Sub-pixel text antialiasing is now supported.
-
-Bug fixes
----------
-* Fixed assertion failure in cairo_surface_create_similar when
- application commits an error by passing a cairo_format_t rather than
- a cairo_content_t.
-
-* Avoid division by zero in various places (cairo-ft).
-
-* Fix infinite loop when using non-default visuals (cairo-xlib).
-
-* Eliminate segfault in cairo_image_surface_create_from_png_stream.
-
-* Prevent errant sign-extension of masks on 64-bit architectures
- (cairo-xlib and cairo-xcb).
-
-* Other miscellaneous fixes.
-
-Snapshot 0.5.2 (2005-07-18 Carl Worth <cworth@cworth.org>)
-==========================================================
-API changes
------------
-* New functions for creating patterns of a single color:
-
- cairo_pattern_create_rgb
- cairo_pattern_create_rgba
-
-* Change cairo_surface_create_similar to accept a new type of
- cairo_content_t rather than cairo_format_t:
-
- typedef enum _cairo_content {
- CAIRO_CONTENT_COLOR = 0x1000,
- CAIRO_CONTENT_ALPHA = 0x2000,
- CAIRO_CONTENT_COLOR_ALPHA = 0x3000
- } cairo_content_t;
-
-* Add new CAIRO_FORMAT_VALID and CAIRO_CONTENT_VALID macros.
-
-* Remove unused status value:
-
- CAIRO_STATUS_NO_TARGET_SURFACE
-
-* Add new status values:
-
- CAIRO_STATUS_INVALID_STATUS
-
-* Require libpixman >= 0.1.5 (for necessary bug fixes)
-
-Bug fixes
----------
-* Fix cairo_surface_write_to_png for RGB24 images.
-
-* Fix broken metrics and rendering for bitmap fonts. Add mostly
- useless bitmap glyph transformation.
-
-* Fix glyph caches to not eject entries that might be immediately
- needed, (fixing intermittent crashes when rendering text).
-
-* Fix all memory leaks found by running "make check-valgrind".
-
-ATSUI backend changes
----------------------
-* Allow building against < 10.3 SDK.
-
-* Prevent crash on empty strings.
-
-Glitz backend changes
----------------------
-* Require glitz >= 0.4.4.
-
-* Use frame buffer objects instead of pbuffers for accelerated
- offscreen drawing.
-
-* Minor improvement to gradient pattern creation.
-
-PostScript backend fixes
-------------------------
-* Rewrite of the PS backend to generate more interesting output that
- the old big-image implementation.
-
-Win32 backend fixes
--------------------
-* Implement glyph path support.
-
-* Fix swap of blue and green values in the fill_rectangles path.
-
-Xlib backend fixes
-------------------
-* Add optimization to use XCopyArea rather than XRenderComposite when
- transforming only with an integer translation, and using SOURCE
- operator or OVER with a source pattern without alpha.
-
-Snapshot 0.5.1 (2005-06-20 Carl Worth <cworth@cworth.org>)
-==========================================================
-API changes
------------
-* Removed cairo_status_string(cairo_t*) and add
- cairo_status_to_string(cairo_status_t) in its place. Code using
- cairo_status_string can be ported forward as follows:
-
- cairo_status (cr);
- ->
- cairo_status_to_string (cairo_status (cr));
-
-* Removed the BAD_NESTING restriction which means that two different
- cairo_t objects can now interleave drawing to the same
- cairo_surface_t without causing an error.
-
-* The following functions which previously had a return type of
- cairo_status_t now have a return type of void:
-
- cairo_pattern_add_color_stop_rgba
- cairo_pattern_set_matrix
- cairo_pattern_get_matrix
- cairo_pattern_set_extend
- cairo_pattern_set_filter
-
- See discussion of cairo_pattern_status below for more details.
-
-API additions
--------------
-* Improved error handling:
-
- cairo_status_t
- cairo_pattern_status (cairo_pattern_t *pattern);
-
- This snapshot expands the status-based error handling scheme from
- cairo_t to cairo_path_t and cairo_pattern_t. It also expands the
- scheme so that object-creating functions, (cairo_create,
- cairo_pattern_create_*, cairo_copy_path_*), are now guaranteed to
- not return NULL. Instead, in the case of out-of-memory these
- functions will return a static object with
- status==CAIRO_STATUS_NO_MEMORY. The status can be checked with the
- functions cairo_status and cairo_pattern_status, or by direct
- inspection of the new status field in cairo_path_t.
-
- Please note that some objects, including cairo_surface_t and all of
- the font-related objects have not been converted to this
- error-handling scheme.
-
-* In addition to the above changes, a new private function has been added:
-
- _cairo_error
-
- This function can be used to set a breakpoint in a debugger to make
- it easier to find programming error in cairo-using code. (Currently,
- _cairo_error is called when any error is detected within a cairo_t
- context, but is not called for non-cairo_t errors such as for
- cairo_path_t and cairo_pattern_t).
-
-* Fixed cairo_path_data_t so that its enum is visible to C++ code, (as
- cairo_path_data_type_t).
-
-Performance improvements
-------------------------
-* Made a minor performance improvement for clipping, (restrict clip
- surface to the new intersected bounds).
-
-* Optimize rendering of a solid source pattern with a pixel-aligned
- rectangular path to use backend clipping rather than rasterization
- and backend compositing.
-
-* Optimize cairo_paint_with_alpha to defer to cairo_paint when alpha
- is 1.0.
-
-Bug fixes
----------
-* Fixed memory leak in cairo_copy_path.
-
-* A build fix for non-srcdir builds.
-
-PDF backend fixes
------------------
-* New support for path-based clipping.
-
-* Fix for text rotated to angles other than multiples of π/2.
-
-Win32 backend fixes
--------------------
-* Fix for text extents.
-
-Xlib backend
-------------
-* Implemented a complex workaround for X server bug[*] related to
- Render-based compositing with untransformed, repeating source
- pictures. The workaround uses core Xlib when possible for
- performance, (ie. with CAIRO_OPERATOR_SOURCE or CAIRO_OPERATOR_OVER
- with an opaque source surface), and falls back to the pixman
- image-based compositing otherwise.
-
- [*] https://bugs.freedesktop.org/show_bug.cgi?id=3566
-
-* Various bug fixes, particularly in the fallback paths.
-
-Snapshot 0.5.0 (2005-05-17 Carl Worth <cworth@cworth.org>)
-==========================================================
-This is a pretty big, and fairly significant snapshot. It represents
-between 2 and 3 months of solid work from a lot of people on improving
-the API as much as possible. I'd like to express my appreciation and
-congratulations to everyone who has worked on the big API Shakeup,
-(whether in email battles over names, or fixing my silly bugs).
-
-This snapshot will require some effort on the part of users, since
-there are a _lot_ of API changes (ie. no cairo program ever written is
-safe --- they're all broken now in at least one way). But, in spite of
-that, we do encourage everyone to move their code to this snapshot as
-soon as possible. And we're doing everything we can think of to make
-the transition as smooth as possible.
-
-The idea behind 0.5 is that we've tried to make every good API change
-we could want now, and get them all done with. That is, between now
-and the 1.0 release of cairo, we expect very few new API changes,
-(though some will certainly sneak in). We will have some significant
-additions, but the pain of moving code from cairo 0.4 to cairo 0.5
-should be a one time experience, and things should be much smoother as
-we continue to move toward cairo 1.0.
-
-And with so many changes coming out for the first time in this 0.5
-release, we really do need a lot of people trying this out to make
-sure the ideas are solid before we freeze the API in preparation for
-the 1.0 release.
-
-OK, enough introduction. Here is a (not-quite-complete) description of
-the API removals, changes and additions in this snapshot, (compared to
-0.4.0)
-
-API removals
-============
-The following public functions have been removed:
-
-- cairo_set_target_*
-
- This is a big change. See the description of cairo_create in
- the API changes section for how to deal with this.
-
-- cairo_set_alpha
-
- Alpha blending hasn't gone away; there's just a much more
- unified rendering model now. Almost all uses of
- cairo_set_alpha will be trivially replaced with
- cairo_set_source_rgba and a few others will be replaced just
- as easily with cairo_paint_with_alpha.
-
-- cairo_show_surface
-
- Another useful function that we realized was muddling up the
- rendering model. The replacement is quite easy:
- cairo_set_source_surface and cairo_paint.
-
-- cairo_matrix_create
-- cairo_matrix_destroy
-- cairo_matrix_copy
-- cairo_matrix_get_affine
-
- These functions supported an opaque cairo_matrix_t. We now
- have an exposed cairo_matrix_t structure, so these can be
- dropped.
-
-- cairo_surface_set_repeat
-- cairo_surface_set_matrix
-- cairo_surface_set_filter
-
- These properties don't belong on surfaces. If you were using
- them, you'll just want to instead use
- cairo_pattern_create_for_surface and then set these properties
- on the pattern.
-
-- cairo_copy
-
- This was a confusing function and hopefully nobody will miss
- it. But if you really don't find cairo_save/restore adequate,
- let us know and we have another idea for a potential
- replacement.
-
-And while we're on the subject of removals, we carefully tightened up
-the cairo header files so they no longer gratuitously include header
-files that are not strictly necessary, (stdio.h, stdint.h, pixman.h,
-Xrender.h, etc. and their dependencies). This may lead to some
-surprising errors, so keep your eyes open for that.
-
-API changes
-===========
-Here are some of the API changes that have occurred:
-
-~ cairo_create(void) -> cairo_create(cairo_surface_t *)
-
- This is the big change that breaks every program. The ability
- to re-target a cairo_t was not particularly useful, but it did
- introduce a lot of muddy semantic questions. To eliminate
- that, cairo_create now requires its target surface to be
- passed in at creation time. This isn't too hard to cope with
- as the typical first operation after cairo_create was often
- cairo_set_target_foo. So the order of those two swap and the
- application instead has cairo_foo_surface_create, then
- cairo_create.
-
-~ cairo_current_* -> cairo_get_*
-
- We had a strange mixture of cairo_get and cairo_current
- functions. They've all been standardized on cairo_get, (though
- note one is cairo_get_current_point).
-
-~ CAIRO_OPERATOR_SRC -> CAIRO_OPERATOR_SOURCE
-~ CAIRO_OPERATOR_OVER_REVERSE -> CAIRO_OPERATOR_DEST_OVER
-
- Many of the cairo_operator_t symbolic values were renamed to
- reduce the amount of abbreviation. The confusing "OP_REVERSE"
- naming was also changed to use "DEST_OP" instead which is
- easier to read and has wider acceptance in other
- libraries/languages.
-
-~ cairo_set_pattern -> cairo_set_source
-~ cairo_set_rgb_color -> cairo_set_source_rgb
-
- All of the various functions that changed the source
- color/pattern were unified to use cairo_set_source names to
- make the relation more clear.
-
-~ cairo_transform_point -> cairo_user_to_device
-~ cairo_transform_distance -> cairo_user_to_device_distance
-~ cairo_inverse_transform_point -> cairo_device_to_user
-~ cairo_inverse_transform_distance -> cairo_device_to_user_distance
-
- These names just seemed a lot more clear.
-
-~ cairo_init_clip -> cairo_reset_clip
-~ cairo_concat_matrix -> cairo_transform
-
- More abbreviation elimination
-
-~ cairo_current_path -> cairo_copy_path
-~ cairo_current_path_flat -> cairo_copy_path_flat
-
- The former mechanism for examining the current path was a
- function that required 3 or 4 callbacks. This was more
- complexity than warranted in most situations. The new
- cairo_copy_path function copies the current path into an
- exposed data structure, and the documentation provides a
- convenient idiom for navigating the path data.
-
-API additions
--------------
-+ cairo_paint
-
- A generalized version of the painting operators cairo_stroke
- and cairo_fill. The cairo_paint call applies the source paint
- everywhere within the current clip region. Very useful for
- clearing a surface to a solid color, or painting an image,
- (see cairo_set_source_surface).
-
-+ cairo_paint_with_alpha
-
- Like cairo_paint but applying some alpha to the source,
- (making the source paint translucent, eg. to blend an image on
- top of another).
-
-+ cairo_mask
-
- A more generalized version of cairo_paint_with_alpha which
- allows a pattern to specify the amount of translucence at each
- point rather than using a constant value everywhere.
-
-+ cairo_mask_surface
-
- A convenience function on cairo_mask for when the mask pattern
- is already contained within a surface.
-
-+ cairo_surface_set_user_data
-+ cairo_surface_get_user_data
-+ cairo_font_face_set_user_data
-+ cairo_font_face_get_user_data
-
- Associate arbitrary data with a surface or font face for later
- retrieval. Get notified when a surface or font face object is
- destroyed.
-
-+ cairo_surface_finish
-
- Allows the user to instruct cairo to finish all of its
- operations for a given surface. This provides a safe point for
- doing things such as flushing and closing files that the
- surface may have had open for writing.
-
-+ cairo_fill_preserve
-+ cairo_stroke_preserve
-+ cairo_clip_preserve
-
- One interesting change in cairo is that the path is no longer
- part of the graphics state managed by
- cairo_save/restore. This allows functions to construct paths
- without interfering with the graphics state. But it prevents
- the traditional idiom for fill-and-stroke:
-
- cairo_save; cairo_fill; cairo_restore; cairo_stroke
-
- Instead we know have alternate versions cairo cairo_fill,
- cairo_stroke, and cairo_clip that preserve the current path
- rather than consuming it. So the idiom now becomes simply:
-
- cairo_fill_preserve; cairo_stroke
-
-+ cairo_surface_write_to_png
-+ cairo_surface_write_to_png_stream
-
- In place of a single PNG backend, now a surface created
- through any backend (except PDF currently) can be written out
- to a PNG image.
-
-+ cairo_image_surface_create_from_png
-+ cairo_image_surface_create_from_png_stream
-
- And its just as easy to load a PNG image into a surface as well.
-
-+ cairo_append_path
-
- With the new, exposed path data structure, it's now possible
- to append bulk path data to the current path, (rather than
- issuing a long sequence of cairo_move_to/line_to/curve_to
- function calls).
-
-Xlib and XCB backends
----------------------
-
-Any cairo_format_t and Colormap arguments have been dropped from
-cairo_xlib_surface_create. There are also two new
-cairo_xlib|xcb_surface_create functions:
-
- cairo_xlib|xcb_surface_create_for_bitmap
- (Particular for creating A1 surfaces)
- cairo_xlib|xcb_surface_create_with_xrender_format
- (For any other surface types, not described by a Visual*)
-
-All of these surface create functions now accept width and height. In
-addition, there are new cairo_xlib|xcb_surface_set_size functions
-which must be called each time a window that is underlying a surface
-changes size.
-
-Print backends (PS and PDF)
----------------------------
-The old FILE* based interfaces have been eliminated. In their place we
-have two different functions. One accepts a simple const char
-*filename. The other is a more general function which accepts a
-callback write function and a void* closure. This should allow the
-flexibility needed to hook up with various stream object in many
-languages.
-
-In addition, when specifying the surface size during construction, the
-units are now device-space units (ie. points) rather than inches. This
-provides consistency with all the other surface types and also makes
-it much easier to reason about the size of the surface when drawing to
-it with the default identity matrix.
-
-Finally, the DPI parameters, which are only needed to control the
-quality of fallbacks, have been made optional. Nothing is required
-during surface_create (300 DPI is assumed) and
-cairo_ps|pdf_surface_set_dpi can be used to set alternate values if
-needed.
-
-Font system
------------
-Owen very graciously listened to feedback after the big font rework he
-had done for 0.4, and came up with way to improve it even more. In 0.4
-there was a cairo_font_t that was always pre-scaled. Now, there is an
-unscaled cairo_font_face_t which is easier to construct, (eg. no
-scaling matrix required) and work with, (it can be scaled and
-transformed after being set on the graphics state). And the font size
-manipulation functions are much easier. You can set an explicit size
-and read/modify/write the font matrix with:
-
- cairo_set_font_size
- cairo_get_font_matrix
- cairo_set_font_matrix
-
-(Previously you could only multiply in a scale factor or a matrix.) A
-pleasant side effect is that we can (and do) now have a default font
-size that is reasonable, as opposed to the old default height of one
-device-space unit which was useless until scaled.
-
-Of course, the old pre-scaled font had allowed some performance
-benefits when getting many metrics for a font. Those benefits are
-still made available through the new cairo_scaled_font_t. And a
-cairo_font_face_t can be "promoted" to a cairo_scaled_font_t by
-suppling a font_matrix and the desired CTM.
-
-Quartz backend
---------------
-Tim Rowley put in the work to bring the Quartz backend back after it
-had been disabled in the 0.4.0 snapshot. He was not able to bring back
-the function that allows one to create a cairo_font_t from an ATSUI
-style:
-
- cairo_font_t *
- cairo_atsui_font_create (ATSUStyle style);
-
-because he didn't have a test case for it. If you care about this
-function, please provide a fairly minimal test and we'll try to bring
-it back in an upcoming snapshot.
-
-Snapshot 0.4.0 (2005-03-08 Carl Worth <cworth@cworth.org>)
-==========================================================
-New documentation
------------------
-Owen Taylor has converted cairo's documentation system to gtk-doc and
-has begun some long-needed work on the documentation, which can now be
-viewed online here:
-
- http://cairographics.org/manual/
-
-New backend: win32
-------------------
-This is the first snapshot to include a functional win32 backend,
-(thanks to Owen Taylor). The interface is as follows:
-
- #include <cairo-win32.h>
-
- void
- cairo_set_target_win32 (cairo_t *cr,
- HDC hdc);
-
- cairo_surface_t *
- cairo_win32_surface_create (HDC hdc);
-
- cairo_font_t *
- cairo_win32_font_create_for_logfontw (LOGFONTW *logfont,
- cairo_matrix_t *scale);
-
- cairo_status_t
- cairo_win32_font_select_font (cairo_font_t *font,
- HDC hdc);
-
- void
- cairo_win32_font_done_font (cairo_font_t *font);
-
- double
- cairo_win32_font_get_scale_factor (cairo_font_t *font);
-
-And see also the documentation at:
-
-http://cairographics.org/manual/cairo-Microsoft-Windows-Backend.html
-
-Disabled backend: quartz
-------------------------
-Unfortunately, the quartz backend code is currently out of date with
-respect to some recent backend interface changes. So, the quartz
-backend is disabled in this snapshot.
-
-If the quartz backend is brought up-to-date before the next snapshot,
-we would be glad to make a 0.4.1 snapshot that re-enables it, (we do
-not expect many more big backend interface changes).
-
-API Changes
------------
-The font system has been revamped, (as Owen Taylor's work with
-integrating pango and cairo gave us the first serious usage of the
-non-toy font API).
-
-One fundamental, user-visible change is that the cairo_font_t object
-now represents a font that is scaled to a particular device
-resolution. Further changes are described below.
-
- cairo.h
- -------
- Removed cairo_font_set_transform and cairo_font_current_transform.
-
- Added cairo_font_extents and cairo_font_glyph_extents. See
- documentation for details:
-
- http://cairographics.org/manual/cairo-cairo-t.html#cairo-font-extents
-
- cairo-ft.h
- ----------
- The cairo_ft_font API changed considerably. Please see the
- documentation for details:
-
- http://cairographics.org/manual/cairo-FreeType-Fonts.html
-
-Performance
------------
-Make the fast-path clipping (pixel-aligned rectangles) faster.
-
-Add optimization for applying a constant alpha to a pattern.
-
-Optimize gradients that are horizontal or vertical in device space.
-
-Xlib: When RENDER is not available, use image surfaces for
-intermediate surfaces rather than xlib surfaces.
-
-Backend-specific changes
-------------------------
- Glitz
- -----
- Major update to glitz backend. The output quality should now be just
- as good as the image and xlib backends.
-
- Track changes to glitz 0.4.0.
-
- PDF
- ---
- Various improvements to produce more conformant output.
-
-Internals
----------
-David Reveman contributed a large re-work of the cairo_pattern_t
-implementation, providing cleaner code and more optimization
-opportunities.
-
- Backend interface changes
- -------------------------
- Rework backend interface to accept patterns, not surfaces for source
- and mask.
-
- Remove set_matrix, set_filter, and set_repeat functions.
-
- More sophisticated backend interface for image fallbacks,
- ({acquire,release}_{source,dest}_image() and clone_similar).
-
-Bug fixes
----------
-Only install header files for backends that have been compiled.
-
-Fixed some rounding errors leading to incorrectly placed glyphs.
-
-Many other minor fixes.
-
-Snapshot 0.3.0 (2005-01-21 Carl Worth <cworth@cworth.org>)
-==========================================================
-Major API changes
------------------
-1) The public header files will no longer be directly installed into
- the system include directory. They will now be installed in a
- subdirectory named "cairo", (eg. in /usr/include/cairo rather than
- in /usr/include).
-
- As always, the easiest way for applications to discover the
- location of the header file is to let pkg-config generate the
- necessary -I CFLAGS and -L/-l LDFLAGS. For example:
-
- cc `pkg-config --cflags --libs cairo` -o foo foo.c
-
- IMPORTANT: Users with old versions of cairo installed will need to
- manually remove cairo.h and cairo-features.h from the
- system include directories in order to prevent the old
- headers from being used in preference to the new ones.
-
-2) The backend-specific portions of the old monolithic cairo.h have
- been split out into individual public header files. The new files
- are:
-
- cairo-atsui.h
- cairo-ft.h
- cairo-glitz.h
- cairo-pdf.h
- cairo-png.h
- cairo-ps.h
- cairo-quartz.h
- cairo-xcb.h
- cairo-xlib.h
-
- Applications will need to be modified to explicitly include the new
- header files where appropriate.
-
-3) There are two new graphics backends in this snapshot, a PDF
- backend, and a Quartz backend. There is also one new font backend,
- ATSUI.
-
-PDF backend
------------
-Kristian Høgsberg has contributed a new backend to allow cairo-based
-applications to generate PDF output. The interface for creating a PDF
-surface is similar to that of the PS backend, as can be seen in
-cairo-pdf.h:
-
- void
- cairo_set_target_pdf (cairo_t *cr,
- FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
-
- cairo_surface_t *
- cairo_pdf_surface_create (FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
-
-Once a PDF surface has been created, applications can draw to it as
-any other cairo surface.
-
-This code is still a bit rough around the edges, and does not yet
-support clipping, surface patterns, or transparent gradients. Text
-only works with TrueType fonts at this point and only black text is
-supported. Also, the size of the generated PDF files is currently
-quite big.
-
-Kristian is still actively developing this backend, so watch this
-space for future progress.
-
-Quartz backend
---------------
-Calum Robinson has contributed a new backend to allow cairo
-applications to target native Mac OS X windows through the Quartz
-API. Geoff Norton integrated this backend into the current
-configure-based build system, while Calum also provided Xcode build
-support in the separate "macosx" module available in CVS.
-
-The new interface, available in cairo-quartz.h, is as follows:
-
- void
- cairo_set_target_quartz_context (cairo_t *cr,
- CGContextRef context,
- int width,
- int height);
-
- cairo_surface_t *
- cairo_quartz_surface_create (CGContextRef context,
- int width,
- int height);
-
-There is an example program available in CVS in cairo-demo/quartz. It
-is a port of Keith Packard's fdclock program originally written for
-the xlib backend. A screenshot of this program running on Mac OS X is
-available here:
-
- http://cairographics.org/~cworth/images/fdclock-quartz.png
-
-ATSUI font backend
-------------------
-This new font backend complements the Quartz backend by allowing
-applications to use native font selection on Mac OS X. The interface
-is a single new function:
-
- cairo_font_t *
- cairo_atsui_font_create (ATSUStyle style);
-
-Minor API changes
------------------
-Prototype for non-existent function "cairo_ft_font_destroy" removed.
-
-Now depends on libpixman 0.1.2 or newer, (0.1.3 is being released
-concurrently and has some useful performance improvements).
-
-Default paint color is now opaque black, (was opaque white). Default
-background color is transparent (as before).
-
-Renamed "struct cairo" to "struct _cairo" to free up the word "cairo"
-from the C++ identifier name space.
-
-Functions returning multiple return values through provided pointers,
-(cairo_matrix_get_affine, cairo_current_point, and
-cairo_current_color_rgb), will now accept NULL for values the user
-wants to ignore.
-
-CAIRO_HAS_FREETYPE_FONT has now been renamed to CAIRO_HAS_FT_FONT.
-
-Performance improvements
-------------------------
-Alexander Larsson provided some fantastic performance improvements
-yielding a 10000% performance improvement in his application, (when
-also including his performance work in libpixman-0.1.3). These include
-
- * Fixed handling of cache misses.
-
- * Creating intermediate clip surfaces at the minimal size required.
-
- * Eliminating roundtrips when creating intermediate Xlib surfaces.
-
-Implementation
---------------
-Major re-work of font metrics system by Keith Packard. Font metrics
-should now be much more reliable.
-
-Glitz backend
--------------
-Updated for glitz-0.3.0.
-Bug fixes in reference counting.
-
-Test suite
-----------
-New tests for cache crashing, rotating text, improper filling of
-complex polygons, and leaky rasterization.
-
-Bug fixes
----------
-Fixed assertion failure when selecting the same font multiple times in
-sequence.
-
-Fixed reference counting so cache_destroy functions work.
-
-Remove unintended copyright statement from files generated with
-PostScript backend.
-
-Fixed to eliminate new warnings from gcc 3.4 and gcc 4.
-
-Snapshot 0.2.0 (2004-10-27 Carl Worth <cworth@cworth.org>)
-===========================================================
-New license: LGPL/MPL
----------------------
-The most significant news with this release is that the license of
-cairo has changed. It is now dual-licensed under the LGPL and the
-MPL. For details see the COPYING file as well as COPYING-LGPL-2.1 and
-COPYING-MPL-1.1.
-
-I express my thanks to everyone involved in the license change process
-for their patience and support!
-
-New font and glyph internals
-----------------------------
-Graydon Hoare has put a tremendous amount of work into new internals
-for handling fonts and glyphs, including caches where appropriate.
-This work has no impact on the user-level API, but should result in
-great performance improvements for applications using text.
-
-New test suite
---------------
-This snapshot of cairo includes a (small) test suite in
-cairo/test. The tests can be run with "make check". The test suite was
-designed to make it very easy to add new tests, and we hope to see
-many contributions here. As you find bugs, please try adding a minimal
-test case to the suite, and submit it with the bug report to the
-cairo@cairographics.org mailing list. This will make it much easier
-for us to track progress in fixing bugs.
-
-New name for glitz backend
---------------------------
-The gl backend has now been renamed to the glitz backend. This means
-that the following names have changed:
-
- CAIRO_HAS_GL_SURFACE -> CAIRO_HAS_GLITZ_SURFACE
- cairo_set_target_gl -> cairo_set_target_glitz
- cairo_gl_surface_create -> cairo_glitz_surface_create
-
-This change obviously breaks backwards compatibility for applications
-using the old gl backend.
-
-Up-to-date with latest glitz snapshots
---------------------------------------
-This snapshot of cairo is now up to date with the latest glitz
-snapshot, (currently 0.2.3). We know that the latest cairo and glitz
-snapshots have been incompatible for a very long time. We've finally
-fixed that now and we're determined to not let that happen again.
-
-Revert some tessellation regression bugs
-----------------------------------------
-People that have been seeing some tessellation bugs, (eg. leaked
-fills), in the CVS version of cairo may have better luck with this
-release. A change since the last snapshot was identified to trigger
-some of these bugs and was reverted before making the snapshot. The
-behavior should be the same as the previous (0.1.23) snapshot.
-
-Miscellaneous changes
----------------------
-Changed CAIRO_FILTER_DEFAULT to CAIRO_FILTER_BEST to make gradients
-easier.
-
-Track XCB API change regarding iterators.
-
-Various bug fixes
------------------
-Fix calculation of required number of vertices for pen.
-
-Fix to avoid zero-dimensioned pixmaps.
-
-Fix broken sort of pen vertices.
-
-Fix bug when cairo_show_text called with a NULL string.
-
-Fix clipping bugs.
-
-Fix bug in computing image length with XCB.
-
-Fix infinite loop bug in cairo_arc.
-
-Fix memory management interactions with libpixman.
-
-Snapshot 0.1.23 (2004-05-11 Carl Worth <cworth@isi.edu>)
-========================================================
-Fixes for gcc 3.4
------------------
-Fix prototype mismatches so that cairo can be built by gcc 3.4.
-
-Updates to track glitz
-----------------------
-Various fixes to support the latest glitz snapshot (0.1.2).
-
-Gradient updates
-----------------
-Radial gradients now support both inner and outer circles.
-Transformed linear gradients are now properly handled.
-Fixes for extend type reflect.
-
-Glitz updates
--------------
-Converted shading routines to use fixed point values and introduced a
-shading operator structure for more efficient shading calculations.
-Support compositing with mask surface when mask is solid or
-multi-texturing is available.
-
-PNG backend cleanups
---------------------
-Fix output to properly compensate for pre-multiplied alpha format in cairo.
-Add support for A8 and A1 image formats.
-
-Bug fixes
----------
-Avoid crash or infinite loop on null strings and degeneratively short
-splines.
-
-New? bugs in cairo_clip
------------------------
-There are some fairly serious bugs in cairo_clip. It is sometimes
-causing an incorrect result. And even when it does work, it is
-sometimes so slow as to be unusable. Some of these bugs may not be
-new, (indeed cairo_clip has only ever had a braindead-slow
-implementation), but I think they're worth mentioning here.
-
-Snapshot 0.1.22 (2004-04-16 Carl Worth <cworth@isi.edu>)
-========================================================
-Cairo was updated to track the changes in libpixman, and now depends
-on libpixman version 0.1.1.
-
-Snapshot 0.1.21 (2004-04-09 David Reveman <c99drn@cs.umu.se>)
-=============================================================
-New OpenGL backend
-------------------
-The OpenGL backend provides hardware accelerated output for
-X11 and OS X. The significant new functions are:
-
- cairo_set_target_gl
- cairo_gl_surface_create
-
-Automatic detection of available backends
------------------------------------------
-The configure script now automatically detect what backends are
-available, (use ./configure --disable-`backend' to prevent
-compilation of specific backends).
-
-Snapshot 0.1.20 (2004-04-06 Carl Worth <cworth@isi.edu>)
-========================================================
-New pattern API
----------------
-David Reveman has contributed a new pattern API which enable linear
-and radial gradient patterns in addition to the original surface-based
-patterns. The significant new top-level functions are:
-
- cairo_pattern_create_linear
- cairo_pattern_create_radial
- cairo_pattern_create_for_surface
- cairo_pattern_add_color_stop
- cairo_set_pattern
-
-Any code using the old cairo_set_pattern, (which accepted a
-cairo_surface_t rather than a cairo_pattern_t), will need to be
-updated.
-
-Update to XCB backend
----------------------
-The XCB backend is now enabled by default, (use ./configure
---disable-xcb to turn it off).
-
-Faster clipping
----------------
-Graydon Hoare has added optimizations that make cairo_clip much faster
-when the path is a pixel-aligned, rectangular region.
-
-Bug fixes.
-
-Snapshot 0.1.19 (2004-02-24 Carl Worth <cworth@isi.edu>)
-========================================================
-New PNG backend
----------------
-Olivier Andrieu contributed a new PNG backend. It builds on the
-existing image backend to make it easy to render "directly" to a
-.png file. The user never needs to deal with the actual image
-buffer. The significant new functions are:
-
- cairo_set_target_png
- cairo_png_surface_create
-
-The PNG backend is not enabled by default so that by default there is
-not a new dependency on libpng. Use ./configure --enable-png to enable
-this backend.
-
-Snapshot 0.1.18 (2004-02-17 Carl Worth <cworth@isi.edu>)
-========================================================
-Path query functionality
-------------------------
-It's now possible to query the current path. The two new functions
-are:
-
- cairo_current_path
- cairo_current_path_flat
-
-Each function accepts a number of callback functions that will be
-called for each element in the path (move_to, line_to, curve_to,
-close_path). The cairo_current_path_flat function does not accept a
-curve_to callback. Instead, all curved portions of the path will be
-converted to line segments, (within the current tolerance value). This
-can be handy for doing things like text-on-path without having to
-manually interpolate Bézier splines.
-
-New XCB backend
----------------
-Jamey Sharp has contributed a second X backend that uses the new, lean
-XCB library rather than Xlib. It cannot currently be compiled at the
-same time as the Xlib backend. See ./configure --enable-xcb.
-
-Build fixes for cygwin.
-
-Bug fixes.
-
-Snapshot 0.1.17 (2003-12-16 Carl Worth <cworth@isi.edu>)
-========================================================
-
-Better text support
--------------------
-This snapshot provides much better text support by implementing the
-following four functions:
-
- cairo_text_extents
- cairo_glyph_extents
- cairo_text_path
- cairo_glyph_path
-
-The text/glyph_extents functions can be used to determine the bounding
-box (and advance) for text as if drawn by show_text/glyphs.
-
-The text/glyph_path objects functions place text shapes on the current
-path, where they can be subsequently manipulated. For example,
-following these functions with cairo_stroke allows outline text to be
-drawn. Calling cairo_clip allows clipping to a text-shaped region.
-
-Combined dependencies
----------------------
-The cairo core now depends only on the libpixman library. This single
-library replaces the three previous libraries libic, libpixregion, and
-slim. Thanks to Dave Beckett <dave.beckett@bristol.ac.uk> for all of
-the heavy lifting with this renaming effort.
-
-Conditional compilation of backends
------------------------------------
-Cairo now allows optional backends to be disabled at compile time. The
-following options may now be passed to the configure script:
-
- --disable-xlib
- --disable-ps
-
-Note that the first option is a change from the old --without-x option
-which will no longer have any effect.
-
-OS X supported - several byte-order issues resolved
----------------------------------------------------
-Cairo has now been successfully compiled under OS X. Testing revealed
-that there were some byte-order problems in the PostScript backend and
-the PNG generation in the demos. These have now been resolved.
-
-2003-10
-=======
-Graydon Hoare <graydon@redhat.com> implemented the first real text
-support using Freetype/fontconfig, (previous versions of cairo used
-Xft and could only draw text when using an X backend).
-
-2003-09
-=======
-Graydon Hoare <graydon@redhat.com> added the first real support for
-running cairo with a non-render-aware X server.
-
-Jamey Sharp <jamey@minilop.net> virtualized the backend font and
-surface interfaces in September, 2003.
-
-2003-06
-=======
-Xr is renamed cairo to avoid confusion since it no longer had a strict
-dependence on X.
-
-2003-05
-=======
-A new image surface backend is added to Xr. Keith Packard
-<keithp@keithp.com> wrote the image compositing code in libic that is
-used for the image_surface backend. This code was originally written
-as the software fallback for the render extension within the X
-server.
-
-2002-06
-=======
-Carl Worth <cworth@isi.edu> wrote the first lines of Xr, after Keith
-Packard <keithp@keithp.com> proposed the plan for a stateful drawing
-library in C providing a PostScript-like rendering model.
-
- LocalWords: mutex BeOS extraordinaire
diff --git a/gfx/cairo/cairo/src/cairo-analysis-surface-private.h b/gfx/cairo/cairo/src/cairo-analysis-surface-private.h
index c7dcb8291..81832126c 100644
--- a/gfx/cairo/cairo/src/cairo-analysis-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-analysis-surface-private.h
@@ -1,36 +1,6 @@
-/*
- * Copyright © 2005 Keith Packard
- *
- * 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):
- * Keith Packard <keithp@keithp.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_ANALYSIS_SURFACE_H
#define CAIRO_ANALYSIS_SURFACE_H
diff --git a/gfx/cairo/cairo/src/cairo-analysis-surface.c b/gfx/cairo/cairo/src/cairo-analysis-surface.c
index 96b43285d..2be419994 100644
--- a/gfx/cairo/cairo/src/cairo-analysis-surface.c
+++ b/gfx/cairo/cairo/src/cairo-analysis-surface.c
@@ -1,38 +1,6 @@
-/*
- * Copyright © 2006 Keith Packard
- * Copyright © 2007 Adrian Johnson
- *
- * 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):
- * Keith Packard <keithp@keithp.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-arc-private.h b/gfx/cairo/cairo/src/cairo-arc-private.h
index 018a14b4a..e8dcc1394 100644
--- a/gfx/cairo/cairo/src/cairo-arc-private.h
+++ b/gfx/cairo/cairo/src/cairo-arc-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_ARC_PRIVATE_H
#define CAIRO_ARC_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-arc.c b/gfx/cairo/cairo/src/cairo-arc.c
index 56d42f19e..54a0723d0 100644
--- a/gfx/cairo/cairo/src/cairo-arc.c
+++ b/gfx/cairo/cairo/src/cairo-arc.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-array.c b/gfx/cairo/cairo/src/cairo-array.c
index 2d11402a3..442540c58 100644
--- a/gfx/cairo/cairo/src/cairo-array.c
+++ b/gfx/cairo/cairo/src/cairo-array.c
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-atomic-private.h b/gfx/cairo/cairo/src/cairo-atomic-private.h
index af462e370..e14c5fdaf 100644
--- a/gfx/cairo/cairo/src/cairo-atomic-private.h
+++ b/gfx/cairo/cairo/src/cairo-atomic-private.h
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Chris Wilson
- * Copyright © 2010 Andrea Canciani
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- * Andrea Canciani <ranma42@gmail.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_ATOMIC_PRIVATE_H
#define CAIRO_ATOMIC_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-atomic.c b/gfx/cairo/cairo/src/cairo-atomic.c
index 2af50cd38..fd5ee930b 100644
--- a/gfx/cairo/cairo/src/cairo-atomic.c
+++ b/gfx/cairo/cairo/src/cairo-atomic.c
@@ -1,35 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-base64-stream.c b/gfx/cairo/cairo/src/cairo-base64-stream.c
index 636431372..02ca8bd45 100644
--- a/gfx/cairo/cairo/src/cairo-base64-stream.c
+++ b/gfx/cairo/cairo/src/cairo-base64-stream.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005-2007 Emmanuel Pacaud <emmanuel.pacaud@free.fr>
- * Copyright © 2009 Chris Wilson
- *
- * 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 Red Hat, Inc.
- *
- * Author(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-base85-stream.c b/gfx/cairo/cairo/src/cairo-base85-stream.c
index f81affb49..ba19ff4a2 100644
--- a/gfx/cairo/cairo/src/cairo-base85-stream.c
+++ b/gfx/cairo/cairo/src/cairo-base85-stream.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Author(s):
- * Kristian Høgsberg <krh@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectangular.c b/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectangular.c
index 8c1d54f0c..4736f4f41 100644
--- a/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectangular.c
+++ b/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectangular.c
@@ -1,39 +1,6 @@
-/*
- * Copyright © 2004 Carl Worth
- * Copyright © 2006 Red Hat, Inc.
- * Copyright © 2009 Chris Wilson
- *
- * 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 Carl Worth
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Provide definitions for standalone compilation */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectilinear.c b/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectilinear.c
index 1696d9367..b00d2823b 100644
--- a/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectilinear.c
+++ b/gfx/cairo/cairo/src/cairo-bentley-ottmann-rectilinear.c
@@ -1,39 +1,6 @@
-/*
- * Copyright © 2004 Carl Worth
- * Copyright © 2006 Red Hat, Inc.
- * Copyright © 2008 Chris Wilson
- *
- * 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 Carl Worth
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Provide definitions for standalone compilation */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-bentley-ottmann.c b/gfx/cairo/cairo/src/cairo-bentley-ottmann.c
index b3819f2f7..c333becaa 100644
--- a/gfx/cairo/cairo/src/cairo-bentley-ottmann.c
+++ b/gfx/cairo/cairo/src/cairo-bentley-ottmann.c
@@ -1,39 +1,6 @@
-/*
- * Copyright © 2004 Carl Worth
- * Copyright © 2006 Red Hat, Inc.
- * Copyright © 2008 Chris Wilson
- *
- * 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 Carl Worth
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Provide definitions for standalone compilation */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-beos-surface.cpp b/gfx/cairo/cairo/src/cairo-beos-surface.cpp
index e527272e6..d52ae1513 100644
--- a/gfx/cairo/cairo/src/cairo-beos-surface.cpp
+++ b/gfx/cairo/cairo/src/cairo-beos-surface.cpp
@@ -1,38 +1,6 @@
-/* vim:set ts=8 sw=4 noet cin: */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Christian Biesinger <cbiesinger@web.de>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Christian Biesinger
- * <cbiesinger@web.de>
- *
- * Contributor(s):
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This is a C++ file in order to use the C++ BeOS API
diff --git a/gfx/cairo/cairo/src/cairo-beos.h b/gfx/cairo/cairo/src/cairo-beos.h
index fdb89a6c4..375c930cc 100644
--- a/gfx/cairo/cairo/src/cairo-beos.h
+++ b/gfx/cairo/cairo/src/cairo-beos.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Christian Biesinger <cbiesinger@web.de>
- *
- * 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 Christian Biesinger
- * <cbiesinger@web.de>
- *
- * Contributor(s):
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_BEOS_H
#define CAIRO_BEOS_H
diff --git a/gfx/cairo/cairo/src/cairo-botor-scan-converter.c b/gfx/cairo/cairo/src/cairo-botor-scan-converter.c
index 0778a5dcd..ae060dc31 100644
--- a/gfx/cairo/cairo/src/cairo-botor-scan-converter.c
+++ b/gfx/cairo/cairo/src/cairo-botor-scan-converter.c
@@ -1,43 +1,6 @@
-/*
- * Copyright © 2004 Carl Worth
- * Copyright © 2006 Red Hat, Inc.
- * Copyright © 2007 David Turner
- * Copyright © 2008 M Joonas Pihlaja
- * Copyright © 2008 Chris Wilson
- * Copyright © 2009 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 Carl Worth
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Provide definitions for standalone compilation */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-boxes-private.h b/gfx/cairo/cairo/src/cairo-boxes-private.h
index 3af0fbdef..e61a64d7c 100644
--- a/gfx/cairo/cairo/src/cairo-boxes-private.h
+++ b/gfx/cairo/cairo/src/cairo-boxes-private.h
@@ -1,35 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_BOXES_H
#define CAIRO_BOXES_H
diff --git a/gfx/cairo/cairo/src/cairo-boxes.c b/gfx/cairo/cairo/src/cairo-boxes.c
index 31bfc0e4e..e29dd7e13 100644
--- a/gfx/cairo/cairo/src/cairo-boxes.c
+++ b/gfx/cairo/cairo/src/cairo-boxes.c
@@ -1,35 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-cache-private.h b/gfx/cairo/cairo/src/cairo-cache-private.h
index 927ff0c0b..06940a63a 100644
--- a/gfx/cairo/cairo/src/cairo-cache-private.h
+++ b/gfx/cairo/cairo/src/cairo-cache-private.h
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc.
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Keith Packard <keithp@keithp.com>
- * Graydon Hoare <graydon@redhat.com>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_CACHE_PRIVATE_H
#define CAIRO_CACHE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-cache.c b/gfx/cairo/cairo/src/cairo-cache.c
index 5c4e4caa3..021b012fd 100644
--- a/gfx/cairo/cairo/src/cairo-cache.c
+++ b/gfx/cairo/cairo/src/cairo-cache.c
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc.
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Keith Packard <keithp@keithp.com>
- * Graydon Hoare <graydon@redhat.com>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-cff-subset.c b/gfx/cairo/cairo/src/cairo-cff-subset.c
index f9b036814..6a5060047 100644
--- a/gfx/cairo/cairo/src/cairo-cff-subset.c
+++ b/gfx/cairo/cairo/src/cairo-cff-subset.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 Adrian Johnson
- *
- * 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 Adrian Johnson.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- * Eugeniy Meshcheryakov <eugen@debian.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Useful links:
diff --git a/gfx/cairo/cairo/src/cairo-clip-private.h b/gfx/cairo/cairo/src/cairo-clip-private.h
index faf486409..04d80afc7 100644
--- a/gfx/cairo/cairo/src/cairo-clip-private.h
+++ b/gfx/cairo/cairo/src/cairo-clip-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_CLIP_PRIVATE_H
#define CAIRO_CLIP_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-clip.c b/gfx/cairo/cairo/src/cairo-clip.c
index 0ebe9b207..cbbf4d2ce 100644
--- a/gfx/cairo/cairo/src/cairo-clip.c
+++ b/gfx/cairo/cairo/src/cairo-clip.c
@@ -1,43 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2009 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Kristian Høgsberg <krh@redhat.com>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-clip-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-color.c b/gfx/cairo/cairo/src/cairo-color.c
index d20fea4d2..b9dae237e 100644
--- a/gfx/cairo/cairo/src/cairo-color.c
+++ b/gfx/cairo/cairo/src/cairo-color.c
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-combsort-private.h b/gfx/cairo/cairo/src/cairo-combsort-private.h
index bb7abb477..3400a681c 100644
--- a/gfx/cairo/cairo/src/cairo-combsort-private.h
+++ b/gfx/cairo/cairo/src/cairo-combsort-private.h
@@ -1,36 +1,6 @@
-/*
- * Copyright © 2008 Chris Wilson
- *
- * 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 Chris Wilson
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This fragment implements a comb sort (specifically combsort11) */
#ifndef _HAVE_CAIRO_COMBSORT_NEWGAP
diff --git a/gfx/cairo/cairo/src/cairo-compiler-private.h b/gfx/cairo/cairo/src/cairo-compiler-private.h
index 18dc661bd..34cfe0956 100644
--- a/gfx/cairo/cairo/src/cairo-compiler-private.h
+++ b/gfx/cairo/cairo/src/cairo-compiler-private.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_COMPILER_PRIVATE_H
#define CAIRO_COMPILER_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-composite-rectangles-private.h b/gfx/cairo/cairo/src/cairo-composite-rectangles-private.h
index 8c3c5abcc..ddbe6bb1a 100644
--- a/gfx/cairo/cairo/src/cairo-composite-rectangles-private.h
+++ b/gfx/cairo/cairo/src/cairo-composite-rectangles-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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 University of Southern
- * California.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.u>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H
#define CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-composite-rectangles.c b/gfx/cairo/cairo/src/cairo-composite-rectangles.c
index 7f6484339..a7b499cf4 100644
--- a/gfx/cairo/cairo/src/cairo-composite-rectangles.c
+++ b/gfx/cairo/cairo/src/cairo-composite-rectangles.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-d2d-private.h b/gfx/cairo/cairo/src/cairo-d2d-private.h
index 15810eb6d..00244b497 100644
--- a/gfx/cairo/cairo/src/cairo-d2d-private.h
+++ b/gfx/cairo/cairo/src/cairo-d2d-private.h
@@ -1,38 +1,7 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2010 Mozilla Foundation
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 the Mozilla Foundation
- *
- * Contributor(s):
- * Bas Schouten <bschouten@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
#ifndef CAIRO_D2D_PRIVATE_H
#define CAIRO_D2D_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
index cb90245dc..6aa8a3503 100644
--- a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
+++ b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
@@ -1,38 +1,7 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2010 Mozilla Foundation
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 the Mozilla Foundation
- *
- * Contributor(s):
- * Bas Schouten <bschouten@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
#define INITGUID
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-debug.c b/gfx/cairo/cairo/src/cairo-debug.c
index e9e72b6aa..49bf31594 100644
--- a/gfx/cairo/cairo/src/cairo-debug.c
+++ b/gfx/cairo/cairo/src/cairo-debug.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-deflate-stream.c b/gfx/cairo/cairo/src/cairo-deflate-stream.c
index ba5f18392..b6d10b12a 100644
--- a/gfx/cairo/cairo/src/cairo-deflate-stream.c
+++ b/gfx/cairo/cairo/src/cairo-deflate-stream.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 Adrian Johnson
- *
- * 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 Adrian Johnson.
- *
- * Author(s):
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-deprecated.h b/gfx/cairo/cairo/src/cairo-deprecated.h
index 7a56aadbf..04b5d264d 100644
--- a/gfx/cairo/cairo/src/cairo-deprecated.h
+++ b/gfx/cairo/cairo/src/cairo-deprecated.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_DEPRECATED_H
#define CAIRO_DEPRECATED_H
diff --git a/gfx/cairo/cairo/src/cairo-device-private.h b/gfx/cairo/cairo/src/cairo-device-private.h
index 6eb44f3b6..371f66714 100644
--- a/gfx/cairo/cairo/src/cairo-device-private.h
+++ b/gfx/cairo/cairo/src/cairo-device-private.h
@@ -1,37 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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 Intel Corporation.
- *
- * Contributors(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _CAIRO_DEVICE_PRIVATE_H_
#define _CAIRO_DEVICE_PRIVATE_H_
diff --git a/gfx/cairo/cairo/src/cairo-device.c b/gfx/cairo/cairo/src/cairo-device.c
index 15b048477..d24dba94c 100644
--- a/gfx/cairo/cairo/src/cairo-device.c
+++ b/gfx/cairo/cairo/src/cairo-device.c
@@ -1,37 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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 Intel Corporation.
- *
- * Contributors(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-device-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-directfb-surface.c b/gfx/cairo/cairo/src/cairo-directfb-surface.c
index fc7509c1a..6387fee94 100644
--- a/gfx/cairo/cairo/src/cairo-directfb-surface.c
+++ b/gfx/cairo/cairo/src/cairo-directfb-surface.c
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Michael Emmel <mike.emmel@gmail.com>
- * Claudio Ciccani <klan@users.sf.net>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-directfb.h"
diff --git a/gfx/cairo/cairo/src/cairo-directfb.h b/gfx/cairo/cairo/src/cairo-directfb.h
index e3d818c66..029b43ef7 100644
--- a/gfx/cairo/cairo/src/cairo-directfb.h
+++ b/gfx/cairo/cairo/src/cairo-directfb.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@isi.edu>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Environment variables affecting the backend:
diff --git a/gfx/cairo/cairo/src/cairo-drm.h b/gfx/cairo/cairo/src/cairo-drm.h
index 907610dcd..bbdb28ba2 100644
--- a/gfx/cairo/cairo/src/cairo-drm.h
+++ b/gfx/cairo/cairo/src/cairo-drm.h
@@ -1,34 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Chris Wilson.
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_DRM_H
#define CAIRO_DRM_H
diff --git a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
index f3d45da1e..391f2e8a7 100644
--- a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
+++ b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
@@ -1,38 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2010 Mozilla Foundation
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 the Mozilla Foundation
- *
- * Contributor(s):
- * Bas Schouten <bschouten@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-dwrite-private.h b/gfx/cairo/cairo/src/cairo-dwrite-private.h
index 7c76abf5e..1eaa46113 100644
--- a/gfx/cairo/cairo/src/cairo-dwrite-private.h
+++ b/gfx/cairo/cairo/src/cairo-dwrite-private.h
@@ -1,38 +1,7 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2010 Mozilla Foundation
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 the Mozilla Foundation
- *
- * Contributor(s):
- * Bas Schouten <bschouten@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
#include <dwrite_1.h>
#include <d2d1.h>
diff --git a/gfx/cairo/cairo/src/cairo-eagle-context.c b/gfx/cairo/cairo/src/cairo-eagle-context.c
index 23766a944..5f59f5239 100644
--- a/gfx/cairo/cairo/src/cairo-eagle-context.c
+++ b/gfx/cairo/cairo/src/cairo-eagle-context.c
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Eric Anholt
- * Copyright © 2009 Chris Wilson
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-error-private.h b/gfx/cairo/cairo/src/cairo-error-private.h
index fc0c56438..c7a9f7098 100644
--- a/gfx/cairo/cairo/src/cairo-error-private.h
+++ b/gfx/cairo/cairo/src/cairo-error-private.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _CAIRO_ERROR_PRIVATE_H_
#define _CAIRO_ERROR_PRIVATE_H_
diff --git a/gfx/cairo/cairo/src/cairo-features.h.in b/gfx/cairo/cairo/src/cairo-features.h.in
index ee76be9ca..e3db6a8f2 100644
--- a/gfx/cairo/cairo/src/cairo-features.h.in
+++ b/gfx/cairo/cairo/src/cairo-features.h.in
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_FEATURES_H
#define CAIRO_FEATURES_H
diff --git a/gfx/cairo/cairo/src/cairo-fixed-private.h b/gfx/cairo/cairo/src/cairo-fixed-private.h
index 9478d7d4f..a00e99cf3 100644
--- a/gfx/cairo/cairo/src/cairo-fixed-private.h
+++ b/gfx/cairo/cairo/src/cairo-fixed-private.h
@@ -1,38 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Mozilla 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 Mozilla Foundation
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@pobox.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_FIXED_PRIVATE_H
#define CAIRO_FIXED_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-fixed-type-private.h b/gfx/cairo/cairo/src/cairo-fixed-type-private.h
index 2bbd5f786..d2bf6cb66 100644
--- a/gfx/cairo/cairo/src/cairo-fixed-type-private.h
+++ b/gfx/cairo/cairo/src/cairo-fixed-type-private.h
@@ -1,38 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Mozilla 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 Mozilla Foundation
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@pobox.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_FIXED_TYPE_PRIVATE_H
#define CAIRO_FIXED_TYPE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-fixed.c b/gfx/cairo/cairo/src/cairo-fixed.c
index 03e055923..75805f3d3 100644
--- a/gfx/cairo/cairo/src/cairo-fixed.c
+++ b/gfx/cairo/cairo/src/cairo-fixed.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-font-face-twin.c b/gfx/cairo/cairo/src/cairo-font-face-twin.c
index 98c6dd8a9..da85cb08e 100644
--- a/gfx/cairo/cairo/src/cairo-font-face-twin.c
+++ b/gfx/cairo/cairo/src/cairo-font-face-twin.c
@@ -1,38 +1,6 @@
-/*
- * Copyright © 2004 Keith Packard
- * Copyright © 2008 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Keith Packard
- *
- * Contributor(s):
- * Keith Packard <keithp@keithp.com>
- * Behdad Esfahbod <behdad@behdad.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-font-face.c b/gfx/cairo/cairo/src/cairo-font-face.c
index a66054ead..ab17a8cb2 100644
--- a/gfx/cairo/cairo/src/cairo-font-face.c
+++ b/gfx/cairo/cairo/src/cairo-font-face.c
@@ -1,42 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Graydon Hoare <graydon@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-font-options.c b/gfx/cairo/cairo/src/cairo-font-options.c
index 5d59fb0f2..17a892160 100644
--- a/gfx/cairo/cairo/src/cairo-font-options.c
+++ b/gfx/cairo/cairo/src/cairo-font-options.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-fontconfig-private.h b/gfx/cairo/cairo/src/cairo-fontconfig-private.h
index ea873abe7..110304b18 100644
--- a/gfx/cairo/cairo/src/cairo-fontconfig-private.h
+++ b/gfx/cairo/cairo/src/cairo-fontconfig-private.h
@@ -1,43 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2000 Keith Packard
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2010 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Graydon Hoare <graydon@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- * Keith Packard <keithp@keithp.com>
- * Carl Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _CAIRO_FONTCONFIG_PRIVATE_H
#define _CAIRO_FONTCONFIG_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-freed-pool-private.h b/gfx/cairo/cairo/src/cairo-freed-pool-private.h
index c73e593c0..c23e5a03a 100644
--- a/gfx/cairo/cairo/src/cairo-freed-pool-private.h
+++ b/gfx/cairo/cairo/src/cairo-freed-pool-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_FREED_POOL_H
#define CAIRO_FREED_POOL_H
diff --git a/gfx/cairo/cairo/src/cairo-freed-pool.c b/gfx/cairo/cairo/src/cairo-freed-pool.c
index 5b1c4c0bb..c65f4626d 100644
--- a/gfx/cairo/cairo/src/cairo-freed-pool.c
+++ b/gfx/cairo/cairo/src/cairo-freed-pool.c
@@ -1,39 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c
index e51923a5d..1a2799b86 100644
--- a/gfx/cairo/cairo/src/cairo-ft-font.c
+++ b/gfx/cairo/cairo/src/cairo-ft-font.c
@@ -1,42 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2000 Keith Packard
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Graydon Hoare <graydon@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- * Keith Packard <keithp@keithp.com>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for strdup() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-ft-private.h b/gfx/cairo/cairo/src/cairo-ft-private.h
index ff6ad4e65..42a1776ed 100644
--- a/gfx/cairo/cairo/src/cairo-ft-private.h
+++ b/gfx/cairo/cairo/src/cairo-ft-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Graydon Hoare <graydon@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_FT_PRIVATE_H
#define CAIRO_FT_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-ft.h b/gfx/cairo/cairo/src/cairo-ft.h
index 56d48c328..2f584066f 100644
--- a/gfx/cairo/cairo/src/cairo-ft.h
+++ b/gfx/cairo/cairo/src/cairo-ft.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Graydon Hoare <graydon@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_FT_H
#define CAIRO_FT_H
diff --git a/gfx/cairo/cairo/src/cairo-gl-glyphs.c b/gfx/cairo/cairo/src/cairo-gl-glyphs.c
index 4736e190e..883883fbf 100644
--- a/gfx/cairo/cairo/src/cairo-gl-glyphs.c
+++ b/gfx/cairo/cairo/src/cairo-gl-glyphs.c
@@ -1,40 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- * Copyright © 2010 Intel Corporation
- * Copyright © 2010 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Chris Wilson.
- *
- * Contributors:
- * Benjamin Otte <otte@gnome.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-gl-private.h b/gfx/cairo/cairo/src/cairo-gl-private.h
index 54f226f42..96a2a1b5b 100644
--- a/gfx/cairo/cairo/src/cairo-gl-private.h
+++ b/gfx/cairo/cairo/src/cairo-gl-private.h
@@ -1,43 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Eric Anholt
- * Copyright © 2009 Chris Wilson
- * Copyright © 2005,2010 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Benjamin Otte <otte@gnome.org>
- * Carl Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- * Eric Anholt <eric@anholt.net>
- * T. Zachary Laine <whatwasthataddress@gmail.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_GL_PRIVATE_H
#define CAIRO_GL_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-gl-shaders.c b/gfx/cairo/cairo/src/cairo-gl-shaders.c
index d7773f567..d0edffa88 100644
--- a/gfx/cairo/cairo/src/cairo-gl-shaders.c
+++ b/gfx/cairo/cairo/src/cairo-gl-shaders.c
@@ -1,41 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 T. Zachary Laine
- * Copyright © 2010 Eric Anholt
- * Copyright © 2010 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is T. Zachary Laine.
- *
- * Contributor(s):
- * Benjamin Otte <otte@gnome.org>
- * Eric Anholt <eric@anholt.net>
- * T. Zachary Laine <whatwasthataddress@gmail.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-gl-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-gl-surface.c b/gfx/cairo/cairo/src/cairo-gl-surface.c
index 278e6429d..458300050 100644
--- a/gfx/cairo/cairo/src/cairo-gl-surface.c
+++ b/gfx/cairo/cairo/src/cairo-gl-surface.c
@@ -1,42 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Eric Anholt
- * Copyright © 2009 Chris Wilson
- * Copyright © 2005,2010 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Benjamin Otte <otte@gnome.org>
- * Carl Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- * Eric Anholt <eric@anholt.net>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-gl.h b/gfx/cairo/cairo/src/cairo-gl.h
index 131d1148b..17c5b03f1 100644
--- a/gfx/cairo/cairo/src/cairo-gl.h
+++ b/gfx/cairo/cairo/src/cairo-gl.h
@@ -1,35 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Eric Anholt
- * Copyright © 2009 Chris Wilson
- *
- * 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 Eric Anholt.
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_GL_H
#define CAIRO_GL_H
diff --git a/gfx/cairo/cairo/src/cairo-glitz-private.h b/gfx/cairo/cairo/src/cairo-glitz-private.h
index 8a876eeab..144eff4a5 100644
--- a/gfx/cairo/cairo/src/cairo-glitz-private.h
+++ b/gfx/cairo/cairo/src/cairo-glitz-private.h
@@ -1,34 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Red Hat, Inc.
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_GLITZ_PRIVATE_H
#define CAIRO_GLITZ_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-glitz-surface.c b/gfx/cairo/cairo/src/cairo-glitz-surface.c
index 5f97f65e8..bd176d056 100644
--- a/gfx/cairo/cairo/src/cairo-glitz-surface.c
+++ b/gfx/cairo/cairo/src/cairo-glitz-surface.c
@@ -1,28 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 David Reveman
- *
- * 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 David
- * Reveman not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. David Reveman makes no representations about the
- * suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * DAVID REVEMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL DAVID REVEMAN 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.
- *
- * Author: David Reveman <davidr@novell.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-glitz.h"
diff --git a/gfx/cairo/cairo/src/cairo-glitz.h b/gfx/cairo/cairo/src/cairo-glitz.h
index 08519dcbd..b74e887bc 100644
--- a/gfx/cairo/cairo/src/cairo-glitz.h
+++ b/gfx/cairo/cairo/src/cairo-glitz.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_GLITZ_H
#define CAIRO_GLITZ_H
diff --git a/gfx/cairo/cairo/src/cairo-glx-context.c b/gfx/cairo/cairo/src/cairo-glx-context.c
index fa9d8be96..1ceab6cc3 100644
--- a/gfx/cairo/cairo/src/cairo-glx-context.c
+++ b/gfx/cairo/cairo/src/cairo-glx-context.c
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Eric Anholt
- * Copyright © 2009 Chris Wilson
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-gstate-private.h b/gfx/cairo/cairo/src/cairo-gstate-private.h
index b41c7a296..e8127d770 100644
--- a/gfx/cairo/cairo/src/cairo-gstate-private.h
+++ b/gfx/cairo/cairo/src/cairo-gstate-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_GSTATE_PRIVATE_H
#define CAIRO_GSTATE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
index cb07b511f..6ba6f0b1d 100644
--- a/gfx/cairo/cairo/src/cairo-gstate.c
+++ b/gfx/cairo/cairo/src/cairo-gstate.c
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-hash-private.h b/gfx/cairo/cairo/src/cairo-hash-private.h
index 30e51ffe6..0c2759dbf 100644
--- a/gfx/cairo/cairo/src/cairo-hash-private.h
+++ b/gfx/cairo/cairo/src/cairo-hash-private.h
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc.
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Keith Packard <keithp@keithp.com>
- * Graydon Hoare <graydon@redhat.com>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_HASH_PRIVATE_H
#define CAIRO_HASH_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-hash.c b/gfx/cairo/cairo/src/cairo-hash.c
index 81a48a235..7e24d930d 100644
--- a/gfx/cairo/cairo/src/cairo-hash.c
+++ b/gfx/cairo/cairo/src/cairo-hash.c
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc.
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Keith Packard <keithp@keithp.com>
- * Graydon Hoare <graydon@redhat.com>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-hull.c b/gfx/cairo/cairo/src/cairo-hull.c
index c65593327..a9cb27982 100644
--- a/gfx/cairo/cairo/src/cairo-hull.c
+++ b/gfx/cairo/cairo/src/cairo-hull.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-image-info-private.h b/gfx/cairo/cairo/src/cairo-image-info-private.h
index 0d9ef8498..1107fa4f9 100644
--- a/gfx/cairo/cairo/src/cairo-image-info-private.h
+++ b/gfx/cairo/cairo/src/cairo-image-info-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Adrian Johnson
- *
- * 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 Adrian Johnson.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_IMAGE_INFO_PRIVATE_H
#define CAIRO_IMAGE_INFO_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-image-info.c b/gfx/cairo/cairo/src/cairo-image-info.c
index 63201e65b..5269ce25f 100644
--- a/gfx/cairo/cairo/src/cairo-image-info.c
+++ b/gfx/cairo/cairo/src/cairo-image-info.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Adrian Johnson
- *
- * 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 Adrian Johnson.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-image-info-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
index 4aaf1c159..ad0737157 100644
--- a/gfx/cairo/cairo/src/cairo-image-surface.c
+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
@@ -1,41 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- * Copyright © 2009,2010 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 University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-list-private.h b/gfx/cairo/cairo/src/cairo-list-private.h
index ddfd0a4c6..ca4e368fc 100644
--- a/gfx/cairo/cairo/src/cairo-list-private.h
+++ b/gfx/cairo/cairo/src/cairo-list-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Chris Wilson.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- *
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_LIST_PRIVATE_H
#define CAIRO_LIST_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-lzw.c b/gfx/cairo/cairo/src/cairo-lzw.c
index de7f99983..e98e613bc 100644
--- a/gfx/cairo/cairo/src/cairo-lzw.c
+++ b/gfx/cairo/cairo/src/cairo-lzw.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-malloc-private.h b/gfx/cairo/cairo/src/cairo-malloc-private.h
index e5776abd0..765fb65b4 100644
--- a/gfx/cairo/cairo/src/cairo-malloc-private.h
+++ b/gfx/cairo/cairo/src/cairo-malloc-private.h
@@ -1,38 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Mozilla 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 Mozilla Foundation
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@pobox.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_MALLOC_PRIVATE_H
#define CAIRO_MALLOC_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-matrix.c b/gfx/cairo/cairo/src/cairo-matrix.c
index 583a7a649..b9691b8ee 100644
--- a/gfx/cairo/cairo/src/cairo-matrix.c
+++ b/gfx/cairo/cairo/src/cairo-matrix.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-meta-surface-private.h b/gfx/cairo/cairo/src/cairo-meta-surface-private.h
index f0c95c19c..c1f6c40f2 100644
--- a/gfx/cairo/cairo/src/cairo-meta-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-meta-surface-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_META_SURFACE_H
#define CAIRO_META_SURFACE_H
diff --git a/gfx/cairo/cairo/src/cairo-misc.c b/gfx/cairo/cairo/src/cairo-misc.c
index e0ed70cb6..6aa793f61 100644
--- a/gfx/cairo/cairo/src/cairo-misc.c
+++ b/gfx/cairo/cairo/src/cairo-misc.c
@@ -1,42 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2007 Adrian Johnson
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-mutex-impl-private.h b/gfx/cairo/cairo/src/cairo-mutex-impl-private.h
index 6c67f6ebb..7813ba46f 100644
--- a/gfx/cairo/cairo/src/cairo-mutex-impl-private.h
+++ b/gfx/cairo/cairo/src/cairo-mutex-impl-private.h
@@ -1,43 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005,2007 Red Hat, Inc.
- * Copyright © 2007 Mathias Hasselmann
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Mathias Hasselmann <mathias.hasselmann@gmx.de>
- * Behdad Esfahbod <behdad@behdad.org>
- * Mark Straver <moonchild@palemoon.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_MUTEX_IMPL_PRIVATE_H
#define CAIRO_MUTEX_IMPL_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-mutex-list-private.h b/gfx/cairo/cairo/src/cairo-mutex-list-private.h
index 7d5ba0299..3f2e44119 100644
--- a/gfx/cairo/cairo/src/cairo-mutex-list-private.h
+++ b/gfx/cairo/cairo/src/cairo-mutex-list-private.h
@@ -1,35 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Mathias Hasselmann
- *
- * 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.
- *
- * Contributor(s):
- * Mathias Hasselmann <mathias.hasselmann@gmx.de>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_FEATURES_H
/* This block is to just make this header file standalone */
diff --git a/gfx/cairo/cairo/src/cairo-mutex-private.h b/gfx/cairo/cairo/src/cairo-mutex-private.h
index 61a7160a0..e9359ef55 100644
--- a/gfx/cairo/cairo/src/cairo-mutex-private.h
+++ b/gfx/cairo/cairo/src/cairo-mutex-private.h
@@ -1,42 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005,2007 Red Hat, Inc.
- * Copyright © 2007 Mathias Hasselmann
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Mathias Hasselmann <mathias.hasselmann@gmx.de>
- * Behdad Esfahbod <behdad@behdad.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_MUTEX_PRIVATE_H
#define CAIRO_MUTEX_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-mutex-type-private.h b/gfx/cairo/cairo/src/cairo-mutex-type-private.h
index e8c493985..eac1d48e6 100644
--- a/gfx/cairo/cairo/src/cairo-mutex-type-private.h
+++ b/gfx/cairo/cairo/src/cairo-mutex-type-private.h
@@ -1,42 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005,2007 Red Hat, Inc.
- * Copyright © 2007 Mathias Hasselmann
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Mathias Hasselmann <mathias.hasselmann@gmx.de>
- * Behdad Esfahbod <behdad@behdad.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_MUTEX_TYPE_PRIVATE_H
#define CAIRO_MUTEX_TYPE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-mutex.c b/gfx/cairo/cairo/src/cairo-mutex.c
index 0a31dced3..d859e28d9 100644
--- a/gfx/cairo/cairo/src/cairo-mutex.c
+++ b/gfx/cairo/cairo/src/cairo-mutex.c
@@ -1,35 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Mathias Hasselmann
- *
- * 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.
- *
- * Contributor(s):
- * Mathias Hasselmann <mathias.hasselmann@gmx.de>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-observer.c b/gfx/cairo/cairo/src/cairo-observer.c
index 7c7b69c91..c8ce5eea2 100644
--- a/gfx/cairo/cairo/src/cairo-observer.c
+++ b/gfx/cairo/cairo/src/cairo-observer.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2010 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 Intel Corporation
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-os2-private.h b/gfx/cairo/cairo/src/cairo-os2-private.h
index 829dd3c8d..e47efd316 100644
--- a/gfx/cairo/cairo/src/cairo-os2-private.h
+++ b/gfx/cairo/cairo/src/cairo-os2-private.h
@@ -1,39 +1,6 @@
-/* vim: set sw=4 sts=4 et cin: */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright (c) 2005-2006 netlabs.org
- *
- * 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
- * Doodle <doodle@scenergy.dfmk.hu>
- *
- * Contributor(s):
- * Peter Weilbacher <mozilla@Weilbacher.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_OS2_PRIVATE_H
#define CAIRO_OS2_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-os2-surface.c b/gfx/cairo/cairo/src/cairo-os2-surface.c
index b9758281d..c0464f62b 100644
--- a/gfx/cairo/cairo/src/cairo-os2-surface.c
+++ b/gfx/cairo/cairo/src/cairo-os2-surface.c
@@ -1,40 +1,6 @@
-/* vim: set sw=4 sts=4 et cin: */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright (c) 2005-2006 netlabs.org
- *
- * 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
- * Doodle <doodle@scenergy.dfmk.hu>
- *
- * Contributor(s):
- * Peter Weilbacher <mozilla@Weilbacher.org>
- * Rich Walsh <dragtext@e-vertise.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-os2.h b/gfx/cairo/cairo/src/cairo-os2.h
index d23f2dec4..16a4fc564 100644
--- a/gfx/cairo/cairo/src/cairo-os2.h
+++ b/gfx/cairo/cairo/src/cairo-os2.h
@@ -1,40 +1,6 @@
-/* vim: set sw=4 sts=4 et cin: */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright (c) 2005-2006 netlabs.org
- *
- * 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
- * Doodle <doodle@scenergy.dfmk.hu>
- *
- * Contributor(s):
- * Peter Weilbacher <mozilla@Weilbacher.org>
- * Rich Walsh <dragtext@e-vertise.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _CAIRO_OS2_H_
#define _CAIRO_OS2_H_
diff --git a/gfx/cairo/cairo/src/cairo-output-stream-private.h b/gfx/cairo/cairo/src/cairo-output-stream-private.h
index edaabbe78..8f3cb3c6b 100644
--- a/gfx/cairo/cairo/src/cairo-output-stream-private.h
+++ b/gfx/cairo/cairo/src/cairo-output-stream-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Author(s):
- * Kristian Høgsberg <krh@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_OUTPUT_STREAM_PRIVATE_H
#define CAIRO_OUTPUT_STREAM_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-output-stream.c b/gfx/cairo/cairo/src/cairo-output-stream.c
index 1aabe821a..5f8d774cd 100644
--- a/gfx/cairo/cairo/src/cairo-output-stream.c
+++ b/gfx/cairo/cairo/src/cairo-output-stream.c
@@ -1,37 +1,6 @@
-/* cairo-output-stream.c: Output stream abstraction
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Author(s):
- * Kristian Høgsberg <krh@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for snprintf() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-paginated-private.h b/gfx/cairo/cairo/src/cairo-paginated-private.h
index 42badbfdf..5687cf85c 100644
--- a/gfx/cairo/cairo/src/cairo-paginated-private.h
+++ b/gfx/cairo/cairo/src/cairo-paginated-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PAGINATED_H
#define CAIRO_PAGINATED_H
diff --git a/gfx/cairo/cairo/src/cairo-paginated-surface-private.h b/gfx/cairo/cairo/src/cairo-paginated-surface-private.h
index ebf4b3424..0b4e81f23 100644
--- a/gfx/cairo/cairo/src/cairo-paginated-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-paginated-surface-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PAGINATED_SURFACE_H
#define CAIRO_PAGINATED_SURFACE_H
diff --git a/gfx/cairo/cairo/src/cairo-paginated-surface.c b/gfx/cairo/cairo/src/cairo-paginated-surface.c
index af4790e7e..febcd05fa 100644
--- a/gfx/cairo/cairo/src/cairo-paginated-surface.c
+++ b/gfx/cairo/cairo/src/cairo-paginated-surface.c
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2007 Adrian Johnson
- *
- * 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- * Keith Packard <keithp@keithp.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* The paginated surface layer exists to provide as much code sharing
* as possible for the various paginated surface backends in cairo
diff --git a/gfx/cairo/cairo/src/cairo-path-bounds.c b/gfx/cairo/cairo/src/cairo-path-bounds.c
index 8ca80fa13..c752fbca1 100644
--- a/gfx/cairo/cairo/src/cairo-path-bounds.c
+++ b/gfx/cairo/cairo/src/cairo-path-bounds.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-path-fixed-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-path-fill.c b/gfx/cairo/cairo/src/cairo-path-fill.c
index 24aaa3969..40d41157a 100644
--- a/gfx/cairo/cairo/src/cairo-path-fill.c
+++ b/gfx/cairo/cairo/src/cairo-path-fill.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-boxes-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-path-fixed-private.h b/gfx/cairo/cairo/src/cairo-path-fixed-private.h
index 42e64eda3..69972505a 100644
--- a/gfx/cairo/cairo/src/cairo-path-fixed-private.h
+++ b/gfx/cairo/cairo/src/cairo-path-fixed-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PATH_FIXED_PRIVATE_H
#define CAIRO_PATH_FIXED_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-path-fixed.c b/gfx/cairo/cairo/src/cairo-path-fixed.c
index eea8630bd..3ba5f75e0 100644
--- a/gfx/cairo/cairo/src/cairo-path-fixed.c
+++ b/gfx/cairo/cairo/src/cairo-path-fixed.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-path-in-fill.c b/gfx/cairo/cairo/src/cairo-path-in-fill.c
index b344f529d..c303d8596 100644
--- a/gfx/cairo/cairo/src/cairo-path-in-fill.c
+++ b/gfx/cairo/cairo/src/cairo-path-in-fill.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Chris Wilson
- *
- * 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 Chris Wilson.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-path-fixed-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-path-private.h b/gfx/cairo/cairo/src/cairo-path-private.h
index 61b4060fa..c28612a32 100644
--- a/gfx/cairo/cairo/src/cairo-path-private.h
+++ b/gfx/cairo/cairo/src/cairo-path-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PATH_PRIVATE_H
#define CAIRO_PATH_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-path-stroke.c b/gfx/cairo/cairo/src/cairo-path-stroke.c
index 505b6ab6a..6d1d6f205 100644
--- a/gfx/cairo/cairo/src/cairo-path-stroke.c
+++ b/gfx/cairo/cairo/src/cairo-path-stroke.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for hypot() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-path.c b/gfx/cairo/cairo/src/cairo-path.c
index 28182c0e4..49b479a99 100644
--- a/gfx/cairo/cairo/src/cairo-path.c
+++ b/gfx/cairo/cairo/src/cairo-path.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-pattern.c b/gfx/cairo/cairo/src/cairo-pattern.c
index 0c51804f8..502344f3c 100644
--- a/gfx/cairo/cairo/src/cairo-pattern.c
+++ b/gfx/cairo/cairo/src/cairo-pattern.c
@@ -1,32 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 David Reveman
- * Copyright © 2005 Red Hat, Inc.
- *
- * 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 David
- * Reveman not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. David Reveman makes no representations about the
- * suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * DAVID REVEMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL DAVID REVEMAN 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.
- *
- * Authors: David Reveman <davidr@novell.com>
- * Keith Packard <keithp@keithp.com>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-pdf-operators-private.h b/gfx/cairo/cairo/src/cairo-pdf-operators-private.h
index 67d1cc233..d0051433b 100644
--- a/gfx/cairo/cairo/src/cairo-pdf-operators-private.h
+++ b/gfx/cairo/cairo/src/cairo-pdf-operators-private.h
@@ -1,43 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc
- * Copyright © 2006 Red Hat, Inc
- * Copyright © 2007 Adrian Johnson
- *
- * 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.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Carl Worth <cworth@cworth.org>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PDF_OPERATORS_H
#define CAIRO_PDF_OPERATORS_H
diff --git a/gfx/cairo/cairo/src/cairo-pdf-operators.c b/gfx/cairo/cairo/src/cairo-pdf-operators.c
index d70756b3a..4da9d573c 100644
--- a/gfx/cairo/cairo/src/cairo-pdf-operators.c
+++ b/gfx/cairo/cairo/src/cairo-pdf-operators.c
@@ -1,43 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc
- * Copyright © 2006 Red Hat, Inc
- * Copyright © 2007, 2008 Adrian Johnson
- *
- * 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.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Carl Worth <cworth@cworth.org>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-pdf-surface-private.h b/gfx/cairo/cairo/src/cairo-pdf-surface-private.h
index 221418ec9..ab5befa52 100644
--- a/gfx/cairo/cairo/src/cairo-pdf-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-pdf-surface-private.h
@@ -1,43 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc
- * Copyright © 2006 Red Hat, Inc
- * Copyright © 2007, 2008 Adrian Johnson
- *
- * 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.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Carl Worth <cworth@cworth.org>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PDF_SURFACE_PRIVATE_H
#define CAIRO_PDF_SURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-pdf-surface.c b/gfx/cairo/cairo/src/cairo-pdf-surface.c
index 09bd42ea0..3dcf58859 100644
--- a/gfx/cairo/cairo/src/cairo-pdf-surface.c
+++ b/gfx/cairo/cairo/src/cairo-pdf-surface.c
@@ -1,43 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc
- * Copyright © 2006 Red Hat, Inc
- * Copyright © 2007, 2008 Adrian Johnson
- *
- * 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.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Carl Worth <cworth@cworth.org>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for snprintf() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-pdf.h b/gfx/cairo/cairo/src/cairo-pdf.h
index 50460ccdf..0e85e9804 100644
--- a/gfx/cairo/cairo/src/cairo-pdf.h
+++ b/gfx/cairo/cairo/src/cairo-pdf.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PDF_H
#define CAIRO_PDF_H
diff --git a/gfx/cairo/cairo/src/cairo-pen.c b/gfx/cairo/cairo/src/cairo-pen.c
index e71f7b561..751b5dc3a 100644
--- a/gfx/cairo/cairo/src/cairo-pen.c
+++ b/gfx/cairo/cairo/src/cairo-pen.c
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2008 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-platform.h b/gfx/cairo/cairo/src/cairo-platform.h
index bfec29f67..9d4bc4d1f 100644
--- a/gfx/cairo/cairo/src/cairo-platform.h
+++ b/gfx/cairo/cairo/src/cairo-platform.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Mozilla Foundation
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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.
- *
- * Contributor(s):
- * Stuart Parmenter <stuart@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PLATFORM_H
#define CAIRO_PLATFORM_H
diff --git a/gfx/cairo/cairo/src/cairo-png.c b/gfx/cairo/cairo/src/cairo-png.c
index 41a33d753..bbab2c2ae 100644
--- a/gfx/cairo/cairo/src/cairo-png.c
+++ b/gfx/cairo/cairo/src/cairo-png.c
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Kristian Høgsberg <krh@redhat.com>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-polygon.c b/gfx/cairo/cairo/src/cairo-polygon.c
index 1b5fab02b..fd71319e9 100644
--- a/gfx/cairo/cairo/src/cairo-polygon.c
+++ b/gfx/cairo/cairo/src/cairo-polygon.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-private.h b/gfx/cairo/cairo/src/cairo-private.h
index 901a69a31..33b049678 100644
--- a/gfx/cairo/cairo/src/cairo-private.h
+++ b/gfx/cairo/cairo/src/cairo-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PRIVATE_H
#define CAIRO_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-ps-surface-private.h b/gfx/cairo/cairo/src/cairo-ps-surface-private.h
index a5a8cd0da..96da53554 100644
--- a/gfx/cairo/cairo/src/cairo-ps-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-ps-surface-private.h
@@ -1,42 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Kristian Høgsberg <krh@redhat.com>
- * Keith Packard <keithp@keithp.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PS_SURFACE_PRIVATE_H
#define CAIRO_PS_SURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-ps-surface.c b/gfx/cairo/cairo/src/cairo-ps-surface.c
index 4e7fb132b..5696d6cb7 100644
--- a/gfx/cairo/cairo/src/cairo-ps-surface.c
+++ b/gfx/cairo/cairo/src/cairo-ps-surface.c
@@ -1,45 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2007,2008 Adrian Johnson
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Kristian Høgsberg <krh@redhat.com>
- * Keith Packard <keithp@keithp.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
-
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Design of the PS output:
diff --git a/gfx/cairo/cairo/src/cairo-ps.h b/gfx/cairo/cairo/src/cairo-ps.h
index fd1d21deb..3d609c9d1 100644
--- a/gfx/cairo/cairo/src/cairo-ps.h
+++ b/gfx/cairo/cairo/src/cairo-ps.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_PS_H
#define CAIRO_PS_H
diff --git a/gfx/cairo/cairo/src/cairo-qt-surface.cpp b/gfx/cairo/cairo/src/cairo-qt-surface.cpp
index 6311c7100..9d73395b7 100644
--- a/gfx/cairo/cairo/src/cairo-qt-surface.cpp
+++ b/gfx/cairo/cairo/src/cairo-qt-surface.cpp
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Mozilla 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Mozilla Corporation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Get INT16_MIN etc. as per C99 */
#define __STDC_LIMIT_MACROS
diff --git a/gfx/cairo/cairo/src/cairo-qt.h b/gfx/cairo/cairo/src/cairo-qt.h
index c20bbb18d..9bb6cd0e3 100644
--- a/gfx/cairo/cairo/src/cairo-qt.h
+++ b/gfx/cairo/cairo/src/cairo-qt.h
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Mozilla 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 Mozilla Corporation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_QT_H
#define CAIRO_QT_H
diff --git a/gfx/cairo/cairo/src/cairo-quartz-font.c b/gfx/cairo/cairo/src/cairo-quartz-font.c
index 2a17e77fa..e58ae0559 100644
--- a/gfx/cairo/cairo/src/cairo-quartz-font.c
+++ b/gfx/cairo/cairo/src/cairo-quartz-font.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright � 2008 Mozilla 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 Mozilla Foundation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-quartz-image-surface.c b/gfx/cairo/cairo/src/cairo-quartz-image-surface.c
index 9a18dd46e..155ec494f 100644
--- a/gfx/cairo/cairo/src/cairo-quartz-image-surface.c
+++ b/gfx/cairo/cairo/src/cairo-quartz-image-surface.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright � 2008 Mozilla 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 Mozilla Foundation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-quartz-image.h b/gfx/cairo/cairo/src/cairo-quartz-image.h
index 2d6e8fb52..fffc1ee86 100644
--- a/gfx/cairo/cairo/src/cairo-quartz-image.h
+++ b/gfx/cairo/cairo/src/cairo-quartz-image.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Mozilla 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 Mozilla Foundation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_QUARTZ_IMAGE_H
#define CAIRO_QUARTZ_IMAGE_H
diff --git a/gfx/cairo/cairo/src/cairo-quartz-private.h b/gfx/cairo/cairo/src/cairo-quartz-private.h
index 1c8d496af..c0dcf3b91 100644
--- a/gfx/cairo/cairo/src/cairo-quartz-private.h
+++ b/gfx/cairo/cairo/src/cairo-quartz-private.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Calum Robinson
- * Copyright (C) 2006,2007 Mozilla 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 Calum Robinson
- *
- * Contributor(s):
- * Calum Robinson <calumr@mac.com>
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_QUARTZ_PRIVATE_H
#define CAIRO_QUARTZ_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
index 434a28983..d5a5ffd92 100644
--- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright � 2006, 2007 Mozilla 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 Mozilla Foundation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* required for RTLD_DEFAULT */
diff --git a/gfx/cairo/cairo/src/cairo-quartz.h b/gfx/cairo/cairo/src/cairo-quartz.h
index 2941a0339..699a4e7ce 100644
--- a/gfx/cairo/cairo/src/cairo-quartz.h
+++ b/gfx/cairo/cairo/src/cairo-quartz.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006, 2007 Mozilla 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 Mozilla Foundation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_QUARTZ_H
#define CAIRO_QUARTZ_H
diff --git a/gfx/cairo/cairo/src/cairo-recording-surface-private.h b/gfx/cairo/cairo/src/cairo-recording-surface-private.h
index 4ec5f88b4..c21a93205 100644
--- a/gfx/cairo/cairo/src/cairo-recording-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-recording-surface-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_RECORDING_SURFACE_H
#define CAIRO_RECORDING_SURFACE_H
diff --git a/gfx/cairo/cairo/src/cairo-recording-surface.c b/gfx/cairo/cairo/src/cairo-recording-surface.c
index 0e955b83f..8230ac375 100644
--- a/gfx/cairo/cairo/src/cairo-recording-surface.c
+++ b/gfx/cairo/cairo/src/cairo-recording-surface.c
@@ -1,41 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2007 Adrian Johnson
- *
- * 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Carl Worth <cworth@cworth.org>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* SECTION:cairo-recording
diff --git a/gfx/cairo/cairo/src/cairo-rectangle.c b/gfx/cairo/cairo/src/cairo-rectangle.c
index 608da53ea..ab043c1bc 100644
--- a/gfx/cairo/cairo/src/cairo-rectangle.c
+++ b/gfx/cairo/cairo/src/cairo-rectangle.c
@@ -1,41 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-rectangular-scan-converter.c b/gfx/cairo/cairo/src/cairo-rectangular-scan-converter.c
index dab2c151f..6c21f5fd5 100644
--- a/gfx/cairo/cairo/src/cairo-rectangular-scan-converter.c
+++ b/gfx/cairo/cairo/src/cairo-rectangular-scan-converter.c
@@ -1,35 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-reference-count-private.h b/gfx/cairo/cairo/src/cairo-reference-count-private.h
index 0d91488ee..c05d4c910 100644
--- a/gfx/cairo/cairo/src/cairo-reference-count-private.h
+++ b/gfx/cairo/cairo/src/cairo-reference-count-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_REFRENCE_COUNT_PRIVATE_H
#define CAIRO_REFRENCE_COUNT_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-region-private.h b/gfx/cairo/cairo/src/cairo-region-private.h
index 11070ba76..32c1e82ab 100644
--- a/gfx/cairo/cairo/src/cairo-region-private.h
+++ b/gfx/cairo/cairo/src/cairo-region-private.h
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- * Vladimir Vukicevic <vladimir@pobox.com>
- * Søren Sandmann <sandmann@daimi.au.dk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_REGION_PRIVATE_H
#define CAIRO_REGION_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-region.c b/gfx/cairo/cairo/src/cairo-region.c
index 112b1d824..3e8ac1248 100644
--- a/gfx/cairo/cairo/src/cairo-region.c
+++ b/gfx/cairo/cairo/src/cairo-region.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- * Vladimir Vukicevic <vladimir@pobox.com>
- * Søren Sandmann <sandmann@daimi.au.dk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-rtree-private.h b/gfx/cairo/cairo/src/cairo-rtree-private.h
index 191c85871..295f48ced 100644
--- a/gfx/cairo/cairo/src/cairo-rtree-private.h
+++ b/gfx/cairo/cairo/src/cairo-rtree-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Chris Wilson.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- *
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_RTREE_PRIVATE_H
#define CAIRO_RTREE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-rtree.c b/gfx/cairo/cairo/src/cairo-rtree.c
index d6e57916a..059edff75 100644
--- a/gfx/cairo/cairo/src/cairo-rtree.c
+++ b/gfx/cairo/cairo/src/cairo-rtree.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Chris Wilson.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- *
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-scaled-font-private.h b/gfx/cairo/cairo/src/cairo-scaled-font-private.h
index 029377b17..5d426494a 100644
--- a/gfx/cairo/cairo/src/cairo-scaled-font-private.h
+++ b/gfx/cairo/cairo/src/cairo-scaled-font-private.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SCALED_FONT_PRIVATE_H
#define CAIRO_SCALED_FONT_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-scaled-font-subsets-private.h b/gfx/cairo/cairo/src/cairo-scaled-font-subsets-private.h
index b165d9aca..246dbdcfd 100644
--- a/gfx/cairo/cairo/src/cairo-scaled-font-subsets-private.h
+++ b/gfx/cairo/cairo/src/cairo-scaled-font-subsets-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SCALED_FONT_SUBSETS_PRIVATE_H
#define CAIRO_SCALED_FONT_SUBSETS_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-scaled-font-subsets.c b/gfx/cairo/cairo/src/cairo-scaled-font-subsets.c
index 01bc05bfb..ba769d509 100644
--- a/gfx/cairo/cairo/src/cairo-scaled-font-subsets.c
+++ b/gfx/cairo/cairo/src/cairo-scaled-font-subsets.c
@@ -1,44 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2003 University of Southern California
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2006 Keith Packard
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Kristian Høgsberg <krh@redhat.com>
- * Keith Packard <keithp@keithp.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for snprintf(), strdup() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-scaled-font.c b/gfx/cairo/cairo/src/cairo-scaled-font.c
index 95db65a99..37806bc63 100644
--- a/gfx/cairo/cairo/src/cairo-scaled-font.c
+++ b/gfx/cairo/cairo/src/cairo-scaled-font.c
@@ -1,42 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/*
- * Copyright © 2005 Keith Packard
- *
- * 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):
- * Keith Packard <keithp@keithp.com>
- * Carl D. Worth <cworth@cworth.org>
- * Graydon Hoare <graydon@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- * Behdad Esfahbod <behdad@behdad.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-script-surface.c b/gfx/cairo/cairo/src/cairo-script-surface.c
index 2cb427bcb..50214aa19 100644
--- a/gfx/cairo/cairo/src/cairo-script-surface.c
+++ b/gfx/cairo/cairo/src/cairo-script-surface.c
@@ -1,38 +1,6 @@
-/* -*- 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 Chris Wilson
- *
- * 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 Chris Wilson.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* The script surface is one that records all operations performed on
* it in the form of a procedural script, similar in fashion to
diff --git a/gfx/cairo/cairo/src/cairo-script.h b/gfx/cairo/cairo/src/cairo-script.h
index b82230f2f..a9d1540cf 100644
--- a/gfx/cairo/cairo/src/cairo-script.h
+++ b/gfx/cairo/cairo/src/cairo-script.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Chris Wilson
- *
- * 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 Chris Wilson
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SCRIPT_H
#define CAIRO_SCRIPT_H
diff --git a/gfx/cairo/cairo/src/cairo-skia.h b/gfx/cairo/cairo/src/cairo-skia.h
index f62823522..89bd2713e 100644
--- a/gfx/cairo/cairo/src/cairo-skia.h
+++ b/gfx/cairo/cairo/src/cairo-skia.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SKIA_H
#define CAIRO_SKIA_H
diff --git a/gfx/cairo/cairo/src/cairo-slope-private.h b/gfx/cairo/cairo/src/cairo-slope-private.h
index 6a58c9f45..bccc955d3 100644
--- a/gfx/cairo/cairo/src/cairo-slope-private.h
+++ b/gfx/cairo/cairo/src/cairo-slope-private.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _CAIRO_SLOPE_PRIVATE_H
#define _CAIRO_SLOPE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-slope.c b/gfx/cairo/cairo/src/cairo-slope.c
index 827037f76..fe93d66f6 100644
--- a/gfx/cairo/cairo/src/cairo-slope.c
+++ b/gfx/cairo/cairo/src/cairo-slope.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-spans-private.h b/gfx/cairo/cairo/src/cairo-spans-private.h
index 00a4df868..aecc9b976 100644
--- a/gfx/cairo/cairo/src/cairo-spans-private.h
+++ b/gfx/cairo/cairo/src/cairo-spans-private.h
@@ -1,4 +1,3 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* cairo - a vector graphics library with display and print output
*
* Copyright (c) 2008 M Joonas Pihlaja
diff --git a/gfx/cairo/cairo/src/cairo-spans.c b/gfx/cairo/cairo/src/cairo-spans.c
index a187b8998..f556d6b2a 100644
--- a/gfx/cairo/cairo/src/cairo-spans.c
+++ b/gfx/cairo/cairo/src/cairo-spans.c
@@ -1,4 +1,3 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* cairo - a vector graphics library with display and print output
*
* Copyright (c) 2008 M Joonas Pihlaja
diff --git a/gfx/cairo/cairo/src/cairo-spline.c b/gfx/cairo/cairo/src/cairo-spline.c
index ca2e2dc64..2fc99dfcb 100644
--- a/gfx/cairo/cairo/src/cairo-spline.c
+++ b/gfx/cairo/cairo/src/cairo-spline.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-stroke-style.c b/gfx/cairo/cairo/src/cairo-stroke-style.c
index 1513d1f35..e068e9dec 100644
--- a/gfx/cairo/cairo/src/cairo-stroke-style.c
+++ b/gfx/cairo/cairo/src/cairo-stroke-style.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-surface-clipper-private.h b/gfx/cairo/cairo/src/cairo-surface-clipper-private.h
index b9ca3cb1c..d8750e642 100644
--- a/gfx/cairo/cairo/src/cairo-surface-clipper-private.h
+++ b/gfx/cairo/cairo/src/cairo-surface-clipper-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.u>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SURFACE_CLIPPER_PRIVATE_H
#define CAIRO_SURFACE_CLIPPER_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-surface-clipper.c b/gfx/cairo/cairo/src/cairo-surface-clipper.c
index 948730047..21c6fb1d5 100644
--- a/gfx/cairo/cairo/src/cairo-surface-clipper.c
+++ b/gfx/cairo/cairo/src/cairo-surface-clipper.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-surface-fallback-private.h b/gfx/cairo/cairo/src/cairo-surface-fallback-private.h
index e993de62e..3c6324815 100644
--- a/gfx/cairo/cairo/src/cairo-surface-fallback-private.h
+++ b/gfx/cairo/cairo/src/cairo-surface-fallback-private.h
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SURFACE_FALLBACK_PRIVATE_H
#define CAIRO_SURFACE_FALLBACK_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-surface-fallback.c b/gfx/cairo/cairo/src/cairo-surface-fallback.c
index 51893ee65..09ab644a7 100644
--- a/gfx/cairo/cairo/src/cairo-surface-fallback.c
+++ b/gfx/cairo/cairo/src/cairo-surface-fallback.c
@@ -1,42 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-surface-offset-private.h b/gfx/cairo/cairo/src/cairo-surface-offset-private.h
index b7877b3de..94525a689 100644
--- a/gfx/cairo/cairo/src/cairo-surface-offset-private.h
+++ b/gfx/cairo/cairo/src/cairo-surface-offset-private.h
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2009 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.u>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SURFACE_OFFSET_PRIVATE_H
#define CAIRO_SURFACE_OFFSET_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-surface-offset.c b/gfx/cairo/cairo/src/cairo-surface-offset.c
index fdbe1a124..a5070617d 100644
--- a/gfx/cairo/cairo/src/cairo-surface-offset.c
+++ b/gfx/cairo/cairo/src/cairo-surface-offset.c
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2007 Adrian Johnson
- * Copyright © 2009 Chris Wilson
- *
- * 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-surface-private.h b/gfx/cairo/cairo/src/cairo-surface-private.h
index 61acf4b05..96cd4a371 100644
--- a/gfx/cairo/cairo/src/cairo-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-surface-private.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SURFACE_PRIVATE_H
#define CAIRO_SURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-surface-snapshot-private.h b/gfx/cairo/cairo/src/cairo-surface-snapshot-private.h
index bbb2bf2a0..a9520332a 100644
--- a/gfx/cairo/cairo/src/cairo-surface-snapshot-private.h
+++ b/gfx/cairo/cairo/src/cairo-surface-snapshot-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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 Intel Corporation.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SURFACE_SNAPSHOT_PRIVATE_H
#define CAIRO_SURFACE_SNAPSHOT_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-surface-snapshot.c b/gfx/cairo/cairo/src/cairo-surface-snapshot.c
index 2dbf2507a..030636056 100644
--- a/gfx/cairo/cairo/src/cairo-surface-snapshot.c
+++ b/gfx/cairo/cairo/src/cairo-surface-snapshot.c
@@ -1,41 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2009 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 University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-surface-subsurface-private.h b/gfx/cairo/cairo/src/cairo-surface-subsurface-private.h
index 435e1eb83..3fe48f83b 100644
--- a/gfx/cairo/cairo/src/cairo-surface-subsurface-private.h
+++ b/gfx/cairo/cairo/src/cairo-surface-subsurface-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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 Intel Corporation.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SURFACE_SUBSURFACE_PRIVATE_H
#define CAIRO_SURFACE_SUBSURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-surface-subsurface.c b/gfx/cairo/cairo/src/cairo-surface-subsurface.c
index 178966263..b9d8eacd6 100644
--- a/gfx/cairo/cairo/src/cairo-surface-subsurface.c
+++ b/gfx/cairo/cairo/src/cairo-surface-subsurface.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 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 Intel Corporation.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-surface-wrapper-private.h b/gfx/cairo/cairo/src/cairo-surface-wrapper-private.h
index a1f05d386..c6d2bbe91 100644
--- a/gfx/cairo/cairo/src/cairo-surface-wrapper-private.h
+++ b/gfx/cairo/cairo/src/cairo-surface-wrapper-private.h
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005 Red Hat, Inc.
- * Copyright © 2009 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.u>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SURFACE_WRAPPER_PRIVATE_H
#define CAIRO_SURFACE_WRAPPER_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-surface-wrapper.c b/gfx/cairo/cairo/src/cairo-surface-wrapper.c
index d3f126e18..902e717cb 100644
--- a/gfx/cairo/cairo/src/cairo-surface-wrapper.c
+++ b/gfx/cairo/cairo/src/cairo-surface-wrapper.c
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2007 Adrian Johnson
- * Copyright © 2009 Chris Wilson
- *
- * 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-surface.c b/gfx/cairo/cairo/src/cairo-surface.c
index b57b944b8..c80ea8553 100644
--- a/gfx/cairo/cairo/src/cairo-surface.c
+++ b/gfx/cairo/cairo/src/cairo-surface.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-svg-surface-private.h b/gfx/cairo/cairo/src/cairo-svg-surface-private.h
index ddbf464b1..eea51cbbf 100644
--- a/gfx/cairo/cairo/src/cairo-svg-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-svg-surface-private.h
@@ -1,42 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Red Hat, Inc
- * Copyright © 2005-2006 Emmanuel Pacaud <emmanuel.pacaud@free.fr>
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SVG_SURFACE_PRIVATE_H
#define CAIRO_SVG_SURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-svg-surface.c b/gfx/cairo/cairo/src/cairo-svg-surface.c
index fb612fadf..b18527f0c 100644
--- a/gfx/cairo/cairo/src/cairo-svg-surface.c
+++ b/gfx/cairo/cairo/src/cairo-svg-surface.c
@@ -1,43 +1,6 @@
-/* vim: set sw=4 sts=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 © 2004 Red Hat, Inc
- * Copyright © 2005-2007 Emmanuel Pacaud <emmanuel.pacaud@free.fr>
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Emmanuel Pacaud <emmanuel.pacaud@free.fr>
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for snprintf() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-svg.h b/gfx/cairo/cairo/src/cairo-svg.h
index 0f739fc04..2c07aeedf 100644
--- a/gfx/cairo/cairo/src/cairo-svg.h
+++ b/gfx/cairo/cairo/src/cairo-svg.h
@@ -1,33 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * cairo-svg.h
- *
- * Copyright © 2005 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
- *
- * 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.
- *
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_SVG_H
#define CAIRO_SVG_H
diff --git a/gfx/cairo/cairo/src/cairo-system.c b/gfx/cairo/cairo/src/cairo-system.c
index 1ff4d078f..22e4934c7 100644
--- a/gfx/cairo/cairo/src/cairo-system.c
+++ b/gfx/cairo/cairo/src/cairo-system.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- * Stuart Parmenter <stuart@mozilla.com>
- * Vladimir Vukicevic <vladimir@pobox.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This file should include code that is system-specific, not
* feature-specific. For example, the DLL initialization/finalization
diff --git a/gfx/cairo/cairo/src/cairo-tee-surface-private.h b/gfx/cairo/cairo/src/cairo-tee-surface-private.h
index a83cfc959..dd8aeda4d 100644
--- a/gfx/cairo/cairo/src/cairo-tee-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-tee-surface-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_TEE_SURFACE_PRIVATE_H
#define CAIRO_TEE_SURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-tee-surface.c b/gfx/cairo/cairo/src/cairo-tee-surface.c
index bca07716f..755a0b7ee 100644
--- a/gfx/cairo/cairo/src/cairo-tee-surface.c
+++ b/gfx/cairo/cairo/src/cairo-tee-surface.c
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Red Hat, Inc
- * Copyright © 2009 Chris Wilson
- *
- * 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This surface supports redirecting all its input to multiple surfaces.
*/
diff --git a/gfx/cairo/cairo/src/cairo-tee.h b/gfx/cairo/cairo/src/cairo-tee.h
index 9c048c6fe..c60cb5327 100644
--- a/gfx/cairo/cairo/src/cairo-tee.h
+++ b/gfx/cairo/cairo/src/cairo-tee.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Chris Wilson
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_TEE_H
#define CAIRO_TEE_H
diff --git a/gfx/cairo/cairo/src/cairo-tor-scan-converter.c b/gfx/cairo/cairo/src/cairo-tor-scan-converter.c
index dc8dad1c5..0dc20fef5 100644
--- a/gfx/cairo/cairo/src/cairo-tor-scan-converter.c
+++ b/gfx/cairo/cairo/src/cairo-tor-scan-converter.c
@@ -1,4 +1,3 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* glitter-paths - polygon scan converter
*
* Copyright (c) 2008 M Joonas Pihlaja
@@ -25,12 +24,14 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
+
/* This is the Glitter paths scan converter incorporated into cairo.
* The source is from commit 734c53237a867a773640bd5b64816249fa1730f8
* of
*
* http://gitweb.freedesktop.org/?p=users/joonas/glitter-paths
*/
+
/* Glitter-paths is a stand alone polygon rasteriser derived from
* David Turner's reimplementation of Tor Anderssons's 15x17
* supersampling rasteriser from the Apparition graphics library. The
diff --git a/gfx/cairo/cairo/src/cairo-toy-font-face.c b/gfx/cairo/cairo/src/cairo-toy-font-face.c
index 4c690da53..92045ba3e 100644
--- a/gfx/cairo/cairo/src/cairo-toy-font-face.c
+++ b/gfx/cairo/cairo/src/cairo-toy-font-face.c
@@ -1,43 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2005,2008 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Graydon Hoare <graydon@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- * Behdad Esfahbod <behdad@behdad.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for strdup() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-traps.c b/gfx/cairo/cairo/src/cairo-traps.c
index 2fe6684db..c3f1d2e35 100644
--- a/gfx/cairo/cairo/src/cairo-traps.c
+++ b/gfx/cairo/cairo/src/cairo-traps.c
@@ -1,41 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/*
- * Copyright © 2002 Keith Packard
- * Copyright © 2007 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Keith Packard
- *
- * Contributor(s):
- * Keith R. Packard <keithp@keithp.com>
- * Carl D. Worth <cworth@cworth.org>
- *
- * 2002-07-15: Converted from XRenderCompositeDoublePoly to #cairo_trap_t. Carl D. Worth
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-truetype-subset-private.h b/gfx/cairo/cairo/src/cairo-truetype-subset-private.h
index f0822611d..fee112b97 100644
--- a/gfx/cairo/cairo/src/cairo-truetype-subset-private.h
+++ b/gfx/cairo/cairo/src/cairo-truetype-subset-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_TRUETYPE_SUBSET_PRIVATE_H
#define CAIRO_TRUETYPE_SUBSET_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-truetype-subset.c b/gfx/cairo/cairo/src/cairo-truetype-subset.c
index 9bf2f8ffc..219adbeb6 100644
--- a/gfx/cairo/cairo/src/cairo-truetype-subset.c
+++ b/gfx/cairo/cairo/src/cairo-truetype-subset.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Useful links:
diff --git a/gfx/cairo/cairo/src/cairo-type1-fallback.c b/gfx/cairo/cairo/src/cairo-type1-fallback.c
index b93c42348..cc3a26966 100644
--- a/gfx/cairo/cairo/src/cairo-type1-fallback.c
+++ b/gfx/cairo/cairo/src/cairo-type1-fallback.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define _BSD_SOURCE /* for snprintf(), strdup() */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-type1-private.h b/gfx/cairo/cairo/src/cairo-type1-private.h
index 1630397bc..0634b7061 100644
--- a/gfx/cairo/cairo/src/cairo-type1-private.h
+++ b/gfx/cairo/cairo/src/cairo-type1-private.h
@@ -1,37 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_TYPE1_PRIVATE_H
#define CAIRO_TYPE1_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-type1-subset.c b/gfx/cairo/cairo/src/cairo-type1-subset.c
index ffa9bfb8f..7abcb10cb 100644
--- a/gfx/cairo/cairo/src/cairo-type1-subset.c
+++ b/gfx/cairo/cairo/src/cairo-type1-subset.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Useful links:
diff --git a/gfx/cairo/cairo/src/cairo-type3-glyph-surface-private.h b/gfx/cairo/cairo/src/cairo-type3-glyph-surface-private.h
index b4abcf604..b101431fc 100644
--- a/gfx/cairo/cairo/src/cairo-type3-glyph-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-type3-glyph-surface-private.h
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Adrian Johnson
- *
- * 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 Adrian Johnson.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H
#define CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-type3-glyph-surface.c b/gfx/cairo/cairo/src/cairo-type3-glyph-surface.c
index 74257d4bf..e0ad08032 100644
--- a/gfx/cairo/cairo/src/cairo-type3-glyph-surface.c
+++ b/gfx/cairo/cairo/src/cairo-type3-glyph-surface.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 Adrian Johnson
- *
- * 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 Adrian Johnson.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-types-private.h b/gfx/cairo/cairo/src/cairo-types-private.h
index 93b035d7c..00b9269c7 100644
--- a/gfx/cairo/cairo/src/cairo-types-private.h
+++ b/gfx/cairo/cairo/src/cairo-types-private.h
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_TYPES_PRIVATE_H
#define CAIRO_TYPES_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-unicode.c b/gfx/cairo/cairo/src/cairo-unicode.c
index 88de39516..3a60ff611 100644
--- a/gfx/cairo/cairo/src/cairo-unicode.c
+++ b/gfx/cairo/cairo/src/cairo-unicode.c
@@ -1,44 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * The code in this file is derived from GLib's gutf8.c and
- * ultimately from libunicode. It is relicensed under the
- * dual LGPL/MPL with permission of the original authors.
- *
- * Copyright © 1999 Tom Tromey
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Tom Tromey.
- * and Red Hat, Inc.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-error-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-user-font-private.h b/gfx/cairo/cairo/src/cairo-user-font-private.h
index d54ef78b4..c5995978f 100644
--- a/gfx/cairo/cairo/src/cairo-user-font-private.h
+++ b/gfx/cairo/cairo/src/cairo-user-font-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006, 2008 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Behdad Esfahbod <behdad@behdad.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_USER_FONT_PRIVATE_H
#define CAIRO_USER_FONT_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-user-font.c b/gfx/cairo/cairo/src/cairo-user-font.c
index a524d588f..9219a7301 100644
--- a/gfx/cairo/cairo/src/cairo-user-font.c
+++ b/gfx/cairo/cairo/src/cairo-user-font.c
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2006, 2008 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Kristian Høgsberg <krh@redhat.com>
- * Behdad Esfahbod <behdad@behdad.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-user-font-private.h"
diff --git a/gfx/cairo/cairo/src/cairo-version.c b/gfx/cairo/cairo/src/cairo-version.c
index b07b48b37..5b7fa6827 100644
--- a/gfx/cairo/cairo/src/cairo-version.c
+++ b/gfx/cairo/cairo/src/cairo-version.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define CAIRO_VERSION_H 1
diff --git a/gfx/cairo/cairo/src/cairo-vg-surface.c b/gfx/cairo/cairo/src/cairo-vg-surface.c
index d3ae8aa52..3a3d83e96 100644
--- a/gfx/cairo/cairo/src/cairo-vg-surface.c
+++ b/gfx/cairo/cairo/src/cairo-vg-surface.c
@@ -1,38 +1,6 @@
-/* -*- 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 Opened Hand Ltd.
- * Copyright © 2009 Chris Wilson
- *
- * 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.og/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.
- *
- * Contributor(s):
- * Pierre Tardy <tardyp@gmail.com>
- * Øyvind Kolås <pippin@gimp.org>
- * Vladimi Vukicevic <vladimir@mozilla.com> (stubbed out base backend)
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-vg.h b/gfx/cairo/cairo/src/cairo-vg.h
index f9a62e51c..7f1097d04 100644
--- a/gfx/cairo/cairo/src/cairo-vg.h
+++ b/gfx/cairo/cairo/src/cairo-vg.h
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 * Mozilla Corporation
- * Copyright © 2009 Chris Wilson
- *
- * 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 Mozilla Corporation.
- *
- * Contributor(s):
- * Vladimir Vukicevic <vladimir@mozilla.com>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_VG_H
#define CAIRO_VG_H
diff --git a/gfx/cairo/cairo/src/cairo-wideint-private.h b/gfx/cairo/cairo/src/cairo-wideint-private.h
index b9f8dae64..a1ae4dce8 100644
--- a/gfx/cairo/cairo/src/cairo-wideint-private.h
+++ b/gfx/cairo/cairo/src/cairo-wideint-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Keith Packard
- *
- * 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):
- * Keith R. Packard <keithp@keithp.com>
- *
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_WIDEINT_H
#define CAIRO_WIDEINT_H
diff --git a/gfx/cairo/cairo/src/cairo-wideint-type-private.h b/gfx/cairo/cairo/src/cairo-wideint-type-private.h
index 9e49ad947..d7f0319a2 100644
--- a/gfx/cairo/cairo/src/cairo-wideint-type-private.h
+++ b/gfx/cairo/cairo/src/cairo-wideint-type-private.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Keith Packard
- *
- * 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):
- * Keith R. Packard <keithp@keithp.com>
- *
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_WIDEINT_TYPE_H
#define CAIRO_WIDEINT_TYPE_H
diff --git a/gfx/cairo/cairo/src/cairo-wideint.c b/gfx/cairo/cairo/src/cairo-wideint.c
index 78dedcdf0..90809c005 100644
--- a/gfx/cairo/cairo/src/cairo-wideint.c
+++ b/gfx/cairo/cairo/src/cairo-wideint.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Keith Packard
- *
- * 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):
- * Keith R. Packard <keithp@keithp.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
index f0bdc8457..c83a0c7a6 100644
--- a/gfx/cairo/cairo/src/cairo-win32-font.c
+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
@@ -1,37 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define WIN32_LEAN_AND_MEAN
/* We require Windows 2000 features such as GetGlyphIndices */
diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
index a6df34ae1..23db87694 100644
--- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
@@ -1,39 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007, 2008 Adrian Johnson
- *
- * 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 Adrian Johnson.
- *
- * Contributor(s):
- * Adrian Johnson <ajohnson@redneon.com>
- * Vladimir Vukicevic <vladimir@pobox.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define WIN32_LEAN_AND_MEAN
/* We require Windows 2000 features such as ETO_PDY */
diff --git a/gfx/cairo/cairo/src/cairo-win32-private.h b/gfx/cairo/cairo/src/cairo-win32-private.h
index 44c38535f..571b7547c 100644
--- a/gfx/cairo/cairo/src/cairo-win32-private.h
+++ b/gfx/cairo/cairo/src/cairo-win32-private.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_WIN32_PRIVATE_H
#define CAIRO_WIN32_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-win32-refptr.h b/gfx/cairo/cairo/src/cairo-win32-refptr.h
index 0baf8ee7b..8c0ec3338 100644
--- a/gfx/cairo/cairo/src/cairo-win32-refptr.h
+++ b/gfx/cairo/cairo/src/cairo-win32-refptr.h
@@ -1,38 +1,7 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2010 Mozilla Foundation
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 the Mozilla Foundation
- *
- * Contributor(s):
- * Bas Schouten <bschouten@mozilla.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
#ifndef CAIRO_WIN32_REFPTR_H
#define CAIRO_WIN32_REFPTR_H
diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
index 3a3d82989..0fecc3ad8 100644
--- a/gfx/cairo/cairo/src/cairo-win32-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* Cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- * Stuart Parmenter <stuart@mozilla.com>
- * Vladimir Vukicevic <vladimir@pobox.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define WIN32_LEAN_AND_MEAN
/* We require Windows 2000 features such as ETO_PDY */
diff --git a/gfx/cairo/cairo/src/cairo-win32.h b/gfx/cairo/cairo/src/cairo-win32.h
index 07f7cc8e4..a1d45c19a 100644
--- a/gfx/cairo/cairo/src/cairo-win32.h
+++ b/gfx/cairo/cairo/src/cairo-win32.h
@@ -1,38 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Owen Taylor <otaylor@redhat.com>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _CAIRO_WIN32_H_
#define _CAIRO_WIN32_H_
diff --git a/gfx/cairo/cairo/src/cairo-xcb-surface.c b/gfx/cairo/cairo/src/cairo-xcb-surface.c
index da07f609f..7f53e630f 100644
--- a/gfx/cairo/cairo/src/cairo-xcb-surface.c
+++ b/gfx/cairo/cairo/src/cairo-xcb-surface.c
@@ -1,42 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2009 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 University of Southern
- * California.
- *
- * Contributor(s):
- * Behdad Esfahbod <behdad@behdad.org>
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- * Karl Tomlinson <karlt+@karlt.net>, Mozilla Corporation
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-xcb-xrender.h b/gfx/cairo/cairo/src/cairo-xcb-xrender.h
index 09c609738..ff81706c4 100644
--- a/gfx/cairo/cairo/src/cairo-xcb-xrender.h
+++ b/gfx/cairo/cairo/src/cairo-xcb-xrender.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_XCB_XRENDER_H
#define CAIRO_XCB_XRENDER_H
diff --git a/gfx/cairo/cairo/src/cairo-xcb.h b/gfx/cairo/cairo/src/cairo-xcb.h
index 3f64dcbdc..de72b4f04 100644
--- a/gfx/cairo/cairo/src/cairo-xcb.h
+++ b/gfx/cairo/cairo/src/cairo-xcb.h
@@ -1,40 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * Copyright © 2009 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 University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_XCB_H
#define CAIRO_XCB_H
diff --git a/gfx/cairo/cairo/src/cairo-xlib-display.c b/gfx/cairo/cairo/src/cairo-xlib-display.c
index 139e63149..7967d6027 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-display.c
+++ b/gfx/cairo/cairo/src/cairo-xlib-display.c
@@ -1,37 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 Chris Wilson
- *
- * 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 Chris Wilson.
- *
- * Contributor(s):
- * Karl Tomlinson <karlt+@karlt.net>, Mozilla Corporation
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-xlib-private.h b/gfx/cairo/cairo/src/cairo-xlib-private.h
index bd260bc0e..e575b2704 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-private.h
+++ b/gfx/cairo/cairo/src/cairo-xlib-private.h
@@ -1,38 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributors(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- * Karl Tomlinson <karlt+@karlt.net>, Mozilla Corporation
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_XLIB_PRIVATE_H
#define CAIRO_XLIB_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-xlib-screen.c b/gfx/cairo/cairo/src/cairo-xlib-screen.c
index a0c3df840..9663ddb7b 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-screen.c
+++ b/gfx/cairo/cairo/src/cairo-xlib-screen.c
@@ -1,35 +1,8 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Partially on code from xftdpy.c
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/* Partially based on code from xftdpy.c, original code licensed under:
*
* Copyright © 2000 Keith Packard
*
diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface-private.h b/gfx/cairo/cairo/src/cairo-xlib-surface-private.h
index 34732b4f6..cd7e79d69 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-surface-private.h
+++ b/gfx/cairo/cairo/src/cairo-xlib-surface-private.h
@@ -1,34 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_XLIB_SURFACE_PRIVATE_H
#define CAIRO_XLIB_SURFACE_PRIVATE_H
diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
index e24c9627a..36b696eaa 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
@@ -1,43 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- * Behdad Esfahbod <behdad@behdad.org>
- * Chris Wilson <chris@chris-wilson.co.uk>
- * Karl Tomlinson <karlt+@karlt.net>, Mozilla Corporation
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Heed well the words of Owen Taylor:
* "Any patch that works around a render bug, or claims to, without a
diff --git a/gfx/cairo/cairo/src/cairo-xlib-visual.c b/gfx/cairo/cairo/src/cairo-xlib-visual.c
index e076ed01e..f70db3a77 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-visual.c
+++ b/gfx/cairo/cairo/src/cairo-xlib-visual.c
@@ -1,37 +1,6 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2008 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
diff --git a/gfx/cairo/cairo/src/cairo-xlib-xrender-private.h b/gfx/cairo/cairo/src/cairo-xlib-xrender-private.h
index 52f415915..6372787a0 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-xrender-private.h
+++ b/gfx/cairo/cairo/src/cairo-xlib-xrender-private.h
@@ -1,34 +1,8 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2007 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/* Part of this file is subject to a different license. See below. */
#ifndef CAIRO_XLIB_XRENDER_PRIVATE_H
#define CAIRO_XLIB_XRENDER_PRIVATE_H
@@ -184,7 +158,7 @@ typedef struct _XConicalGradient {
/* The rest of this file is copied from various Xrender header files, with
* the following copyright/license information:
*
- * Copyright © 2000 SuSE, Inc.
+ * Copyright (C) 2000 SuSE, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/gfx/cairo/cairo/src/cairo-xlib-xrender.h b/gfx/cairo/cairo/src/cairo-xlib-xrender.h
index b34b057de..996983e4e 100644
--- a/gfx/cairo/cairo/src/cairo-xlib-xrender.h
+++ b/gfx/cairo/cairo/src/cairo-xlib-xrender.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_XLIB_XRENDER_H
#define CAIRO_XLIB_XRENDER_H
diff --git a/gfx/cairo/cairo/src/cairo-xlib.h b/gfx/cairo/cairo/src/cairo-xlib.h
index 4ee592ce4..fdcff769c 100644
--- a/gfx/cairo/cairo/src/cairo-xlib.h
+++ b/gfx/cairo/cairo/src/cairo-xlib.h
@@ -1,38 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- *
- * 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.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_XLIB_H
#define CAIRO_XLIB_H
diff --git a/gfx/cairo/cairo/src/cairo-xml-surface.c b/gfx/cairo/cairo/src/cairo-xml-surface.c
index 5583829e7..f1c3c3ed6 100644
--- a/gfx/cairo/cairo/src/cairo-xml-surface.c
+++ b/gfx/cairo/cairo/src/cairo-xml-surface.c
@@ -1,38 +1,6 @@
-/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Chris Wilson.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This surface is intended to produce a verbose, hierarchical, DAG XML file
* representing a single surface. It is intended to be used by debuggers,
diff --git a/gfx/cairo/cairo/src/cairo-xml.h b/gfx/cairo/cairo/src/cairo-xml.h
index 9ae76e90a..0367076a3 100644
--- a/gfx/cairo/cairo/src/cairo-xml.h
+++ b/gfx/cairo/cairo/src/cairo-xml.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 Chris Wilson
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_XML_H
#define CAIRO_XML_H
diff --git a/gfx/cairo/cairo/src/cairo.c b/gfx/cairo/cairo/src/cairo.c
index eeee0206e..e4a90b57f 100644
--- a/gfx/cairo/cairo/src/cairo.c
+++ b/gfx/cairo/cairo/src/cairo.c
@@ -1,40 +1,6 @@
-/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "cairoint.h"
#include "cairo-private.h"
diff --git a/gfx/cairo/cairo/src/cairo.h b/gfx/cairo/cairo/src/cairo.h
index 52d062352..3a34e80bf 100644
--- a/gfx/cairo/cairo/src/cairo.h
+++ b/gfx/cairo/cairo/src/cairo.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CAIRO_H
#define CAIRO_H
diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
index be78d6d89..3627cd288 100644
--- a/gfx/cairo/cairo/src/cairoint.h
+++ b/gfx/cairo/cairo/src/cairoint.h
@@ -1,39 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2002 University of Southern California
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is University of Southern
- * California.
- *
- * Contributor(s):
- * Carl D. Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* These definitions are solely for use by the implementation of cairo
diff --git a/gfx/cairo/cairo/src/test-fallback-surface.c b/gfx/cairo/cairo/src/test-fallback-surface.c
index 66399d4ab..ff07bc81e 100644
--- a/gfx/cairo/cairo/src/test-fallback-surface.c
+++ b/gfx/cairo/cairo/src/test-fallback-surface.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This isn't a "real" surface, but just something to be used by the
* test suite to test a mythical backend that uses nothing but
diff --git a/gfx/cairo/cairo/src/test-fallback-surface.h b/gfx/cairo/cairo/src/test-fallback-surface.h
index e70715113..c2534c184 100644
--- a/gfx/cairo/cairo/src/test-fallback-surface.h
+++ b/gfx/cairo/cairo/src/test-fallback-surface.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef TEST_FALLBACK_SURFACE_H
#define TEST_FALLBACK_SURFACE_H
diff --git a/gfx/cairo/cairo/src/test-meta-surface.c b/gfx/cairo/cairo/src/test-meta-surface.c
index d5e14d7d1..305174eb5 100644
--- a/gfx/cairo/cairo/src/test-meta-surface.c
+++ b/gfx/cairo/cairo/src/test-meta-surface.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This isn't a "real" surface, but just something to be used by the
* test suite to help exercise the meta-surface paths in cairo.
diff --git a/gfx/cairo/cairo/src/test-meta-surface.h b/gfx/cairo/cairo/src/test-meta-surface.h
index c036bb9c8..78b7a5752 100644
--- a/gfx/cairo/cairo/src/test-meta-surface.h
+++ b/gfx/cairo/cairo/src/test-meta-surface.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef TEST_META_SURFACE_H
#define TEST_META_SURFACE_H
diff --git a/gfx/cairo/cairo/src/test-paginated-surface.c b/gfx/cairo/cairo/src/test-paginated-surface.c
index e06cbed71..5d09308f4 100644
--- a/gfx/cairo/cairo/src/test-paginated-surface.c
+++ b/gfx/cairo/cairo/src/test-paginated-surface.c
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This isn't a "real" surface, but just something to be used by the
* test suite to help exercise the paginated-surface paths in cairo.
diff --git a/gfx/cairo/cairo/src/test-paginated-surface.h b/gfx/cairo/cairo/src/test-paginated-surface.h
index 2bd98aa5e..5f2d1d593 100644
--- a/gfx/cairo/cairo/src/test-paginated-surface.h
+++ b/gfx/cairo/cairo/src/test-paginated-surface.h
@@ -1,37 +1,6 @@
-/* cairo - a vector graphics library with display and print output
- *
- * 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.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Red Hat, Inc.
- *
- * Contributor(s):
- * Carl Worth <cworth@cworth.org>
- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef TEST_PAGINATED_SURFACE_H
#define TEST_PAGINATED_SURFACE_H
diff --git a/gfx/cairo/cairo_qt_a8_fallback.diff b/gfx/cairo/cairo_qt_a8_fallback.diff
deleted file mode 100644
index a8388dda7..000000000
--- a/gfx/cairo/cairo_qt_a8_fallback.diff
+++ /dev/null
@@ -1,68 +0,0 @@
-CAIRO_FORMAT_A8 not allowed for cairo-qt image backend
-diff --git a/gfx/cairo/cairo/src/cairo-qt-surface.cpp b/gfx/cairo/cairo/src/cairo-qt-surface.cpp
---- a/gfx/cairo/cairo/src/cairo-qt-surface.cpp
-+++ b/gfx/cairo/cairo/src/cairo-qt-surface.cpp
-@@ -459,17 +459,17 @@ _cairo_qt_surface_finish (void *abstract
- {
- cairo_qt_surface_t *qs = (cairo_qt_surface_t *) abstract_surface;
-
- D(fprintf(stderr, "q[%p] finish\n", abstract_surface));
-
- /* Only delete p if we created it */
- if (qs->image || qs->pixmap)
- delete qs->p;
-- else
-+ else if (qs->p)
- qs->p->restore ();
-
- if (qs->image_equiv)
- cairo_surface_destroy (qs->image_equiv);
-
- _cairo_surface_clipper_reset (&qs->clipper);
-
- if (qs->image)
-@@ -736,17 +736,17 @@ _cairo_qt_surface_set_clip_region (cairo
- }
-
- static cairo_int_status_t
- _cairo_qt_surface_set_clip (cairo_qt_surface_t *qs,
- cairo_clip_t *clip)
- {
- cairo_int_status_t status;
-
-- D(fprintf(stderr, "q[%p] intersect_clip_path %s\n", abstract_surface, path ? "(path)" : "(clear)"));
-+ D(fprintf(stderr, "q[%p] intersect_clip_path %s\n", qs, clip ? "(path)" : "(clear)"));
-
- if (clip == NULL) {
- _cairo_surface_clipper_reset (&qs->clipper);
- // How the clip path is reset depends on whether we own p or not
- if (qs->pixmap || qs->image) {
- // we own p
- qs->p->setClipping (false);
- } else {
-@@ -1605,16 +1605,25 @@ cairo_qt_surface_create_with_qimage (cai
-
- _cairo_surface_init (&qs->base,
- &cairo_qt_surface_backend,
- _cairo_content_from_format (format));
-
- _cairo_surface_clipper_init (&qs->clipper,
- _cairo_qt_surface_clipper_intersect_clip_path);
-
-+ if (CAIRO_FORMAT_A8 == format) {
-+ qs->image = NULL;
-+ qs->image_equiv = cairo_image_surface_create(format,
-+ width, height);
-+ qs->p = NULL;
-+ qs->supports_porter_duff = false;
-+ qs->window = QRect(0, 0, width, height);
-+ return &qs->base;
-+ }
-
- QImage *image = new QImage (width, height,
- _qimage_format_from_cairo_format (format));
-
- qs->image = image;
-
- if (!image->isNull()) {
- qs->p = new QPainter(image);
diff --git a/gfx/cairo/cairo_qt_glyphs.patch b/gfx/cairo/cairo_qt_glyphs.patch
deleted file mode 100644
index b12356287..000000000
--- a/gfx/cairo/cairo_qt_glyphs.patch
+++ /dev/null
@@ -1,256 +0,0 @@
-Bug 29092 - Fix glyphs rendering for cairo-qpainter-surface
-diff --git a/src/cairo-qt-surface.cpp b/src/cairo-qt-surface.cpp
-index 2ac06ef..5b61b42 100644
---- a/src/cairo-qt-surface.cpp
-+++ b/src/cairo-qt-surface.cpp
-@@ -45,6 +45,7 @@
- #include "cairo-surface-clipper-private.h"
- #include "cairo-types-private.h"
-
-+#include "cairo-ft.h"
- #include "cairo-qt.h"
-
- #include <memory>
-@@ -58,14 +59,10 @@
- #include <QtGui/QPen>
- #include <QtGui/QWidget>
- #include <QtGui/QX11Info>
-+#include <QtCore/QVarLengthArray>
-
--#if CAIRO_HAS_XLIB_XRENDER_SURFACE
--#include "cairo-xlib.h"
--#include "cairo-xlib-xrender.h"
--// I hate X
--#undef Status
--#undef CursorShape
--#undef Bool
-+#if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)) || defined(QT_GLYPHS_API_BACKPORT)
-+extern void qt_draw_glyphs(QPainter *, const quint32 *glyphs, const QPointF *positions, int count);
- #endif
-
- #include <sys/time.h>
-@@ -118,15 +115,6 @@ struct cairo_qt_surface_t {
-
- cairo_bool_t supports_porter_duff;
-
--#if defined(Q_WS_X11) && CAIRO_HAS_XLIB_XRENDER_SURFACE
-- /* temporary, so that we can share the xlib surface's glyphs code */
-- bool xlib_has_clipping;
-- cairo_surface_t *xlib_equiv;
-- QRect xlib_clip_bounds;
-- int xlib_clip_serial;
-- QPoint redir_offset;
--#endif
--
- QPainter *p;
-
- /* The pixmap/image constructors will store their objects here */
-@@ -145,11 +133,6 @@ struct cairo_qt_surface_t {
- */
- static cairo_bool_t _qpixmaps_have_no_alpha = FALSE;
-
--#if defined(Q_WS_X11) && CAIRO_HAS_XLIB_XRENDER_SURFACE
--slim_hidden_proto (cairo_xlib_surface_create);
--slim_hidden_proto (cairo_xlib_surface_create_with_xrender_format);
--#endif
--
- /**
- ** Helper methods
- **/
-@@ -498,11 +481,6 @@ _cairo_qt_surface_finish (void *abstract_surface)
-
- _cairo_surface_clipper_reset (&qs->clipper);
-
--#if defined(Q_WS_X11) && CAIRO_HAS_XLIB_XRENDER_SURFACE
-- if (qs->xlib_equiv)
-- cairo_surface_destroy (qs->xlib_equiv);
--#endif
--
- if (qs->image)
- delete qs->image;
-
-@@ -1392,33 +1370,40 @@ _cairo_qt_surface_show_glyphs (void *abstract_surface,
- cairo_clip_t *clip,
- int *remaining_glyphs)
- {
-+#if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)) || defined(QT_GLYPHS_API_BACKPORT)
- cairo_qt_surface_t *qs = (cairo_qt_surface_t *) abstract_surface;
-
--#if defined(Q_WS_X11) && CAIRO_HAS_XLIB_XRENDER_SURFACE
-- /* If we have an equivalent X surface, let the xlib surface handle this
-- * until we figure out how to do this natively with Qt.
-- */
-- if (qs->xlib_equiv) {
-- D(fprintf(stderr, "q[%p] show_glyphs (x11 equiv) op:%s nglyphs: %d\n", abstract_surface, _opstr(op), num_glyphs));
--
-- for (int i = 0; i < num_glyphs; i++) {
-- glyphs[i].x -= qs->redir_offset.x();
-- glyphs[i].y -= qs->redir_offset.y();
-- }
--
-- return (cairo_int_status_t)
-- _cairo_surface_show_text_glyphs (qs->xlib_equiv,
-- op, source,
-- NULL, 0,
-- glyphs, num_glyphs,
-- NULL, 0,
-- (cairo_text_cluster_flags_t) 0,
-- scaled_font,
-- clip);
-+ // pick out the colour to use from the cairo source
-+ cairo_solid_pattern_t *solid = (cairo_solid_pattern_t*) source;
-+ cairo_scaled_glyph_t* glyph;
-+ // documentation says you have to freeze the cache, but I don't believe it
-+ _cairo_scaled_font_freeze_cache(scaled_font);
-+
-+ QColor tempColour(solid->color.red * 255, solid->color.green * 255, solid->color.blue * 255);
-+ QVarLengthArray<QPointF> positions(num_glyphs);
-+ QVarLengthArray<unsigned int> glyphss(num_glyphs);
-+ FT_Face face = cairo_ft_scaled_font_lock_face (scaled_font);
-+ const FT_Size_Metrics& ftMetrics = face->size->metrics;
-+ QFont font(face->family_name);
-+ font.setStyleStrategy(QFont::NoFontMerging);
-+ font.setBold(face->style_flags & FT_STYLE_FLAG_BOLD);
-+ font.setItalic(face->style_flags & FT_STYLE_FLAG_ITALIC);
-+ font.setKerning(face->face_flags & FT_FACE_FLAG_KERNING);
-+ font.setPixelSize(ftMetrics.y_ppem);
-+ cairo_ft_scaled_font_unlock_face(scaled_font);
-+ qs->p->setFont(font);
-+ qs->p->setPen(tempColour);
-+ for (int currentGlyph = 0; currentGlyph < num_glyphs; currentGlyph++) {
-+ positions[currentGlyph].setX(glyphs[currentGlyph].x);
-+ positions[currentGlyph].setY(glyphs[currentGlyph].y);
-+ glyphss[currentGlyph] = glyphs[currentGlyph].index;
- }
--#endif
--
-+ qt_draw_glyphs(qs->p, glyphss.data(), positions.data(), num_glyphs);
-+ _cairo_scaled_font_thaw_cache(scaled_font);
-+ return CAIRO_INT_STATUS_SUCCESS;
-+#else
- return CAIRO_INT_STATUS_UNSUPPORTED;
-+#endif
- }
-
- static cairo_int_status_t
-@@ -1555,24 +1540,6 @@ _cairo_qt_surface_composite (cairo_operator_t op,
- }
-
- static cairo_status_t
--_cairo_qt_surface_flush (void *abstract_surface)
--{
-- cairo_qt_surface_t *qs = (cairo_qt_surface_t *) abstract_surface;
--
-- if (qs->p == NULL)
-- return CAIRO_STATUS_SUCCESS;
--
-- if (qs->image || qs->pixmap) {
-- qs->p->end ();
-- qs->p->begin (qs->p->device ());
-- } else {
-- qs->p->restore ();
-- }
--
-- return CAIRO_STATUS_SUCCESS;
--}
--
--static cairo_status_t
- _cairo_qt_surface_mark_dirty (void *abstract_surface,
- int x, int y,
- int width, int height)
-@@ -1609,7 +1576,7 @@ static const cairo_surface_backend_t cairo_qt_surface_backend = {
- _cairo_qt_surface_get_extents,
- NULL, /* old_show_glyphs */
- NULL, /* get_font_options */
-- _cairo_qt_surface_flush,
-+ NULL, /* flush */
- _cairo_qt_surface_mark_dirty,
- NULL, /* scaled_font_fini */
- NULL, /* scaled_glyph_fini */
-@@ -1629,64 +1596,6 @@ static const cairo_surface_backend_t cairo_qt_surface_backend = {
- NULL, /* show_text_glyphs */
- };
-
--#if defined(Q_WS_X11) && CAIRO_HAS_XLIB_XRENDER_SURFACE
--static cairo_surface_t *
--_cairo_qt_create_xlib_surface (cairo_qt_surface_t *qs)
--{
-- if (!qs->p)
-- return NULL;
--
-- QPaintDevice *pd = qs->p->device();
-- if (!pd)
-- return NULL;
--
-- QPoint offs;
-- QPaintDevice *rpd = QPainter::redirected(pd, &offs);
-- if (rpd) {
-- pd = rpd;
-- qs->redir_offset = offs;
-- }
--
-- if (pd->devType() == QInternal::Widget) {
-- QWidget *w = (QWidget*) pd;
-- QX11Info xinfo = w->x11Info();
--
-- return cairo_xlib_surface_create (xinfo.display(),
-- (Drawable) w->handle (),
-- (Visual *) xinfo.visual (),
-- w->width (), w->height ());
-- } else if (pd->devType() == QInternal::Pixmap) {
-- QPixmap *pixmap = (QPixmap*) pd;
-- QX11Info xinfo = pixmap->x11Info ();
-- XRenderPictFormat *xrender_format;
-- int pict_format;
--
-- switch (pixmap->depth ()) {
-- case 1:
-- pict_format = PictStandardA1; break;
-- case 8:
-- pict_format = PictStandardA8; break;
-- case 24:
-- pict_format = PictStandardRGB24; break;
-- default:
-- ASSERT_NOT_REACHED;
-- case 32:
-- pict_format = PictStandardARGB32; break;
-- }
-- xrender_format = XRenderFindStandardFormat (xinfo.display (),
-- pict_format);
--
-- return cairo_xlib_surface_create_with_xrender_format (xinfo.display(),
-- (Drawable) pixmap->handle (),
-- ScreenOfDisplay (xinfo.display (),
-- xinfo.screen ()),
-- xrender_format,
-- pixmap->width (), pixmap->height ());
-- } else
-- return NULL;
--}
--#endif
--
- cairo_surface_t *
- cairo_qt_surface_create (QPainter *painter)
- {
-@@ -1717,10 +1626,6 @@ cairo_qt_surface_create (QPainter *painter)
-
- qs->window = painter->window();
-
--#if defined(Q_WS_X11) && CAIRO_HAS_XLIB_XRENDER_SURFACE
-- qs->xlib_equiv = _cairo_qt_create_xlib_surface (qs);
--#endif
--
- D(fprintf(stderr, "qpainter_surface_create: window: [%d %d %d %d] pd:%d\n",
- qs->window.x(), qs->window.y(), qs->window.width(), qs->window.height(),
- qs->supports_porter_duff));
-@@ -1819,10 +1724,6 @@ cairo_qt_surface_create_with_qpixmap (cairo_content_t content,
-
- qs->window = QRect(0, 0, width, height);
-
--#if defined(Q_WS_X11) && CAIRO_HAS_XLIB_XRENDER_SURFACE
-- qs->xlib_equiv = _cairo_qt_create_xlib_surface (qs);
--#endif
--
- D(fprintf(stderr, "qpainter_surface_create: qpixmap: [%d %d %d %d] pd:%d\n",
- qs->window.x(), qs->window.y(), qs->window.width(), qs->window.height(),
- qs->supports_porter_duff));
diff --git a/gfx/cairo/clip-invariant.patch b/gfx/cairo/clip-invariant.patch
deleted file mode 100644
index 08ba4d4de..000000000
--- a/gfx/cairo/clip-invariant.patch
+++ /dev/null
@@ -1,1255 +0,0 @@
-diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
-index 2acc8b5..019249e 100644
---- a/src/cairo-gl-surface.c
-+++ b/src/cairo-gl-surface.c
-@@ -2012,13 +2012,14 @@ typedef struct _cairo_gl_surface_span_renderer {
-
- cairo_gl_composite_setup_t setup;
-
-+ int xmin, xmax;
-+
- cairo_operator_t op;
- cairo_antialias_t antialias;
-
- cairo_gl_surface_t *dst;
- cairo_region_t *clip;
-
-- cairo_composite_rectangles_t composite_rectangles;
- GLuint vbo;
- void *vbo_base;
- unsigned int vbo_size;
-@@ -2049,11 +2050,11 @@ _cairo_gl_span_renderer_flush (cairo_gl_surface_span_renderer_t *renderer)
- cairo_region_get_rectangle (renderer->clip, i, &rect);
-
- glScissor (rect.x, rect.y, rect.width, rect.height);
-- glDrawArrays (GL_LINES, 0, count);
-+ glDrawArrays (GL_QUADS, 0, count);
- }
- glDisable (GL_SCISSOR_TEST);
- } else {
-- glDrawArrays (GL_LINES, 0, count);
-+ glDrawArrays (GL_QUADS, 0, count);
- }
- }
-
-@@ -2134,72 +2135,87 @@ _cairo_gl_emit_span_vertex (cairo_gl_surface_span_renderer_t *renderer,
-
- static void
- _cairo_gl_emit_span (cairo_gl_surface_span_renderer_t *renderer,
-- int x1, int x2, int y, uint8_t alpha)
-+ int x, int y1, int y2,
-+ uint8_t alpha)
- {
- float *vertices = _cairo_gl_span_renderer_get_vbo (renderer, 2);
-
-- _cairo_gl_emit_span_vertex (renderer, x1, y, alpha, vertices);
-- _cairo_gl_emit_span_vertex (renderer, x2, y, alpha,
-+ _cairo_gl_emit_span_vertex (renderer, x, y1, alpha, vertices);
-+ _cairo_gl_emit_span_vertex (renderer, x, y2, alpha,
- vertices + renderer->vertex_size / 4);
- }
-
--/* Emits the contents of the span renderer rows as GL_LINES with the span's
-- * alpha.
-- *
-- * Unlike the image surface, which is compositing into a temporary, we emit
-- * coverage even for alpha == 0, in case we're using an unbounded operator.
-- * But it means we avoid having to do the fixup.
-- */
-+static void
-+_cairo_gl_emit_rectangle (cairo_gl_surface_span_renderer_t *renderer,
-+ int x1, int y1,
-+ int x2, int y2,
-+ int coverage)
-+{
-+ _cairo_gl_emit_span (renderer, x1, y1, y2, coverage);
-+ _cairo_gl_emit_span (renderer, x2, y2, y1, coverage);
-+}
-+
- static cairo_status_t
--_cairo_gl_surface_span_renderer_render_row (
-- void *abstract_renderer,
-- int y,
-- const cairo_half_open_span_t *spans,
-- unsigned num_spans)
-+_cairo_gl_render_bounded_spans (void *abstract_renderer,
-+ int y, int height,
-+ const cairo_half_open_span_t *spans,
-+ unsigned num_spans)
- {
- cairo_gl_surface_span_renderer_t *renderer = abstract_renderer;
-- int xmin = renderer->composite_rectangles.mask.x;
-- int xmax = xmin + renderer->composite_rectangles.width;
-- int prev_x = xmin;
-- int prev_alpha = 0;
-- unsigned i;
-- int x_translate;
--
-- /* Make sure we're within y-range. */
-- if (y < renderer->composite_rectangles.mask.y ||
-- y >= renderer->composite_rectangles.mask.y +
-- renderer->composite_rectangles.height)
-+
-+ if (num_spans == 0)
- return CAIRO_STATUS_SUCCESS;
-
-- x_translate = renderer->composite_rectangles.dst.x -
-- renderer->composite_rectangles.mask.x;
-- y += renderer->composite_rectangles.dst.y -
-- renderer->composite_rectangles.mask.y;
-+ do {
-+ if (spans[0].coverage) {
-+ _cairo_gl_emit_rectangle (renderer,
-+ spans[0].x, y,
-+ spans[1].x, y + height,
-+ spans[0].coverage);
-+ }
-
-- /* Find the first span within x-range. */
-- for (i=0; i < num_spans && spans[i].x < xmin; i++) {}
-- if (i>0)
-- prev_alpha = spans[i-1].coverage;
-+ spans++;
-+ } while (--num_spans > 1);
-
-- /* Set the intermediate spans. */
-- for (; i < num_spans; i++) {
-- int x = spans[i].x;
-+ return CAIRO_STATUS_SUCCESS;
-+}
-
-- if (x >= xmax)
-- break;
-+static cairo_status_t
-+_cairo_gl_render_unbounded_spans (void *abstract_renderer,
-+ int y, int height,
-+ const cairo_half_open_span_t *spans,
-+ unsigned num_spans)
-+{
-+ cairo_gl_surface_span_renderer_t *renderer = abstract_renderer;
-
-- _cairo_gl_emit_span (renderer,
-- prev_x + x_translate, x + x_translate, y,
-- prev_alpha);
-+ if (num_spans == 0) {
-+ _cairo_gl_emit_rectangle (renderer,
-+ renderer->xmin, y,
-+ renderer->xmax, y + height,
-+ 0);
-+ return CAIRO_STATUS_SUCCESS;
-+ }
-
-- prev_x = x;
-- prev_alpha = spans[i].coverage;
-+ if (spans[0].x != renderer->xmin) {
-+ _cairo_gl_emit_rectangle (renderer,
-+ renderer->xmin, y,
-+ spans[0].x, y + height,
-+ 0);
- }
-
-- if (prev_x < xmax) {
-- _cairo_gl_emit_span (renderer,
-- prev_x + x_translate, xmax + x_translate, y,
-- prev_alpha);
-+ do {
-+ _cairo_gl_emit_rectangle (renderer,
-+ spans[0].x, y,
-+ spans[1].x, y + height,
-+ spans[0].coverage);
-+ spans++;
-+ } while (--num_spans > 1);
-+
-+ if (spans[0].x != renderer->xmax) {
-+ _cairo_gl_emit_rectangle (renderer,
-+ spans[0].x, y,
-+ renderer->xmax, y + height,
-+ 0);
- }
-
- return CAIRO_STATUS_SUCCESS;
-@@ -2274,8 +2290,6 @@ _cairo_gl_surface_create_span_renderer (cairo_operator_t op,
- cairo_gl_surface_t *dst = abstract_dst;
- cairo_gl_surface_span_renderer_t *renderer;
- cairo_status_t status;
-- int width = rects->width;
-- int height = rects->height;
- cairo_surface_attributes_t *src_attributes;
- GLenum err;
-
-diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
-index 48d8013..d52979d 100644
---- a/src/cairo-image-surface.c
-+++ b/src/cairo-image-surface.c
-@@ -1390,11 +1390,13 @@ typedef struct _cairo_image_surface_span_renderer {
- const cairo_pattern_t *pattern;
- cairo_antialias_t antialias;
-
-+ uint8_t *mask_data;
-+ uint32_t mask_stride;
-+
- cairo_image_surface_t *src;
- cairo_surface_attributes_t src_attributes;
- cairo_image_surface_t *mask;
- cairo_image_surface_t *dst;
--
- cairo_composite_rectangles_t composite_rectangles;
- } cairo_image_surface_span_renderer_t;
-
-@@ -1403,66 +1405,46 @@ _cairo_image_surface_span_render_row (
- int y,
- const cairo_half_open_span_t *spans,
- unsigned num_spans,
-- cairo_image_surface_t *mask,
-- const cairo_composite_rectangles_t *rects)
-+ uint8_t *data,
-+ uint32_t stride)
- {
-- int xmin = rects->mask.x;
-- int xmax = xmin + rects->width;
- uint8_t *row;
-- int prev_x = xmin;
-- int prev_alpha = 0;
- unsigned i;
-
-- /* Make sure we're within y-range. */
-- y -= rects->mask.y;
-- if (y < 0 || y >= rects->height)
-+ if (num_spans == 0)
- return;
-
-- row = (uint8_t*)(mask->data) + y*(size_t)mask->stride - xmin;
--
-- /* Find the first span within x-range. */
-- for (i=0; i < num_spans && spans[i].x < xmin; i++) {}
-- if (i>0)
-- prev_alpha = spans[i-1].coverage;
--
-- /* Set the intermediate spans. */
-- for (; i < num_spans; i++) {
-- int x = spans[i].x;
--
-- if (x >= xmax)
-- break;
--
-- if (prev_alpha != 0) {
-- /* We implement setting rendering the most common single
-- * pixel wide span case to avoid the overhead of a memset
-- * call. Open coding setting longer spans didn't show a
-- * noticeable improvement over memset. */
-- if (x == prev_x + 1) {
-- row[prev_x] = prev_alpha;
-- }
-- else {
-- memset(row + prev_x, prev_alpha, x - prev_x);
-- }
-+ row = data + y * stride;
-+ for (i = 0; i < num_spans - 1; i++) {
-+ if (! spans[i].coverage)
-+ continue;
-+
-+ /* We implement setting the most common single pixel wide
-+ * span case to avoid the overhead of a memset call.
-+ * Open coding setting longer spans didn't show a
-+ * noticeable improvement over memset.
-+ */
-+ if (spans[i+1].x == spans[i].x + 1) {
-+ row[spans[i].x] = spans[i].coverage;
-+ } else {
-+ memset (row + spans[i].x,
-+ spans[i].coverage,
-+ spans[i+1].x - spans[i].x);
- }
--
-- prev_x = x;
-- prev_alpha = spans[i].coverage;
-- }
--
-- if (prev_alpha != 0 && prev_x < xmax) {
-- memset(row + prev_x, prev_alpha, xmax - prev_x);
- }
- }
-
- static cairo_status_t
--_cairo_image_surface_span_renderer_render_row (
-+_cairo_image_surface_span_renderer_render_rows (
- void *abstract_renderer,
- int y,
-+ int height,
- const cairo_half_open_span_t *spans,
- unsigned num_spans)
- {
- cairo_image_surface_span_renderer_t *renderer = abstract_renderer;
-- _cairo_image_surface_span_render_row (y, spans, num_spans, renderer->mask, &renderer->composite_rectangles);
-+ while (height--)
-+ _cairo_image_surface_span_render_row (y++, spans, num_spans, renderer->mask_data, renderer->mask_stride);
- return CAIRO_STATUS_SUCCESS;
- }
-
-@@ -1517,11 +1499,11 @@ _cairo_image_surface_span_renderer_finish (void *abstract_renderer)
- &dst->base,
- src_attributes,
- src->width, src->height,
-- rects->width, rects->height,
-+ width, height,
- rects->src.x, rects->src.y,
- 0, 0, /* mask.x, mask.y */
- rects->dst.x, rects->dst.y,
-- rects->width, rects->height,
-+ width, height,
- dst->clip_region);
- }
- }
-@@ -1567,7 +1549,7 @@ _cairo_image_surface_create_span_renderer (cairo_operator_t op,
-
- renderer->base.destroy = _cairo_image_surface_span_renderer_destroy;
- renderer->base.finish = _cairo_image_surface_span_renderer_finish;
-- renderer->base.render_row = _cairo_image_surface_span_renderer_render_row;
-+ renderer->base.render_rows = _cairo_image_surface_span_renderer_render_rows;
- renderer->op = op;
- renderer->pattern = pattern;
- renderer->antialias = antialias;
-@@ -1604,6 +1586,9 @@ _cairo_image_surface_create_span_renderer (cairo_operator_t op,
- _cairo_image_surface_span_renderer_destroy (renderer);
- return _cairo_span_renderer_create_in_error (status);
- }
-+
-+ renderer->mask_data = renderer->mask->data - rects->mask.x - rects->mask.y * renderer->mask->stride;
-+ renderer->mask_stride = renderer->mask->stride;
- return &renderer->base;
- }
-
-diff --git a/src/cairo-spans-private.h b/src/cairo-spans-private.h
-index e29a567..af3b38c 100644
---- a/src/cairo-spans-private.h
-+++ b/src/cairo-spans-private.h
-@@ -47,26 +47,24 @@ typedef struct _cairo_half_open_span {
- * surfaces if they want to composite spans instead of trapezoids. */
- typedef struct _cairo_span_renderer cairo_span_renderer_t;
- struct _cairo_span_renderer {
-+ /* Private status variable. */
-+ cairo_status_t status;
-+
- /* Called to destroy the renderer. */
- cairo_destroy_func_t destroy;
-
-- /* Render the spans on row y of the source by whatever compositing
-- * method is required. The function should ignore spans outside
-- * the bounding box set by the init() function. */
-- cairo_status_t (*render_row)(
-- void *abstract_renderer,
-- int y,
-- const cairo_half_open_span_t *coverages,
-- unsigned num_coverages);
-+ /* Render the spans on row y of the destination by whatever compositing
-+ * method is required. */
-+ cairo_warn cairo_status_t
-+ (*render_rows) (void *abstract_renderer,
-+ int y, int height,
-+ const cairo_half_open_span_t *coverages,
-+ unsigned num_coverages);
-
- /* Called after all rows have been rendered to perform whatever
- * final rendering step is required. This function is called just
- * once before the renderer is destroyed. */
-- cairo_status_t (*finish)(
-- void *abstract_renderer);
--
-- /* Private status variable. */
-- cairo_status_t status;
-+ cairo_status_t (*finish) (void *abstract_renderer);
- };
-
- /* Scan converter interface. */
-diff --git a/src/cairo-spans.c b/src/cairo-spans.c
-index af3b85f..69894c1 100644
---- a/src/cairo-spans.c
-+++ b/src/cairo-spans.c
-@@ -275,13 +275,15 @@ _cairo_scan_converter_create_in_error (cairo_status_t status)
- }
-
- static cairo_status_t
--_cairo_nil_span_renderer_render_row (
-+_cairo_nil_span_renderer_render_rows (
- void *abstract_renderer,
- int y,
-+ int height,
- const cairo_half_open_span_t *coverages,
- unsigned num_coverages)
- {
- (void) y;
-+ (void) height;
- (void) coverages;
- (void) num_coverages;
- return _cairo_span_renderer_status (abstract_renderer);
-@@ -310,7 +312,7 @@ _cairo_span_renderer_set_error (
- ASSERT_NOT_REACHED;
- }
- if (renderer->status == CAIRO_STATUS_SUCCESS) {
-- renderer->render_row = _cairo_nil_span_renderer_render_row;
-+ renderer->render_rows = _cairo_nil_span_renderer_render_rows;
- renderer->finish = _cairo_nil_span_renderer_finish;
- renderer->status = error;
- }
-diff --git a/src/cairo-tor-scan-converter.c b/src/cairo-tor-scan-converter.c
-index 29262c2..2b9fb1b 100644
---- a/src/cairo-tor-scan-converter.c
-+++ b/src/cairo-tor-scan-converter.c
-@@ -128,27 +128,29 @@ blit_with_span_renderer(
- cairo_span_renderer_t *span_renderer,
- struct pool *span_pool,
- int y,
-+ int height,
- int xmin,
- int xmax);
-
- static glitter_status_t
--blit_empty_with_span_renderer (cairo_span_renderer_t *renderer, int y);
-+blit_empty_with_span_renderer (cairo_span_renderer_t *renderer, int y, int height);
-
- #define GLITTER_BLIT_COVERAGES_ARGS \
- cairo_span_renderer_t *span_renderer, \
- struct pool *span_pool
-
--#define GLITTER_BLIT_COVERAGES(cells, y, xmin, xmax) do { \
-+#define GLITTER_BLIT_COVERAGES(cells, y, height,xmin, xmax) do { \
- cairo_status_t status = blit_with_span_renderer (cells, \
- span_renderer, \
- span_pool, \
-- y, xmin, xmax); \
-+ y, height, \
-+ xmin, xmax); \
- if (unlikely (status)) \
- return status; \
- } while (0)
-
--#define GLITTER_BLIT_COVERAGES_EMPTY(y, xmin, xmax) do { \
-- cairo_status_t status = blit_empty_with_span_renderer (span_renderer, y); \
-+#define GLITTER_BLIT_COVERAGES_EMPTY(y, height, xmin, xmax) do { \
-+ cairo_status_t status = blit_empty_with_span_renderer (span_renderer, y, height); \
- if (unlikely (status)) \
- return status; \
- } while (0)
-@@ -309,8 +311,8 @@ typedef int grid_area_t;
- #define UNROLL3(x) x x x
-
- struct quorem {
-- int quo;
-- int rem;
-+ int32_t quo;
-+ int32_t rem;
- };
-
- /* Header for a chunk of memory in a memory pool. */
-@@ -382,6 +384,7 @@ struct edge {
- /* Original sign of the edge: +1 for downwards, -1 for upwards
- * edges. */
- int dir;
-+ int vertical;
- };
-
- /* Number of subsample rows per y-bucket. Must be GRID_Y. */
-@@ -389,18 +392,28 @@ struct edge {
-
- #define EDGE_Y_BUCKET_INDEX(y, ymin) (((y) - (ymin))/EDGE_Y_BUCKET_HEIGHT)
-
-+struct bucket {
-+ /* Unsorted list of edges starting within this bucket. */
-+ struct edge *edges;
-+
-+ /* Set to non-zero if there are edges starting strictly within the
-+ * bucket. */
-+ unsigned have_inside_edges;
-+};
-+
- /* A collection of sorted and vertically clipped edges of the polygon.
- * Edges are moved from the polygon to an active list while scan
- * converting. */
- struct polygon {
-- /* The vertical clip extents. */
-+ /* The clip extents. */
-+ grid_scaled_x_t xmin, xmax;
- grid_scaled_y_t ymin, ymax;
-
- /* Array of edges all starting in the same bucket. An edge is put
- * into bucket EDGE_BUCKET_INDEX(edge->ytop, polygon->ymin) when
- * it is added to the polygon. */
-- struct edge **y_buckets;
-- struct edge *y_buckets_embedded[64];
-+ struct bucket *y_buckets;
-+ struct bucket y_buckets_embedded[64];
-
- struct {
- struct pool base[1];
-@@ -702,7 +715,6 @@ static void
- cell_list_fini(struct cell_list *cells)
- {
- pool_fini (cells->cell_pool.base);
-- cell_list_init (cells);
- }
-
- /* Empty the cell list. This is called at the start of every pixel
-@@ -715,6 +727,26 @@ cell_list_reset (struct cell_list *cells)
- pool_reset (cells->cell_pool.base);
- }
-
-+static struct cell *
-+cell_list_alloc (struct cell_list *cells,
-+ struct cell **cursor,
-+ struct cell *tail,
-+ int x)
-+{
-+ struct cell *cell;
-+
-+ cell = pool_alloc (cells->cell_pool.base, sizeof (struct cell));
-+ if (unlikely (NULL == cell))
-+ return NULL;
-+
-+ *cursor = cell;
-+ cell->next = tail;
-+ cell->x = x;
-+ cell->uncovered_area = 0;
-+ cell->covered_height = 0;
-+ return cell;
-+}
-+
- /* Find a cell at the given x-coordinate. Returns %NULL if a new cell
- * needed to be allocated but couldn't be. Cells must be found with
- * non-decreasing x-coordinate until the cell list is rewound using
-@@ -737,22 +769,10 @@ cell_list_find (struct cell_list *cells, int x)
- }
- cells->cursor = cursor;
-
-- if (tail->x == x) {
-+ if (tail->x == x)
- return tail;
-- } else {
-- struct cell *cell;
--
-- cell = pool_alloc (cells->cell_pool.base, sizeof (struct cell));
-- if (unlikely (NULL == cell))
-- return NULL;
-
-- *cursor = cell;
-- cell->next = tail;
-- cell->x = x;
-- cell->uncovered_area = 0;
-- cell->covered_height = 0;
-- return cell;
-- }
-+ return cell_list_alloc (cells, cursor, tail, x);
- }
-
- /* Find two cells at x1 and x2. This is exactly equivalent
-@@ -832,9 +852,8 @@ cell_list_find_pair(struct cell_list *cells, int x1, int x2)
- /* Add an unbounded subpixel span covering subpixels >= x to the
- * coverage cells. */
- static glitter_status_t
--cell_list_add_unbounded_subspan(
-- struct cell_list *cells,
-- grid_scaled_x_t x)
-+cell_list_add_unbounded_subspan (struct cell_list *cells,
-+ grid_scaled_x_t x)
- {
- struct cell *cell;
- int ix, fx;
-@@ -907,20 +926,24 @@ cell_list_render_edge(
- struct edge *edge,
- int sign)
- {
-- struct quorem x1 = edge->x;
-- struct quorem x2 = x1;
- grid_scaled_y_t y1, y2, dy;
- grid_scaled_x_t dx;
- int ix1, ix2;
- grid_scaled_x_t fx1, fx2;
-
-- x2.quo += edge->dxdy_full.quo;
-- x2.rem += edge->dxdy_full.rem;
-- if (x2.rem >= 0) {
-- ++x2.quo;
-- x2.rem -= edge->dy;
-+ struct quorem x1 = edge->x;
-+ struct quorem x2 = x1;
-+
-+ if (! edge->vertical) {
-+ x2.quo += edge->dxdy_full.quo;
-+ x2.rem += edge->dxdy_full.rem;
-+ if (x2.rem >= 0) {
-+ ++x2.quo;
-+ x2.rem -= edge->dy;
-+ }
-+
-+ edge->x = x2;
- }
-- edge->x = x2;
-
- GRID_X_TO_INT_FRAC(x1.quo, ix1, fx1);
- GRID_X_TO_INT_FRAC(x2.quo, ix2, fx2);
-@@ -1026,6 +1049,7 @@ static void
- polygon_init (struct polygon *polygon)
- {
- polygon->ymin = polygon->ymax = 0;
-+ polygon->xmin = polygon->xmax = 0;
- polygon->y_buckets = polygon->y_buckets_embedded;
- pool_init (polygon->edge_pool.base,
- 8192 - sizeof (struct _pool_chunk),
-@@ -1045,10 +1069,11 @@ polygon_fini (struct polygon *polygon)
- * receive new edges and clip them to the vertical range
- * [ymin,ymax). */
- static glitter_status_t
--polygon_reset(
-- struct polygon *polygon,
-- grid_scaled_y_t ymin,
-- grid_scaled_y_t ymax)
-+polygon_reset (struct polygon *polygon,
-+ grid_scaled_x_t xmin,
-+ grid_scaled_x_t xmax,
-+ grid_scaled_y_t ymin,
-+ grid_scaled_y_t ymax)
- {
- unsigned h = ymax - ymin;
- unsigned num_buckets = EDGE_Y_BUCKET_INDEX(ymax + EDGE_Y_BUCKET_HEIGHT-1,
-@@ -1065,14 +1090,16 @@ polygon_reset(
- polygon->y_buckets = polygon->y_buckets_embedded;
- if (num_buckets > ARRAY_LENGTH (polygon->y_buckets_embedded)) {
- polygon->y_buckets = _cairo_malloc_ab (num_buckets,
-- sizeof (struct edge *));
-+ sizeof (struct bucket));
- if (unlikely (NULL == polygon->y_buckets))
- goto bail_no_mem;
- }
-- memset (polygon->y_buckets, 0, num_buckets * sizeof (struct edge *));
-+ memset (polygon->y_buckets, 0, num_buckets * sizeof (struct bucket));
-
- polygon->ymin = ymin;
- polygon->ymax = ymax;
-+ polygon->xmin = xmin;
-+ polygon->xmax = xmax;
- return GLITTER_STATUS_SUCCESS;
-
- bail_no_mem:
-@@ -1086,10 +1113,13 @@ _polygon_insert_edge_into_its_y_bucket(
- struct polygon *polygon,
- struct edge *e)
- {
-- unsigned ix = EDGE_Y_BUCKET_INDEX(e->ytop, polygon->ymin);
-- struct edge **ptail = &polygon->y_buckets[ix];
-+ unsigned j = e->ytop - polygon->ymin;
-+ unsigned ix = j / EDGE_Y_BUCKET_HEIGHT;
-+ unsigned offset = j % EDGE_Y_BUCKET_HEIGHT;
-+ struct edge **ptail = &polygon->y_buckets[ix].edges;
- e->next = *ptail;
- *ptail = e;
-+ polygon->y_buckets[ix].have_inside_edges |= offset;
- }
-
- inline static glitter_status_t
-@@ -1115,30 +1145,53 @@ polygon_add_edge (struct polygon *polygon,
- dx = edge->line.p2.x - edge->line.p1.x;
- dy = edge->line.p2.y - edge->line.p1.y;
- e->dy = dy;
-- e->dxdy = floored_divrem (dx, dy);
--
-- if (ymin <= edge->top)
-- ytop = edge->top;
-- else
-- ytop = ymin;
-- 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;
-- }
--
- e->dir = edge->dir;
-+
-+ ytop = edge->top >= ymin ? edge->top : ymin;
-+ ybot = edge->bottom <= ymax ? edge->bottom : ymax;
- e->ytop = ytop;
-- ybot = edge->bottom < ymax ? edge->bottom : ymax;
- e->height_left = ybot - ytop;
-
-- if (e->height_left >= GRID_Y) {
-- e->dxdy_full = floored_muldivrem (GRID_Y, dx, dy);
-- } else {
-+ 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;
-+
-+ /* Drop edges to the right of the clip extents. */
-+ if (e->x.quo >= polygon->xmax)
-+ return GLITTER_STATUS_SUCCESS;
-+
-+ /* Offset vertical edges at the left side of the clip extents
-+ * to just shy of the left side. We depend on this when
-+ * checking for possible intersections within the clip
-+ * rectangle. */
-+ if (e->x.quo <= polygon->xmin) {
-+ e->x.quo = polygon->xmin - 1;
-+ }
-+ } 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->x.quo >= polygon->xmax && e->dxdy.quo >= 0)
-+ return GLITTER_STATUS_SUCCESS;
-+
-+ 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);
-@@ -1161,31 +1214,30 @@ active_list_init(struct active_list *active)
- active_list_reset(active);
- }
-
--static void
--active_list_fini(
-- struct active_list *active)
--{
-- active_list_reset(active);
--}
--
- /* Merge the edges in an unsorted list of edges into a sorted
- * list. The sort order is edges ascending by edge->x.quo. Returns
- * the new head of the sorted list. */
- static struct edge *
- merge_unsorted_edges(struct edge *sorted_head, struct edge *unsorted_head)
- {
-- struct edge *head = unsorted_head;
- struct edge **cursor = &sorted_head;
- int x;
-
-- while (NULL != head) {
-+ if (sorted_head == NULL) {
-+ sorted_head = unsorted_head;
-+ unsorted_head = unsorted_head->next;
-+ sorted_head->next = NULL;
-+ if (unsorted_head == NULL)
-+ return sorted_head;
-+ }
-+
-+ do {
-+ struct edge *next = unsorted_head->next;
- struct edge *prev = *cursor;
-- struct edge *next = head->next;
-- x = head->x.quo;
-
-- if (NULL == prev || x < prev->x.quo) {
-+ x = unsorted_head->x.quo;
-+ if (x < prev->x.quo)
- cursor = &sorted_head;
-- }
-
- while (1) {
- UNROLL3({
-@@ -1196,26 +1248,29 @@ merge_unsorted_edges(struct edge *sorted_head, struct edge *unsorted_head)
- });
- }
-
-- head->next = *cursor;
-- *cursor = head;
-+ unsorted_head->next = *cursor;
-+ *cursor = unsorted_head;
-+ unsorted_head = next;
-+ } while (unsorted_head != NULL);
-
-- head = next;
-- }
- return sorted_head;
- }
-
- /* Test if the edges on the active list can be safely advanced by a
- * full row without intersections or any edges ending. */
- inline static int
--active_list_can_step_full_row(
-- struct active_list *active)
-+active_list_can_step_full_row (struct active_list *active,
-+ grid_scaled_x_t xmin)
- {
-+ const struct edge *e;
-+ grid_scaled_x_t prev_x = INT_MIN;
-+
- /* Recomputes the minimum height of all edges on the active
- * list if we have been dropping edges. */
- if (active->min_height <= 0) {
-- struct edge *e = active->head;
- int min_height = INT_MAX;
-
-+ e = active->head;
- while (NULL != e) {
- if (e->height_left < min_height)
- min_height = e->height_left;
-@@ -1225,27 +1280,38 @@ active_list_can_step_full_row(
- active->min_height = min_height;
- }
-
-- /* Check for intersections only if no edges end during the next
-- * row. */
-- if (active->min_height >= GRID_Y) {
-- grid_scaled_x_t prev_x = INT_MIN;
-- struct edge *e = active->head;
-- while (NULL != e) {
-- struct quorem x = e->x;
-+ if (active->min_height < GRID_Y)
-+ return 0;
-
-+ /* Check for intersections as no edges end during the next row. */
-+ e = active->head;
-+ while (NULL != e) {
-+ 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;
-+ }
-
-- if (x.quo <= prev_x)
-+ /* There's may be an intersection if the edge sort order might
-+ * change. */
-+ if (x.quo <= prev_x) {
-+ /* Ignore intersections to the left of the clip extents.
-+ * This assumes that all vertical edges on or at the left
-+ * side of the clip rectangle have been shifted slightly
-+ * to the left in polygon_add_edge(). */
-+ if (prev_x >= xmin || x.quo >= xmin || e->x.quo >= xmin)
- return 0;
-+ }
-+ else {
- prev_x = x.quo;
-- e = e->next;
- }
-- return 1;
-+ e = e->next;
- }
-- return 0;
-+
-+ return 1;
- }
-
- /* Merges edges on the given subpixel row from the polygon to the
-@@ -1261,7 +1327,7 @@ active_list_merge_edges_from_polygon(
- unsigned ix = EDGE_Y_BUCKET_INDEX(y, polygon->ymin);
- int min_height = active->min_height;
- struct edge *subrow_edges = NULL;
-- struct edge **ptail = &polygon->y_buckets[ix];
-+ struct edge **ptail = &polygon->y_buckets[ix].edges;
-
- while (1) {
- struct edge *tail = *ptail;
-@@ -1277,8 +1343,10 @@ active_list_merge_edges_from_polygon(
- ptail = &tail->next;
- }
- }
-- active->head = merge_unsorted_edges(active->head, subrow_edges);
-- active->min_height = min_height;
-+ if (subrow_edges) {
-+ active->head = merge_unsorted_edges(active->head, subrow_edges);
-+ active->min_height = min_height;
-+ }
- }
-
- /* Advance the edges on the active list by one subsample row by
-@@ -1439,11 +1507,13 @@ apply_nonzero_fill_rule_and_step_edges (struct active_list *active,
- }
- }
-
-- right_edge->x.quo += right_edge->dxdy_full.quo;
-- right_edge->x.rem += right_edge->dxdy_full.rem;
-- if (right_edge->x.rem >= 0) {
-- ++right_edge->x.quo;
-- right_edge->x.rem -= right_edge->dy;
-+ if (! right_edge->vertical) {
-+ right_edge->x.quo += right_edge->dxdy_full.quo;
-+ right_edge->x.rem += right_edge->dxdy_full.rem;
-+ if (right_edge->x.rem >= 0) {
-+ ++right_edge->x.quo;
-+ right_edge->x.rem -= right_edge->dy;
-+ }
- }
- }
-
-@@ -1472,6 +1542,7 @@ apply_evenodd_fill_rule_and_step_edges (struct active_list *active,
- left_edge = *cursor;
- while (NULL != left_edge) {
- struct edge *right_edge;
-+ int winding = left_edge->dir;
-
- left_edge->height_left -= GRID_Y;
- if (left_edge->height_left)
-@@ -1490,17 +1561,22 @@ apply_evenodd_fill_rule_and_step_edges (struct active_list *active,
- else
- *cursor = right_edge->next;
-
-+ winding += right_edge->dir;
-+ if ((winding & 1) == 0) {
- if (right_edge->next == NULL ||
- right_edge->next->x.quo != right_edge->x.quo)
- {
- break;
- }
-+ }
-
-- right_edge->x.quo += right_edge->dxdy_full.quo;
-- right_edge->x.rem += right_edge->dxdy_full.rem;
-- if (right_edge->x.rem >= 0) {
-- ++right_edge->x.quo;
-- right_edge->x.rem -= right_edge->dy;
-+ if (! right_edge->vertical) {
-+ right_edge->x.quo += right_edge->dxdy_full.quo;
-+ right_edge->x.rem += right_edge->dxdy_full.rem;
-+ if (right_edge->x.rem >= 0) {
-+ ++right_edge->x.quo;
-+ right_edge->x.rem -= right_edge->dy;
-+ }
- }
- }
-
-@@ -1537,8 +1613,14 @@ blit_span(
- }
- }
-
--#define GLITTER_BLIT_COVERAGES(coverages, y, xmin, xmax) \
-- blit_cells(coverages, raster_pixels + (y)*raster_stride, xmin, xmax)
-+#define GLITTER_BLIT_COVERAGES(coverages, y, height, xmin, xmax) \
-+ do { \
-+ int __y = y; \
-+ int __h = height; \
-+ do { \
-+ blit_cells(coverages, raster_pixels + (__y)*raster_stride, xmin, xmax); \
-+ } while (--__h); \
-+ } while (0)
-
- static void
- blit_cells(
-@@ -1597,7 +1679,6 @@ static void
- _glitter_scan_converter_fini(glitter_scan_converter_t *converter)
- {
- polygon_fini(converter->polygon);
-- active_list_fini(converter->active);
- cell_list_fini(converter->coverages);
- converter->xmin=0;
- converter->ymin=0;
-@@ -1641,7 +1722,7 @@ glitter_scan_converter_reset(
-
- active_list_reset(converter->active);
- cell_list_reset(converter->coverages);
-- status = polygon_reset(converter->polygon, ymin, ymax);
-+ status = polygon_reset(converter->polygon, xmin, xmax, ymin, ymax);
- if (status)
- return status;
-
-@@ -1711,19 +1792,48 @@ glitter_scan_converter_add_edge (glitter_scan_converter_t *converter,
- #endif
-
- #ifndef GLITTER_BLIT_COVERAGES_EMPTY
--# define GLITTER_BLIT_COVERAGES_EMPTY(y, xmin, xmax)
-+# define GLITTER_BLIT_COVERAGES_EMPTY(y0, y1, xmin, xmax)
- #endif
-
-+static cairo_bool_t
-+active_list_is_vertical (struct active_list *active)
-+{
-+ struct edge *e;
-+
-+ for (e = active->head; e != NULL; e = e->next) {
-+ if (! e->vertical)
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-+
-+static void
-+step_edges (struct active_list *active, int count)
-+{
-+ struct edge **cursor = &active->head;
-+ struct edge *edge;
-+
-+ for (edge = *cursor; edge != NULL; edge = *cursor) {
-+ edge->height_left -= GRID_Y * count;
-+ if (edge->height_left)
-+ cursor = &edge->next;
-+ else
-+ *cursor = edge->next;
-+ }
-+}
-+
- I glitter_status_t
- glitter_scan_converter_render(
- glitter_scan_converter_t *converter,
- int nonzero_fill,
- GLITTER_BLIT_COVERAGES_ARGS)
- {
-- int i;
-+ int i, j;
- int ymax_i = converter->ymax / GRID_Y;
- int ymin_i = converter->ymin / GRID_Y;
- int xmin_i, xmax_i;
-+ grid_scaled_x_t xmin = converter->xmin;
- int h = ymax_i - ymin_i;
- struct polygon *polygon = converter->polygon;
- struct cell_list *coverages = converter->coverages;
-@@ -1738,22 +1848,28 @@ glitter_scan_converter_render(
- GLITTER_BLIT_COVERAGES_BEGIN;
-
- /* Render each pixel row. */
-- for (i=0; i<h; i++) {
-+ for (i = 0; i < h; i = j) {
- int do_full_step = 0;
- glitter_status_t status = 0;
-
-+ j = i + 1;
-+
- /* Determine if we can ignore this row or use the full pixel
- * stepper. */
-- if (GRID_Y == EDGE_Y_BUCKET_HEIGHT && ! polygon->y_buckets[i]) {
-+ if (polygon->y_buckets[i].edges == NULL) {
- if (! active->head) {
-- GLITTER_BLIT_COVERAGES_EMPTY (i+ymin_i, xmin_i, xmax_i);
-+ for (; j < h && ! polygon->y_buckets[j].edges; j++)
-+ ;
-+ GLITTER_BLIT_COVERAGES_EMPTY (i+ymin_i, j-i, xmin_i, xmax_i);
- continue;
- }
--
-- do_full_step = active_list_can_step_full_row (active);
-+ do_full_step = active_list_can_step_full_row (active, xmin);
-+ }
-+ else if (! polygon->y_buckets[i].have_inside_edges) {
-+ grid_scaled_y_t y = (i+ymin_i)*GRID_Y;
-+ active_list_merge_edges_from_polygon (active, y, polygon);
-+ do_full_step = active_list_can_step_full_row (active, xmin);
- }
--
-- cell_list_reset (coverages);
-
- if (do_full_step) {
- /* Step by a full pixel row's worth. */
-@@ -1764,8 +1880,20 @@ glitter_scan_converter_render(
- status = apply_evenodd_fill_rule_and_step_edges (active,
- coverages);
- }
-+
-+ if (active_list_is_vertical (active)) {
-+ while (j < h &&
-+ polygon->y_buckets[j].edges == NULL &&
-+ active->min_height >= 2*GRID_Y)
-+ {
-+ active->min_height -= GRID_Y;
-+ j++;
-+ }
-+ if (j != i + 1)
-+ step_edges (active, j - (i + 1));
-+ }
- } else {
-- /* Subsample this row. */
-+ /* Supersample this row. */
- grid_scaled_y_t suby;
- for (suby = 0; suby < GRID_Y; suby++) {
- grid_scaled_y_t y = (i+ymin_i)*GRID_Y + suby;
-@@ -1787,13 +1915,13 @@ glitter_scan_converter_render(
- if (unlikely (status))
- return status;
-
-- GLITTER_BLIT_COVERAGES(coverages, i+ymin_i, xmin_i, xmax_i);
-+ GLITTER_BLIT_COVERAGES(coverages, i+ymin_i, j-i, xmin_i, xmax_i);
-+ cell_list_reset (coverages);
-
-- if (! active->head) {
-+ if (! active->head)
- active->min_height = INT_MAX;
-- } else {
-+ else
- active->min_height -= GRID_Y;
-- }
- }
-
- /* Clean up the coverage blitter. */
-@@ -1807,21 +1935,20 @@ glitter_scan_converter_render(
- * scan converter subclass. */
-
- static glitter_status_t
--blit_with_span_renderer(
-- struct cell_list *cells,
-- cairo_span_renderer_t *renderer,
-- struct pool *span_pool,
-- int y,
-- int xmin,
-- int xmax)
-+blit_with_span_renderer (struct cell_list *cells,
-+ cairo_span_renderer_t *renderer,
-+ struct pool *span_pool,
-+ int y, int height,
-+ int xmin, int xmax)
- {
- struct cell *cell = cells->head;
- int prev_x = xmin;
- int cover = 0;
- cairo_half_open_span_t *spans;
- unsigned num_spans;
-+
- if (cell == NULL)
-- return CAIRO_STATUS_SUCCESS;
-+ return blit_empty_with_span_renderer (renderer, y, height);
-
- /* Skip cells to the left of the clip region. */
- while (cell != NULL && cell->x < xmin) {
-@@ -1833,12 +1960,12 @@ blit_with_span_renderer(
- /* Count number of cells remaining. */
- {
- struct cell *next = cell;
-- num_spans = 0;
-- while (next) {
-+ num_spans = 1;
-+ while (next != NULL) {
- next = next->next;
- ++num_spans;
- }
-- num_spans = 2*num_spans + 1;
-+ num_spans = 2*num_spans;
- }
-
- /* Allocate enough spans for the row. */
-@@ -1853,6 +1980,7 @@ blit_with_span_renderer(
- for (; cell != NULL; cell = cell->next) {
- int x = cell->x;
- int area;
-+
- if (x >= xmax)
- break;
-
-@@ -1872,20 +2000,26 @@ blit_with_span_renderer(
- prev_x = x+1;
- }
-
-- if (prev_x < xmax) {
-+ if (prev_x <= xmax) {
- spans[num_spans].x = prev_x;
- spans[num_spans].coverage = GRID_AREA_TO_ALPHA (cover);
- ++num_spans;
- }
-
-+ if (prev_x < xmax && cover) {
-+ spans[num_spans].x = xmax;
-+ spans[num_spans].coverage = 0;
-+ ++num_spans;
-+ }
-+
- /* Dump them into the renderer. */
-- return renderer->render_row (renderer, y, spans, num_spans);
-+ return renderer->render_rows (renderer, y, height, spans, num_spans);
- }
-
- static glitter_status_t
--blit_empty_with_span_renderer (cairo_span_renderer_t *renderer, int y)
-+blit_empty_with_span_renderer (cairo_span_renderer_t *renderer, int y, int height)
- {
-- return renderer->render_row (renderer, y, NULL, 0);
-+ return renderer->render_rows (renderer, y, height, NULL, 0);
- }
-
- struct _cairo_tor_scan_converter {
-diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
-index 82d1cf5..d4575a3 100644
---- a/src/cairo-win32-surface.c
-+++ b/src/cairo-win32-surface.c
-@@ -1954,6 +1954,9 @@ typedef struct _cairo_win32_surface_span_renderer {
- const cairo_pattern_t *pattern;
- cairo_antialias_t antialias;
-
-+ uint8_t *mask_data;
-+ uint32_t mask_stride;
-+
- cairo_image_surface_t *mask;
- cairo_win32_surface_t *dst;
- cairo_region_t *clip_region;
-@@ -1962,14 +1965,16 @@ typedef struct _cairo_win32_surface_span_renderer {
- } cairo_win32_surface_span_renderer_t;
-
- static cairo_status_t
--_cairo_win32_surface_span_renderer_render_row (
-+_cairo_win32_surface_span_renderer_render_rows (
- void *abstract_renderer,
- int y,
-+ int height,
- const cairo_half_open_span_t *spans,
- unsigned num_spans)
- {
- cairo_win32_surface_span_renderer_t *renderer = abstract_renderer;
-- _cairo_image_surface_span_render_row (y, spans, num_spans, renderer->mask, &renderer->composite_rectangles);
-+ while (height--)
-+ _cairo_image_surface_span_render_row (y++, spans, num_spans, renderer->mask_data, renderer->mask_stride);
- return CAIRO_STATUS_SUCCESS;
- }
-
-@@ -2066,8 +2071,7 @@ _cairo_win32_surface_create_span_renderer (cairo_operator_t op,
-
- renderer->base.destroy = _cairo_win32_surface_span_renderer_destroy;
- renderer->base.finish = _cairo_win32_surface_span_renderer_finish;
-- renderer->base.render_row =
-- _cairo_win32_surface_span_renderer_render_row;
-+ renderer->base.render_rows = _cairo_win32_surface_span_renderer_render_rows;
- renderer->op = op;
- renderer->pattern = pattern;
- renderer->antialias = antialias;
-@@ -2088,6 +2092,9 @@ _cairo_win32_surface_create_span_renderer (cairo_operator_t op,
- _cairo_win32_surface_span_renderer_destroy (renderer);
- return _cairo_span_renderer_create_in_error (status);
- }
-+
-+ renderer->mask_data = renderer->mask->data - rects->mask.x - rects->mask.y * renderer->mask->stride;
-+ renderer->mask_stride = renderer->mask->stride;
- return &renderer->base;
- }
-
-diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
-index a7a40b8..566d9fb 100644
---- a/src/cairo-xlib-display.c
-+++ b/src/cairo-xlib-display.c
-@@ -407,6 +407,10 @@ _cairo_xlib_display_get (Display *dpy,
- display->buggy_pad_reflect = TRUE;
- }
-
-+ /* gradients don't seem to work */
-+ display->buggy_gradients = TRUE;
-+
-+
- /* XXX workaround; see https://bugzilla.mozilla.org/show_bug.cgi?id=413583 */
- /* If buggy_repeat_force == -1, then initialize.
- * - set to -2, meaning "nothing was specified", and we trust the above detection.
-diff --git a/src/cairoint.h b/src/cairoint.h
-index 58850ab..1cdf6ff 100644
---- a/src/cairoint.h
-+++ b/src/cairoint.h
-@@ -2257,8 +2257,8 @@ cairo_private void
- _cairo_image_surface_span_render_row (int y,
- const cairo_half_open_span_t *spans,
- unsigned num_spans,
-- cairo_image_surface_t *mask,
-- const cairo_composite_rectangles_t *rects);
-+ uint8_t *data,
-+ uint32_t stride);
-
- cairo_private cairo_image_transparency_t
- _cairo_image_analyze_transparency (cairo_image_surface_t *image);
diff --git a/gfx/cairo/clip-rects-surface-extents.patch b/gfx/cairo/clip-rects-surface-extents.patch
deleted file mode 100644
index 1a9972aa7..000000000
--- a/gfx/cairo/clip-rects-surface-extents.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From 108b1c7825116ed3f93aa57384bbd3290cdc9181 Mon Sep 17 00:00:00 2001
-From: Karl Tomlinson <karlt+@karlt.net>
-Date: Sat, 17 Jul 2010 01:08:53 +0000
-Subject: clip: consider gstate target extents in _cairo_gstate_copy_clip_rectangle_list
-
-Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29125
-
-To be consistent with _cairo_gstate_clip_extents, the context's clip
-should be intersected with the target surface extents (instead of only
-using them when there is no clip).
-
-Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
----
-diff --git a/src/cairo-clip.c b/src/cairo-clip.c
-index 77d8214..d5a2fab 100644
---- a/src/cairo-clip.c
-+++ b/src/cairo-clip.c
-@@ -1495,7 +1495,7 @@ _cairo_rectangle_list_create_in_error (cairo_status_t status)
- cairo_rectangle_list_t *
- _cairo_clip_copy_rectangle_list (cairo_clip_t *clip, cairo_gstate_t *gstate)
- {
--#define ERROR_LIST(S) _cairo_rectangle_list_create_in_error (_cairo_error (S));
-+#define ERROR_LIST(S) _cairo_rectangle_list_create_in_error (_cairo_error (S))
-
- cairo_rectangle_list_t *list;
- cairo_rectangle_t *rectangles = NULL;
-@@ -1507,57 +1507,37 @@ _cairo_clip_copy_rectangle_list (cairo_clip_t *clip, cairo_gstate_t *gstate)
- if (clip->all_clipped)
- goto DONE;
-
-- if (clip->path != NULL) {
-- status = _cairo_clip_get_region (clip, &region);
-- if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) {
-- goto DONE;
-- } else if (status == CAIRO_INT_STATUS_UNSUPPORTED) {
-- return ERROR_LIST (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE)
-- } else if (unlikely (status)) {
-- return ERROR_LIST (status);
-- }
-- }
--
-- if (region != NULL) {
-- n_rects = cairo_region_num_rectangles (region);
-- if (n_rects) {
-- rectangles = _cairo_malloc_ab (n_rects, sizeof (cairo_rectangle_t));
-- if (unlikely (rectangles == NULL)) {
-- return ERROR_LIST (CAIRO_STATUS_NO_MEMORY);
-- }
-+ if (!clip->path)
-+ return ERROR_LIST (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
-
-- for (i = 0; i < n_rects; ++i) {
-- cairo_rectangle_int_t clip_rect;
--
-- cairo_region_get_rectangle (region, i, &clip_rect);
-+ status = _cairo_clip_get_region (clip, &region);
-+ if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) {
-+ goto DONE;
-+ } else if (status == CAIRO_INT_STATUS_UNSUPPORTED) {
-+ return ERROR_LIST (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
-+ } else if (unlikely (status)) {
-+ return ERROR_LIST (status);
-+ }
-
-- if (! _cairo_clip_int_rect_to_user (gstate,
-- &clip_rect,
-- &rectangles[i]))
-- {
-- free (rectangles);
-- return ERROR_LIST (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
-- }
-- }
-+ n_rects = cairo_region_num_rectangles (region);
-+ if (n_rects) {
-+ rectangles = _cairo_malloc_ab (n_rects, sizeof (cairo_rectangle_t));
-+ if (unlikely (rectangles == NULL)) {
-+ return ERROR_LIST (CAIRO_STATUS_NO_MEMORY);
- }
-- } else {
-- cairo_rectangle_int_t extents;
-
-- if (! _cairo_surface_get_extents (_cairo_gstate_get_target (gstate),
-- &extents))
-- {
-- /* unbounded surface -> unclipped */
-- goto DONE;
-- }
-+ for (i = 0; i < n_rects; ++i) {
-+ cairo_rectangle_int_t clip_rect;
-
-- n_rects = 1;
-- rectangles = malloc(sizeof (cairo_rectangle_t));
-- if (unlikely (rectangles == NULL))
-- return ERROR_LIST (CAIRO_STATUS_NO_MEMORY);
-+ cairo_region_get_rectangle (region, i, &clip_rect);
-
-- if (! _cairo_clip_int_rect_to_user (gstate, &extents, rectangles)) {
-- free (rectangles);
-- return ERROR_LIST (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
-+ if (! _cairo_clip_int_rect_to_user (gstate,
-+ &clip_rect,
-+ &rectangles[i]))
-+ {
-+ free (rectangles);
-+ return ERROR_LIST (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
-+ }
- }
- }
-
-diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
-index baf6145..7caf624 100644
---- a/src/cairo-gstate.c
-+++ b/src/cairo-gstate.c
-@@ -1555,7 +1555,19 @@ _cairo_gstate_clip_extents (cairo_gstate_t *gstate,
- cairo_rectangle_list_t*
- _cairo_gstate_copy_clip_rectangle_list (cairo_gstate_t *gstate)
- {
-- return _cairo_clip_copy_rectangle_list (&gstate->clip, gstate);
-+ cairo_clip_t clip;
-+ cairo_rectangle_int_t extents;
-+ cairo_rectangle_list_t *list;
-+
-+ _cairo_clip_init_copy (&clip, &gstate->clip);
-+
-+ if (_cairo_surface_get_extents (gstate->target, &extents))
-+ _cairo_clip_rectangle (&clip, &extents);
-+
-+ list = _cairo_clip_copy_rectangle_list (&clip, gstate);
-+ _cairo_clip_fini (&clip);
-+
-+ return list;
- }
-
- static void
-diff --git a/test/get-clip.c b/test/get-clip.c
-index f0477a1..f97db3f 100644
---- a/test/get-clip.c
-+++ b/test/get-clip.c
-@@ -120,6 +120,22 @@ preamble (cairo_test_context_t *ctx)
- }
- cairo_rectangle_list_destroy (rectangle_list);
-
-+ /* We should get the same results after applying a clip that contains the
-+ existing clip. */
-+ phase = "Clip beyond surface extents";
-+ cairo_save (cr);
-+ cairo_rectangle (cr, -10, -10, SIZE + 20 , SIZE + 20);
-+ cairo_clip (cr);
-+ rectangle_list = cairo_copy_clip_rectangle_list (cr);
-+ if (! check_count (ctx, phase, rectangle_list, 1) ||
-+ ! check_clip_extents (ctx, phase, cr, 0, 0, SIZE, SIZE) ||
-+ ! check_rectangles_contain (ctx, phase, rectangle_list, 0, 0, SIZE, SIZE))
-+ {
-+ goto FAIL;
-+ }
-+ cairo_rectangle_list_destroy (rectangle_list);
-+ cairo_restore (cr);
-+
- /* Test simple clip rect. */
- phase = "Simple clip rect";
- cairo_save (cr);
---
-cgit v0.8.3-6-g21f6
diff --git a/gfx/cairo/copyarea-with-alpha.patch b/gfx/cairo/copyarea-with-alpha.patch
deleted file mode 100644
index c6765105e..000000000
--- a/gfx/cairo/copyarea-with-alpha.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
---- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
-@@ -1722,30 +1722,31 @@ _surface_has_alpha (cairo_xlib_surface_t
- else
- return FALSE;
- } else {
- /* In the no-render case, we never have alpha */
- return FALSE;
- }
- }
-
--/* Returns true if the given operator and source-alpha combination
-- * requires alpha compositing to complete.
-+/* Returns true if the given operator and alpha combination requires alpha
-+ * compositing to complete on source and destination surfaces with the same
-+ * format. i.e. if a simple bitwise copy is not appropriate.
- */
- static cairo_bool_t
- _operator_needs_alpha_composite (cairo_operator_t op,
-- cairo_bool_t destination_has_alpha,
-- cairo_bool_t source_has_alpha)
-+ cairo_bool_t surfaces_have_alpha)
- {
-- if (op == CAIRO_OPERATOR_SOURCE ||
-- (! source_has_alpha &&
-- (op == CAIRO_OPERATOR_OVER ||
-- op == CAIRO_OPERATOR_ATOP ||
-- op == CAIRO_OPERATOR_IN)))
-- return destination_has_alpha;
-+ if (op == CAIRO_OPERATOR_SOURCE)
-+ return FALSE;
-+
-+ if (op == CAIRO_OPERATOR_OVER ||
-+ op == CAIRO_OPERATOR_IN ||
-+ op == CAIRO_OPERATOR_ATOP)
-+ return surfaces_have_alpha;
-
- return TRUE;
- }
-
- /* There is a bug in most older X servers with compositing using a
- * untransformed repeating source pattern when the source is in off-screen
- * video memory, and another with repeated transformed images using a
- * general transform matrix. When these bugs could be triggered, we need a
-@@ -1843,24 +1844,24 @@ _categorize_composite_operation (cairo_x
- */
- static composite_operation_t
- _recategorize_composite_operation (cairo_xlib_surface_t *dst,
- cairo_operator_t op,
- cairo_xlib_surface_t *src,
- cairo_surface_attributes_t *src_attr,
- cairo_bool_t have_mask)
- {
-- /* Can we use the core protocol? */
-+ /* Can we use the core protocol? (If _surfaces_compatible, then src and
-+ * dst have the same format and _surface_has_alpha is the same for each.)
-+ */
- if (! have_mask &&
- src->owns_pixmap &&
-- src->depth == dst->depth &&
-+ _surfaces_compatible (src, dst) &&
- _cairo_matrix_is_integer_translation (&src_attr->matrix, NULL, NULL) &&
-- ! _operator_needs_alpha_composite (op,
-- _surface_has_alpha (dst),
-- _surface_has_alpha (src)))
-+ ! _operator_needs_alpha_composite (op, _surface_has_alpha (dst)))
- {
- if (src_attr->extend == CAIRO_EXTEND_NONE)
- return DO_XCOPYAREA;
-
- if (dst->buggy_repeat && src_attr->extend == CAIRO_EXTEND_REPEAT)
- return DO_XTILE;
- }
-
-@@ -2211,34 +2212,28 @@ _cairo_xlib_surface_composite (cairo_ope
- cairo_surface_attributes_t src_attr, mask_attr;
- cairo_xlib_surface_t *dst = abstract_dst;
- cairo_xlib_surface_t *src;
- cairo_xlib_surface_t *mask;
- cairo_int_status_t status;
- composite_operation_t operation;
- int itx, ity;
- cairo_bool_t is_integer_translation;
-- cairo_bool_t needs_alpha_composite;
- GC gc;
-
- if (mask_pattern != NULL && ! CAIRO_SURFACE_RENDER_HAS_COMPOSITE (dst))
- return UNSUPPORTED ("no support for masks");
-
- operation = _categorize_composite_operation (dst, op, src_pattern,
- mask_pattern != NULL);
- if (operation == DO_UNSUPPORTED)
- return UNSUPPORTED ("unsupported operation");
-
- X_DEBUG ((dst->dpy, "composite (dst=%x)", (unsigned int) dst->drawable));
-
-- needs_alpha_composite =
-- _operator_needs_alpha_composite (op,
-- _surface_has_alpha (dst),
-- ! _cairo_pattern_is_opaque (src_pattern));
--
- _cairo_xlib_display_notify (dst->display);
-
- status =
- _cairo_xlib_surface_acquire_pattern_surfaces (dst,
- src_pattern, mask_pattern,
- src_x, src_y,
- mask_x, mask_y,
- width, height,
diff --git a/gfx/cairo/d2d-gradient-ensure-stops.patch b/gfx/cairo/d2d-gradient-ensure-stops.patch
deleted file mode 100644
index 2f7bb9334..000000000
--- a/gfx/cairo/d2d-gradient-ensure-stops.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1348618772 -43200
-# Node ID 55ccbc8d52e69b020f2ba493e92ad2e214388df0
-# Parent e0d69219dd2b3b2826d186dc99c673b879409ea6
-Bug 792903. Prevent num_stops from being set to zero. r=bas
-
-diff --git a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
---- a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
-+++ b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
-@@ -1641,17 +1641,20 @@ static RefPtr<ID2D1Brush>
- min_dist = MIN(_cairo_d2d_dot_product(u, _cairo_d2d_subtract_point(top_left, p1)),
- _cairo_d2d_dot_product(u, _cairo_d2d_subtract_point(top_right, p1)));
- min_dist = MIN(min_dist, _cairo_d2d_dot_product(u, _cairo_d2d_subtract_point(bottom_left, p1)));
- min_dist = MIN(min_dist, _cairo_d2d_dot_product(u, _cairo_d2d_subtract_point(bottom_right, p1)));
-
- min_dist = MAX(-min_dist, 0);
-
- // Repeats after gradient start.
-- int after_repeat = (int)ceil(max_dist / gradient_length);
-+ // It's possible for max_dist and min_dist to both be zero, in which case
-+ // we'll set num_stops to 0 and crash D2D. Let's just ensure after_repeat
-+ // is at least 1.
-+ int after_repeat = MAX((int)ceil(max_dist / gradient_length), 1);
- int before_repeat = (int)ceil(min_dist / gradient_length);
- num_stops *= (after_repeat + before_repeat);
-
- p2.x = p1.x + u.x * after_repeat * gradient_length;
- p2.y = p1.y + u.y * after_repeat * gradient_length;
- p1.x = p1.x - u.x * before_repeat * gradient_length;
- p1.y = p1.y - u.y * before_repeat * gradient_length;
-
diff --git a/gfx/cairo/d2d-repeating-gradients.patch b/gfx/cairo/d2d-repeating-gradients.patch
deleted file mode 100644
index 993695bf0..000000000
--- a/gfx/cairo/d2d-repeating-gradients.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-From: Robert O'Callahan <robert@ocallahan.org>
-Bug 768775. Improve the precision of the calculation of the number of stops that need to be added to handle 'repeat' and 'reflect', when we're filling a path. r=bas
-
-diff --git a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
---- a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
-+++ b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
-@@ -1411,17 +1411,17 @@ static RefPtr<ID2D1Brush>
-
- gradient_center.x = _cairo_fixed_to_float(source_pattern->c1.x);
- gradient_center.y = _cairo_fixed_to_float(source_pattern->c1.y);
-
- // Transform surface corners into pattern coordinates.
- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &top_left.x, &top_left.y);
- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &top_right.x, &top_right.y);
- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &bottom_left.x, &bottom_left.y);
-- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &bottom_right.x, &top_left.y);
-+ cairo_matrix_transform_point(&source_pattern->base.base.matrix, &bottom_right.x, &bottom_right.y);
-
- // Find the corner furthest away from the gradient center in pattern space.
- double largest = MAX(_cairo_d2d_point_dist(top_left, gradient_center), _cairo_d2d_point_dist(top_right, gradient_center));
- largest = MAX(largest, _cairo_d2d_point_dist(bottom_left, gradient_center));
- largest = MAX(largest, _cairo_d2d_point_dist(bottom_right, gradient_center));
-
- unsigned int minSize = (unsigned int)ceil(largest);
-
-@@ -1531,16 +1531,17 @@ static RefPtr<ID2D1Brush>
- stopCollection,
- &brush);
- delete [] stops;
- return brush;
- }
-
- static RefPtr<ID2D1Brush>
- _cairo_d2d_create_linear_gradient_brush(cairo_d2d_surface_t *d2dsurf,
-+ cairo_path_fixed_t *fill_path,
- cairo_linear_pattern_t *source_pattern)
- {
- if (source_pattern->p1.x == source_pattern->p2.x &&
- source_pattern->p1.y == source_pattern->p2.y) {
- // Cairo behavior in this situation is to draw a solid color the size of the last stop.
- RefPtr<ID2D1SolidColorBrush> brush;
- d2dsurf->rt->CreateSolidColorBrush(
- _cairo_d2d_color_from_cairo_color_stop(source_pattern->base.stops[source_pattern->base.n_stops - 1].color),
-@@ -1564,35 +1565,46 @@ static RefPtr<ID2D1Brush>
- p1.x = _cairo_fixed_to_float(source_pattern->p1.x);
- p1.y = _cairo_fixed_to_float(source_pattern->p1.y);
- p2.x = _cairo_fixed_to_float(source_pattern->p2.x);
- p2.y = _cairo_fixed_to_float(source_pattern->p2.y);
-
- D2D1_GRADIENT_STOP *stops;
- int num_stops = source_pattern->base.n_stops;
- if (source_pattern->base.base.extend == CAIRO_EXTEND_REPEAT || source_pattern->base.base.extend == CAIRO_EXTEND_REFLECT) {
--
-- RefPtr<IDXGISurface> surf;
-- d2dsurf->surface->QueryInterface(&surf);
-- DXGI_SURFACE_DESC desc;
-- surf->GetDesc(&desc);
--
- // Get this when the points are not transformed yet.
- double gradient_length = _cairo_d2d_point_dist(p1, p2);
--
-- // Calculate the repeat count needed;
-- cairo_point_double_t top_left, top_right, bottom_left, bottom_right;
-- top_left.x = bottom_left.x = top_left.y = top_right.y = 0;
-- top_right.x = bottom_right.x = desc.Width;
-- bottom_right.y = bottom_left.y = desc.Height;
-+ cairo_point_double_t top_left, top_right, bottom_left, bottom_right;
-+
-+ if (fill_path) {
-+ // Calculate the repeat count needed;
-+ cairo_box_t fill_extents;
-+ _cairo_path_fixed_extents (fill_path, &fill_extents);
-+
-+ top_left.x = bottom_left.x = _cairo_fixed_to_double (fill_extents.p1.x);
-+ top_left.y = top_right.y = _cairo_fixed_to_double (fill_extents.p1.y);
-+ top_right.x = bottom_right.x = _cairo_fixed_to_double (fill_extents.p2.x);
-+ bottom_right.y = bottom_left.y = _cairo_fixed_to_double (fill_extents.p2.y);
-+ } else {
-+ RefPtr<IDXGISurface> surf;
-+ d2dsurf->surface->QueryInterface(&surf);
-+ DXGI_SURFACE_DESC desc;
-+ surf->GetDesc(&desc);
-+
-+ top_left.x = bottom_left.x = 0;
-+ top_left.y = top_right.y = 0;
-+ top_right.x = bottom_right.x = desc.Width;
-+ bottom_right.y = bottom_left.y = desc.Height;
-+ }
-+
- // Transform the corners of our surface to pattern space.
- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &top_left.x, &top_left.y);
- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &top_right.x, &top_right.y);
- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &bottom_left.x, &bottom_left.y);
-- cairo_matrix_transform_point(&source_pattern->base.base.matrix, &bottom_right.x, &top_left.y);
-+ cairo_matrix_transform_point(&source_pattern->base.base.matrix, &bottom_right.x, &bottom_right.y);
-
- cairo_point_double_t u;
- // Unit vector of the gradient direction.
- u = _cairo_d2d_subtract_point(p2, p1);
- _cairo_d2d_normalize_point(&u);
-
- // (corner - p1) . u = |corner - p1| cos(a) where a is the angle between the two vectors.
- // Coincidentally |corner - p1| cos(a) is actually also the distance our gradient needs to cover since
-@@ -1701,17 +1713,18 @@ static RefPtr<ID2D1Brush>
- * \param d2dsurf Surface to create a brush for
- * \param pattern The pattern to create a brush for
- * \param unique We cache the bitmap/color brush for speed. If this
- * needs a brush that is unique (i.e. when more than one is needed),
- * this will make the function return a seperate brush.
- * \return A brush object
- */
- static RefPtr<ID2D1Brush>
--_cairo_d2d_create_brush_for_pattern(cairo_d2d_surface_t *d2dsurf,
-+_cairo_d2d_create_brush_for_pattern(cairo_d2d_surface_t *d2dsurf,
-+ cairo_path_fixed_t *fill_path,
- const cairo_pattern_t *pattern,
- bool unique = false)
- {
- HRESULT hr;
-
- if (pattern->type == CAIRO_PATTERN_TYPE_SOLID) {
- cairo_solid_pattern_t *sourcePattern =
- (cairo_solid_pattern_t*)pattern;
-@@ -1729,17 +1742,17 @@ static RefPtr<ID2D1Brush>
- d2dsurf->solidColorBrush->SetColor(color);
- }
- return d2dsurf->solidColorBrush;
- }
-
- } else if (pattern->type == CAIRO_PATTERN_TYPE_LINEAR) {
- cairo_linear_pattern_t *source_pattern =
- (cairo_linear_pattern_t*)pattern;
-- return _cairo_d2d_create_linear_gradient_brush(d2dsurf, source_pattern);
-+ return _cairo_d2d_create_linear_gradient_brush(d2dsurf, fill_path, source_pattern);
- } else if (pattern->type == CAIRO_PATTERN_TYPE_RADIAL) {
- cairo_radial_pattern_t *source_pattern =
- (cairo_radial_pattern_t*)pattern;
- return _cairo_d2d_create_radial_gradient_brush(d2dsurf, source_pattern);
- } else if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE) {
- cairo_matrix_t mat = pattern->matrix;
- cairo_matrix_invert(&mat);
-
-@@ -3228,17 +3241,17 @@ static cairo_int_status_t
-
- if (unlikely(status))
- return status;
- }
- #endif
-
- target_rt->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
-
-- RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf,
-+ RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf, NULL,
- source);
-
- if (!brush) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- D2D1_SIZE_F size = target_rt->GetSize();
- target_rt->FillRectangle(D2D1::RectF((FLOAT)0,
-@@ -3349,17 +3362,17 @@ static cairo_int_status_t
- source->filter,
- solidAlphaValue);
- if (rv != CAIRO_INT_STATUS_UNSUPPORTED) {
- return rv;
- }
- }
- }
-
-- RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf, source);
-+ RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf, NULL, source);
- if (!brush) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- RefPtr<ID2D1RenderTarget> target_rt = d2dsurf->rt;
- #ifndef ALWAYS_MANUAL_COMPOSITE
- if (op != CAIRO_OPERATOR_OVER) {
- #endif
-@@ -3389,17 +3402,17 @@ static cairo_int_status_t
- brush->SetOpacity(1.0);
-
- if (target_rt.get() != d2dsurf->rt.get()) {
- return _cairo_d2d_blend_temp_surface(d2dsurf, op, target_rt, clip);
- }
- return CAIRO_INT_STATUS_SUCCESS;
- }
-
-- RefPtr<ID2D1Brush> opacityBrush = _cairo_d2d_create_brush_for_pattern(d2dsurf, mask, true);
-+ RefPtr<ID2D1Brush> opacityBrush = _cairo_d2d_create_brush_for_pattern(d2dsurf, NULL, mask, true);
- if (!opacityBrush) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- if (!d2dsurf->maskLayer) {
- d2dsurf->rt->CreateLayer(&d2dsurf->maskLayer);
- }
- target_rt->PushLayer(D2D1::LayerParameters(D2D1::InfiniteRect(),
-@@ -3475,17 +3488,17 @@ static cairo_int_status_t
- D2D1_FIGURE_BEGIN_FILLED);
-
- bool transformed = true;
-
- if (_cairo_matrix_is_identity(ctm)) {
- transformed = false;
- }
-
-- RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf,
-+ RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf, NULL,
- source);
- if (!brush) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- D2D1::Matrix3x2F mat;
- if (transformed) {
- // If we are transformed we will draw the geometry multiplied by the
-@@ -3602,31 +3615,31 @@ static cairo_int_status_t
- }
-
- if (is_box) {
- float x1 = _cairo_fixed_to_float(box.p1.x);
- float y1 = _cairo_fixed_to_float(box.p1.y);
- float x2 = _cairo_fixed_to_float(box.p2.x);
- float y2 = _cairo_fixed_to_float(box.p2.y);
- RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf,
-- source);
-+ path, source);
- if (!brush) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- target_rt->FillRectangle(D2D1::RectF(x1,
- y1,
- x2,
- y2),
- brush);
- } else {
- RefPtr<ID2D1Geometry> d2dpath = _cairo_d2d_create_path_geometry_for_path(path, fill_rule, D2D1_FIGURE_BEGIN_FILLED);
-
- RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(d2dsurf,
-- source);
-+ path, source);
- if (!brush) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
- target_rt->FillGeometry(d2dpath, brush);
- }
-
- if (target_rt.get() != d2dsurf->rt.get()) {
- double x1, y1, x2, y2;
-@@ -4138,17 +4151,17 @@ static cairo_int_status_t
- DWRITE_TEXTURE_ALIASED_1x1 : DWRITE_TEXTURE_CLEARTYPE_3x1,
- &bounds);
- fontArea.x = bounds.left;
- fontArea.y = bounds.top;
- fontArea.width = bounds.right - bounds.left;
- fontArea.height = bounds.bottom - bounds.top;
- }
-
-- RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(dst,
-+ RefPtr<ID2D1Brush> brush = _cairo_d2d_create_brush_for_pattern(dst, NULL,
- source);
-
- if (!brush) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- if (transform) {
- D2D1::Matrix3x2F mat_inverse = _cairo_d2d_matrix_from_matrix(&dwritesf->mat_inverse);
diff --git a/gfx/cairo/d2d.patch b/gfx/cairo/d2d.patch
deleted file mode 100644
index b8dd155e7..000000000
--- a/gfx/cairo/d2d.patch
+++ /dev/null
@@ -1,465 +0,0 @@
-commit 4a412c0b144ed1fdde668e0e91241bac8bedd579
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Sun Jan 24 14:04:33 2010 -0500
-
- d2d
-
-diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h
-index c299def..a37ca6a 100644
---- a/src/cairo-fixed-private.h
-+++ b/src/cairo-fixed-private.h
-@@ -50,6 +50,7 @@
-
- #define CAIRO_FIXED_ONE ((cairo_fixed_t)(1 << CAIRO_FIXED_FRAC_BITS))
- #define CAIRO_FIXED_ONE_DOUBLE ((double)(1 << CAIRO_FIXED_FRAC_BITS))
-+#define CAIRO_FIXED_ONE_FLOAT ((float)(1 << CAIRO_FIXED_FRAC_BITS))
- #define CAIRO_FIXED_EPSILON ((cairo_fixed_t)(1))
-
- #define CAIRO_FIXED_FRAC_MASK (((cairo_fixed_unsigned_t)(-1)) >> (CAIRO_FIXED_BITS - CAIRO_FIXED_FRAC_BITS))
-@@ -141,6 +142,12 @@ _cairo_fixed_to_double (cairo_fixed_t f)
- return ((double) f) / CAIRO_FIXED_ONE_DOUBLE;
- }
-
-+static inline float
-+_cairo_fixed_to_float (cairo_fixed_t f)
-+{
-+ return ((float) f) / CAIRO_FIXED_ONE_FLOAT;
-+}
-+
- static inline int
- _cairo_fixed_is_integer (cairo_fixed_t f)
- {
-diff --git a/src/cairo-win32-private.h b/src/cairo-win32-private.h
-index b9926bb..ba57595 100644
---- a/src/cairo-win32-private.h
-+++ b/src/cairo-win32-private.h
-@@ -231,4 +231,19 @@ inline BOOL ModifyWorldTransform(HDC hdc, CONST XFORM * lpxf, DWORD mode) { retu
-
- #endif
-
-+#ifdef CAIRO_HAS_DWRITE_FONT
-+CAIRO_BEGIN_DECLS
-+
-+cairo_public cairo_int_status_t
-+cairo_dwrite_show_glyphs_on_surface(void *surface,
-+ cairo_operator_t op,
-+ const cairo_pattern_t *source,
-+ cairo_glyph_t *glyphs,
-+ int num_glyphs,
-+ cairo_scaled_font_t *scaled_font,
-+ cairo_rectangle_int_t *extents);
-+
-+
-+CAIRO_END_DECLS
-+#endif /* CAIRO_HAS_DWRITE_FONT */
- #endif /* CAIRO_WIN32_PRIVATE_H */
-diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
-index 0dc5e76..bee00b1 100644
---- a/src/cairo-win32-surface.c
-+++ b/src/cairo-win32-surface.c
-@@ -1547,152 +1547,158 @@ _cairo_win32_surface_show_glyphs (void *surface,
- int *remaining_glyphs)
- {
- #if defined(CAIRO_HAS_WIN32_FONT) && !defined(WINCE)
-- cairo_win32_surface_t *dst = surface;
--
-- WORD glyph_buf_stack[STACK_GLYPH_SIZE];
-- WORD *glyph_buf = glyph_buf_stack;
-- int dxy_buf_stack[2 * STACK_GLYPH_SIZE];
-- int *dxy_buf = dxy_buf_stack;
--
-- BOOL win_result = 0;
-- int i, j;
-+ if (scaled_font->backend->type == CAIRO_FONT_TYPE_DWRITE) {
-+#ifdef CAIRO_HAS_DWRITE_FONT
-+ return cairo_dwrite_show_glyphs_on_surface(surface, op, source, glyphs, num_glyphs, scaled_font, clip);
-+#endif
-+ } else {
-+ cairo_win32_surface_t *dst = surface;
-+
-+ WORD glyph_buf_stack[STACK_GLYPH_SIZE];
-+ WORD *glyph_buf = glyph_buf_stack;
-+ int dxy_buf_stack[2 * STACK_GLYPH_SIZE];
-+ int *dxy_buf = dxy_buf_stack;
-
-- cairo_solid_pattern_t *solid_pattern;
-- COLORREF color;
-+ BOOL win_result = 0;
-+ int i, j;
-
-- cairo_matrix_t device_to_logical;
-+ cairo_solid_pattern_t *solid_pattern;
-+ COLORREF color;
-
-- int start_x, start_y;
-- double user_x, user_y;
-- int logical_x, logical_y;
-- unsigned int glyph_index_option;
-+ cairo_matrix_t device_to_logical;
-
-- /* We can only handle win32 fonts */
-- if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_WIN32)
-- return CAIRO_INT_STATUS_UNSUPPORTED;
-+ int start_x, start_y;
-+ double user_x, user_y;
-+ int logical_x, logical_y;
-+ unsigned int glyph_index_option;
-
-- /* We can only handle opaque solid color sources */
-- if (!_cairo_pattern_is_opaque_solid(source))
-- return CAIRO_INT_STATUS_UNSUPPORTED;
-+ /* We can only handle win32 fonts */
-+ if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_WIN32)
-+ return CAIRO_INT_STATUS_UNSUPPORTED;
-
-- /* We can only handle operator SOURCE or OVER with the destination
-- * having no alpha */
-- if ((op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_OVER) ||
-- (dst->format != CAIRO_FORMAT_RGB24))
-- return CAIRO_INT_STATUS_UNSUPPORTED;
-+ /* We can only handle opaque solid color sources */
-+ if (!_cairo_pattern_is_opaque_solid(source))
-+ return CAIRO_INT_STATUS_UNSUPPORTED;
-
-- /* If we have a fallback mask clip set on the dst, we have
-- * to go through the fallback path, but only if we're not
-- * doing this for printing */
-- if (clip != NULL) {
-- if ((dst->flags & CAIRO_WIN32_SURFACE_FOR_PRINTING) == 0) {
-- cairo_region_t *clip_region;
-- cairo_status_t status;
-+ /* We can only handle operator SOURCE or OVER with the destination
-+ * having no alpha */
-+ if ((op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_OVER) ||
-+ (dst->format != CAIRO_FORMAT_RGB24))
-+ return CAIRO_INT_STATUS_UNSUPPORTED;
-
-- status = _cairo_clip_get_region (clip, &clip_region);
-- assert (status != CAIRO_INT_STATUS_NOTHING_TO_DO);
-- if (status)
-- return status;
-+ /* If we have a fallback mask clip set on the dst, we have
-+ * to go through the fallback path, but only if we're not
-+ * doing this for printing */
-+ if (clip != NULL) {
-+ if ((dst->flags & CAIRO_WIN32_SURFACE_FOR_PRINTING) == 0) {
-+ cairo_region_t *clip_region;
-+ cairo_status_t status;
-+
-+ status = _cairo_clip_get_region (clip, &clip_region);
-+ assert (status != CAIRO_INT_STATUS_NOTHING_TO_DO);
-+ if (status)
-+ return status;
-
-- _cairo_win32_surface_set_clip_region (surface, clip_region);
-+ _cairo_win32_surface_set_clip_region (surface, clip_region);
-+ }
- }
-- }
-
-- solid_pattern = (cairo_solid_pattern_t *)source;
-- color = RGB(((int)solid_pattern->color.red_short) >> 8,
-- ((int)solid_pattern->color.green_short) >> 8,
-- ((int)solid_pattern->color.blue_short) >> 8);
-+ solid_pattern = (cairo_solid_pattern_t *)source;
-+ color = RGB(((int)solid_pattern->color.red_short) >> 8,
-+ ((int)solid_pattern->color.green_short) >> 8,
-+ ((int)solid_pattern->color.blue_short) >> 8);
-
-- cairo_win32_scaled_font_get_device_to_logical(scaled_font, &device_to_logical);
-+ cairo_win32_scaled_font_get_device_to_logical(scaled_font, &device_to_logical);
-
-- SaveDC(dst->dc);
-+ SaveDC(dst->dc);
-
-- cairo_win32_scaled_font_select_font(scaled_font, dst->dc);
-- SetTextColor(dst->dc, color);
-- SetTextAlign(dst->dc, TA_BASELINE | TA_LEFT);
-- SetBkMode(dst->dc, TRANSPARENT);
-+ cairo_win32_scaled_font_select_font(scaled_font, dst->dc);
-+ SetTextColor(dst->dc, color);
-+ SetTextAlign(dst->dc, TA_BASELINE | TA_LEFT);
-+ SetBkMode(dst->dc, TRANSPARENT);
-
-- if (num_glyphs > STACK_GLYPH_SIZE) {
-- glyph_buf = (WORD *) _cairo_malloc_ab (num_glyphs, sizeof(WORD));
-- dxy_buf = (int *) _cairo_malloc_abc (num_glyphs, sizeof(int), 2);
-- }
-+ if (num_glyphs > STACK_GLYPH_SIZE) {
-+ glyph_buf = (WORD *) _cairo_malloc_ab (num_glyphs, sizeof(WORD));
-+ dxy_buf = (int *) _cairo_malloc_abc (num_glyphs, sizeof(int), 2);
-+ }
-
-- /* It is vital that dx values for dxy_buf are calculated from the delta of
-- * _logical_ x coordinates (not user x coordinates) or else the sum of all
-- * previous dx values may start to diverge from the current glyph's x
-- * coordinate due to accumulated rounding error. As a result strings could
-- * be painted shorter or longer than expected. */
-+ /* It is vital that dx values for dxy_buf are calculated from the delta of
-+ * _logical_ x coordinates (not user x coordinates) or else the sum of all
-+ * previous dx values may start to diverge from the current glyph's x
-+ * coordinate due to accumulated rounding error. As a result strings could
-+ * be painted shorter or longer than expected. */
-
-- user_x = glyphs[0].x;
-- user_y = glyphs[0].y;
-+ user_x = glyphs[0].x;
-+ user_y = glyphs[0].y;
-
-- cairo_matrix_transform_point(&device_to_logical,
-- &user_x, &user_y);
-+ cairo_matrix_transform_point(&device_to_logical,
-+ &user_x, &user_y);
-
-- logical_x = _cairo_lround (user_x);
-- logical_y = _cairo_lround (user_y);
-+ logical_x = _cairo_lround (user_x);
-+ logical_y = _cairo_lround (user_y);
-
-- start_x = logical_x;
-- start_y = logical_y;
-+ start_x = logical_x;
-+ start_y = logical_y;
-
-- for (i = 0, j = 0; i < num_glyphs; ++i, j = 2 * i) {
-- glyph_buf[i] = (WORD) glyphs[i].index;
-- if (i == num_glyphs - 1) {
-- dxy_buf[j] = 0;
-- dxy_buf[j+1] = 0;
-- } else {
-- double next_user_x = glyphs[i+1].x;
-- double next_user_y = glyphs[i+1].y;
-- int next_logical_x, next_logical_y;
-+ for (i = 0, j = 0; i < num_glyphs; ++i, j = 2 * i) {
-+ glyph_buf[i] = (WORD) glyphs[i].index;
-+ if (i == num_glyphs - 1) {
-+ dxy_buf[j] = 0;
-+ dxy_buf[j+1] = 0;
-+ } else {
-+ double next_user_x = glyphs[i+1].x;
-+ double next_user_y = glyphs[i+1].y;
-+ int next_logical_x, next_logical_y;
-
-- cairo_matrix_transform_point(&device_to_logical,
-- &next_user_x, &next_user_y);
-+ cairo_matrix_transform_point(&device_to_logical,
-+ &next_user_x, &next_user_y);
-
-- next_logical_x = _cairo_lround (next_user_x);
-- next_logical_y = _cairo_lround (next_user_y);
-+ next_logical_x = _cairo_lround (next_user_x);
-+ next_logical_y = _cairo_lround (next_user_y);
-
-- dxy_buf[j] = _cairo_lround (next_logical_x - logical_x);
-- dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
-- /* note that GDI coordinate system is inverted */
-+ dxy_buf[j] = _cairo_lround (next_logical_x - logical_x);
-+ dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
-+ /* note that GDI coordinate system is inverted */
-
-- logical_x = next_logical_x;
-- logical_y = next_logical_y;
-- }
-- }
-+ logical_x = next_logical_x;
-+ logical_y = next_logical_y;
-+ }
-+ }
-
-- /* Using glyph indices for a Type 1 font does not work on a
-- * printer DC. The win32 printing surface will convert the the
-- * glyph indices of Type 1 fonts to the unicode values.
-- */
-- if ((dst->flags & CAIRO_WIN32_SURFACE_FOR_PRINTING) &&
-- _cairo_win32_scaled_font_is_type1 (scaled_font))
-- {
-- glyph_index_option = 0;
-- }
-- else
-- {
-- glyph_index_option = ETO_GLYPH_INDEX;
-- }
-+ /* Using glyph indices for a Type 1 font does not work on a
-+ * printer DC. The win32 printing surface will convert the the
-+ * glyph indices of Type 1 fonts to the unicode values.
-+ */
-+ if ((dst->flags & CAIRO_WIN32_SURFACE_FOR_PRINTING) &&
-+ _cairo_win32_scaled_font_is_type1 (scaled_font))
-+ {
-+ glyph_index_option = 0;
-+ }
-+ else
-+ {
-+ glyph_index_option = ETO_GLYPH_INDEX;
-+ }
-
-- win_result = ExtTextOutW(dst->dc,
-- start_x,
-- start_y,
-- glyph_index_option | ETO_PDY,
-- NULL,
-- glyph_buf,
-- num_glyphs,
-- dxy_buf);
-- if (!win_result) {
-- _cairo_win32_print_gdi_error("_cairo_win32_surface_show_glyphs(ExtTextOutW failed)");
-- }
-+ win_result = ExtTextOutW(dst->dc,
-+ start_x,
-+ start_y,
-+ glyph_index_option | ETO_PDY,
-+ NULL,
-+ glyph_buf,
-+ num_glyphs,
-+ dxy_buf);
-+ if (!win_result) {
-+ _cairo_win32_print_gdi_error("_cairo_win32_surface_show_glyphs(ExtTextOutW failed)");
-+ }
-
-- RestoreDC(dst->dc, -1);
-+ RestoreDC(dst->dc, -1);
-
-- if (glyph_buf != glyph_buf_stack) {
-- free(glyph_buf);
-- free(dxy_buf);
-+ if (glyph_buf != glyph_buf_stack) {
-+ free(glyph_buf);
-+ free(dxy_buf);
-+ }
-+ return (win_result) ? CAIRO_STATUS_SUCCESS : CAIRO_INT_STATUS_UNSUPPORTED;
- }
-- return (win_result) ? CAIRO_STATUS_SUCCESS : CAIRO_INT_STATUS_UNSUPPORTED;
- #else
- return CAIRO_INT_STATUS_UNSUPPORTED;
- #endif
-diff --git a/src/cairo-win32.h b/src/cairo-win32.h
-index 6b86d4e..fcf20b8 100644
---- a/src/cairo-win32.h
-+++ b/src/cairo-win32.h
-@@ -109,6 +109,63 @@ cairo_win32_scaled_font_get_device_to_logical (cairo_scaled_font_t *scaled_font,
-
- #endif /* CAIRO_HAS_WIN32_FONT */
-
-+#if CAIRO_HAS_DWRITE_FONT
-+
-+/*
-+ * Win32 DirectWrite font support
-+ */
-+cairo_public cairo_font_face_t *
-+cairo_dwrite_font_face_create_for_dwrite_fontface(void *dwrite_font, void *dwrite_font_face);
-+
-+#endif /* CAIRO_HAS_DWRITE_FONT */
-+
-+#if CAIRO_HAS_D2D_SURFACE
-+
-+/**
-+ * Create a D2D surface for an HWND
-+ *
-+ * \param wnd Handle for the window
-+ * \return New cairo surface
-+ */
-+cairo_public cairo_surface_t *
-+cairo_d2d_surface_create_for_hwnd(HWND wnd);
-+
-+/**
-+ * Create a D2D surface of a certain size.
-+ *
-+ * \param format Cairo format of the surface
-+ * \param width Width of the surface
-+ * \param height Height of the surface
-+ * \return New cairo surface
-+ */
-+cairo_public cairo_surface_t *
-+cairo_d2d_surface_create(cairo_format_t format,
-+ int width,
-+ int height);
-+
-+/**
-+ * Present the backbuffer for a surface create for an HWND. This needs
-+ * to be called when the owner of the original window surface wants to
-+ * actually present the executed drawing operations to the screen.
-+ *
-+ * \param surface D2D surface.
-+ */
-+void cairo_d2d_present_backbuffer(cairo_surface_t *surface);
-+
-+/**
-+ * Scroll the surface, this only moves the surface graphics, it does not
-+ * actually scroll child windows or anything like that. Nor does it invalidate
-+ * that area of the window.
-+ *
-+ * \param surface The d2d surface this operation should apply to.
-+ * \param x The x delta for the movement
-+ * \param y The y delta for the movement
-+ * \param clip The clip rectangle, the is the 'part' of the surface that needs
-+ * scrolling.
-+ */
-+void cairo_d2d_scroll(cairo_surface_t *surface, int x, int y, cairo_rectangle_t *clip);
-+#endif
-+
- CAIRO_END_DECLS
-
- #else /* CAIRO_HAS_WIN32_SURFACE */
-diff --git a/src/cairo.h b/src/cairo.h
-index 3a8b8a6..21827aa 100644
---- a/src/cairo.h
-+++ b/src/cairo.h
-@@ -1370,7 +1370,8 @@ typedef enum _cairo_font_type {
- CAIRO_FONT_TYPE_FT,
- CAIRO_FONT_TYPE_WIN32,
- CAIRO_FONT_TYPE_QUARTZ,
-- CAIRO_FONT_TYPE_USER
-+ CAIRO_FONT_TYPE_USER,
-+ CAIRO_FONT_TYPE_DWRITE
- } cairo_font_type_t;
-
- cairo_public cairo_font_type_t
-@@ -2009,7 +2010,7 @@ typedef enum _cairo_surface_type {
- CAIRO_SURFACE_TYPE_TEE,
- CAIRO_SURFACE_TYPE_XML,
- CAIRO_SURFACE_TYPE_SKIA,
-- CAIRO_SURFACE_TYPE_DDRAW
-+ CAIRO_SURFACE_TYPE_D2D
- } cairo_surface_type_t;
-
- cairo_public cairo_surface_type_t
-diff --git a/src/cairoint.h b/src/cairoint.h
-index b942b4b..58850ab 100644
---- a/src/cairoint.h
-+++ b/src/cairoint.h
-@@ -587,6 +587,12 @@ extern const cairo_private struct _cairo_font_face_backend _cairo_win32_font_fac
-
- #endif
-
-+#if CAIRO_HAS_DWRITE_FONT
-+
-+extern const cairo_private struct _cairo_font_face_backend _cairo_dwrite_font_face_backend;
-+
-+#endif
-+
- #if CAIRO_HAS_QUARTZ_FONT
-
- extern const cairo_private struct _cairo_font_face_backend _cairo_quartz_font_face_backend;
-@@ -932,7 +938,12 @@ typedef struct _cairo_traps {
- #define CAIRO_FT_FONT_FAMILY_DEFAULT ""
- #define CAIRO_USER_FONT_FAMILY_DEFAULT "@cairo:"
-
--#if CAIRO_HAS_WIN32_FONT
-+#if CAIRO_HAS_DWRITE_FONT
-+
-+#define CAIRO_FONT_FAMILY_DEFAULT CAIRO_WIN32_FONT_FAMILY_DEFAULT
-+#define CAIRO_FONT_FACE_BACKEND_DEFAULT &_cairo_dwrite_font_face_backend
-+
-+#elif CAIRO_HAS_WIN32_FONT
-
- #define CAIRO_FONT_FAMILY_DEFAULT CAIRO_WIN32_FONT_FAMILY_DEFAULT
- #define CAIRO_FONT_FACE_BACKEND_DEFAULT &_cairo_win32_font_face_backend
-@@ -2617,7 +2628,7 @@ cairo_private int
- _cairo_ucs4_to_utf8 (uint32_t unicode,
- char *utf8);
-
--#if CAIRO_HAS_WIN32_FONT || CAIRO_HAS_QUARTZ_FONT || CAIRO_HAS_PDF_OPERATORS
-+#if CAIRO_HAS_WIN32_FONT || CAIRO_HAS_QUARTZ_FONT || CAIRO_HAS_PDF_OPERATORS || CAIRO_HAS_DW_FONT
- # define CAIRO_HAS_UTF8_TO_UTF16 1
- #endif
- #if CAIRO_HAS_UTF8_TO_UTF16
diff --git a/gfx/cairo/dasharray-zero-gap.patch b/gfx/cairo/dasharray-zero-gap.patch
deleted file mode 100644
index e26580ae1..000000000
--- a/gfx/cairo/dasharray-zero-gap.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -2573,29 +2573,43 @@ static cairo_int_status_t
-
- if (style->dash && style->num_dashes) {
- #define STATIC_DASH 32
- cairo_quartz_float_t sdash[STATIC_DASH];
- cairo_quartz_float_t *fdash = sdash;
- unsigned int max_dashes = style->num_dashes;
- unsigned int k;
-
-- if (style->num_dashes%2)
-- max_dashes *= 2;
-- if (max_dashes > STATIC_DASH)
-- fdash = _cairo_malloc_ab (max_dashes, sizeof (cairo_quartz_float_t));
-- if (fdash == NULL)
-- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
--
-- for (k = 0; k < max_dashes; k++)
-- fdash[k] = (cairo_quartz_float_t) style->dash[k % style->num_dashes];
--
-- CGContextSetLineDash (surface->cgContext, style->dash_offset, fdash, max_dashes);
-- if (fdash != sdash)
-- free (fdash);
-+ bool set_line_dash = false;
-+ if (style->num_dashes % 2 == 0) {
-+ for (k = 1; k < max_dashes; k++) {
-+ if (style->dash[k]) {
-+ set_line_dash = true;
-+ break;
-+ }
-+ }
-+ } else
-+ set_line_dash = true;
-+
-+ if (set_line_dash) {
-+ if (style->num_dashes%2)
-+ max_dashes *= 2;
-+ if (max_dashes > STATIC_DASH)
-+ fdash = _cairo_malloc_ab (max_dashes, sizeof (cairo_quartz_float_t));
-+ if (fdash == NULL)
-+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-+
-+ for (k = 0; k < max_dashes; k++)
-+ fdash[k] = (cairo_quartz_float_t) style->dash[k % style->num_dashes];
-+
-+ CGContextSetLineDash (surface->cgContext, style->dash_offset, fdash, max_dashes);
-+ if (fdash != sdash)
-+ free (fdash);
-+ } else
-+ CGContextSetLineDash (state.context, 0, NULL, 0);
- } else
- CGContextSetLineDash (state.context, 0, NULL, 0);
-
-
- _cairo_quartz_cairo_path_to_quartz_context (path, state.context);
-
- _cairo_quartz_cairo_matrix_to_quartz (ctm, &strokeTransform);
- CGContextConcatCTM (state.context, strokeTransform);
diff --git a/gfx/cairo/disable-previous-scaled-font-cache.patch b/gfx/cairo/disable-previous-scaled-font-cache.patch
deleted file mode 100644
index afeac5ec8..000000000
--- a/gfx/cairo/disable-previous-scaled-font-cache.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo.c b/gfx/cairo/cairo/src/cairo.c
---- a/gfx/cairo/cairo/src/cairo.c
-+++ b/gfx/cairo/cairo/src/cairo.c
-@@ -3201,8 +3201,12 @@ cairo_set_scaled_font (cairo_t
-
- _cairo_gstate_set_font_options (cr->gstate, &scaled_font->options);
-
-+ /* XXX: Mozilla code assumes that the ctm of a scaled font doesn't need to
-+ * match the context ctm. This assumption breaks the previous_scaled_font
-+ * cache. So we avoid using the cache for now.
- if (was_previous)
- cr->gstate->scaled_font = cairo_scaled_font_reference ((cairo_scaled_font_t *) scaled_font);
-+ */
-
- return;
-
diff --git a/gfx/cairo/disable-printing.patch b/gfx/cairo/disable-printing.patch
deleted file mode 100644
index c1006d819..000000000
--- a/gfx/cairo/disable-printing.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -1892,21 +1892,22 @@ cairo_win32_surface_get_dc (cairo_surfac
- return winsurf->dc;
- }
-
- if (_cairo_surface_is_paginated (surface)) {
- cairo_surface_t *target;
-
- target = _cairo_paginated_surface_get_target (surface);
-
-+#ifndef CAIRO_OMIT_WIN32_PRINTING
- if (_cairo_surface_is_win32_printing (target)) {
- winsurf = (cairo_win32_surface_t *) target;
--
- return winsurf->dc;
- }
-+#endif
- }
-
- return NULL;
- }
-
- /**
- * cairo_win32_surface_get_image
- * @surface: a #cairo_surface_t
diff --git a/gfx/cairo/disable-server-gradients.patch b/gfx/cairo/disable-server-gradients.patch
deleted file mode 100644
index 2d8fb5b6d..000000000
--- a/gfx/cairo/disable-server-gradients.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 31579379422b75c3fe01b75d363e03f9b1e85604
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Fri Mar 12 16:07:59 2010 -0500
-
- xlib bugs
-
-diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
-index a7a40b8..566d9fb 100644
---- a/src/cairo-xlib-display.c
-+++ b/src/cairo-xlib-display.c
-@@ -407,6 +407,10 @@ _cairo_xlib_display_get (Display *dpy,
- display->buggy_pad_reflect = TRUE;
- }
-
-+ /* gradients don't seem to work */
-+ display->buggy_gradients = TRUE;
-+
-+
- /* XXX workaround; see https://bugzilla.mozilla.org/show_bug.cgi?id=413583 */
- /* If buggy_repeat_force == -1, then initialize.
- * - set to -2, meaning "nothing was specified", and we trust the above detection.
diff --git a/gfx/cairo/disable-subpixel-antialiasing.patch b/gfx/cairo/disable-subpixel-antialiasing.patch
deleted file mode 100644
index 7a0eb3a06..000000000
--- a/gfx/cairo/disable-subpixel-antialiasing.patch
+++ /dev/null
@@ -1,519 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1294019288 -46800
-# Node ID 8857392e37aea7475ed6d8ee4b45023e1233bcec
-# Parent c53f60831c43cca397dfed8adf8d350aeec7d3ca
-Bug 363861. Part 2: Introduce cairo_surface_get/set_subpixel_antialiasing. r=jrmuizel,sr=vlad,a=blocking
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -2473,16 +2473,17 @@ _cairo_quartz_surface_show_glyphs (void
- cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
- cairo_quartz_drawing_state_t state;
- float xprev, yprev;
- int i;
- CGFontRef cgfref = NULL;
-
- cairo_bool_t isClipping = FALSE;
- cairo_bool_t didForceFontSmoothing = FALSE;
-+ cairo_antialias_t effective_antialiasing;
-
- if (IS_EMPTY(surface))
- return CAIRO_STATUS_SUCCESS;
-
- if (num_glyphs <= 0)
- return CAIRO_STATUS_SUCCESS;
-
- if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_QUARTZ)
-@@ -2514,16 +2515,22 @@ _cairo_quartz_surface_show_glyphs (void
- goto BAIL;
- }
-
- /* this doesn't addref */
- cgfref = _cairo_quartz_scaled_font_get_cg_font_ref (scaled_font);
- CGContextSetFont (state.context, cgfref);
- CGContextSetFontSize (state.context, 1.0);
-
-+ effective_antialiasing = scaled_font->options.antialias;
-+ if (effective_antialiasing == CAIRO_ANTIALIAS_SUBPIXEL &&
-+ !surface->base.permit_subpixel_antialiasing) {
-+ effective_antialiasing = CAIRO_ANTIALIAS_GRAY;
-+ }
-+
- switch (scaled_font->options.antialias) {
- case CAIRO_ANTIALIAS_SUBPIXEL:
- CGContextSetShouldAntialias (state.context, TRUE);
- CGContextSetShouldSmoothFonts (state.context, TRUE);
- if (CGContextSetAllowsFontSmoothingPtr &&
- !CGContextGetAllowsFontSmoothingPtr (state.context))
- {
- didForceFontSmoothing = TRUE;
-diff --git a/gfx/cairo/cairo/src/cairo-surface-private.h b/gfx/cairo/cairo/src/cairo-surface-private.h
---- a/gfx/cairo/cairo/src/cairo-surface-private.h
-+++ b/gfx/cairo/cairo/src/cairo-surface-private.h
-@@ -58,16 +58,17 @@ struct _cairo_surface {
-
- cairo_reference_count_t ref_count;
- cairo_status_t status;
- unsigned int unique_id;
-
- unsigned finished : 1;
- unsigned is_clear : 1;
- unsigned has_font_options : 1;
-+ unsigned permit_subpixel_antialiasing : 1;
-
- cairo_user_data_array_t user_data;
- cairo_user_data_array_t mime_data;
-
- cairo_matrix_t device_transform;
- cairo_matrix_t device_transform_inverse;
-
- /* The actual resolution of the device, in dots per inch. */
-diff --git a/gfx/cairo/cairo/src/cairo-surface.c b/gfx/cairo/cairo/src/cairo-surface.c
---- a/gfx/cairo/cairo/src/cairo-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-surface.c
-@@ -49,17 +49,18 @@ const cairo_surface_t name = { \
- NULL, /* backend */ \
- CAIRO_SURFACE_TYPE_IMAGE, /* type */ \
- CAIRO_CONTENT_COLOR, /* content */ \
- CAIRO_REFERENCE_COUNT_INVALID, /* ref_count */ \
- status, /* status */ \
- 0, /* unique id */ \
- FALSE, /* finished */ \
- TRUE, /* is_clear */ \
-- FALSE, /* has_font_options */ \
-+ FALSE, /* has_font_options */ \
-+ FALSE, /* permit_subpixel_antialiasing */ \
- { 0, 0, 0, NULL, }, /* user_data */ \
- { 0, 0, 0, NULL, }, /* mime_data */ \
- { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, /* device_transform */ \
- { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, /* device_transform_inverse */ \
- 0.0, /* x_resolution */ \
- 0.0, /* y_resolution */ \
- 0.0, /* x_fallback_resolution */ \
- 0.0, /* y_fallback_resolution */ \
-@@ -342,46 +343,48 @@ _cairo_surface_init (cairo_surface_t *
- surface->content = content;
- surface->type = backend->type;
-
- CAIRO_REFERENCE_COUNT_INIT (&surface->ref_count, 1);
- surface->status = CAIRO_STATUS_SUCCESS;
- surface->unique_id = _cairo_surface_allocate_unique_id ();
- surface->finished = FALSE;
- surface->is_clear = FALSE;
-+ surface->has_font_options = FALSE;
-+ surface->permit_subpixel_antialiasing = TRUE;
-
- _cairo_user_data_array_init (&surface->user_data);
- _cairo_user_data_array_init (&surface->mime_data);
-
- cairo_matrix_init_identity (&surface->device_transform);
- cairo_matrix_init_identity (&surface->device_transform_inverse);
-
- surface->x_resolution = CAIRO_SURFACE_RESOLUTION_DEFAULT;
- surface->y_resolution = CAIRO_SURFACE_RESOLUTION_DEFAULT;
-
- surface->x_fallback_resolution = CAIRO_SURFACE_FALLBACK_RESOLUTION_DEFAULT;
- surface->y_fallback_resolution = CAIRO_SURFACE_FALLBACK_RESOLUTION_DEFAULT;
-
- _cairo_array_init (&surface->snapshots, sizeof (cairo_surface_t *));
- surface->snapshot_of = NULL;
--
-- surface->has_font_options = FALSE;
- }
-
- static void
- _cairo_surface_copy_similar_properties (cairo_surface_t *surface,
- cairo_surface_t *other)
- {
- if (other->has_font_options || other->backend != surface->backend) {
- cairo_font_options_t options;
-
- cairo_surface_get_font_options (other, &options);
- _cairo_surface_set_font_options (surface, &options);
- }
-
-+ surface->permit_subpixel_antialiasing = other->permit_subpixel_antialiasing;
-+
- cairo_surface_set_fallback_resolution (surface,
- other->x_fallback_resolution,
- other->y_fallback_resolution);
- }
-
- cairo_surface_t *
- _cairo_surface_create_similar_scratch (cairo_surface_t *other,
- cairo_content_t content,
-@@ -2482,16 +2485,67 @@ cairo_surface_has_show_text_glyphs (cair
-
- if (surface->backend->has_show_text_glyphs)
- return surface->backend->has_show_text_glyphs (surface);
- else
- return surface->backend->show_text_glyphs != NULL;
- }
- slim_hidden_def (cairo_surface_has_show_text_glyphs);
-
-+/**
-+ * cairo_surface_set_subpixel_antialiasing:
-+ * @surface: a #cairo_surface_t
-+ *
-+ * Sets whether the surface permits subpixel antialiasing. By default,
-+ * surfaces permit subpixel antialiasing.
-+ *
-+ * Enabling subpixel antialiasing for CONTENT_COLOR_ALPHA surfaces generally
-+ * requires that the pixels in the areas under a subpixel antialiasing
-+ * operation already be opaque.
-+ *
-+ * Since: 1.12
-+ **/
-+void
-+cairo_surface_set_subpixel_antialiasing (cairo_surface_t *surface,
-+ cairo_subpixel_antialiasing_t enabled)
-+{
-+ if (surface->status)
-+ return;
-+
-+ if (surface->finished) {
-+ _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
-+ return;
-+ }
-+
-+ surface->permit_subpixel_antialiasing =
-+ enabled == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED;
-+}
-+slim_hidden_def (cairo_surface_set_subpixel_antialiasing);
-+
-+/**
-+ * cairo_surface_get_subpixel_antialiasing:
-+ * @surface: a #cairo_surface_t
-+ *
-+ * Gets whether the surface supports subpixel antialiasing. By default,
-+ * CAIRO_CONTENT_COLOR surfaces support subpixel antialiasing but other
-+ * surfaces do not.
-+ *
-+ * Since: 1.12
-+ **/
-+cairo_subpixel_antialiasing_t
-+cairo_surface_get_subpixel_antialiasing (cairo_surface_t *surface)
-+{
-+ if (surface->status)
-+ return CAIRO_SUBPIXEL_ANTIALIASING_DISABLED;
-+
-+ return surface->permit_subpixel_antialiasing ?
-+ CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED;
-+}
-+slim_hidden_def (cairo_surface_get_subpixel_antialiasing);
-+
- /* Note: the backends may modify the contents of the glyph array as long as
- * they do not return %CAIRO_INT_STATUS_UNSUPPORTED. This makes it possible to
- * avoid copying the array again and again, and edit it in-place.
- * Backends are in fact free to use the array as a generic buffer as they
- * see fit.
- *
- * For show_glyphs backend method, and NOT for show_text_glyphs method,
- * when they do return UNSUPPORTED, they may adjust remaining_glyphs to notify
-diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
---- a/gfx/cairo/cairo/src/cairo-win32-font.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
-@@ -1380,16 +1380,17 @@ _cairo_win32_scaled_font_show_glyphs (vo
- cairo_win32_surface_t *surface = (cairo_win32_surface_t *)generic_surface;
- cairo_status_t status;
-
- if (width == 0 || height == 0)
- return CAIRO_STATUS_SUCCESS;
-
- if (_cairo_surface_is_win32 (generic_surface) &&
- surface->format == CAIRO_FORMAT_RGB24 &&
-+ (generic_surface->permit_subpixel_antialiasing || scaled_font->quality != CLEARTYPE_QUALITY) &&
- op == CAIRO_OPERATOR_OVER &&
- _cairo_pattern_is_opaque_solid (pattern)) {
-
- cairo_solid_pattern_t *solid_pattern = (cairo_solid_pattern_t *)pattern;
-
- /* When compositing OVER on a GDI-understood surface, with a
- * solid opaque color, we can just call ExtTextOut directly.
- */
-@@ -1411,16 +1412,18 @@ _cairo_win32_scaled_font_show_glyphs (vo
- * surface by drawing the the glyphs onto a DIB, black-on-white then
- * inverting. GDI outputs gamma-corrected images so inverted black-on-white
- * is very different from white-on-black. We favor the more common
- * case where the final output is dark-on-light.
- */
- cairo_win32_surface_t *tmp_surface;
- cairo_surface_t *mask_surface;
- cairo_surface_pattern_t mask;
-+ cairo_bool_t use_subpixel_antialiasing =
-+ scaled_font->quality == CLEARTYPE_QUALITY && generic_surface->permit_subpixel_antialiasing;
- RECT r;
-
- tmp_surface = (cairo_win32_surface_t *)cairo_win32_surface_create_with_dib (CAIRO_FORMAT_ARGB32, width, height);
- if (tmp_surface->base.status)
- return tmp_surface->base.status;
-
- r.left = 0;
- r.top = 0;
-@@ -1432,17 +1435,17 @@ _cairo_win32_scaled_font_show_glyphs (vo
- scaled_font, RGB (0, 0, 0),
- dest_x, dest_y,
- glyphs, num_glyphs);
- if (status) {
- cairo_surface_destroy (&tmp_surface->base);
- return status;
- }
-
-- if (scaled_font->quality == CLEARTYPE_QUALITY) {
-+ if (use_subpixel_antialiasing) {
- /* For ClearType, we need a 4-channel mask. If we are compositing on
- * a surface with alpha, we need to compute the alpha channel of
- * the mask (we just copy the green channel). But for a destination
- * surface without alpha the alpha channel of the mask is ignored
- */
-
- if (surface->format != CAIRO_FORMAT_RGB24)
- _compute_argb32_mask_alpha (tmp_surface);
-@@ -1460,17 +1463,17 @@ _cairo_win32_scaled_font_show_glyphs (vo
-
- /* For op == OVER, no-cleartype, a possible optimization here is to
- * draw onto an intermediate ARGB32 surface and alpha-blend that with the
- * destination
- */
- _cairo_pattern_init_for_surface (&mask, mask_surface);
- cairo_surface_destroy (mask_surface);
-
-- if (scaled_font->quality == CLEARTYPE_QUALITY)
-+ if (use_subpixel_antialiasing)
- mask.base.has_component_alpha = TRUE;
-
- status = _cairo_surface_composite (op, pattern,
- &mask.base,
- &surface->base,
- source_x, source_y,
- 0, 0,
- dest_x, dest_y,
-diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
---- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
-@@ -3570,16 +3570,17 @@ typedef struct _cairo_xlib_font_glyphset
- GlyphSet glyphset;
- cairo_format_t format;
- XRenderPictFormat *xrender_format;
- cairo_xlib_font_glyphset_free_glyphs_t *pending_free_glyphs;
- } cairo_xlib_font_glyphset_info_t;
-
- typedef struct _cairo_xlib_surface_font_private {
- cairo_scaled_font_t *scaled_font;
-+ cairo_scaled_font_t *grayscale_font;
- cairo_xlib_hook_t close_display_hook;
- cairo_xlib_display_t *display;
- cairo_xlib_font_glyphset_info_t glyphset_info[NUM_GLYPHSETS];
- } cairo_xlib_surface_font_private_t;
-
- /* callback from CloseDisplay */
- static void
- _cairo_xlib_surface_remove_scaled_font (cairo_xlib_display_t *display,
-@@ -3599,16 +3600,20 @@ _cairo_xlib_surface_remove_scaled_font (
-
- _cairo_scaled_font_reset_cache (scaled_font);
- CAIRO_MUTEX_UNLOCK (scaled_font->mutex);
-
- if (font_private != NULL) {
- Display *dpy;
- int i;
-
-+ if (font_private->grayscale_font) {
-+ cairo_scaled_font_destroy (font_private->grayscale_font);
-+ }
-+
- dpy = _cairo_xlib_display_get_dpy (display);
- for (i = 0; i < NUM_GLYPHSETS; i++) {
- cairo_xlib_font_glyphset_info_t *glyphset_info;
-
- glyphset_info = &font_private->glyphset_info[i];
- if (glyphset_info->glyphset)
- XRenderFreeGlyphSet (dpy, glyphset_info->glyphset);
-
-@@ -3629,16 +3634,17 @@ _cairo_xlib_surface_font_init (Display
- cairo_status_t status;
- int i;
-
- font_private = malloc (sizeof (cairo_xlib_surface_font_private_t));
- if (unlikely (font_private == NULL))
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
- font_private->scaled_font = scaled_font;
-+ font_private->grayscale_font = NULL;
- status = _cairo_xlib_display_get (dpy, &font_private->display);
- if (unlikely (status)) {
- free (font_private);
- return status;
- }
-
- /* initialize and hook into the CloseDisplay callback */
- font_private->close_display_hook.func =
-@@ -3671,16 +3677,20 @@ _cairo_xlib_surface_scaled_font_fini (ca
- {
- cairo_xlib_surface_font_private_t *font_private;
-
- font_private = scaled_font->surface_private;
- if (font_private != NULL) {
- cairo_xlib_display_t *display;
- int i;
-
-+ if (font_private->grayscale_font) {
-+ cairo_scaled_font_destroy (font_private->grayscale_font);
-+ }
-+
- display = font_private->display;
- _cairo_xlib_remove_close_display_hook (display,
- &font_private->close_display_hook);
-
- for (i = 0; i < NUM_GLYPHSETS; i++) {
- cairo_xlib_font_glyphset_info_t *glyphset_info;
-
- glyphset_info = &font_private->glyphset_info[i];
-@@ -4417,16 +4427,62 @@ _cairo_xlib_surface_owns_font (cairo_xli
- (font_private != NULL && font_private->display != dst->display))
- {
- return FALSE;
- }
-
- return TRUE;
- }
-
-+/* Gets a grayscale version of scaled_font. The grayscale version is cached
-+ * in our surface_private data.
-+ */
-+static cairo_scaled_font_t *
-+_cairo_xlib_get_grayscale_font (cairo_xlib_surface_t *dst,
-+ cairo_scaled_font_t *scaled_font)
-+{
-+ cairo_xlib_surface_font_private_t *font_private = scaled_font->surface_private;
-+ cairo_bool_t needs_font;
-+
-+ if (font_private == NULL) {
-+ cairo_status_t status = _cairo_xlib_surface_font_init (dst->dpy, scaled_font);
-+ if (unlikely (status))
-+ return _cairo_scaled_font_create_in_error (status);
-+ font_private = scaled_font->surface_private;
-+ }
-+
-+ CAIRO_MUTEX_LOCK (scaled_font->mutex);
-+ needs_font = !font_private->grayscale_font;
-+ CAIRO_MUTEX_UNLOCK (scaled_font->mutex);
-+
-+ if (needs_font) {
-+ cairo_font_options_t options;
-+ cairo_scaled_font_t *new_font;
-+
-+ options = scaled_font->options;
-+ options.antialias = CAIRO_ANTIALIAS_GRAY;
-+ new_font = cairo_scaled_font_create (scaled_font->font_face,
-+ &scaled_font->font_matrix,
-+ &scaled_font->ctm, &options);
-+
-+ CAIRO_MUTEX_LOCK (scaled_font->mutex);
-+ if (!font_private->grayscale_font) {
-+ font_private->grayscale_font = new_font;
-+ new_font = NULL;
-+ }
-+ CAIRO_MUTEX_UNLOCK (scaled_font->mutex);
-+
-+ if (new_font) {
-+ cairo_scaled_font_destroy (new_font);
-+ }
-+ }
-+
-+ return font_private->grayscale_font;
-+}
-+
- static cairo_int_status_t
- _cairo_xlib_surface_show_glyphs (void *abstract_dst,
- cairo_operator_t op,
- const cairo_pattern_t *src_pattern,
- cairo_glyph_t *glyphs,
- int num_glyphs,
- cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
-@@ -4475,16 +4531,21 @@ _cairo_xlib_surface_show_glyphs (void
-
- operation = _categorize_composite_operation (dst, op, src_pattern, TRUE);
- if (operation == DO_UNSUPPORTED)
- return UNSUPPORTED ("unsupported op");
-
- if (! _cairo_xlib_surface_owns_font (dst, scaled_font))
- return UNSUPPORTED ("unowned font");
-
-+ if (!dst->base.permit_subpixel_antialiasing &&
-+ scaled_font->options.antialias == CAIRO_ANTIALIAS_SUBPIXEL) {
-+ scaled_font = _cairo_xlib_get_grayscale_font (dst, scaled_font);
-+ }
-+
- X_DEBUG ((dst->dpy, "show_glyphs (dst=%x)", (unsigned int) dst->drawable));
-
- if (clip_region != NULL &&
- cairo_region_num_rectangles (clip_region) == 1)
- {
- cairo_rectangle_int_t glyph_extents;
- const cairo_rectangle_int_t *clip_extents;
-
-diff --git a/gfx/cairo/cairo/src/cairo.h b/gfx/cairo/cairo/src/cairo.h
---- a/gfx/cairo/cairo/src/cairo.h
-+++ b/gfx/cairo/cairo/src/cairo.h
-@@ -2101,16 +2101,35 @@ cairo_public void
- cairo_surface_copy_page (cairo_surface_t *surface);
-
- cairo_public void
- cairo_surface_show_page (cairo_surface_t *surface);
-
- cairo_public cairo_bool_t
- cairo_surface_has_show_text_glyphs (cairo_surface_t *surface);
-
-+/**
-+ * _cairo_subpixel_antialiasing_t:
-+ * @CAIRO_SUBPIXEL_ANTIALIASING_ENABLED: subpixel antialiasing is enabled
-+ * for this surface.
-+ * @CAIRO_SUBPIXEL_ANTIALIASING_DISABLED: subpixel antialiasing is disabled
-+ * for this surface.
-+ */
-+typedef enum _cairo_subpixel_antialiasing_t {
-+ CAIRO_SUBPIXEL_ANTIALIASING_ENABLED,
-+ CAIRO_SUBPIXEL_ANTIALIASING_DISABLED
-+} cairo_subpixel_antialiasing_t;
-+
-+cairo_public void
-+cairo_surface_set_subpixel_antialiasing (cairo_surface_t *surface,
-+ cairo_subpixel_antialiasing_t enabled);
-+
-+cairo_public cairo_subpixel_antialiasing_t
-+cairo_surface_get_subpixel_antialiasing (cairo_surface_t *surface);
-+
- /* Image-surface functions */
-
- /**
- * cairo_format_t:
- * @CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with
- * alpha in the upper 8 bits, then red, then green, then blue.
- * The 32-bit quantities are stored native-endian. Pre-multiplied
- * alpha is used. (That is, 50% transparent red is 0x80800000,
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -2750,16 +2750,18 @@ slim_hidden_proto (cairo_surface_destroy
- slim_hidden_proto (cairo_surface_finish);
- slim_hidden_proto (cairo_surface_flush);
- slim_hidden_proto (cairo_surface_get_content);
- slim_hidden_proto (cairo_surface_get_device_offset);
- slim_hidden_proto (cairo_surface_get_font_options);
- slim_hidden_proto (cairo_surface_get_mime_data);
- slim_hidden_proto (cairo_surface_get_type);
- slim_hidden_proto (cairo_surface_has_show_text_glyphs);
-+slim_hidden_proto (cairo_surface_set_subpixel_antialiasing);
-+slim_hidden_proto (cairo_surface_get_subpixel_antialiasing);
- 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_fallback_resolution);
- slim_hidden_proto (cairo_surface_set_mime_data);
- slim_hidden_proto (cairo_surface_show_page);
- slim_hidden_proto (cairo_surface_status);
- slim_hidden_proto (cairo_text_cluster_allocate);
diff --git a/gfx/cairo/dwrite-font-match-robustness.patch b/gfx/cairo/dwrite-font-match-robustness.patch
deleted file mode 100644
index eadcce3bd..000000000
--- a/gfx/cairo/dwrite-font-match-robustness.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Robert O'Callahan <robert@ocallahan.org>
-Bug 717178. Part 1: Don't crash when passing a nil scaled-font to _name_tables_match. r=jfkthame
-
-diff --git a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
---- a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
-+++ b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
-@@ -1489,17 +1489,18 @@ static cairo_bool_t
- unsigned long size1;
- unsigned long size2;
- cairo_int_status_t status1;
- cairo_int_status_t status2;
- unsigned char *buffer1;
- unsigned char *buffer2;
- cairo_bool_t result = false;
-
-- if (!font1->backend->load_truetype_table ||
-+ if (!font1->backend || !font2->backend ||
-+ !font1->backend->load_truetype_table ||
- !font2->backend->load_truetype_table)
- return false;
-
- status1 = font1->backend->load_truetype_table (font1,
- TT_TAG_name, 0, NULL, &size1);
- status2 = font2->backend->load_truetype_table (font2,
- TT_TAG_name, 0, NULL, &size2);
- if (status1 || status2)
diff --git a/gfx/cairo/dwrite-font-printing.patch b/gfx/cairo/dwrite-font-printing.patch
deleted file mode 100644
index 837e19f6c..000000000
--- a/gfx/cairo/dwrite-font-printing.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
---- a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
-+++ b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
-@@ -37,16 +37,17 @@
- #include "cairoint.h"
-
- #include "cairo-win32-private.h"
- #include "cairo-surface-private.h"
- #include "cairo-clip-private.h"
-
- #include "cairo-d2d-private.h"
- #include "cairo-dwrite-private.h"
-+#include "cairo-truetype-subset-private.h"
- #include <float.h>
-
- typedef HRESULT (WINAPI*D2D1CreateFactoryFunc)(
- D2D1_FACTORY_TYPE factoryType,
- REFIID iid,
- CONST D2D1_FACTORY_OPTIONS *pFactoryOptions,
- void **factory
- );
-@@ -1036,17 +1037,17 @@ cairo_int_status_t
- {
- cairo_dwrite_scaled_font_t *dwritesf = static_cast<cairo_dwrite_scaled_font_t*>(scaled_font);
- cairo_dwrite_font_face_t *face = reinterpret_cast<cairo_dwrite_font_face_t*>(dwritesf->base.font_face);
-
- const void *data;
- UINT32 size;
- void *tableContext;
- BOOL exists;
-- face->dwriteface->TryGetFontTable(tag,
-+ face->dwriteface->TryGetFontTable(be32_to_cpu (tag),
- &data,
- &size,
- &tableContext,
- &exists);
-
- if (!exists) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-@@ -1476,16 +1477,59 @@ DWriteFactory::CreateRenderingParams()
- Instance()->CreateCustomRenderingParams(gamma, contrast, clearTypeLevel,
- pixelGeometry, renderingMode,
- &mCustomClearTypeRenderingParams);
- Instance()->CreateCustomRenderingParams(gamma, contrast, clearTypeLevel,
- pixelGeometry, DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC,
- &mForceGDIClassicRenderingParams);
- }
-
-+static cairo_bool_t
-+_name_tables_match (cairo_scaled_font_t *font1,
-+ cairo_scaled_font_t *font2)
-+{
-+ unsigned long size1;
-+ unsigned long size2;
-+ cairo_int_status_t status1;
-+ cairo_int_status_t status2;
-+ unsigned char *buffer1;
-+ unsigned char *buffer2;
-+ cairo_bool_t result = false;
-+
-+ if (!font1->backend->load_truetype_table ||
-+ !font2->backend->load_truetype_table)
-+ return false;
-+
-+ status1 = font1->backend->load_truetype_table (font1,
-+ TT_TAG_name, 0, NULL, &size1);
-+ status2 = font2->backend->load_truetype_table (font2,
-+ TT_TAG_name, 0, NULL, &size2);
-+ if (status1 || status2)
-+ return false;
-+ if (size1 != size2)
-+ return false;
-+
-+ buffer1 = (unsigned char*)malloc (size1);
-+ buffer2 = (unsigned char*)malloc (size2);
-+
-+ if (buffer1 && buffer2) {
-+ status1 = font1->backend->load_truetype_table (font1,
-+ TT_TAG_name, 0, buffer1, &size1);
-+ status2 = font2->backend->load_truetype_table (font2,
-+ TT_TAG_name, 0, buffer2, &size2);
-+ if (!status1 && !status2) {
-+ result = memcmp (buffer1, buffer2, size1) == 0;
-+ }
-+ }
-+
-+ free (buffer1);
-+ free (buffer2);
-+ return result;
-+}
-+
- // Helper for _cairo_win32_printing_surface_show_glyphs to create a win32 equivalent
- // of a dwrite scaled_font so that we can print using ExtTextOut instead of drawing
- // paths or blitting glyph bitmaps.
- cairo_int_status_t
- _cairo_dwrite_scaled_font_create_win32_scaled_font (cairo_scaled_font_t *scaled_font,
- cairo_scaled_font_t **new_font)
- {
- if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_DWRITE) {
-@@ -1528,19 +1572,18 @@ cairo_int_status_t
- &ctm,
- &options);
- cairo_font_face_destroy (win32_face);
-
- if (!font) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
-- if (_cairo_win32_scaled_font_is_type1 (font) || _cairo_win32_scaled_font_is_bitmap (font)) {
-- // If we somehow got a Type1 or bitmap font, it can't be the same physical font
-- // as directwrite was using, so glyph IDs will not match; best we can do is to
-- // throw it away and fall back on rendering paths or blitting bitmaps instead.
-+ if (!_name_tables_match (font, scaled_font)) {
-+ // If the font name tables aren't equal, then GDI may have failed to
-+ // find the right font and substituted a different font.
- cairo_scaled_font_destroy (font);
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- *new_font = font;
- return CAIRO_INT_STATUS_SUCCESS;
- }
-diff --git a/gfx/cairo/cairo/src/cairo-truetype-subset-private.h b/gfx/cairo/cairo/src/cairo-truetype-subset-private.h
---- a/gfx/cairo/cairo/src/cairo-truetype-subset-private.h
-+++ b/gfx/cairo/cairo/src/cairo-truetype-subset-private.h
-@@ -34,16 +34,18 @@
- * Adrian Johnson <ajohnson@redneon.com>
- */
-
- #ifndef CAIRO_TRUETYPE_SUBSET_PRIVATE_H
- #define CAIRO_TRUETYPE_SUBSET_PRIVATE_H
-
- #include "cairoint.h"
-
-+CAIRO_BEGIN_DECLS
-+
- #if CAIRO_HAS_FONT_SUBSET
-
- /* The structs defined here should strictly follow the TrueType
- * specification and not be padded. We use only 16-bit integer
- * in their definition to guarantee that. The fields of type
- * "FIXED" in the TT spec are broken into two *_1 and *_2 16-bit
- * parts, and 64-bit members are broken into four.
- *
-@@ -191,9 +193,11 @@ typedef struct _tt_composite_glyph {
- typedef struct _tt_glyph_data {
- int16_t num_contours;
- int8_t data[8];
- tt_composite_glyph_t glyph;
- } tt_glyph_data_t;
-
- #endif /* CAIRO_HAS_FONT_SUBSET */
-
-+CAIRO_END_DECLS
-+
- #endif /* CAIRO_TRUETYPE_SUBSET_PRIVATE_H */
diff --git a/gfx/cairo/dwrite-glyph-extents.patch b/gfx/cairo/dwrite-glyph-extents.patch
deleted file mode 100644
index d3625e198..000000000
--- a/gfx/cairo/dwrite-glyph-extents.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
---- a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
-+++ b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
-@@ -582,22 +582,37 @@ _cairo_dwrite_scaled_font_init_glyph_met
- DWRITE_FONT_METRICS fontMetrics;
- font_face->dwriteface->GetMetrics(&fontMetrics);
- HRESULT hr = font_face->dwriteface->GetDesignGlyphMetrics(&charIndex, 1, &metrics);
- if (FAILED(hr)) {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- // TODO: Treat swap_xy.
-- extents.width = (FLOAT)(metrics.advanceWidth - metrics.leftSideBearing - metrics.rightSideBearing) / fontMetrics.designUnitsPerEm;
-- extents.height = (FLOAT)(metrics.advanceHeight - metrics.topSideBearing - metrics.bottomSideBearing) / fontMetrics.designUnitsPerEm;
-+ extents.width = (FLOAT)(metrics.advanceWidth - metrics.leftSideBearing - metrics.rightSideBearing) /
-+ fontMetrics.designUnitsPerEm;
-+ extents.height = (FLOAT)(metrics.advanceHeight - metrics.topSideBearing - metrics.bottomSideBearing) /
-+ fontMetrics.designUnitsPerEm;
- extents.x_advance = (FLOAT)metrics.advanceWidth / fontMetrics.designUnitsPerEm;
- extents.x_bearing = (FLOAT)metrics.leftSideBearing / fontMetrics.designUnitsPerEm;
- extents.y_advance = 0.0;
-- extents.y_bearing = (FLOAT)(metrics.topSideBearing - metrics.verticalOriginY) / fontMetrics.designUnitsPerEm;
-+ extents.y_bearing = (FLOAT)(metrics.topSideBearing - metrics.verticalOriginY) /
-+ fontMetrics.designUnitsPerEm;
-+
-+ // We pad the extents here because GetDesignGlyphMetrics returns "ideal" metrics
-+ // for the glyph outline, without accounting for hinting/gridfitting/antialiasing,
-+ // and therefore it does not always cover all pixels that will actually be touched.
-+ if (scaled_font->base.options.antialias != CAIRO_ANTIALIAS_NONE &&
-+ extents.width > 0 && extents.height > 0) {
-+ extents.width += scaled_font->mat_inverse.xx * 2;
-+ extents.x_bearing -= scaled_font->mat_inverse.xx;
-+ extents.height += scaled_font->mat_inverse.yy * 2;
-+ extents.y_bearing -= scaled_font->mat_inverse.yy;
-+ }
-+
- _cairo_scaled_glyph_set_metrics (scaled_glyph,
- &scaled_font->base,
- &extents);
- return CAIRO_INT_STATUS_SUCCESS;
- }
-
- /**
- * Stack-based helper implementing IDWriteGeometrySink.
diff --git a/gfx/cairo/empty-clip-extents.patch b/gfx/cairo/empty-clip-extents.patch
deleted file mode 100644
index 306a61ad6..000000000
--- a/gfx/cairo/empty-clip-extents.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From b79ea8a6cab8bd28aebecf6e1e8229d5ac017264 Mon Sep 17 00:00:00 2001
-From: Karl Tomlinson <karlt+@karlt.net>
-Date: Fri, 16 Jul 2010 23:46:25 +0000
-Subject: clip: consider all_clipped in _cairo_clip_get_extents
-
-If the gstate clip in _cairo_gstate_int_clip_extents() has all_clipped
-set (and path NULL), then it returns the gstate target extents instead of
-an empty rectangle. If the target is infinite, then it says the clip is
-unbounded.
-
-Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29124
-Tested-by test/get-clip
-
-Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
----
-diff --git a/src/cairo-clip.c b/src/cairo-clip.c
-index f6173c6..77d8214 100644
---- a/src/cairo-clip.c
-+++ b/src/cairo-clip.c
-@@ -1264,9 +1264,14 @@ _cairo_clip_combine_with_surface (cairo_clip_t *clip,
- return CAIRO_STATUS_SUCCESS;
- }
-
-+static const cairo_rectangle_int_t _cairo_empty_rectangle_int = { 0, 0, 0, 0 };
-+
- const cairo_rectangle_int_t *
- _cairo_clip_get_extents (const cairo_clip_t *clip)
- {
-+ if (clip->all_clipped)
-+ return &_cairo_empty_rectangle_int;
-+
- if (clip->path == NULL)
- return NULL;
-
-diff --git a/test/get-clip.c b/test/get-clip.c
-index 9d6e796..f0477a1 100644
---- a/test/get-clip.c
-+++ b/test/get-clip.c
-@@ -83,6 +83,8 @@ check_clip_extents (const cairo_test_context_t *ctx,
- cairo_clip_extents (cr, &ext_x1, &ext_y1, &ext_x2, &ext_y2);
- if (ext_x1 == x && ext_y1 == y && ext_x2 == x + width && ext_y2 == y + height)
- return 1;
-+ if (width == 0.0 && height == 0.0 && ext_x1 == ext_x2 && ext_y1 == ext_y2)
-+ return 1;
- cairo_test_log (ctx, "Error: %s; clip extents %f,%f,%f,%f should be %f,%f,%f,%f\n",
- message, ext_x1, ext_y1, ext_x2 - ext_x1, ext_y2 - ext_y1,
- x, y, width, height);
-@@ -138,7 +140,8 @@ preamble (cairo_test_context_t *ctx)
- cairo_save (cr);
- cairo_clip (cr);
- rectangle_list = cairo_copy_clip_rectangle_list (cr);
-- if (! check_count (ctx, phase, rectangle_list, 0))
-+ if (! check_count (ctx, phase, rectangle_list, 0) ||
-+ ! check_clip_extents (ctx, phase, cr, 0, 0, 0, 0))
- {
- goto FAIL;
- }
---
-cgit v0.8.3-6-g21f6
diff --git a/gfx/cairo/empty-clip-rectangles.patch b/gfx/cairo/empty-clip-rectangles.patch
deleted file mode 100644
index c9aa558a2..000000000
--- a/gfx/cairo/empty-clip-rectangles.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f2fa15680ec3ac95cb68d4957557f06561a7dc55 Mon Sep 17 00:00:00 2001
-From: Karl Tomlinson <karlt+@karlt.net>
-Date: Fri, 16 Jul 2010 22:39:50 +0000
-Subject: clip: return empty clip from _cairo_clip_copy_rectangle_list when all_clipped
-
-Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29122
-Tested by test/get-clip
-
-Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
----
-diff --git a/src/cairo-clip.c b/src/cairo-clip.c
-index 12dc04d..f6173c6 100644
---- a/src/cairo-clip.c
-+++ b/src/cairo-clip.c
-@@ -1499,7 +1499,10 @@ _cairo_clip_copy_rectangle_list (cairo_clip_t *clip, cairo_gstate_t *gstate)
- int n_rects = 0;
- int i;
-
-- if (clip != NULL && clip->path != NULL) {
-+ if (clip->all_clipped)
-+ goto DONE;
-+
-+ if (clip->path != NULL) {
- status = _cairo_clip_get_region (clip, &region);
- if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) {
- goto DONE;
---
-cgit v0.8.3-6-g21f6
diff --git a/gfx/cairo/ensure-text-flushed.patch b/gfx/cairo/ensure-text-flushed.patch
deleted file mode 100644
index 5ec578fe5..000000000
--- a/gfx/cairo/ensure-text-flushed.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-pdf-operators.c b/gfx/cairo/cairo/src/cairo-pdf-operators.c
---- a/gfx/cairo/cairo/src/cairo-pdf-operators.c
-+++ b/gfx/cairo/cairo/src/cairo-pdf-operators.c
-@@ -480,6 +480,12 @@ _cairo_pdf_operators_clip (cairo_pdf_ope
- const char *pdf_operator;
- cairo_status_t status;
-
-+ if (pdf_operators->in_text_object) {
-+ status = _cairo_pdf_operators_end_text (pdf_operators);
-+ if (unlikely (status))
-+ return status;
-+ }
-+
- if (! path->has_current_point) {
- /* construct an empty path */
- _cairo_output_stream_printf (pdf_operators->stream, "0 0 m ");
diff --git a/gfx/cairo/expose-snapshot.patch b/gfx/cairo/expose-snapshot.patch
deleted file mode 100644
index 879b1fc90..000000000
--- a/gfx/cairo/expose-snapshot.patch
+++ /dev/null
@@ -1,528 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-analysis-surface-private.h b/gfx/cairo/cairo/src/cairo-analysis-surface-private.h
---- a/gfx/cairo/cairo/src/cairo-analysis-surface-private.h
-+++ b/gfx/cairo/cairo/src/cairo-analysis-surface-private.h
-@@ -65,14 +65,11 @@ _cairo_analysis_surface_has_unsupported
- cairo_private void
- _cairo_analysis_surface_get_bounding_box (cairo_surface_t *surface,
- cairo_box_t *bbox);
-
- cairo_private cairo_int_status_t
- _cairo_analysis_surface_merge_status (cairo_int_status_t status_a,
- cairo_int_status_t status_b);
-
--cairo_private cairo_surface_t *
--_cairo_null_surface_create (cairo_content_t content);
--
- CAIRO_END_DECLS
-
- #endif /* CAIRO_ANALYSIS_SURFACE_H */
-diff --git a/gfx/cairo/cairo/src/cairo-analysis-surface.c b/gfx/cairo/cairo/src/cairo-analysis-surface.c
---- a/gfx/cairo/cairo/src/cairo-analysis-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-analysis-surface.c
-@@ -902,17 +902,17 @@ static const cairo_surface_backend_t cai
- NULL, /* fill_stroke */
- NULL, /* create_solid_pattern_surface */
- NULL, /* can_repaint_solid_pattern_surface */
- NULL, /* has_show_text_glyphs */
- NULL /* show_text_glyphs */
- };
-
- cairo_surface_t *
--_cairo_null_surface_create (cairo_content_t content)
-+cairo_null_surface_create (cairo_content_t content)
- {
- cairo_surface_t *surface;
-
- surface = malloc (sizeof (cairo_surface_t));
- if (unlikely (surface == NULL)) {
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
- }
-
-diff --git a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
---- a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
-+++ b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
-@@ -1951,24 +1951,24 @@ _cairo_d2d_create_brush_for_pattern(cair
- rect = D2D1::RectU(1, 1, srcSurf->width + 1, srcSurf->height + 1);
- } else {
- rect = D2D1::RectU(0, 0, srcSurf->width, srcSurf->height);
- }
- sourceBitmap->CopyFromMemory(&rect,
- srcSurf->data,
- srcSurf->stride);
- cairo_surface_t *nullSurf =
-- _cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
-+ cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
- cachebitmap->refs++;
- cachebitmap->dirty = false;
- cairo_surface_set_user_data(nullSurf,
- &bitmap_key_snapshot,
- cachebitmap,
- NULL);
-- _cairo_surface_attach_snapshot(surfacePattern->surface,
-+ cairo_surface_attach_snapshot(surfacePattern->surface,
- nullSurf,
- _d2d_snapshot_detached);
- }
- } else {
- if (pattern->extend != CAIRO_EXTEND_NONE) {
- d2dsurf->rt->CreateBitmap(D2D1::SizeU(width, height),
- data + yoffset * stride + xoffset * Bpp,
- stride,
-@@ -2015,22 +2015,22 @@ _cairo_d2d_create_brush_for_pattern(cair
- * and one more in the user data structure.
- */
- cachebitmap->refs = 2;
- cairo_surface_set_user_data(surfacePattern->surface,
- key,
- cachebitmap,
- _d2d_release_bitmap);
- cairo_surface_t *nullSurf =
-- _cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
-+ cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
- cairo_surface_set_user_data(nullSurf,
- &bitmap_key_snapshot,
- cachebitmap,
- NULL);
-- _cairo_surface_attach_snapshot(surfacePattern->surface,
-+ cairo_surface_attach_snapshot(surfacePattern->surface,
- nullSurf,
- _d2d_snapshot_detached);
- cache_usage += _d2d_compute_bitmap_mem_size(sourceBitmap);
- }
- if (pix_image) {
- pixman_image_unref(pix_image);
- }
- }
-diff --git a/gfx/cairo/cairo/src/cairo-recording-surface.c b/gfx/cairo/cairo/src/cairo-recording-surface.c
---- a/gfx/cairo/cairo/src/cairo-recording-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-recording-surface.c
-@@ -276,17 +276,17 @@ _cairo_recording_surface_acquire_source_
- -surface->extents.y);
-
- status = _cairo_recording_surface_replay (&surface->base, image);
- if (unlikely (status)) {
- cairo_surface_destroy (image);
- return status;
- }
-
-- _cairo_surface_attach_snapshot (&surface->base, image, NULL);
-+ cairo_surface_attach_snapshot (&surface->base, image, NULL);
-
- *image_out = (cairo_image_surface_t *) image;
- *image_extra = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
-
- static void
- _cairo_recording_surface_release_source_image (void *abstract_surface,
-@@ -1046,17 +1046,17 @@ static cairo_status_t
- _recording_surface_get_ink_bbox (cairo_recording_surface_t *surface,
- cairo_box_t *bbox,
- const cairo_matrix_t *transform)
- {
- cairo_surface_t *null_surface;
- cairo_surface_t *analysis_surface;
- cairo_status_t status;
-
-- null_surface = _cairo_null_surface_create (surface->content);
-+ null_surface = cairo_null_surface_create (surface->content);
- analysis_surface = _cairo_analysis_surface_create (null_surface);
- cairo_surface_destroy (null_surface);
-
- status = analysis_surface->status;
- if (unlikely (status))
- return status;
-
- if (transform != NULL)
-diff --git a/gfx/cairo/cairo/src/cairo-surface-private.h b/gfx/cairo/cairo/src/cairo-surface-private.h
---- a/gfx/cairo/cairo/src/cairo-surface-private.h
-+++ b/gfx/cairo/cairo/src/cairo-surface-private.h
-@@ -40,18 +40,16 @@
-
- #include "cairo.h"
-
- #include "cairo-types-private.h"
- #include "cairo-list-private.h"
- #include "cairo-reference-count-private.h"
- #include "cairo-clip-private.h"
-
--typedef void (*cairo_surface_func_t) (cairo_surface_t *);
--
- struct _cairo_surface {
- const cairo_surface_backend_t *backend;
- cairo_device_t *device;
-
- /* We allow surfaces to override the backend->type by shoving something
- * else into surface->type. This is for "wrapper" surfaces that want to
- * hide their internal type from the user-level API. */
- cairo_surface_type_t type;
-diff --git a/gfx/cairo/cairo/src/cairo-surface-snapshot.c b/gfx/cairo/cairo/src/cairo-surface-snapshot.c
---- a/gfx/cairo/cairo/src/cairo-surface-snapshot.c
-+++ b/gfx/cairo/cairo/src/cairo-surface-snapshot.c
-@@ -209,17 +209,17 @@ _cairo_surface_snapshot (cairo_surface_t
- if (unlikely (status)) {
- cairo_surface_destroy (snap);
- return _cairo_surface_create_in_error (status);
- }
-
- snap->device_transform = surface->device_transform;
- snap->device_transform_inverse = surface->device_transform_inverse;
-
-- _cairo_surface_attach_snapshot (surface, snap, NULL);
-+ cairo_surface_attach_snapshot (surface, snap, NULL);
-
- return snap;
- }
- }
-
- snapshot = (cairo_surface_snapshot_t *)
- _cairo_surface_has_snapshot (surface, &_cairo_surface_snapshot_backend);
- if (snapshot != NULL)
-@@ -242,14 +242,14 @@ _cairo_surface_snapshot (cairo_surface_t
- if (unlikely (status)) {
- cairo_surface_destroy (&snapshot->base);
- return _cairo_surface_create_in_error (status);
- }
-
- snapshot->base.device_transform = surface->device_transform;
- snapshot->base.device_transform_inverse = surface->device_transform_inverse;
-
-- _cairo_surface_attach_snapshot (surface,
-+ cairo_surface_attach_snapshot (surface,
- &snapshot->base,
- _cairo_surface_snapshot_copy_on_write);
-
- return &snapshot->base;
- }
-diff --git a/gfx/cairo/cairo/src/cairo-surface-subsurface.c b/gfx/cairo/cairo/src/cairo-surface-subsurface.c
---- a/gfx/cairo/cairo/src/cairo-surface-subsurface.c
-+++ b/gfx/cairo/cairo/src/cairo-surface-subsurface.c
-@@ -326,17 +326,17 @@ _cairo_surface_subsurface_acquire_source
- _cairo_image_surface_create_with_content (meta->content,
- surface->extents.width,
- surface->extents.height);
- if (unlikely (image->base.status))
- return image->base.status;
-
- cairo_surface_paint_to_target (&image->base, surface);
-
-- _cairo_surface_attach_snapshot (&surface->base, &image->base, NULL);
-+ cairo_surface_attach_snapshot (&surface->base, &image->base, NULL);
-
- *image_out = image;
- *extra_out = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
- }
-
- extra = malloc (sizeof (struct extra));
-diff --git a/gfx/cairo/cairo/src/cairo-surface.c b/gfx/cairo/cairo/src/cairo-surface.c
---- a/gfx/cairo/cairo/src/cairo-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-surface.c
-@@ -305,51 +305,51 @@ _cairo_surface_detach_mime_data (cairo_s
- if (! _cairo_surface_has_mime_data (surface))
- return;
-
- _cairo_user_data_array_fini (&surface->mime_data);
- _cairo_user_data_array_init (&surface->mime_data);
- }
-
- static void
--_cairo_surface_detach_snapshots (cairo_surface_t *surface)
-+cairo_surface_detach_snapshots (cairo_surface_t *surface)
- {
- while (_cairo_surface_has_snapshots (surface)) {
-- _cairo_surface_detach_snapshot (cairo_list_first_entry (&surface->snapshots,
-+ cairo_surface_detach_snapshot (cairo_list_first_entry (&surface->snapshots,
- cairo_surface_t,
- snapshot));
- }
- }
-
- void
--_cairo_surface_detach_snapshot (cairo_surface_t *snapshot)
-+cairo_surface_detach_snapshot (cairo_surface_t *snapshot)
- {
- assert (snapshot->snapshot_of != NULL);
-
- snapshot->snapshot_of = NULL;
- cairo_list_del (&snapshot->snapshot);
-
- if (snapshot->snapshot_detach != NULL)
- snapshot->snapshot_detach (snapshot);
-
- cairo_surface_destroy (snapshot);
- }
-
- void
--_cairo_surface_attach_snapshot (cairo_surface_t *surface,
-+cairo_surface_attach_snapshot (cairo_surface_t *surface,
- cairo_surface_t *snapshot,
- cairo_surface_func_t detach_func)
- {
- assert (surface != snapshot);
- assert (snapshot->snapshot_of != surface);
-
- cairo_surface_reference (snapshot);
-
- if (snapshot->snapshot_of != NULL)
-- _cairo_surface_detach_snapshot (snapshot);
-+ cairo_surface_detach_snapshot (snapshot);
-
- snapshot->snapshot_of = surface;
- snapshot->snapshot_detach = detach_func;
-
- cairo_list_add (&snapshot->snapshot, &surface->snapshots);
-
- assert (_cairo_surface_has_snapshot (surface, snapshot->backend) == snapshot);
- }
-@@ -382,17 +382,17 @@ _cairo_surface_is_writable (cairo_surfac
-
- static void
- _cairo_surface_begin_modification (cairo_surface_t *surface)
- {
- assert (surface->status == CAIRO_STATUS_SUCCESS);
- assert (! surface->finished);
- assert (surface->snapshot_of == NULL);
-
-- _cairo_surface_detach_snapshots (surface);
-+ cairo_surface_detach_snapshots (surface);
- _cairo_surface_detach_mime_data (surface);
- }
-
- void
- _cairo_surface_init (cairo_surface_t *surface,
- const cairo_surface_backend_t *backend,
- cairo_device_t *device,
- cairo_content_t content)
-@@ -711,19 +711,19 @@ cairo_surface_finish (cairo_surface_t *s
-
- if (CAIRO_REFERENCE_COUNT_IS_INVALID (&surface->ref_count))
- return;
-
- if (surface->finished)
- return;
-
- /* update the snapshots *before* we declare the surface as finished */
-- _cairo_surface_detach_snapshots (surface);
-+ cairo_surface_detach_snapshots (surface);
- if (surface->snapshot_of != NULL)
-- _cairo_surface_detach_snapshot (surface);
-+ cairo_surface_detach_snapshot (surface);
-
- cairo_surface_flush (surface);
- surface->finished = TRUE;
-
- /* call finish even if in error mode */
- if (surface->backend->finish) {
- status = surface->backend->finish (surface);
- if (unlikely (status))
-@@ -1106,17 +1106,17 @@ cairo_surface_flush (cairo_surface_t *su
-
- if (surface->status)
- return;
-
- if (surface->finished)
- return;
-
- /* update the current snapshots *before* the user updates the surface */
-- _cairo_surface_detach_snapshots (surface);
-+ cairo_surface_detach_snapshots (surface);
-
- if (surface->backend->flush) {
- status = surface->backend->flush (surface);
- if (unlikely (status))
- status = _cairo_surface_set_error (surface, status);
- }
- }
- slim_hidden_def (cairo_surface_flush);
-@@ -1628,17 +1628,17 @@ _cairo_recording_surface_clone_similar (
- return similar->status;
-
- status = _cairo_recording_surface_replay (src, similar);
- if (unlikely (status)) {
- cairo_surface_destroy (similar);
- return status;
- }
-
-- _cairo_surface_attach_snapshot (src, similar, NULL);
-+ cairo_surface_attach_snapshot (src, similar, NULL);
-
- src_x = src_y = 0;
- }
-
- *clone_out = similar;
- *clone_offset_x = src_x;
- *clone_offset_y = src_y;
- return CAIRO_STATUS_SUCCESS;
-diff --git a/gfx/cairo/cairo/src/cairo-vg-surface.c b/gfx/cairo/cairo/src/cairo-vg-surface.c
---- a/gfx/cairo/cairo/src/cairo-vg-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-vg-surface.c
-@@ -977,17 +977,17 @@ _vg_setup_surface_source (cairo_vg_conte
- status = _cairo_cache_insert (&context->snapshot_cache,
- &clone->snapshot_cache_entry);
- if (unlikely (status)) {
- clone->snapshot_cache_entry.hash = 0;
- cairo_surface_destroy (&clone->base);
- return status;
- }
-
-- _cairo_surface_attach_snapshot (spat->surface, &clone->base,
-+ cairo_surface_attach_snapshot (spat->surface, &clone->base,
- _vg_surface_remove_from_cache);
-
- DONE:
- cairo_surface_destroy (&context->source->base);
- context->source = clone;
-
- vgSetParameteri (context->paint, VG_PAINT_TYPE, VG_PAINT_TYPE_PATTERN);
-
-diff --git a/gfx/cairo/cairo/src/cairo-xcb-surface.c b/gfx/cairo/cairo/src/cairo-xcb-surface.c
---- a/gfx/cairo/cairo/src/cairo-xcb-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-xcb-surface.c
-@@ -560,17 +560,17 @@ _cairo_xcb_surface_acquire_source_image
- image = (cairo_image_surface_t *) cairo_surface_reference (&image->base);
- goto DONE;
- }
-
- status = _get_image (surface, FALSE, &image);
- if (unlikely (status))
- return status;
-
-- _cairo_surface_attach_snapshot (&surface->base, &image->base, NULL);
-+ cairo_surface_attach_snapshot (&surface->base, &image->base, NULL);
-
- DONE:
- *image_out = image;
- *image_extra = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
-
- static void
-@@ -713,17 +713,17 @@ _cairo_xcb_surface_flush (void *abstract
- status = cairo_surface_status (surface->fallback);
-
- if (status == CAIRO_STATUS_SUCCESS) {
- status = _put_image (surface,
- (cairo_image_surface_t *) surface->fallback);
- }
-
- if (status == CAIRO_STATUS_SUCCESS) {
-- _cairo_surface_attach_snapshot (&surface->base,
-+ cairo_surface_attach_snapshot (&surface->base,
- surface->fallback,
- cairo_surface_finish);
- }
- }
-
- cairo_surface_destroy (surface->fallback);
- surface->fallback = NULL;
-
-diff --git a/gfx/cairo/cairo/src/cairo.h b/gfx/cairo/cairo/src/cairo.h
---- a/gfx/cairo/cairo/src/cairo.h
-+++ b/gfx/cairo/cairo/src/cairo.h
-@@ -214,16 +214,25 @@ typedef struct _cairo_pattern cairo_patt
- *
- * #cairo_destroy_func_t the type of function which is called when a
- * data element is destroyed. It is passed the pointer to the data
- * element and should free any memory and resources allocated for it.
- **/
- typedef void (*cairo_destroy_func_t) (void *data);
-
- /**
-+ * cairo_surface_func_t:
-+ * @surface: The surface being referred to.
-+ *
-+ * #cairo_surface_func_t the type of function which is used for callback
-+ * when a surface needs to be apssed as a parameter.
-+ */
-+typedef void (*cairo_surface_func_t) (cairo_surface_t *surface);
-+
-+/**
- * cairo_user_data_key_t:
- * @unused: not used; ignore.
- *
- * #cairo_user_data_key_t is used for attaching user data to cairo
- * data structures. The actual contents of the struct is never used,
- * and there is no need to initialize the object; only the unique
- * address of a #cairo_data_key_t object is used. Typically, you
- * would just use the address of a static #cairo_data_key_t object.
-@@ -2150,16 +2159,24 @@ cairo_surface_get_user_data (cairo_surfa
- const cairo_user_data_key_t *key);
-
- cairo_public cairo_status_t
- cairo_surface_set_user_data (cairo_surface_t *surface,
- const cairo_user_data_key_t *key,
- void *user_data,
- cairo_destroy_func_t destroy);
-
-+cairo_public void
-+cairo_surface_attach_snapshot (cairo_surface_t *surface,
-+ cairo_surface_t *snapshot,
-+ cairo_surface_func_t detach_func);
-+
-+cairo_public void
-+cairo_surface_detach_snapshot (cairo_surface_t *snapshot);
-+
- #define CAIRO_MIME_TYPE_JPEG "image/jpeg"
- #define CAIRO_MIME_TYPE_PNG "image/png"
- #define CAIRO_MIME_TYPE_JP2 "image/jp2"
- #define CAIRO_MIME_TYPE_URI "text/x-uri"
-
- cairo_public void
- cairo_surface_get_mime_data (cairo_surface_t *surface,
- const char *mime_type,
-@@ -2328,16 +2345,21 @@ cairo_recording_surface_create (cairo_co
-
- cairo_public void
- cairo_recording_surface_ink_extents (cairo_surface_t *surface,
- double *x0,
- double *y0,
- double *width,
- double *height);
-
-+/* Null-surface functions */
-+
-+cairo_public cairo_surface_t *
-+cairo_null_surface_create (cairo_content_t content);
-+
- /* Pattern creation functions */
-
- cairo_public cairo_pattern_t *
- cairo_pattern_create_rgb (double red, double green, double blue);
-
- cairo_public cairo_pattern_t *
- cairo_pattern_create_rgba (double red, double green, double blue,
- double alpha);
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -1770,27 +1770,19 @@ _cairo_surface_clone_similar (cairo_surf
- int height,
- int *clone_offset_x,
- int *clone_offset_y,
- cairo_surface_t **clone_out);
-
- cairo_private cairo_surface_t *
- _cairo_surface_snapshot (cairo_surface_t *surface);
-
--cairo_private void
--_cairo_surface_attach_snapshot (cairo_surface_t *surface,
-- cairo_surface_t *snapshot,
-- cairo_surface_func_t detach_func);
--
- cairo_private cairo_surface_t *
- _cairo_surface_has_snapshot (cairo_surface_t *surface,
-- const cairo_surface_backend_t *backend);
--
--cairo_private void
--_cairo_surface_detach_snapshot (cairo_surface_t *snapshot);
-+ const cairo_surface_backend_t *backend);
-
- cairo_private cairo_bool_t
- _cairo_surface_is_similar (cairo_surface_t *surface_a,
- cairo_surface_t *surface_b);
-
- cairo_private cairo_bool_t
- _cairo_surface_get_extents (cairo_surface_t *surface,
- cairo_rectangle_int_t *extents);
diff --git a/gfx/cairo/fix-build-with-Werror=return-type.patch b/gfx/cairo/fix-build-with-Werror=return-type.patch
deleted file mode 100644
index 7cd77a597..000000000
--- a/gfx/cairo/fix-build-with-Werror=return-type.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -436,16 +436,17 @@ _cairo_quartz_cairo_operator_to_quartz_c
- case CAIRO_OPERATOR_DIFFERENCE:
- case CAIRO_OPERATOR_EXCLUSION:
- case CAIRO_OPERATOR_HSL_HUE:
- case CAIRO_OPERATOR_HSL_SATURATION:
- case CAIRO_OPERATOR_HSL_COLOR:
- case CAIRO_OPERATOR_HSL_LUMINOSITY:
- default:
- assert (0);
-+ return kPrivateCGCompositeClear;
- }
- }
-
- static cairo_int_status_t
- _cairo_quartz_surface_set_cairo_operator (cairo_quartz_surface_t *surface, cairo_operator_t op)
- {
- ND((stderr, "%p _cairo_quartz_surface_set_cairo_operator %d\n", surface, op));
-
diff --git a/gfx/cairo/fix-cairo-surface-wrapper-flush-build-warning.patch b/gfx/cairo/fix-cairo-surface-wrapper-flush-build-warning.patch
deleted file mode 100644
index 0e7c0b973..000000000
--- a/gfx/cairo/fix-cairo-surface-wrapper-flush-build-warning.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-# HG changeset patch
-# Parent 5479a346b95b82162c72419a95cbb4022cbbfe4d
-# User Ed Morley <bmo@edmorley.co.uk>
-Bug 631155 - undefined return value in function '_cairo_surface_wrapper_flush'; r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-surface-wrapper.c b/gfx/cairo/cairo/src/cairo-surface-wrapper.c
---- a/gfx/cairo/cairo/src/cairo-surface-wrapper.c
-+++ b/gfx/cairo/cairo/src/cairo-surface-wrapper.c
-@@ -712,9 +712,10 @@ _cairo_surface_wrapper_fini (cairo_surfa
- }
-
- cairo_status_t
- _cairo_surface_wrapper_flush (cairo_surface_wrapper_t *wrapper)
- {
- if (wrapper->target->backend->flush) {
- return wrapper->target->backend->flush(wrapper->target);
- }
-+ return CAIRO_STATUS_SUCCESS;
- }
diff --git a/gfx/cairo/fix-cairo-win32-print-gdi-error.diff b/gfx/cairo/fix-cairo-win32-print-gdi-error.diff
deleted file mode 100644
index 9387a87af..000000000
--- a/gfx/cairo/fix-cairo-win32-print-gdi-error.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -95,20 +95,21 @@ _cairo_win32_print_gdi_error (const char
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- last_error,
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPSTR) &lpMsgBuf,
- 0, NULL)) {
- fprintf (stderr, "%s: Unknown GDI error", context);
- } else {
-- fwprintf (stderr, "%S: %s", context, (char *)lpMsgBuf);
-+ fprintf (stderr, "%s: %S", context, (char *)lpMsgBuf);
-
- LocalFree (lpMsgBuf);
- }
-+ fflush(stderr);
-
- /* We should switch off of last_status, but we'd either return
- * CAIRO_STATUS_NO_MEMORY or CAIRO_STATUS_UNKNOWN_ERROR and there
- * is no CAIRO_STATUS_UNKNOWN_ERROR.
- */
-
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- }
diff --git a/gfx/cairo/fix-clip-copy.patch b/gfx/cairo/fix-clip-copy.patch
deleted file mode 100644
index c2c3b2fc8..000000000
--- a/gfx/cairo/fix-clip-copy.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-commit f49a9740350d2f0d69ed59e913f0263a899cfb2a
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Fri Jan 29 14:39:24 2010 -0500
-
- Fix clip copy
-
-diff --git a/src/cairo-clip.c b/src/cairo-clip.c
-index 8d66a5f..6acbcff 100644
---- a/src/cairo-clip.c
-+++ b/src/cairo-clip.c
-@@ -280,13 +280,12 @@ cairo_clip_t *
- _cairo_clip_init_copy (cairo_clip_t *clip, cairo_clip_t *other)
- {
- if (other != NULL) {
-- if (other->path == NULL) {
-- _cairo_clip_init (clip);
-- clip = NULL;
-- } else {
-- clip->all_clipped = other->all_clipped;
-- clip->path = _cairo_clip_path_reference (other->path);
-- }
-+ clip->all_clipped = other->all_clipped;
-+ clip->path = _cairo_clip_path_reference (other->path);
-+
-+ /* this guy is here because of the weird return semantics of _cairo_clip_init_copy */
-+ if (!other->path)
-+ return NULL;
- } else {
- _cairo_clip_init (clip);
- }
diff --git a/gfx/cairo/fix-clip-region-simplification.patch b/gfx/cairo/fix-clip-region-simplification.patch
deleted file mode 100644
index 825130a2e..000000000
--- a/gfx/cairo/fix-clip-region-simplification.patch
+++ /dev/null
@@ -1 +0,0 @@
-stg show: fix-clip-region-simplication: Unknown patch or revision name
diff --git a/gfx/cairo/fix-clip-test.patch b/gfx/cairo/fix-clip-test.patch
deleted file mode 100644
index 9987b48bf..000000000
--- a/gfx/cairo/fix-clip-test.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Fix a clip test to test the right coordinate.
-
-Fixed upstream by 498c10032ea3f8631a928cd7df96766f2c8ddca4
-diff --git a/gfx/cairo/cairo/src/cairo-clip.c b/gfx/cairo/cairo/src/cairo-clip.c
---- a/gfx/cairo/cairo/src/cairo-clip.c
-+++ b/gfx/cairo/cairo/src/cairo-clip.c
-@@ -408,7 +408,7 @@ _cairo_clip_rectangle (cairo_clip_t
- /* if a smaller clip has already been set, ignore the new path */
- if (clip->path != NULL) {
- if (rectangle->x <= clip->path->extents.x &&
-- rectangle->y <= clip->path->extents.x &&
-+ rectangle->y <= clip->path->extents.y &&
- rectangle->x + rectangle->width >= clip->path->extents.x + clip->path->extents.width &&
- rectangle->y + rectangle->height >= clip->path->extents.y + clip->path->extents.height)
- {
diff --git a/gfx/cairo/fix-ps-output.patch b/gfx/cairo/fix-ps-output.patch
deleted file mode 100644
index b325f0bc5..000000000
--- a/gfx/cairo/fix-ps-output.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-# HG changeset patch
-# User Jeff Muizelaar <jmuizelaar@mozilla.com>
-# Date 1276629019 14400
-# Node ID b5eb246c152dedb895d3010eb7192f88cce51146
-# Parent 792cd3e8aa59b24c333f2c90f938beda361b3336
-cairo: PS: Add missing 'q' when resetting clip path
-
-diff --git a/gfx/cairo/cairo/src/cairo-ps-surface.c b/gfx/cairo/cairo/src/cairo-ps-surface.c
---- a/gfx/cairo/cairo/src/cairo-ps-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-ps-surface.c
-@@ -3696,7 +3696,7 @@ _cairo_ps_surface_set_paginated_mode (vo
- if (surface->clipper.clip.path != NULL) {
- status = _cairo_pdf_operators_flush (&surface->pdf_operators);
-
-- _cairo_output_stream_printf (surface->stream, "Q\n");
-+ _cairo_output_stream_printf (surface->stream, "Q q\n");
- _cairo_surface_clipper_reset (&surface->clipper);
- }
- }
diff --git a/gfx/cairo/fix-unnecessary-fallback.patch b/gfx/cairo/fix-unnecessary-fallback.patch
deleted file mode 100644
index 468801623..000000000
--- a/gfx/cairo/fix-unnecessary-fallback.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
-index 353cbcd..1a053d0 100644
---- a/src/cairo-xlib-surface.c
-+++ b/src/cairo-xlib-surface.c
-@@ -1818,7 +1817,8 @@ _recategorize_composite_operation (cairo_xlib_surface_t *dst,
- return DO_XTILE;
- }
-
-- if (dst->buggy_repeat && src_attr->extend == CAIRO_EXTEND_REPEAT)
-+ if (dst->buggy_repeat && src_attr->extend == CAIRO_EXTEND_REPEAT &&
-+ (src->width != 1 || src->height != 1))
- return DO_UNSUPPORTED;
-
- if (! CAIRO_SURFACE_RENDER_HAS_COMPOSITE (src))
diff --git a/gfx/cairo/fix-win32-font-assertion.patch b/gfx/cairo/fix-win32-font-assertion.patch
deleted file mode 100644
index 23cc5474b..000000000
--- a/gfx/cairo/fix-win32-font-assertion.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Jonathan Kew <jkew@mozilla.com>
-bug 838617 - don't assert equality with the key's hash unless it was actually initialized. r=roc
-
-diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
---- a/gfx/cairo/cairo/src/cairo-win32-font.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
-@@ -2104,19 +2104,19 @@ cairo_win32_font_face_create_for_logfont
- font_face = malloc (sizeof (cairo_win32_font_face_t));
- if (!font_face) {
- _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
- goto FAIL;
- }
-
- _cairo_win32_font_face_init_key (font_face, logfont, font);
- _cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
-- assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
-
- if (!font) {
-+ assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
- status = _cairo_hash_table_insert (hash_table,
- &font_face->base.hash_entry);
- if (unlikely (status))
- goto FAIL;
- }
-
- DONE:
- if (!font) {
diff --git a/gfx/cairo/fix-win32-show-glyphs-clipping.patch b/gfx/cairo/fix-win32-show-glyphs-clipping.patch
deleted file mode 100644
index 91c5de2e1..000000000
--- a/gfx/cairo/fix-win32-show-glyphs-clipping.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 25fb70d4dc1e67553dba5973a79902e4cf81341f
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Wed Apr 21 11:23:27 2010 -0400
-
- fix show glyphs clipping
-
-diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
-index c10e134..ff823a3 100644
---- a/src/cairo-win32-surface.c
-+++ b/src/cairo-win32-surface.c
-@@ -1603,6 +1603,8 @@ _cairo_win32_surface_show_glyphs (void *surface,
-
- _cairo_win32_surface_set_clip_region (surface, clip_region);
- }
-+ } else {
-+ _cairo_win32_surface_set_clip_region (surface, NULL);
- }
-
- solid_pattern = (cairo_solid_pattern_t *)source;
diff --git a/gfx/cairo/fix-xcopyarea-with-clips.patch b/gfx/cairo/fix-xcopyarea-with-clips.patch
deleted file mode 100644
index 6bf3320b6..000000000
--- a/gfx/cairo/fix-xcopyarea-with-clips.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Benjamin Otte <otte@redhat.com>
-Date: Thu, 29 Apr 2010 16:20:59 +0000
-Subject: xlib: Don't modify variables that are needed later
-
-In the XCopyArea region code, don't modify src_x/y when they are later
-used in the unbounded fixup code.
-
-Exposed by composite-integer-translate-source test.
----
-diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
-index bedc3fd..30c08d3 100644
---- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
-@@ -2322,10 +2322,10 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
- width, height,
- dst_x, dst_y);
- } else {
-- int n, num_rects;
-+ int n, num_rects, x, y;
-
-- src_x += src_attr.x_offset + itx - dst_x;
-- src_y += src_attr.y_offset + ity - dst_y;
-+ x = src_x + src_attr.x_offset + itx - dst_x;
-+ y = src_y + src_attr.y_offset + ity - dst_y;
-
- num_rects = cairo_region_num_rectangles (clip_region);
- for (n = 0; n < num_rects; n++) {
-@@ -2333,7 +2333,7 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
-
- cairo_region_get_rectangle (clip_region, n, &rect);
- XCopyArea (dst->dpy, src->drawable, dst->drawable, gc,
-- rect.x + src_x, rect.y + src_y,
-+ rect.x + x, rect.y + y,
- rect.width, rect.height,
- rect.x, rect.y);
- }
---
-cgit v0.8.3-6-g21f6
diff --git a/gfx/cairo/fix-zero-length-gradient.patch b/gfx/cairo/fix-zero-length-gradient.patch
deleted file mode 100644
index a920d76e9..000000000
--- a/gfx/cairo/fix-zero-length-gradient.patch
+++ /dev/null
@@ -1 +0,0 @@
-stg show: fix-zero-len-graident: Unknown patch or revision name
diff --git a/gfx/cairo/fixup-unbounded.patch b/gfx/cairo/fixup-unbounded.patch
deleted file mode 100644
index 09b3a9069..000000000
--- a/gfx/cairo/fixup-unbounded.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -1797,17 +1797,17 @@ _cairo_image_surface_fixup_unbounded_box
- cairo_boxes_t *boxes)
- {
- cairo_boxes_t clear;
- cairo_box_t box;
- cairo_status_t status;
- struct _cairo_boxes_chunk *chunk;
- int i;
-
-- if (boxes->num_boxes <= 1 && clip_region == NULL)
-+ if (boxes->num_boxes < 1 && clip_region == NULL)
- return _cairo_image_surface_fixup_unbounded (dst, extents, NULL);
-
- _cairo_boxes_init (&clear);
-
- box.p1.x = _cairo_fixed_from_int (extents->unbounded.x + extents->unbounded.width);
- box.p1.y = _cairo_fixed_from_int (extents->unbounded.y);
- box.p2.x = _cairo_fixed_from_int (extents->unbounded.x);
- box.p2.y = _cairo_fixed_from_int (extents->unbounded.y + extents->unbounded.height);
diff --git a/gfx/cairo/ft-no-subpixel-if-surface-disables.patch b/gfx/cairo/ft-no-subpixel-if-surface-disables.patch
deleted file mode 100644
index a53e5de2b..000000000
--- a/gfx/cairo/ft-no-subpixel-if-surface-disables.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-# HG changeset patch
-# Parent 31c7eac3de3de324cb5c93bd19c4e16a693f1101
-# User Karl Tomlinson <karlt+@karlt.net>
-b=929451 don't use subpixel aa for ft fonts on surfaces that don't support it r?roc
-
-Also:
-* Prefer subpixel order provided by the surface over that from the font face.
-* Allow font face options to turn off subpixel aa.
-
-diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c
---- a/gfx/cairo/cairo/src/cairo-ft-font.c
-+++ b/gfx/cairo/cairo/src/cairo-ft-font.c
-@@ -1759,23 +1759,26 @@ static void
-
- if (load_flags & FT_LOAD_NO_HINTING)
- other->base.hint_style = CAIRO_HINT_STYLE_NONE;
-
- if (other->base.antialias == CAIRO_ANTIALIAS_NONE ||
- options->base.antialias == CAIRO_ANTIALIAS_NONE) {
- options->base.antialias = CAIRO_ANTIALIAS_NONE;
- options->base.subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT;
-- }
--
-- if (other->base.antialias == CAIRO_ANTIALIAS_SUBPIXEL &&
-- (options->base.antialias == CAIRO_ANTIALIAS_DEFAULT ||
-- options->base.antialias == CAIRO_ANTIALIAS_GRAY)) {
-- options->base.antialias = CAIRO_ANTIALIAS_SUBPIXEL;
-- options->base.subpixel_order = other->base.subpixel_order;
-+ } else if (options->base.antialias != CAIRO_ANTIALIAS_GRAY) {
-+ /* The surface supports subpixel aa, so let the font face options
-+ * choose whether to use subpixel aa. If the surface has
-+ * CAIRO_ANTIALIAS_GRAY (e.g. PS, PDF, SVG, translucent part of a
-+ * CONTENT_COLOR_ALPHA surface), then don't accept subpixel aa. */
-+ if (other->base.antialias != CAIRO_ANTIALIAS_DEFAULT)
-+ options->base.antialias = other->base.antialias;
-+ /* If the surface knows the subpixel order then use that. */
-+ if (options->base.subpixel_order == CAIRO_SUBPIXEL_ORDER_DEFAULT)
-+ options->base.subpixel_order = other->base.subpixel_order;
- }
-
- if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT)
- options->base.hint_style = other->base.hint_style;
-
- if (other->base.hint_style == CAIRO_HINT_STYLE_NONE)
- options->base.hint_style = CAIRO_HINT_STYLE_NONE;
-
diff --git a/gfx/cairo/gdi-RGB24-ARGB32.patch b/gfx/cairo/gdi-RGB24-ARGB32.patch
deleted file mode 100644
index 1df95f9ac..000000000
--- a/gfx/cairo/gdi-RGB24-ARGB32.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-changeset: 106848:28db6dbdd9ea
-tag: gdi-patch
-tag: qbase
-tag: qtip
-tag: tip
-user: Jeff Muizelaar <jmuizelaar@mozilla.com>
-date: Wed Sep 12 22:52:06 2012 -0400
-summary: Bug 788794. Use BitBlt to do SOURCE and OVER from RGB24 to ARGB32. r=nical
-
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -884,16 +884,28 @@ static cairo_int_status_t
- src_x, src_y,
- src_w, src_h,
- blend_function))
- return _cairo_win32_print_gdi_error ("_cairo_win32_surface_composite(AlphaBlend)");
-
- return CAIRO_STATUS_SUCCESS;
- }
-
-+/* makes the alpha channel in a RGB24 surface 0xff */
-+static void
-+make_opaque (cairo_image_surface_t *image, cairo_rectangle_int_t src_r)
-+{
-+ int x; int y;
-+ for (y = src_r.y; y < src_r.height; y++) {
-+ for (x = src_r.x; x < src_r.width; x++) {
-+ image->data[y * image->stride + x*4 + 3] = 0xff;
-+ }
-+ }
-+}
-+
- static cairo_int_status_t
- _cairo_win32_surface_composite_inner (cairo_win32_surface_t *src,
- cairo_image_surface_t *src_image,
- cairo_win32_surface_t *dst,
- cairo_rectangle_int_t src_extents,
- cairo_rectangle_int_t src_r,
- cairo_rectangle_int_t dst_r,
- int alpha,
-@@ -935,16 +947,24 @@ static cairo_int_status_t
- src_r.width, - (int) src_r.height,
- src_image->data,
- &bi,
- DIB_RGB_COLORS,
- SRCCOPY))
- return _cairo_win32_print_gdi_error ("_cairo_win32_surface_composite(StretchDIBits)");
- }
- } else if (!needs_alpha) {
-+ if (src->format == CAIRO_FORMAT_RGB24 && dst->format == CAIRO_FORMAT_ARGB32) {
-+ /* Because we store RGB24 & ARGB32 in the same way GDI has no way
-+ * to ignore the alpha channel from a RGB24 source. Therefore, we set
-+ * the alpha channel in our RGB24 source to opaque so that we can treat
-+ * it like ARGB32. */
-+ GdiFlush();
-+ make_opaque(src->image, src_r);
-+ }
- /* BitBlt or StretchBlt? */
- if (!needs_scale && (dst->flags & CAIRO_WIN32_SURFACE_CAN_BITBLT)) {
- if (!BitBlt (dst->dc,
- dst_r.x, dst_r.y,
- dst_r.width, dst_r.height,
- src->dc,
- src_r.x, src_r.y,
- SRCCOPY))
-@@ -1184,28 +1204,36 @@ static cairo_int_status_t
- }
- } else {
- needs_repeat = TRUE;
- }
-
- /*
- * Operations that we can do:
- *
-+ * AlphaBlend uses the following formula for alpha when not use the per-pixel alpha (AlphaFormat = 0)
-+ * Dst.Alpha = Src.Alpha * (SCA/255.0) + Dst.Alpha * (1.0 - (SCA/255.0))
-+ * This turns into Dst.Alpha = Src.Alpha when SCA = 255.
-+ * (http://msdn.microsoft.com/en-us/library/aa921335.aspx)
-+ *
- * RGB OVER RGB -> BitBlt (same as SOURCE)
-- * RGB OVER ARGB -> UNSUPPORTED (AlphaBlend treats this as a BitBlt, even with SCA 255 and no AC_SRC_ALPHA)
-+ * RGB OVER ARGB -> Partially supported, We convert this operation into a ARGB SOURCE ARGB
-+ * by setting the alpha values of the source to 255.
- * ARGB OVER ARGB -> AlphaBlend, with AC_SRC_ALPHA
- * ARGB OVER RGB -> AlphaBlend, with AC_SRC_ALPHA; we'll have junk in the dst A byte
- *
- * RGB OVER RGB + mask -> AlphaBlend, no AC_SRC_ALPHA
-- * RGB OVER ARGB + mask -> UNSUPPORTED
-+ * RGB OVER ARGB + mask -> Partially supported, We convert this operation into a ARGB OVER ARGB + mask
-+ * by setting the alpha values of the source to 255.
- * ARGB OVER ARGB + mask -> AlphaBlend, with AC_SRC_ALPHA
- * ARGB OVER RGB + mask -> AlphaBlend, with AC_SRC_ALPHA; junk in the dst A byte
- *
- * RGB SOURCE RGB -> BitBlt
-- * RGB SOURCE ARGB -> UNSUPPORTED (AlphaBlend treats this as a BitBlt, even with SCA 255 and no AC_SRC_ALPHA)
-+ * RGB SOURCE ARGB -> Partially supported, We convert this operation into a ARGB SOURCE ARGB
-+ * by setting the alpha values of the source to 255.
- * ARGB SOURCE ARGB -> BitBlt
- * ARGB SOURCE RGB -> BitBlt
- *
- * RGB SOURCE RGB + mask -> unsupported
- * RGB SOURCE ARGB + mask -> unsupported
- * ARGB SOURCE ARGB + mask -> unsupported
- * ARGB SOURCE RGB + mask -> unsupported
- */
-@@ -1222,22 +1250,32 @@ static cairo_int_status_t
- needs_alpha = FALSE;
- } else {
- needs_alpha = TRUE;
- }
- } else if (src_format == CAIRO_FORMAT_ARGB32 &&
- dst->format == CAIRO_FORMAT_RGB24)
- {
- needs_alpha = TRUE;
-+ } else if (src_format == CAIRO_FORMAT_RGB24 &&
-+ dst->format == CAIRO_FORMAT_ARGB32 &&
-+ src->image)
-+ {
-+ if (alpha == 255) {
-+ needs_alpha = FALSE;
-+ } else {
-+ needs_alpha = TRUE;
-+ }
- } else {
- goto UNSUPPORTED;
- }
- } else if (alpha == 255 && op == CAIRO_OPERATOR_SOURCE) {
- if ((src_format == dst->format) ||
-- (src_format == CAIRO_FORMAT_ARGB32 && dst->format == CAIRO_FORMAT_RGB24))
-+ (src_format == CAIRO_FORMAT_ARGB32 && dst->format == CAIRO_FORMAT_RGB24) ||
-+ (src_format == CAIRO_FORMAT_RGB24 && dst->format == CAIRO_FORMAT_ARGB32 && src->image))
- {
- needs_alpha = FALSE;
- } else {
- goto UNSUPPORTED;
- }
- } else {
- goto UNSUPPORTED;
- }
-
diff --git a/gfx/cairo/handle-a1.patch b/gfx/cairo/handle-a1.patch
deleted file mode 100644
index eaad3d69e..000000000
--- a/gfx/cairo/handle-a1.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-commit 82aab44a9005047743538d52e9fbc27fd6ce408a
-Author: Chris Wilson <chris@chris-wilson.co.uk>
-Date: Fri Mar 19 17:23:20 2010 -0400
-
- commit f07195860620959c27d43080a7b987e28222735a
-
- xlib: Handle a1 image uploads through converter
-
- Fixes test/large-source [xlib]
-
-diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
-index 1a053d0..8f773b0 100644
---- a/src/cairo-xlib-surface.c
-+++ b/src/cairo-xlib-surface.c
-@@ -1155,7 +1155,9 @@ _draw_image_surface (cairo_xlib_surface_t *surface,
- int dither_adjustment = dither_row[x_off];
- int a, r, g, b;
-
-- if (image_masks.bpp <= 8)
-+ if (image_masks.bpp == 1)
-+ in_pixel = !! (((uint8_t*)row)[x/8] & (1 << (x & 7)));
-+ else if (image_masks.bpp <= 8)
- in_pixel = ((uint8_t*)row)[x];
- else if (image_masks.bpp <= 16)
- in_pixel = ((uint16_t*)row)[x];
diff --git a/gfx/cairo/handle-multi-path-clip.patch b/gfx/cairo/handle-multi-path-clip.patch
deleted file mode 100644
index fe4268885..000000000
--- a/gfx/cairo/handle-multi-path-clip.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -2885,16 +2885,18 @@ static cairo_status_t
- cairo_bool_t need_clip_mask = FALSE;
- cairo_status_t status;
- struct _cairo_boxes_chunk *chunk;
- uint32_t pixel;
- int i;
-
- if (clip != NULL) {
- status = _cairo_clip_get_region (clip, &clip_region);
-+ if (unlikely (status == CAIRO_INT_STATUS_NOTHING_TO_DO))
-+ return CAIRO_STATUS_SUCCESS;
- need_clip_mask = status == CAIRO_INT_STATUS_UNSUPPORTED;
- if (need_clip_mask &&
- (op == CAIRO_OPERATOR_SOURCE || ! extents->is_bounded))
- {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- if (clip_region != NULL && cairo_region_num_rectangles (clip_region) == 1)
-@@ -3200,30 +3202,20 @@ static cairo_status_t
- return _clip_and_composite (dst, op, src,
- _composite_traps, &info,
- extents, clip);
- }
-
- static cairo_clip_path_t *
- _clip_get_single_path (cairo_clip_t *clip)
- {
-- cairo_clip_path_t *iter = clip->path;
-- cairo_clip_path_t *path = NULL;
--
-- do {
-- if ((iter->flags & CAIRO_CLIP_PATH_IS_BOX) == 0) {
-- if (path != NULL)
-- return FALSE;
--
-- path = iter;
-- }
-- iter = iter->prev;
-- } while (iter != NULL);
--
-- return path;
-+ if (clip->path->prev == NULL)
-+ return clip->path;
-+
-+ return NULL;
- }
-
- /* high level image interface */
-
- static cairo_int_status_t
- _cairo_image_surface_paint (void *abstract_surface,
- cairo_operator_t op,
- const cairo_pattern_t *source,
diff --git a/gfx/cairo/ignore-rank0.patch b/gfx/cairo/ignore-rank0.patch
deleted file mode 100644
index 7e20f66fb..000000000
--- a/gfx/cairo/ignore-rank0.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
-index 0439bcf..32a5c4b 100644
---- a/gfx/cairo/cairo/src/cairo-gstate.c
-+++ b/gfx/cairo/cairo/src/cairo-gstate.c
-@@ -1271,8 +1271,13 @@ _cairo_gstate_set_font_matrix (cairo_gstate_t *gstate,
- if (memcmp (matrix, &gstate->font_matrix, sizeof (cairo_matrix_t)) == 0)
- return CAIRO_STATUS_SUCCESS;
-
-- if (! _cairo_matrix_is_invertible (matrix))
-- return _cairo_error (CAIRO_STATUS_INVALID_MATRIX);
-+ if (! _cairo_matrix_is_invertible (matrix)) {
-+ /* rank 0 matrices are ok even though they are not invertible */
-+ if (!(matrix->xx == 0. && matrix->xy == 0. &&
-+ matrix->yx == 0. && matrix->yy == 0.)) {
-+ return _cairo_error (CAIRO_STATUS_INVALID_MATRIX);
-+ }
-+ }
-
- _cairo_gstate_unset_scaled_font (gstate);
-
diff --git a/gfx/cairo/lround-c99-only.patch b/gfx/cairo/lround-c99-only.patch
deleted file mode 100644
index 9002235f0..000000000
--- a/gfx/cairo/lround-c99-only.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Only use lround in C99 programs.
-
-diff --git a/gfx/cairo/cairo/src/cairo-misc.c b/gfx/cairo/cairo/src/cairo-misc.c
---- a/gfx/cairo/cairo/src/cairo-misc.c
-+++ b/gfx/cairo/cairo/src/cairo-misc.c
-@@ -478,17 +478,17 @@ _cairo_operator_bounded_by_either (cairo
- case CAIRO_OPERATOR_IN:
- case CAIRO_OPERATOR_DEST_IN:
- case CAIRO_OPERATOR_DEST_ATOP:
- return 0;
- }
-
- }
-
--#if DISABLE_SOME_FLOATING_POINT
-+#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L
- /* This function is identical to the C99 function lround(), except that it
- * performs arithmetic rounding (floor(d + .5) instead of away-from-zero rounding) and
- * has a valid input range of (INT_MIN, INT_MAX] instead of
- * [INT_MIN, INT_MAX]. It is much faster on both x86 and FPU-less systems
- * than other commonly used methods for rounding (lround, round, rint, lrint
- * or float (d + 0.5)).
- *
- * The reason why this function is much faster on x86 than other
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -969,17 +969,17 @@ _cairo_restrict_value (double value, dou
- * away from 0. _cairo_round rounds halfway cases toward negative infinity.
- * This matches the rounding behaviour of _cairo_lround. */
- static inline double cairo_const
- _cairo_round (double r)
- {
- return floor (r + .5);
- }
-
--#if DISABLE_SOME_FLOATING_POINT
-+#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L
- cairo_private int
- _cairo_lround (double d) cairo_const;
- #else
- #define _cairo_lround lround
- #endif
-
- cairo_private uint16_t
- _cairo_half_from_float (float f) cairo_const;
diff --git a/gfx/cairo/max-font-size.patch b/gfx/cairo/max-font-size.patch
deleted file mode 100644
index 99be23906..000000000
--- a/gfx/cairo/max-font-size.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c
---- a/gfx/cairo/cairo/src/cairo-ft-font.c
-+++ b/gfx/cairo/cairo/src/cairo-ft-font.c
-@@ -63,6 +63,10 @@
- /* This is the max number of FT_face objects we keep open at once
- */
- #define MAX_OPEN_FACES 10
-+
-+/* This is the maximum font size we allow to be passed to FT_Set_Char_Size
-+ */
-+#define MAX_FONT_SIZE 1000
-
- /*
- * The simple 2x2 matrix is converted into separate scale and shape
-@@ -682,9 +686,11 @@ _cairo_ft_unscaled_font_set_scale (cairo
- FT_Set_Transform(unscaled->face, &mat, NULL);
-
- if ((unscaled->face->face_flags & FT_FACE_FLAG_SCALABLE) != 0) {
-+ double x_scale = MIN(sf.x_scale, MAX_FONT_SIZE);
-+ double y_scale = MIN(sf.y_scale, MAX_FONT_SIZE);
- error = FT_Set_Char_Size (unscaled->face,
-- sf.x_scale * 64.0 + .5,
-- sf.y_scale * 64.0 + .5,
-+ x_scale * 64.0 + .5,
-+ y_scale * 64.0 + .5,
- 0, 0);
- if (error)
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
diff --git a/gfx/cairo/missing-cairo-clip-init.diff b/gfx/cairo/missing-cairo-clip-init.diff
deleted file mode 100644
index a3f46771f..000000000
--- a/gfx/cairo/missing-cairo-clip-init.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
---- a/gfx/cairo/cairo/src/cairo-gstate.c
-+++ b/gfx/cairo/cairo/src/cairo-gstate.c
-@@ -1841,16 +1841,17 @@ _cairo_gstate_show_text_glyphs (cairo_gs
- transformed_glyphs,
- &num_glyphs,
- transformed_clusters);
-
- if (status || num_glyphs == 0)
- goto CLEANUP_GLYPHS;
-
- _cairo_gstate_copy_transformed_source (gstate, &source_pattern.base);
-+ _cairo_clip_init(&clip);
-
- /* For really huge font sizes, we can just do path;fill instead of
- * show_glyphs, as show_glyphs would put excess pressure on the cache,
- * not all components below us correctly handle huge font sizes, and
- * path filling can be cheaper since parts of glyphs are likely to be
- * clipped out. 256 seems like a good limit. But alas, seems like cairo's
- * rasterizer is something like ten times slower than freetype's for huge
- * sizes. So, no win just yet when we're using cairo's rasterizer.
diff --git a/gfx/cairo/moz.build b/gfx/cairo/moz.build
deleted file mode 100644
index 177484753..000000000
--- a/gfx/cairo/moz.build
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIRS += ['cairo/src']
-
-if CONFIG['MOZ_TREE_PIXMAN']:
- DIRS += ['libpixman/src']
-
diff --git a/gfx/cairo/native-clipping.patch b/gfx/cairo/native-clipping.patch
deleted file mode 100644
index 171998fe7..000000000
--- a/gfx/cairo/native-clipping.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-commit 857df0583365228150b3319475efc43b22077d06
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Tue Apr 20 15:43:54 2010 -0400
-
- native clipping
-
-diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
-index df063bf..819e53e 100644
---- a/src/cairo-quartz-surface.c
-+++ b/src/cairo-quartz-surface.c
-@@ -39,6 +39,8 @@
-
- #include "cairo-quartz-private.h"
- #include "cairo-surface-clipper-private.h"
-+#include "cairo-gstate-private.h"
-+#include "cairo-private.h"
-
- #include <dlfcn.h>
-
-@@ -3095,6 +3097,61 @@ cairo_quartz_surface_get_cg_context (cairo_surface_t *surface)
- return quartz->cgContext;
- }
-
-+CGContextRef
-+cairo_quartz_get_cg_context_with_clip (cairo_t *cr)
-+{
-+
-+ cairo_surface_t *surface = cr->gstate->target;
-+ cairo_clip_t *clip = &cr->gstate->clip;
-+ cairo_status_t status;
-+
-+ cairo_quartz_surface_t *quartz = (cairo_quartz_surface_t*)surface;
-+
-+ if (cairo_surface_get_type(surface) != CAIRO_SURFACE_TYPE_QUARTZ)
-+ return NULL;
-+
-+ if (!clip->path) {
-+ if (clip->all_clipped) {
-+ /* Save the state before we set an empty clip rect so that
-+ * our previous clip will be restored */
-+ CGContextSaveGState (quartz->cgContext);
-+
-+ /* _cairo_surface_clipper_set_clip doesn't deal with
-+ * clip->all_clipped because drawing is normally discarded earlier */
-+ CGRect empty = {{0,0}, {0,0}};
-+ CGContextClipToRect (quartz->cgContext, empty);
-+
-+ return quartz->cgContext;
-+ }
-+
-+ /* an empty clip is represented by NULL */
-+ clip = NULL;
-+ }
-+
-+ status = _cairo_surface_clipper_set_clip (&quartz->clipper, clip);
-+
-+ /* Save the state after we set the clip so that it persists
-+ * after we restore */
-+ CGContextSaveGState (quartz->cgContext);
-+
-+ if (unlikely (status))
-+ return NULL;
-+
-+ return quartz->cgContext;
-+}
-+
-+void
-+cairo_quartz_finish_cg_context_with_clip (cairo_t *cr)
-+{
-+ cairo_surface_t *surface = cr->gstate->target;
-+
-+ cairo_quartz_surface_t *quartz = (cairo_quartz_surface_t*)surface;
-+
-+ if (cairo_surface_get_type(surface) != CAIRO_SURFACE_TYPE_QUARTZ)
-+ return;
-+
-+ CGContextRestoreGState (quartz->cgContext);
-+}
-
- /* Debug stuff */
-
-diff --git a/src/cairo-quartz.h b/src/cairo-quartz.h
-index e8b71ba..aa1cdd2 100644
---- a/src/cairo-quartz.h
-+++ b/src/cairo-quartz.h
-@@ -57,6 +57,12 @@ cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
- cairo_public CGContextRef
- cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
-
-+cairo_public CGContextRef
-+cairo_quartz_get_cg_context_with_clip (cairo_t *cr);
-+
-+cairo_public void
-+cairo_quartz_finish_cg_context_with_clip (cairo_t *cr);
-+
- #if CAIRO_HAS_QUARTZ_FONT
-
- /*
-diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
-index d4575a3..c10e134 100644
---- a/src/cairo-win32-surface.c
-+++ b/src/cairo-win32-surface.c
-@@ -52,7 +52,9 @@
- #include "cairo-win32-private.h"
- #include "cairo-scaled-font-subsets-private.h"
- #include "cairo-surface-fallback-private.h"
--
-+#include "cairo-surface-clipper-private.h"
-+#include "cairo-gstate-private.h"
-+#include "cairo-private.h"
- #include <wchar.h>
- #include <windows.h>
-
-@@ -1914,6 +1916,61 @@ cairo_win32_surface_get_dc (cairo_surface_t *surface)
- return NULL;
- }
-
-+
-+HDC
-+cairo_win32_get_dc_with_clip (cairo_t *cr)
-+{
-+ cairo_surface_t *surface = cr->gstate->target;
-+ cairo_clip_t clip;
-+ _cairo_clip_init_copy(&clip, &cr->gstate->clip);
-+
-+ if (_cairo_surface_is_win32 (surface)){
-+ cairo_win32_surface_t *winsurf = (cairo_win32_surface_t *) surface;
-+ cairo_region_t *clip_region = NULL;
-+ cairo_status_t status;
-+
-+ if (clip.path) {
-+ status = _cairo_clip_get_region (&clip, &clip_region);
-+ assert (status != CAIRO_INT_STATUS_NOTHING_TO_DO);
-+ if (status) {
-+ _cairo_clip_fini(&clip);
-+ return NULL;
-+ }
-+ }
-+ _cairo_win32_surface_set_clip_region (winsurf, clip_region);
-+
-+ _cairo_clip_fini(&clip);
-+ return winsurf->dc;
-+ }
-+
-+ if (_cairo_surface_is_paginated (surface)) {
-+ cairo_surface_t *target;
-+
-+ target = _cairo_paginated_surface_get_target (surface);
-+
-+#ifndef CAIRO_OMIT_WIN32_PRINTING
-+ if (_cairo_surface_is_win32_printing (target)) {
-+ cairo_status_t status;
-+ cairo_win32_surface_t *winsurf = (cairo_win32_surface_t *) target;
-+
-+ status = _cairo_surface_clipper_set_clip (&winsurf->clipper, &clip);
-+
-+ _cairo_clip_fini(&clip);
-+
-+ if (status)
-+ return NULL;
-+
-+ return winsurf->dc;
-+ }
-+#endif
-+ }
-+
-+ _cairo_clip_fini(&clip);
-+ return NULL;
-+}
-+
-+
-+
- /**
- * cairo_win32_surface_get_image
- * @surface: a #cairo_surface_t
-diff --git a/src/cairo-win32.h b/src/cairo-win32.h
-index 7d04d2a..c304f92 100644
---- a/src/cairo-win32.h
-+++ b/src/cairo-win32.h
-@@ -65,6 +65,9 @@ cairo_win32_surface_create_with_dib (cairo_format_t format,
- cairo_public HDC
- cairo_win32_surface_get_dc (cairo_surface_t *surface);
-
-+cairo_public HDC
-+cairo_win32_get_dc_with_clip (cairo_t *cr);
-+
- cairo_public cairo_surface_t *
- cairo_win32_surface_get_image (cairo_surface_t *surface);
-
diff --git a/gfx/cairo/no-pixman-image-reuse-across-threads.patch b/gfx/cairo/no-pixman-image-reuse-across-threads.patch
deleted file mode 100644
index ccaf5a5e6..000000000
--- a/gfx/cairo/no-pixman-image-reuse-across-threads.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-From
-https://cgit.freedesktop.org/cairo/commit/?id=71e8a4c23019b01aa43b334fcb2784c70daae9b5
-https://bugs.freedesktop.org/show_bug.cgi?id=34177
-
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -870,17 +870,17 @@ static cairo_bool_t
- *ty = _pixman_nearest_sample (*ty);
- } else {
- if (*tx != floor (*tx) || *ty != floor (*ty))
- return FALSE;
- }
- return fabs (*tx) < PIXMAN_MAX_INT && fabs (*ty) < PIXMAN_MAX_INT;
- }
-
--#if HAS_ATOMIC_OPS
-+#if PIXMAN_HAS_ATOMIC_OPS
- static pixman_image_t *__pixman_transparent_image;
- static pixman_image_t *__pixman_black_image;
- static pixman_image_t *__pixman_white_image;
-
- static pixman_image_t *
- _pixman_transparent_image (void)
- {
- pixman_image_t *image;
-@@ -964,56 +964,59 @@ static pixman_image_t *
- pixman_image_ref (image);
- }
- } else {
- pixman_image_ref (image);
- }
-
- return image;
- }
--#else
--static pixman_image_t *
--_pixman_transparent_image (void)
--{
-- return _pixman_image_for_solid (&_cairo_pattern_clear);
--}
--static pixman_image_t *
--_pixman_black_image (void)
--{
-- return _pixman_image_for_solid (&_cairo_pattern_black);
--}
--static pixman_image_t *
--_pixman_white_image (void)
--{
-- return _pixman_image_for_solid (&_cairo_pattern_white);
--}
--#endif
-
- static uint32_t
- hars_petruska_f54_1_random (void)
- {
- #define rol(x,k) ((x << k) | (x >> (32-k)))
- static uint32_t x;
- return x = (x ^ rol (x, 5) ^ rol (x, 24)) + 0x37798849;
- #undef rol
- }
-
- static struct {
- cairo_color_t color;
- pixman_image_t *image;
- } cache[16];
- static int n_cached;
-
-+#else /* !PIXMAN_HAS_ATOMIC_OPS */
-+static pixman_image_t *
-+_pixman_transparent_image (void)
-+{
-+ return _pixman_image_for_solid (&_cairo_pattern_clear);
-+}
-+
-+static pixman_image_t *
-+_pixman_black_image (void)
-+{
-+ return _pixman_image_for_solid (&_cairo_pattern_black);
-+}
-+
-+static pixman_image_t *
-+_pixman_white_image (void)
-+{
-+ return _pixman_image_for_solid (&_cairo_pattern_white);
-+}
-+#endif /* !PIXMAN_HAS_ATOMIC_OPS */
-+
- void
- _cairo_image_reset_static_data (void)
- {
-+#if PIXMAN_HAS_ATOMIC_OPS
- while (n_cached)
- pixman_image_unref (cache[--n_cached].image);
-
--#if HAS_ATOMIC_OPS
- if (__pixman_transparent_image) {
- pixman_image_unref (__pixman_transparent_image);
- __pixman_transparent_image = NULL;
- }
-
- if (__pixman_black_image) {
- pixman_image_unref (__pixman_black_image);
- __pixman_black_image = NULL;
-@@ -1026,19 +1029,20 @@ void
- #endif
- }
-
- static pixman_image_t *
- _pixman_image_for_solid (const cairo_solid_pattern_t *pattern)
- {
- pixman_color_t color;
- pixman_image_t *image;
-+
-+#if PIXMAN_HAS_ATOMIC_OPS
- int i;
-
--#if HAS_ATOMIC_OPS
- if (pattern->color.alpha_short <= 0x00ff)
- return _pixman_transparent_image ();
-
- if (pattern->color.alpha_short >= 0xff00) {
- if (pattern->color.red_short <= 0x00ff &&
- pattern->color.green_short <= 0x00ff &&
- pattern->color.blue_short <= 0x00ff)
- {
-@@ -1047,46 +1051,48 @@ static pixman_image_t *
-
- if (pattern->color.red_short >= 0xff00 &&
- pattern->color.green_short >= 0xff00 &&
- pattern->color.blue_short >= 0xff00)
- {
- return _pixman_white_image ();
- }
- }
--#endif
-
- CAIRO_MUTEX_LOCK (_cairo_image_solid_cache_mutex);
- for (i = 0; i < n_cached; i++) {
- if (_cairo_color_equal (&cache[i].color, &pattern->color)) {
- image = pixman_image_ref (cache[i].image);
- goto UNLOCK;
- }
- }
-+#endif
-
- color.red = pattern->color.red_short;
- color.green = pattern->color.green_short;
- color.blue = pattern->color.blue_short;
- color.alpha = pattern->color.alpha_short;
-
- image = pixman_image_create_solid_fill (&color);
-+#if PIXMAN_HAS_ATOMIC_OPS
- if (image == NULL)
- goto UNLOCK;
-
- if (n_cached < ARRAY_LENGTH (cache)) {
- i = n_cached++;
- } else {
- i = hars_petruska_f54_1_random () % ARRAY_LENGTH (cache);
- pixman_image_unref (cache[i].image);
- }
- cache[i].image = pixman_image_ref (image);
- cache[i].color = pattern->color;
-
- UNLOCK:
- CAIRO_MUTEX_UNLOCK (_cairo_image_solid_cache_mutex);
-+#endif
- return image;
- }
-
- static double
- clamp (double val, double min, double max)
- {
- return val < min ? min : (val > max ? max : val);
- }
-@@ -1423,25 +1429,27 @@ static pixman_image_t *
- return _pixman_transparent_image ();
- }
- else
- {
- return _pixel_to_solid (source, sample.x, sample.y);
- }
- }
-
-+#if PIXMAN_HAS_ATOMIC_OPS
- /* avoid allocating a 'pattern' image if we can reuse the original */
- if (extend == CAIRO_EXTEND_NONE &&
- _cairo_matrix_is_translation (&pattern->base.matrix) &&
- _nearest_sample (filter, &tx, &ty))
- {
- *ix = tx;
- *iy = ty;
- return pixman_image_ref (source->pixman_image);
- }
-+#endif
-
- pixman_image = pixman_image_create_bits (source->pixman_format,
- source->width,
- source->height,
- (uint32_t *) source->data,
- source->stride);
- if (unlikely (pixman_image == NULL))
- return NULL;
-@@ -1466,31 +1474,36 @@ static pixman_image_t *
- sub->extents.x + sample.x,
- sub->extents.y + sample.y);
- } else {
- if (extend == CAIRO_EXTEND_NONE)
- return _pixman_transparent_image ();
- }
- }
-
-+#if PIXMAN_HAS_ATOMIC_OPS
- if (is_contained &&
- _cairo_matrix_is_translation (&pattern->base.matrix) &&
- _nearest_sample (filter, &tx, &ty))
- {
- *ix = tx + sub->extents.x;
- *iy = ty + sub->extents.y;
- return pixman_image_ref (source->pixman_image);
- }
-+#endif
-
- /* Avoid sub-byte offsets, force a copy in that case. */
- if (PIXMAN_FORMAT_BPP (source->pixman_format) >= 8) {
-+ void *data = source->data
-+ + sub->extents.x * PIXMAN_FORMAT_BPP(source->pixman_format)/8
-+ + sub->extents.y * source->stride;
- pixman_image = pixman_image_create_bits (source->pixman_format,
- sub->extents.width,
- sub->extents.height,
-- (uint32_t *) (source->data + sub->extents.x * PIXMAN_FORMAT_BPP(source->pixman_format)/8 + sub->extents.y * source->stride),
-+ data,
- source->stride);
- if (unlikely (pixman_image == NULL))
- return NULL;
- }
- }
- }
-
- if (pixman_image == NULL) {
diff --git a/gfx/cairo/nonfatal-assertions.patch b/gfx/cairo/nonfatal-assertions.patch
deleted file mode 100644
index dcbb904ab..000000000
--- a/gfx/cairo/nonfatal-assertions.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -r b79d47dad1ea gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h Fri Jun 08 18:09:53 2007 -0700
-+++ b/gfx/cairo/cairo/src/cairoint.h Fri Jun 29 09:18:02 2007 +0200
-@@ -159,6 +159,13 @@ CAIRO_BEGIN_DECLS
-
- #ifndef M_PI
- #define M_PI 3.14159265358979323846
-+#endif
-+
-+#ifndef NDEBUG
-+#undef assert
-+#define assert(expr) \
-+ do { if (!(expr)) fprintf(stderr, "Assertion failed at %s:%d: %s\n", \
-+ __FILE__, __LINE__, #expr); } while (0)
- #endif
-
- #undef ARRAY_LENGTH
diff --git a/gfx/cairo/on-edge.patch b/gfx/cairo/on-edge.patch
deleted file mode 100644
index 85e328ad8..000000000
--- a/gfx/cairo/on-edge.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-commit a26655b3144ed273940486fc15ccdac12b0562ec
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Tue Mar 17 15:08:50 2009 -0400
-
- Jeff Muizelaar noted that the treatment of edges differed with firefox's
- canvas definition, which considers a point on any edge as inside. The
- current implementation has a similar definition to that of flash, for
- which the top and right edges are outside. Arguably, firefox has the more
- intuitive definition here...
-
-diff --git a/src/cairo-path-in-fill.c b/src/cairo-path-in-fill.c
-index 21cd0bd..e641654 100644
---- a/src/cairo-path-in-fill.c
-+++ b/src/cairo-path-in-fill.c
-@@ -41,6 +41,7 @@ typedef struct cairo_in_fill {
- int winding;
-
- cairo_fixed_t x, y;
-+ cairo_bool_t on_edge;
-
- cairo_bool_t has_current_point;
- cairo_point_t current_point;
-@@ -58,6 +59,7 @@ _cairo_in_fill_init (cairo_in_fill_t *in_fill,
-
- in_fill->x = _cairo_fixed_from_double (x);
- in_fill->y = _cairo_fixed_from_double (y);
-+ in_fill->on_edge = FALSE;
-
- in_fill->has_current_point = FALSE;
- in_fill->current_point.x = 0;
-@@ -103,6 +105,9 @@ _cairo_in_fill_add_edge (cairo_in_fill_t *in_fill,
- {
- int dir;
-
-+ if (in_fill->on_edge)
-+ return;
-+
- /* count the number of edge crossing to -∞ */
-
- dir = 1;
-@@ -116,6 +121,18 @@ _cairo_in_fill_add_edge (cairo_in_fill_t *in_fill,
- dir = -1;
- }
-
-+ /* First check whether the query is on an edge */
-+ if ((p1->x == in_fill->x && p1->x == in_fill->y) ||
-+ (p2->x == in_fill->x && p2->x == in_fill->y) ||
-+ (! (p2->y < in_fill->y || p1->y > in_fill->y) &&
-+ ! (p1->x > in_fill->x && p2->x > in_fill->x) &&
-+ ! (p1->x < in_fill->x && p2->x < in_fill->x) &&
-+ edge_compare_for_y_against_x (p1, p2, in_fill->y, in_fill->x) == 0))
-+ {
-+ in_fill->on_edge = TRUE;
-+ return;
-+ }
-+
- /* edge is entirely above or below, note the shortening rule */
- if (p2->y <= in_fill->y || p1->y > in_fill->y)
- return;
-@@ -246,7 +263,9 @@ _cairo_path_fixed_in_fill (cairo_path_fixed_t *path,
-
- _cairo_in_fill_close_path (&in_fill);
-
-- switch (fill_rule) {
-+ if (in_fill.on_edge) {
-+ *is_inside = TRUE;
-+ } else switch (fill_rule) {
- case CAIRO_FILL_RULE_EVEN_ODD:
- *is_inside = in_fill.winding & 1;
- break;
diff --git a/gfx/cairo/pattern_get_surface-no-error.patch b/gfx/cairo/pattern_get_surface-no-error.patch
deleted file mode 100644
index 93f08512d..000000000
--- a/gfx/cairo/pattern_get_surface-no-error.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1294019288 -46800
-# Node ID e427b4ea7e2ff980769e1acd92f4730c5ed3654f
-# Parent bacc54d452a9fddb5a0d6a1442ec7be4de81ffa7
-Bug 593604. Part 2.5: cairo_pattern_get_surface should not call cairo_error. r=jrmuizel,a=blocking
-
-diff --git a/gfx/cairo/cairo/src/cairo-pattern.c b/gfx/cairo/cairo/src/cairo-pattern.c
---- a/gfx/cairo/cairo/src/cairo-pattern.c
-+++ b/gfx/cairo/cairo/src/cairo-pattern.c
-@@ -2940,17 +2940,17 @@ cairo_pattern_get_surface (cairo_pattern
- cairo_surface_t **surface)
- {
- cairo_surface_pattern_t *spat = (cairo_surface_pattern_t*) pattern;
-
- if (pattern->status)
- return pattern->status;
-
- if (pattern->type != CAIRO_PATTERN_TYPE_SURFACE)
-- return _cairo_error (CAIRO_STATUS_PATTERN_TYPE_MISMATCH);
-+ return CAIRO_STATUS_PATTERN_TYPE_MISMATCH;
-
- if (surface)
- *surface = spat->surface;
-
- return CAIRO_STATUS_SUCCESS;
- }
-
- /**
diff --git a/gfx/cairo/pixman-16-bit-pipeline.patch b/gfx/cairo/pixman-16-bit-pipeline.patch
deleted file mode 100644
index 8a7878ca2..000000000
--- a/gfx/cairo/pixman-16-bit-pipeline.patch
+++ /dev/null
@@ -1,1242 +0,0 @@
-diff --git a/gfx/cairo/libpixman/src/pixman-access.c b/gfx/cairo/libpixman/src/pixman-access.c
---- a/gfx/cairo/libpixman/src/pixman-access.c
-+++ b/gfx/cairo/libpixman/src/pixman-access.c
-@@ -933,16 +933,54 @@ store_scanline_x2b10g10r10 (bits_image_t
- {
- WRITE (image, pixel++,
- ((values[i] >> 38) & 0x3ff) |
- ((values[i] >> 12) & 0xffc00) |
- ((values[i] << 14) & 0x3ff00000));
- }
- }
-
-+static void
-+store_scanline_16 (bits_image_t * image,
-+ int x,
-+ int y,
-+ int width,
-+ const uint32_t *v)
-+{
-+ uint16_t *bits = (uint16_t*)(image->bits + image->rowstride * y);
-+ uint16_t *values = (uint16_t *)v;
-+ uint16_t *pixel = bits + x;
-+ int i;
-+
-+ for (i = 0; i < width; ++i)
-+ {
-+ WRITE (image, pixel++, values[i]);
-+ }
-+}
-+
-+static void
-+fetch_scanline_16 (pixman_image_t *image,
-+ int x,
-+ int y,
-+ int width,
-+ uint32_t * b,
-+ const uint32_t *mask)
-+{
-+ const uint16_t *bits = (uint16_t*)(image->bits.bits + y * image->bits.rowstride);
-+ const uint16_t *pixel = bits + x;
-+ int i;
-+ uint16_t *buffer = (uint16_t *)b;
-+
-+ for (i = 0; i < width; ++i)
-+ {
-+ *buffer++ = READ (image, pixel++);
-+ }
-+}
-+
-+
- /*
- * Contracts a 64bpp image to 32bpp and then stores it using a regular 32-bit
- * store proc. Despite the type, this function expects a uint64_t buffer.
- */
- static void
- store_scanline_generic_64 (bits_image_t * image,
- int x,
- int y,
-@@ -1044,32 +1082,47 @@ fetch_pixel_generic_lossy_32 (bits_image
- pixman_contract (&result, &pixel64, 1);
-
- return result;
- }
-
- typedef struct
- {
- pixman_format_code_t format;
-+ fetch_scanline_t fetch_scanline_16;
- fetch_scanline_t fetch_scanline_32;
- fetch_scanline_t fetch_scanline_64;
- fetch_pixel_32_t fetch_pixel_32;
- fetch_pixel_64_t fetch_pixel_64;
-+ store_scanline_t store_scanline_16;
- store_scanline_t store_scanline_32;
- store_scanline_t store_scanline_64;
- } format_info_t;
-
- #define FORMAT_INFO(format) \
- { \
- PIXMAN_ ## format, \
-+ NULL, \
- fetch_scanline_ ## format, \
- fetch_scanline_generic_64, \
- fetch_pixel_ ## format, fetch_pixel_generic_64, \
-+ NULL, \
- store_scanline_ ## format, store_scanline_generic_64 \
- }
-+#define FORMAT_INFO16(format) \
-+ { \
-+ PIXMAN_ ## format, \
-+ fetch_scanline_16, \
-+ fetch_scanline_ ## format, \
-+ fetch_scanline_generic_64, \
-+ fetch_pixel_ ## format, fetch_pixel_generic_64, \
-+ store_scanline_16, \
-+ store_scanline_ ## format, store_scanline_generic_64 \
-+ }
-+
-
- static const format_info_t accessors[] =
- {
- /* 32 bpp formats */
- FORMAT_INFO (a8r8g8b8),
- FORMAT_INFO (x8r8g8b8),
- FORMAT_INFO (a8b8g8r8),
- FORMAT_INFO (x8b8g8r8),
-@@ -1079,18 +1132,18 @@ static const format_info_t accessors[] =
- FORMAT_INFO (r8g8b8x8),
- FORMAT_INFO (x14r6g6b6),
-
- /* 24bpp formats */
- FORMAT_INFO (r8g8b8),
- FORMAT_INFO (b8g8r8),
-
- /* 16bpp formats */
-- FORMAT_INFO (r5g6b5),
-- FORMAT_INFO (b5g6r5),
-+ FORMAT_INFO16 (r5g6b5),
-+ FORMAT_INFO16 (b5g6r5),
-
- FORMAT_INFO (a1r5g5b5),
- FORMAT_INFO (x1r5g5b5),
- FORMAT_INFO (a1b5g5r5),
- FORMAT_INFO (x1b5g5r5),
- FORMAT_INFO (a4r4g4b4),
- FORMAT_INFO (x4r4g4b4),
- FORMAT_INFO (a4b4g4r4),
-@@ -1132,62 +1185,64 @@ static const format_info_t accessors[] =
-
- /* 1bpp formats */
- FORMAT_INFO (a1),
- FORMAT_INFO (g1),
-
- /* Wide formats */
-
- { PIXMAN_a2r10g10b10,
-- NULL, fetch_scanline_a2r10g10b10,
-+ NULL, NULL, fetch_scanline_a2r10g10b10,
- fetch_pixel_generic_lossy_32, fetch_pixel_a2r10g10b10,
- NULL, store_scanline_a2r10g10b10 },
-
- { PIXMAN_x2r10g10b10,
-- NULL, fetch_scanline_x2r10g10b10,
-+ NULL, NULL, fetch_scanline_x2r10g10b10,
- fetch_pixel_generic_lossy_32, fetch_pixel_x2r10g10b10,
- NULL, store_scanline_x2r10g10b10 },
-
- { PIXMAN_a2b10g10r10,
-- NULL, fetch_scanline_a2b10g10r10,
-+ NULL, NULL, fetch_scanline_a2b10g10r10,
- fetch_pixel_generic_lossy_32, fetch_pixel_a2b10g10r10,
- NULL, store_scanline_a2b10g10r10 },
-
- { PIXMAN_x2b10g10r10,
-- NULL, fetch_scanline_x2b10g10r10,
-+ NULL, NULL, fetch_scanline_x2b10g10r10,
- fetch_pixel_generic_lossy_32, fetch_pixel_x2b10g10r10,
- NULL, store_scanline_x2b10g10r10 },
-
- /* YUV formats */
- { PIXMAN_yuy2,
-- fetch_scanline_yuy2, fetch_scanline_generic_64,
-+ NULL, fetch_scanline_yuy2, fetch_scanline_generic_64,
- fetch_pixel_yuy2, fetch_pixel_generic_64,
- NULL, NULL },
-
- { PIXMAN_yv12,
-- fetch_scanline_yv12, fetch_scanline_generic_64,
-+ NULL, fetch_scanline_yv12, fetch_scanline_generic_64,
- fetch_pixel_yv12, fetch_pixel_generic_64,
- NULL, NULL },
-
- { PIXMAN_null },
- };
-
- static void
- setup_accessors (bits_image_t *image)
- {
- const format_info_t *info = accessors;
-
- while (info->format != PIXMAN_null)
- {
- if (info->format == image->format)
- {
-+ image->fetch_scanline_16 = info->fetch_scanline_16;
- image->fetch_scanline_32 = info->fetch_scanline_32;
- image->fetch_scanline_64 = info->fetch_scanline_64;
- image->fetch_pixel_32 = info->fetch_pixel_32;
- image->fetch_pixel_64 = info->fetch_pixel_64;
-+ image->store_scanline_16 = info->store_scanline_16;
- image->store_scanline_32 = info->store_scanline_32;
- image->store_scanline_64 = info->store_scanline_64;
-
- return;
- }
-
- info++;
- }
-diff --git a/gfx/cairo/libpixman/src/pixman-bits-image.c b/gfx/cairo/libpixman/src/pixman-bits-image.c
---- a/gfx/cairo/libpixman/src/pixman-bits-image.c
-+++ b/gfx/cairo/libpixman/src/pixman-bits-image.c
-@@ -1247,16 +1247,31 @@ src_get_scanline_wide (pixman_iter_t *it
-
- void
- _pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter)
- {
- if (iter->flags & ITER_NARROW)
- iter->get_scanline = src_get_scanline_narrow;
- else
- iter->get_scanline = src_get_scanline_wide;
-+
-+}
-+
-+static uint32_t *
-+dest_get_scanline_16 (pixman_iter_t *iter, const uint32_t *mask)
-+{
-+ pixman_image_t *image = iter->image;
-+ int x = iter->x;
-+ int y = iter->y;
-+ int width = iter->width;
-+ uint32_t * buffer = iter->buffer;
-+
-+ image->bits.fetch_scanline_16 (image, x, y, width, buffer, mask);
-+
-+ return iter->buffer;
- }
-
- static uint32_t *
- dest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask)
- {
- pixman_image_t *image = iter->image;
- int x = iter->x;
- int y = iter->y;
-@@ -1327,16 +1342,30 @@ dest_get_scanline_wide (pixman_iter_t *i
- free (alpha);
- }
- }
-
- return iter->buffer;
- }
-
- static void
-+dest_write_back_16 (pixman_iter_t *iter)
-+{
-+ bits_image_t * image = &iter->image->bits;
-+ int x = iter->x;
-+ int y = iter->y;
-+ int width = iter->width;
-+ const uint32_t *buffer = iter->buffer;
-+
-+ image->store_scanline_16 (image, x, y, width, buffer);
-+
-+ iter->y++;
-+}
-+
-+static void
- dest_write_back_narrow (pixman_iter_t *iter)
- {
- bits_image_t * image = &iter->image->bits;
- int x = iter->x;
- int y = iter->y;
- int width = iter->width;
- const uint32_t *buffer = iter->buffer;
-
-@@ -1375,28 +1404,41 @@ dest_write_back_wide (pixman_iter_t *ite
- }
-
- iter->y++;
- }
-
- void
- _pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter)
- {
-- if (iter->flags & ITER_NARROW)
-+ if (iter->flags & ITER_16)
-+ {
-+ if ((iter->flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) ==
-+ (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA))
-+ {
-+ iter->get_scanline = _pixman_iter_get_scanline_noop;
-+ }
-+ else
-+ {
-+ iter->get_scanline = dest_get_scanline_16;
-+ }
-+ iter->write_back = dest_write_back_16;
-+ }
-+ else if (iter->flags & ITER_NARROW)
- {
- if ((iter->flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) ==
- (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA))
- {
- iter->get_scanline = _pixman_iter_get_scanline_noop;
- }
- else
- {
- iter->get_scanline = dest_get_scanline_narrow;
- }
--
-+
- iter->write_back = dest_write_back_narrow;
- }
- else
- {
- iter->get_scanline = dest_get_scanline_wide;
- iter->write_back = dest_write_back_wide;
- }
- }
-diff --git a/gfx/cairo/libpixman/src/pixman-combine16.c b/gfx/cairo/libpixman/src/pixman-combine16.c
-new file mode 100644
---- /dev/null
-+++ b/gfx/cairo/libpixman/src/pixman-combine16.c
-@@ -0,0 +1,124 @@
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+#include <math.h>
-+#include <string.h>
-+
-+#include "pixman-private.h"
-+
-+#include "pixman-combine32.h"
-+
-+static force_inline uint32_t
-+combine_mask (const uint32_t src, const uint32_t mask)
-+{
-+ uint32_t s, m;
-+
-+ m = mask >> A_SHIFT;
-+
-+ if (!m)
-+ return 0;
-+ s = src;
-+
-+ UN8x4_MUL_UN8 (s, m);
-+
-+ return s;
-+}
-+
-+static inline uint32_t convert_0565_to_8888(uint16_t color)
-+{
-+ return CONVERT_0565_TO_8888(color);
-+}
-+
-+static inline uint16_t convert_8888_to_0565(uint32_t color)
-+{
-+ return CONVERT_8888_TO_0565(color);
-+}
-+
-+static void
-+combine_src_u (pixman_implementation_t *imp,
-+ pixman_op_t op,
-+ uint32_t * dest,
-+ const uint32_t * src,
-+ const uint32_t * mask,
-+ int width)
-+{
-+ int i;
-+
-+ if (!mask)
-+ memcpy (dest, src, width * sizeof (uint16_t));
-+ else
-+ {
-+ uint16_t *d = (uint16_t*)dest;
-+ uint16_t *src16 = (uint16_t*)src;
-+ for (i = 0; i < width; ++i)
-+ {
-+ if ((*mask & 0xff000000) == 0xff000000) {
-+ // it's likely worth special casing
-+ // fully opaque because it avoids
-+ // the cost of conversion as well the multiplication
-+ *(d + i) = *src16;
-+ } else {
-+ // the mask is still 32bits
-+ uint32_t s = combine_mask (convert_0565_to_8888(*src16), *mask);
-+ *(d + i) = convert_8888_to_0565(s);
-+ }
-+ mask++;
-+ src16++;
-+ }
-+ }
-+
-+}
-+
-+static void
-+combine_over_u (pixman_implementation_t *imp,
-+ pixman_op_t op,
-+ uint32_t * dest,
-+ const uint32_t * src,
-+ const uint32_t * mask,
-+ int width)
-+{
-+ int i;
-+
-+ if (!mask)
-+ memcpy (dest, src, width * sizeof (uint16_t));
-+ else
-+ {
-+ uint16_t *d = (uint16_t*)dest;
-+ uint16_t *src16 = (uint16_t*)src;
-+ for (i = 0; i < width; ++i)
-+ {
-+ if ((*mask & 0xff000000) == 0xff000000) {
-+ // it's likely worth special casing
-+ // fully opaque because it avoids
-+ // the cost of conversion as well the multiplication
-+ *(d + i) = *src16;
-+ } else if ((*mask & 0xff000000) == 0x00000000) {
-+ // keep the dest the same
-+ } else {
-+ // the mask is still 32bits
-+ uint32_t s = combine_mask (convert_0565_to_8888(*src16), *mask);
-+ uint32_t ia = ALPHA_8 (~s);
-+ uint32_t d32 = convert_0565_to_8888(*(d + i));
-+ UN8x4_MUL_UN8_ADD_UN8x4 (d32, ia, s);
-+ *(d + i) = convert_8888_to_0565(d32);
-+ }
-+ mask++;
-+ src16++;
-+ }
-+ }
-+
-+}
-+
-+
-+void
-+_pixman_setup_combiner_functions_16 (pixman_implementation_t *imp)
-+{
-+ int i;
-+ for (i = 0; i < PIXMAN_N_OPERATORS; i++) {
-+ imp->combine_16[i] = NULL;
-+ }
-+ imp->combine_16[PIXMAN_OP_SRC] = combine_src_u;
-+ imp->combine_16[PIXMAN_OP_OVER] = combine_over_u;
-+}
-+
-diff --git a/gfx/cairo/libpixman/src/pixman-general.c b/gfx/cairo/libpixman/src/pixman-general.c
---- a/gfx/cairo/libpixman/src/pixman-general.c
-+++ b/gfx/cairo/libpixman/src/pixman-general.c
-@@ -106,46 +106,61 @@ general_composite_rect (pixman_implemen
- PIXMAN_COMPOSITE_ARGS (info);
- uint64_t stack_scanline_buffer[(SCANLINE_BUFFER_LENGTH * 3 + 7) / 8];
- uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
- uint8_t *src_buffer, *mask_buffer, *dest_buffer;
- pixman_iter_t src_iter, mask_iter, dest_iter;
- pixman_combine_32_func_t compose;
- pixman_bool_t component_alpha;
- iter_flags_t narrow, src_flags;
-+ iter_flags_t rgb16;
- int Bpp;
- int i;
-
- if ((src_image->common.flags & FAST_PATH_NARROW_FORMAT) &&
- (!mask_image || mask_image->common.flags & FAST_PATH_NARROW_FORMAT) &&
- (dest_image->common.flags & FAST_PATH_NARROW_FORMAT))
- {
- narrow = ITER_NARROW;
- Bpp = 4;
- }
- else
- {
- narrow = 0;
- Bpp = 8;
- }
-
-+ // XXX: This special casing is bad. Ideally, we'd keep the general code general perhaps
-+ // by having it deal more specifically with different intermediate formats
-+ if (
-+ (dest_image->common.flags & FAST_PATH_16_FORMAT && (src_image->type == LINEAR || src_image->type == RADIAL)) &&
-+ ( op == PIXMAN_OP_SRC ||
-+ (op == PIXMAN_OP_OVER && (src_image->common.flags & FAST_PATH_IS_OPAQUE))
-+ )
-+ ) {
-+ rgb16 = ITER_16;
-+ } else {
-+ rgb16 = 0;
-+ }
-+
-+
- if (width * Bpp > SCANLINE_BUFFER_LENGTH)
- {
- scanline_buffer = pixman_malloc_abc (width, 3, Bpp);
-
- if (!scanline_buffer)
- return;
- }
-
- src_buffer = scanline_buffer;
- mask_buffer = src_buffer + width * Bpp;
- dest_buffer = mask_buffer + width * Bpp;
-
- /* src iter */
-- src_flags = narrow | op_flags[op].src;
-+ src_flags = narrow | op_flags[op].src | rgb16;
-
- _pixman_implementation_src_iter_init (imp->toplevel, &src_iter, src_image,
- src_x, src_y, width, height,
- src_buffer, src_flags);
-
- /* mask iter */
- if ((src_flags & (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB)) ==
- (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB))
-@@ -164,20 +179,20 @@ general_composite_rect (pixman_implemen
-
- _pixman_implementation_src_iter_init (
- imp->toplevel, &mask_iter, mask_image, mask_x, mask_y, width, height,
- mask_buffer, narrow | (component_alpha? 0 : ITER_IGNORE_RGB));
-
- /* dest iter */
- _pixman_implementation_dest_iter_init (
- imp->toplevel, &dest_iter, dest_image, dest_x, dest_y, width, height,
-- dest_buffer, narrow | op_flags[op].dst);
-+ dest_buffer, narrow | op_flags[op].dst | rgb16);
-
- compose = _pixman_implementation_lookup_combiner (
-- imp->toplevel, op, component_alpha, narrow);
-+ imp->toplevel, op, component_alpha, narrow, !!rgb16);
-
- if (!compose)
- return;
-
- for (i = 0; i < height; ++i)
- {
- uint32_t *s, *m, *d;
-
-@@ -234,16 +249,17 @@ general_fill (pixman_implementation_t *i
- return FALSE;
- }
-
- pixman_implementation_t *
- _pixman_implementation_create_general (void)
- {
- pixman_implementation_t *imp = _pixman_implementation_create (NULL, general_fast_path);
-
-+ _pixman_setup_combiner_functions_16 (imp);
- _pixman_setup_combiner_functions_32 (imp);
- _pixman_setup_combiner_functions_64 (imp);
-
- imp->blt = general_blt;
- imp->fill = general_fill;
- imp->src_iter_init = general_src_iter_init;
- imp->dest_iter_init = general_dest_iter_init;
-
-diff --git a/gfx/cairo/libpixman/src/pixman-image.c b/gfx/cairo/libpixman/src/pixman-image.c
---- a/gfx/cairo/libpixman/src/pixman-image.c
-+++ b/gfx/cairo/libpixman/src/pixman-image.c
-@@ -451,16 +451,20 @@ compute_image_info (pixman_image_t *imag
- flags |= FAST_PATH_IS_OPAQUE;
- }
-
- if (image->bits.read_func || image->bits.write_func)
- flags &= ~FAST_PATH_NO_ACCESSORS;
-
- if (PIXMAN_FORMAT_IS_WIDE (image->bits.format))
- flags &= ~FAST_PATH_NARROW_FORMAT;
-+
-+ if (image->bits.format == PIXMAN_r5g6b5)
-+ flags |= FAST_PATH_16_FORMAT;
-+
- break;
-
- case RADIAL:
- code = PIXMAN_unknown;
-
- /*
- * As explained in pixman-radial-gradient.c, every point of
- * the plane has a valid associated radius (and thus will be
-diff --git a/gfx/cairo/libpixman/src/pixman-implementation.c b/gfx/cairo/libpixman/src/pixman-implementation.c
---- a/gfx/cairo/libpixman/src/pixman-implementation.c
-+++ b/gfx/cairo/libpixman/src/pixman-implementation.c
-@@ -101,45 +101,51 @@ pixman_implementation_t *
- imp->fill = delegate_fill;
- imp->src_iter_init = delegate_src_iter_init;
- imp->dest_iter_init = delegate_dest_iter_init;
-
- imp->fast_paths = fast_paths;
-
- for (i = 0; i < PIXMAN_N_OPERATORS; ++i)
- {
-+ imp->combine_16[i] = NULL;
- imp->combine_32[i] = NULL;
- imp->combine_64[i] = NULL;
- imp->combine_32_ca[i] = NULL;
- imp->combine_64_ca[i] = NULL;
- }
-
- return imp;
- }
-
- pixman_combine_32_func_t
- _pixman_implementation_lookup_combiner (pixman_implementation_t *imp,
- pixman_op_t op,
- pixman_bool_t component_alpha,
-- pixman_bool_t narrow)
-+ pixman_bool_t narrow,
-+ pixman_bool_t rgb16)
- {
- pixman_combine_32_func_t f;
-
- do
- {
- pixman_combine_32_func_t (*combiners[]) =
- {
- (pixman_combine_32_func_t *)imp->combine_64,
- (pixman_combine_32_func_t *)imp->combine_64_ca,
- imp->combine_32,
- imp->combine_32_ca,
-+ (pixman_combine_32_func_t *)imp->combine_16,
-+ NULL,
- };
--
-- f = combiners[component_alpha | (narrow << 1)][op];
--
-+ if (rgb16) {
-+ f = combiners[4][op];
-+ } else {
-+ f = combiners[component_alpha + (narrow << 1)][op];
-+ }
- imp = imp->delegate;
- }
- while (!f);
-
- return f;
- }
-
- pixman_bool_t
-diff --git a/gfx/cairo/libpixman/src/pixman-linear-gradient.c b/gfx/cairo/libpixman/src/pixman-linear-gradient.c
---- a/gfx/cairo/libpixman/src/pixman-linear-gradient.c
-+++ b/gfx/cairo/libpixman/src/pixman-linear-gradient.c
-@@ -217,42 +217,185 @@ linear_get_scanline_narrow (pixman_iter_
- }
- }
-
- iter->y++;
-
- return iter->buffer;
- }
-
-+static uint16_t convert_8888_to_0565(uint32_t color)
-+{
-+ return CONVERT_8888_TO_0565(color);
-+}
-+
-+static uint32_t *
-+linear_get_scanline_16 (pixman_iter_t *iter,
-+ const uint32_t *mask)
-+{
-+ pixman_image_t *image = iter->image;
-+ int x = iter->x;
-+ int y = iter->y;
-+ int width = iter->width;
-+ uint16_t * buffer = (uint16_t*)iter->buffer;
-+
-+ pixman_vector_t v, unit;
-+ pixman_fixed_32_32_t l;
-+ pixman_fixed_48_16_t dx, dy;
-+ gradient_t *gradient = (gradient_t *)image;
-+ linear_gradient_t *linear = (linear_gradient_t *)image;
-+ uint16_t *end = buffer + width;
-+ pixman_gradient_walker_t walker;
-+
-+ _pixman_gradient_walker_init (&walker, gradient, image->common.repeat);
-+
-+ /* reference point is the center of the pixel */
-+ v.vector[0] = pixman_int_to_fixed (x) + pixman_fixed_1 / 2;
-+ v.vector[1] = pixman_int_to_fixed (y) + pixman_fixed_1 / 2;
-+ v.vector[2] = pixman_fixed_1;
-+
-+ if (image->common.transform)
-+ {
-+ if (!pixman_transform_point_3d (image->common.transform, &v))
-+ return iter->buffer;
-+
-+ unit.vector[0] = image->common.transform->matrix[0][0];
-+ unit.vector[1] = image->common.transform->matrix[1][0];
-+ unit.vector[2] = image->common.transform->matrix[2][0];
-+ }
-+ else
-+ {
-+ unit.vector[0] = pixman_fixed_1;
-+ unit.vector[1] = 0;
-+ unit.vector[2] = 0;
-+ }
-+
-+ dx = linear->p2.x - linear->p1.x;
-+ dy = linear->p2.y - linear->p1.y;
-+
-+ l = dx * dx + dy * dy;
-+
-+ if (l == 0 || unit.vector[2] == 0)
-+ {
-+ /* affine transformation only */
-+ pixman_fixed_32_32_t t, next_inc;
-+ double inc;
-+
-+ if (l == 0 || v.vector[2] == 0)
-+ {
-+ t = 0;
-+ inc = 0;
-+ }
-+ else
-+ {
-+ double invden, v2;
-+
-+ invden = pixman_fixed_1 * (double) pixman_fixed_1 /
-+ (l * (double) v.vector[2]);
-+ v2 = v.vector[2] * (1. / pixman_fixed_1);
-+ t = ((dx * v.vector[0] + dy * v.vector[1]) -
-+ (dx * linear->p1.x + dy * linear->p1.y) * v2) * invden;
-+ inc = (dx * unit.vector[0] + dy * unit.vector[1]) * invden;
-+ }
-+ next_inc = 0;
-+
-+ if (((pixman_fixed_32_32_t )(inc * width)) == 0)
-+ {
-+ register uint16_t color;
-+
-+ color = convert_8888_to_0565(_pixman_gradient_walker_pixel (&walker, t));
-+ while (buffer < end)
-+ *buffer++ = color;
-+ }
-+ else
-+ {
-+ int i;
-+
-+ i = 0;
-+ while (buffer < end)
-+ {
-+ if (!mask || *mask++)
-+ {
-+ *buffer = convert_8888_to_0565(_pixman_gradient_walker_pixel (&walker,
-+ t + next_inc));
-+ }
-+ i++;
-+ next_inc = inc * i;
-+ buffer++;
-+ }
-+ }
-+ }
-+ else
-+ {
-+ /* projective transformation */
-+ double t;
-+
-+ t = 0;
-+
-+ while (buffer < end)
-+ {
-+ if (!mask || *mask++)
-+ {
-+ if (v.vector[2] != 0)
-+ {
-+ double invden, v2;
-+
-+ invden = pixman_fixed_1 * (double) pixman_fixed_1 /
-+ (l * (double) v.vector[2]);
-+ v2 = v.vector[2] * (1. / pixman_fixed_1);
-+ t = ((dx * v.vector[0] + dy * v.vector[1]) -
-+ (dx * linear->p1.x + dy * linear->p1.y) * v2) * invden;
-+ }
-+
-+ *buffer = convert_8888_to_0565(_pixman_gradient_walker_pixel (&walker, t));
-+ }
-+
-+ ++buffer;
-+
-+ v.vector[0] += unit.vector[0];
-+ v.vector[1] += unit.vector[1];
-+ v.vector[2] += unit.vector[2];
-+ }
-+ }
-+
-+ iter->y++;
-+
-+ return iter->buffer;
-+}
-+
- static uint32_t *
- linear_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
- {
- uint32_t *buffer = linear_get_scanline_narrow (iter, NULL);
-
- pixman_expand ((uint64_t *)buffer, buffer, PIXMAN_a8r8g8b8, iter->width);
-
- return buffer;
- }
-
- void
- _pixman_linear_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter)
- {
- if (linear_gradient_is_horizontal (
- iter->image, iter->x, iter->y, iter->width, iter->height))
- {
-- if (iter->flags & ITER_NARROW)
-+ if (iter->flags & ITER_16)
-+ linear_get_scanline_16 (iter, NULL);
-+ else if (iter->flags & ITER_NARROW)
- linear_get_scanline_narrow (iter, NULL);
- else
- linear_get_scanline_wide (iter, NULL);
-
- iter->get_scanline = _pixman_iter_get_scanline_noop;
- }
- else
- {
-- if (iter->flags & ITER_NARROW)
-+ if (iter->flags & ITER_16)
-+ iter->get_scanline = linear_get_scanline_16;
-+ else if (iter->flags & ITER_NARROW)
- iter->get_scanline = linear_get_scanline_narrow;
- else
- iter->get_scanline = linear_get_scanline_wide;
- }
- }
-
- PIXMAN_EXPORT pixman_image_t *
- pixman_image_create_linear_gradient (pixman_point_fixed_t * p1,
-diff --git a/gfx/cairo/libpixman/src/pixman-private.h b/gfx/cairo/libpixman/src/pixman-private.h
---- a/gfx/cairo/libpixman/src/pixman-private.h
-+++ b/gfx/cairo/libpixman/src/pixman-private.h
-@@ -152,24 +152,28 @@ struct bits_image
- int height;
- uint32_t * bits;
- uint32_t * free_me;
- int rowstride; /* in number of uint32_t's */
-
- fetch_scanline_t get_scanline_32;
- fetch_scanline_t get_scanline_64;
-
-+ fetch_scanline_t fetch_scanline_16;
-+
- fetch_scanline_t fetch_scanline_32;
- fetch_pixel_32_t fetch_pixel_32;
- store_scanline_t store_scanline_32;
-
- fetch_scanline_t fetch_scanline_64;
- fetch_pixel_64_t fetch_pixel_64;
- store_scanline_t store_scanline_64;
-
-+ store_scanline_t store_scanline_16;
-+
- /* Used for indirect access to the bits */
- pixman_read_memory_func_t read_func;
- pixman_write_memory_func_t write_func;
- };
-
- union pixman_image
- {
- image_type_t type;
-@@ -202,17 +206,24 @@ typedef enum
- * destination.
- *
- * When he destination is xRGB, this is useful knowledge, because then
- * we can treat it as if it were ARGB, which means in some cases we can
- * avoid copying it to a temporary buffer.
- */
- ITER_LOCALIZED_ALPHA = (1 << 1),
- ITER_IGNORE_ALPHA = (1 << 2),
-- ITER_IGNORE_RGB = (1 << 3)
-+ ITER_IGNORE_RGB = (1 << 3),
-+
-+ /* With the addition of ITER_16 we now have two flags that to represent
-+ * 3 pipelines. This means that there can be an invalid state when
-+ * both ITER_NARROW and ITER_16 are set. In this case
-+ * ITER_16 overrides NARROW and we should use the 16 bit pipeline.
-+ * Note: ITER_16 still has a 32 bit mask, which is a bit weird. */
-+ ITER_16 = (1 << 4)
- } iter_flags_t;
-
- struct pixman_iter_t
- {
- /* These are initialized by _pixman_implementation_{src,dest}_init */
- pixman_image_t * image;
- uint32_t * buffer;
- int x, y;
-@@ -429,16 +440,17 @@ typedef pixman_bool_t (*pixman_fill_func
- int x,
- int y,
- int width,
- int height,
- uint32_t xor);
- typedef void (*pixman_iter_init_func_t) (pixman_implementation_t *imp,
- pixman_iter_t *iter);
-
-+void _pixman_setup_combiner_functions_16 (pixman_implementation_t *imp);
- void _pixman_setup_combiner_functions_32 (pixman_implementation_t *imp);
- void _pixman_setup_combiner_functions_64 (pixman_implementation_t *imp);
-
- typedef struct
- {
- pixman_op_t op;
- pixman_format_code_t src_format;
- uint32_t src_flags;
-@@ -459,32 +471,34 @@ struct pixman_implementation_t
- pixman_fill_func_t fill;
- pixman_iter_init_func_t src_iter_init;
- pixman_iter_init_func_t dest_iter_init;
-
- pixman_combine_32_func_t combine_32[PIXMAN_N_OPERATORS];
- pixman_combine_32_func_t combine_32_ca[PIXMAN_N_OPERATORS];
- pixman_combine_64_func_t combine_64[PIXMAN_N_OPERATORS];
- pixman_combine_64_func_t combine_64_ca[PIXMAN_N_OPERATORS];
-+ pixman_combine_64_func_t combine_16[PIXMAN_N_OPERATORS];
- };
-
- uint32_t
- _pixman_image_get_solid (pixman_implementation_t *imp,
- pixman_image_t * image,
- pixman_format_code_t format);
-
- pixman_implementation_t *
- _pixman_implementation_create (pixman_implementation_t *delegate,
- const pixman_fast_path_t *fast_paths);
-
- pixman_combine_32_func_t
- _pixman_implementation_lookup_combiner (pixman_implementation_t *imp,
- pixman_op_t op,
- pixman_bool_t component_alpha,
-- pixman_bool_t wide);
-+ pixman_bool_t wide,
-+ pixman_bool_t rgb16);
-
- pixman_bool_t
- _pixman_implementation_blt (pixman_implementation_t *imp,
- uint32_t * src_bits,
- uint32_t * dst_bits,
- int src_stride,
- int dst_stride,
- int src_bpp,
-@@ -613,16 +627,17 @@ uint32_t *
- #define FAST_PATH_Y_UNIT_ZERO (1 << 18)
- #define FAST_PATH_BILINEAR_FILTER (1 << 19)
- #define FAST_PATH_ROTATE_90_TRANSFORM (1 << 20)
- #define FAST_PATH_ROTATE_180_TRANSFORM (1 << 21)
- #define FAST_PATH_ROTATE_270_TRANSFORM (1 << 22)
- #define FAST_PATH_SAMPLES_COVER_CLIP_NEAREST (1 << 23)
- #define FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR (1 << 24)
- #define FAST_PATH_BITS_IMAGE (1 << 25)
-+#define FAST_PATH_16_FORMAT (1 << 26)
-
- #define FAST_PATH_PAD_REPEAT \
- (FAST_PATH_NO_NONE_REPEAT | \
- FAST_PATH_NO_NORMAL_REPEAT | \
- FAST_PATH_NO_REFLECT_REPEAT)
-
- #define FAST_PATH_NORMAL_REPEAT \
- (FAST_PATH_NO_NONE_REPEAT | \
-diff --git a/gfx/cairo/libpixman/src/pixman-radial-gradient.c b/gfx/cairo/libpixman/src/pixman-radial-gradient.c
---- a/gfx/cairo/libpixman/src/pixman-radial-gradient.c
-+++ b/gfx/cairo/libpixman/src/pixman-radial-gradient.c
-@@ -395,35 +395,289 @@ radial_get_scanline_narrow (pixman_iter_
- v.vector[2] += unit.vector[2];
- }
- }
-
- iter->y++;
- return iter->buffer;
- }
-
-+static uint16_t convert_8888_to_0565(uint32_t color)
-+{
-+ return CONVERT_8888_TO_0565(color);
-+}
-+
-+static uint32_t *
-+radial_get_scanline_16 (pixman_iter_t *iter, const uint32_t *mask)
-+{
-+ /*
-+ * Implementation of radial gradients following the PDF specification.
-+ * See section 8.7.4.5.4 Type 3 (Radial) Shadings of the PDF Reference
-+ * Manual (PDF 32000-1:2008 at the time of this writing).
-+ *
-+ * In the radial gradient problem we are given two circles (câ‚,râ‚) and
-+ * (câ‚‚,râ‚‚) that define the gradient itself.
-+ *
-+ * Mathematically the gradient can be defined as the family of circles
-+ *
-+ * ((1-t)·c₠+ t·(c₂), (1-t)·r₠+ t·r₂)
-+ *
-+ * excluding those circles whose radius would be < 0. When a point
-+ * belongs to more than one circle, the one with a bigger t is the only
-+ * one that contributes to its color. When a point does not belong
-+ * to any of the circles, it is transparent black, i.e. RGBA (0, 0, 0, 0).
-+ * Further limitations on the range of values for t are imposed when
-+ * the gradient is not repeated, namely t must belong to [0,1].
-+ *
-+ * The graphical result is the same as drawing the valid (radius > 0)
-+ * circles with increasing t in [-inf, +inf] (or in [0,1] if the gradient
-+ * is not repeated) using SOURCE operator composition.
-+ *
-+ * It looks like a cone pointing towards the viewer if the ending circle
-+ * is smaller than the starting one, a cone pointing inside the page if
-+ * the starting circle is the smaller one and like a cylinder if they
-+ * have the same radius.
-+ *
-+ * What we actually do is, given the point whose color we are interested
-+ * in, compute the t values for that point, solving for t in:
-+ *
-+ * length((1-t)·c₠+ t·(c₂) - p) = (1-t)·r₠+ t·r₂
-+ *
-+ * Let's rewrite it in a simpler way, by defining some auxiliary
-+ * variables:
-+ *
-+ * cd = câ‚‚ - câ‚
-+ * pd = p - câ‚
-+ * dr = râ‚‚ - râ‚
-+ * length(t·cd - pd) = r₠+ t·dr
-+ *
-+ * which actually means
-+ *
-+ * hypot(t·cdx - pdx, t·cdy - pdy) = r₠+ t·dr
-+ *
-+ * or
-+ *
-+ * ⎷((t·cdx - pdx)² + (t·cdy - pdy)²) = r₠+ t·dr.
-+ *
-+ * If we impose (as stated earlier) that r₠+ t·dr >= 0, it becomes:
-+ *
-+ * (t·cdx - pdx)² + (t·cdy - pdy)² = (r₠+ t·dr)²
-+ *
-+ * where we can actually expand the squares and solve for t:
-+ *
-+ * t²cdx² - 2t·cdx·pdx + pdx² + t²cdy² - 2t·cdy·pdy + pdy² =
-+ * = r₲ + 2·râ‚·t·dr + t²·dr²
-+ *
-+ * (cdx² + cdy² - dr²)t² - 2(cdx·pdx + cdy·pdy + râ‚·dr)t +
-+ * (pdx² + pdy² - r₲) = 0
-+ *
-+ * A = cdx² + cdy² - dr²
-+ * B = pdx·cdx + pdy·cdy + râ‚·dr
-+ * C = pdx² + pdy² - r₲
-+ * At² - 2Bt + C = 0
-+ *
-+ * The solutions (unless the equation degenerates because of A = 0) are:
-+ *
-+ * t = (B ± ⎷(B² - A·C)) / A
-+ *
-+ * The solution we are going to prefer is the bigger one, unless the
-+ * radius associated to it is negative (or it falls outside the valid t
-+ * range).
-+ *
-+ * Additional observations (useful for optimizations):
-+ * A does not depend on p
-+ *
-+ * A < 0 <=> one of the two circles completely contains the other one
-+ * <=> for every p, the radiuses associated with the two t solutions
-+ * have opposite sign
-+ */
-+ pixman_image_t *image = iter->image;
-+ int x = iter->x;
-+ int y = iter->y;
-+ int width = iter->width;
-+ uint16_t *buffer = iter->buffer;
-+
-+ gradient_t *gradient = (gradient_t *)image;
-+ radial_gradient_t *radial = (radial_gradient_t *)image;
-+ uint16_t *end = buffer + width;
-+ pixman_gradient_walker_t walker;
-+ pixman_vector_t v, unit;
-+
-+ /* reference point is the center of the pixel */
-+ v.vector[0] = pixman_int_to_fixed (x) + pixman_fixed_1 / 2;
-+ v.vector[1] = pixman_int_to_fixed (y) + pixman_fixed_1 / 2;
-+ v.vector[2] = pixman_fixed_1;
-+
-+ _pixman_gradient_walker_init (&walker, gradient, image->common.repeat);
-+
-+ if (image->common.transform)
-+ {
-+ if (!pixman_transform_point_3d (image->common.transform, &v))
-+ return iter->buffer;
-+
-+ unit.vector[0] = image->common.transform->matrix[0][0];
-+ unit.vector[1] = image->common.transform->matrix[1][0];
-+ unit.vector[2] = image->common.transform->matrix[2][0];
-+ }
-+ else
-+ {
-+ unit.vector[0] = pixman_fixed_1;
-+ unit.vector[1] = 0;
-+ unit.vector[2] = 0;
-+ }
-+
-+ if (unit.vector[2] == 0 && v.vector[2] == pixman_fixed_1)
-+ {
-+ /*
-+ * Given:
-+ *
-+ * t = (B ± ⎷(B² - A·C)) / A
-+ *
-+ * where
-+ *
-+ * A = cdx² + cdy² - dr²
-+ * B = pdx·cdx + pdy·cdy + râ‚·dr
-+ * C = pdx² + pdy² - r₲
-+ * det = B² - A·C
-+ *
-+ * Since we have an affine transformation, we know that (pdx, pdy)
-+ * increase linearly with each pixel,
-+ *
-+ * pdx = pdx₀ + n·ux,
-+ * pdy = pdy₀ + n·uy,
-+ *
-+ * we can then express B, C and det through multiple differentiation.
-+ */
-+ pixman_fixed_32_32_t b, db, c, dc, ddc;
-+
-+ /* warning: this computation may overflow */
-+ v.vector[0] -= radial->c1.x;
-+ v.vector[1] -= radial->c1.y;
-+
-+ /*
-+ * B and C are computed and updated exactly.
-+ * If fdot was used instead of dot, in the worst case it would
-+ * lose 11 bits of precision in each of the multiplication and
-+ * summing up would zero out all the bit that were preserved,
-+ * thus making the result 0 instead of the correct one.
-+ * This would mean a worst case of unbound relative error or
-+ * about 2^10 absolute error
-+ */
-+ b = dot (v.vector[0], v.vector[1], radial->c1.radius,
-+ radial->delta.x, radial->delta.y, radial->delta.radius);
-+ db = dot (unit.vector[0], unit.vector[1], 0,
-+ radial->delta.x, radial->delta.y, 0);
-+
-+ c = dot (v.vector[0], v.vector[1],
-+ -((pixman_fixed_48_16_t) radial->c1.radius),
-+ v.vector[0], v.vector[1], radial->c1.radius);
-+ dc = dot (2 * (pixman_fixed_48_16_t) v.vector[0] + unit.vector[0],
-+ 2 * (pixman_fixed_48_16_t) v.vector[1] + unit.vector[1],
-+ 0,
-+ unit.vector[0], unit.vector[1], 0);
-+ ddc = 2 * dot (unit.vector[0], unit.vector[1], 0,
-+ unit.vector[0], unit.vector[1], 0);
-+
-+ while (buffer < end)
-+ {
-+ if (!mask || *mask++)
-+ {
-+ *buffer = convert_8888_to_0565(
-+ radial_compute_color (radial->a, b, c,
-+ radial->inva,
-+ radial->delta.radius,
-+ radial->mindr,
-+ &walker,
-+ image->common.repeat));
-+ }
-+
-+ b += db;
-+ c += dc;
-+ dc += ddc;
-+ ++buffer;
-+ }
-+ }
-+ else
-+ {
-+ /* projective */
-+ /* Warning:
-+ * error propagation guarantees are much looser than in the affine case
-+ */
-+ while (buffer < end)
-+ {
-+ if (!mask || *mask++)
-+ {
-+ if (v.vector[2] != 0)
-+ {
-+ double pdx, pdy, invv2, b, c;
-+
-+ invv2 = 1. * pixman_fixed_1 / v.vector[2];
-+
-+ pdx = v.vector[0] * invv2 - radial->c1.x;
-+ /* / pixman_fixed_1 */
-+
-+ pdy = v.vector[1] * invv2 - radial->c1.y;
-+ /* / pixman_fixed_1 */
-+
-+ b = fdot (pdx, pdy, radial->c1.radius,
-+ radial->delta.x, radial->delta.y,
-+ radial->delta.radius);
-+ /* / pixman_fixed_1 / pixman_fixed_1 */
-+
-+ c = fdot (pdx, pdy, -radial->c1.radius,
-+ pdx, pdy, radial->c1.radius);
-+ /* / pixman_fixed_1 / pixman_fixed_1 */
-+
-+ *buffer = convert_8888_to_0565 (
-+ radial_compute_color (radial->a, b, c,
-+ radial->inva,
-+ radial->delta.radius,
-+ radial->mindr,
-+ &walker,
-+ image->common.repeat));
-+ }
-+ else
-+ {
-+ *buffer = 0;
-+ }
-+ }
-+
-+ ++buffer;
-+
-+ v.vector[0] += unit.vector[0];
-+ v.vector[1] += unit.vector[1];
-+ v.vector[2] += unit.vector[2];
-+ }
-+ }
-+
-+ iter->y++;
-+ return iter->buffer;
-+}
- static uint32_t *
- radial_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
- {
- uint32_t *buffer = radial_get_scanline_narrow (iter, NULL);
-
- pixman_expand ((uint64_t *)buffer, buffer, PIXMAN_a8r8g8b8, iter->width);
-
- return buffer;
- }
-
- void
- _pixman_radial_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter)
- {
-- if (iter->flags & ITER_NARROW)
-+ if (iter->flags & ITER_16)
-+ iter->get_scanline = radial_get_scanline_16;
-+ else if (iter->flags & ITER_NARROW)
- iter->get_scanline = radial_get_scanline_narrow;
- else
- iter->get_scanline = radial_get_scanline_wide;
- }
-
-+
- PIXMAN_EXPORT pixman_image_t *
- pixman_image_create_radial_gradient (pixman_point_fixed_t * inner,
- pixman_point_fixed_t * outer,
- pixman_fixed_t inner_radius,
- pixman_fixed_t outer_radius,
- const pixman_gradient_stop_t *stops,
- int n_stops)
- {
diff --git a/gfx/cairo/pixman-8888-over-565.patch b/gfx/cairo/pixman-8888-over-565.patch
deleted file mode 100644
index d6ab4618f..000000000
--- a/gfx/cairo/pixman-8888-over-565.patch
+++ /dev/null
@@ -1,712 +0,0 @@
-changeset: 96613:3e003f0b8026
-tag: 2pass
-tag: qbase
-tag: qtip
-tag: tip
-user: Jeff Muizelaar <jmuizelaar@mozilla.com>
-date: Thu May 17 19:23:53 2012 -0400
-summary: Bug 757878. Add a fast path for 8888_over_565 with NEON. r=bgirard,joe
-
-diff --git a/gfx/cairo/libpixman/src/pixman-arm-common.h b/gfx/cairo/libpixman/src/pixman-arm-common.h
---- a/gfx/cairo/libpixman/src/pixman-arm-common.h
-+++ b/gfx/cairo/libpixman/src/pixman-arm-common.h
-@@ -355,26 +355,26 @@ scaled_bilinear_scanline_##cputype##_##n
- if ((flags & SKIP_ZERO_SRC) && zero_src) \
- return; \
- pixman_scaled_bilinear_scanline_##name##_##op##_asm_##cputype ( \
- dst, src_top, src_bottom, wt, wb, vx, unit_x, w); \
- } \
- \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_cover_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint32_t, dst_type, COVER, FLAG_NONE) \
-+ NULL, src_type, uint32_t, dst_type, COVER, FLAG_NONE) \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_none_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint32_t, dst_type, NONE, FLAG_NONE) \
-+ NULL, src_type, uint32_t, dst_type, NONE, FLAG_NONE) \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_pad_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint32_t, dst_type, PAD, FLAG_NONE) \
-+ NULL, src_type, uint32_t, dst_type, PAD, FLAG_NONE) \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_normal_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint32_t, dst_type, NORMAL, \
-+ NULL, src_type, uint32_t, dst_type, NORMAL, \
- FLAG_NONE)
-
-
- #define PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_A8_DST(flags, cputype, name, op, \
- src_type, dst_type) \
- void \
- pixman_scaled_bilinear_scanline_##name##_##op##_asm_##cputype ( \
- dst_type * dst, \
-@@ -404,25 +404,25 @@ scaled_bilinear_scanline_##cputype##_##n
- if ((flags & SKIP_ZERO_SRC) && zero_src) \
- return; \
- pixman_scaled_bilinear_scanline_##name##_##op##_asm_##cputype ( \
- dst, mask, src_top, src_bottom, wt, wb, vx, unit_x, w); \
- } \
- \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_cover_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint8_t, dst_type, COVER, \
-+ NULL, src_type, uint8_t, dst_type, COVER, \
- FLAG_HAVE_NON_SOLID_MASK) \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_none_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint8_t, dst_type, NONE, \
-+ NULL, src_type, uint8_t, dst_type, NONE, \
- FLAG_HAVE_NON_SOLID_MASK) \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_pad_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint8_t, dst_type, PAD, \
-+ NULL, src_type, uint8_t, dst_type, PAD, \
- FLAG_HAVE_NON_SOLID_MASK) \
- FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_normal_##op, \
- scaled_bilinear_scanline_##cputype##_##name##_##op, \
-- src_type, uint8_t, dst_type, NORMAL, \
-+ NULL, src_type, uint8_t, dst_type, NORMAL, \
- FLAG_HAVE_NON_SOLID_MASK)
-
-
- #endif
-diff --git a/gfx/cairo/libpixman/src/pixman-arm-neon.c b/gfx/cairo/libpixman/src/pixman-arm-neon.c
---- a/gfx/cairo/libpixman/src/pixman-arm-neon.c
-+++ b/gfx/cairo/libpixman/src/pixman-arm-neon.c
-@@ -140,16 +140,33 @@ PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 8888_0565, SRC,
- uint32_t, uint16_t)
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 0565_x888, SRC,
- uint16_t, uint32_t)
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 0565_0565, SRC,
- uint16_t, uint16_t)
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (SKIP_ZERO_SRC, neon, 8888_8888, OVER,
- uint32_t, uint32_t)
-+static force_inline void
-+pixman_scaled_bilinear_scanline_8888_8888_SRC (
-+ uint32_t * dst,
-+ const uint32_t * mask,
-+ const uint32_t * src_top,
-+ const uint32_t * src_bottom,
-+ int32_t w,
-+ int wt,
-+ int wb,
-+ pixman_fixed_t vx,
-+ pixman_fixed_t unit_x,
-+ pixman_fixed_t max_vx,
-+ pixman_bool_t zero_src)
-+{
-+ pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon (dst, src_top, src_bottom, wt, wb, vx, unit_x, w);
-+}
-+
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (SKIP_ZERO_SRC, neon, 8888_8888, ADD,
- uint32_t, uint32_t)
-
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_A8_DST (0, neon, 8888_8_8888, SRC,
- uint32_t, uint32_t)
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_A8_DST (0, neon, 8888_8_0565, SRC,
- uint32_t, uint16_t)
- PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_A8_DST (0, neon, 0565_8_x888, SRC,
-@@ -261,16 +278,38 @@ pixman_blt_neon (uint32_t *src_bits,
- (uint32_t *)(((char *) src_bits) +
- src_y * src_stride * 4 + src_x * 4), src_stride);
- return TRUE;
- default:
- return FALSE;
- }
- }
-
-+static inline void op_bilinear_over_8888_0565(uint16_t *dst, const uint32_t *mask, const uint32_t *src, int width)
-+{
-+ pixman_composite_over_8888_0565_asm_neon (width, 1, dst, 0, src, 0);
-+}
-+
-+FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_0565_cover_OVER,
-+ pixman_scaled_bilinear_scanline_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ COVER, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_0565_pad_OVER,
-+ pixman_scaled_bilinear_scanline_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ PAD, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_0565_none_OVER,
-+ pixman_scaled_bilinear_scanline_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ NONE, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_0565_normal_OVER,
-+ pixman_scaled_bilinear_scanline_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ NORMAL, FLAG_NONE)
-+
- static const pixman_fast_path_t arm_neon_fast_paths[] =
- {
- PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, neon_composite_src_0565_0565),
- PIXMAN_STD_FAST_PATH (SRC, b5g6r5, null, b5g6r5, neon_composite_src_0565_0565),
- PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, r5g6b5, neon_composite_src_8888_0565),
- PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, r5g6b5, neon_composite_src_8888_0565),
- PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, b5g6r5, neon_composite_src_8888_0565),
- PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, b5g6r5, neon_composite_src_8888_0565),
-@@ -414,16 +453,18 @@ static const pixman_fast_path_t arm_neon
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, r5g6b5, r5g6b5, neon_0565_8_0565),
-
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, neon_8888_8_8888),
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, neon_8888_8_8888),
-
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, neon_8888_8_8888),
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (ADD, a8r8g8b8, x8r8g8b8, neon_8888_8_8888),
-
-+ SIMPLE_BILINEAR_FAST_PATH (OVER, a8r8g8b8, r5g6b5, neon_8888_0565),
-+
- { PIXMAN_OP_NONE },
- };
-
- static pixman_bool_t
- arm_neon_blt (pixman_implementation_t *imp,
- uint32_t * src_bits,
- uint32_t * dst_bits,
- int src_stride,
-diff --git a/gfx/cairo/libpixman/src/pixman-fast-path.c b/gfx/cairo/libpixman/src/pixman-fast-path.c
---- a/gfx/cairo/libpixman/src/pixman-fast-path.c
-+++ b/gfx/cairo/libpixman/src/pixman-fast-path.c
-@@ -1356,63 +1356,63 @@ scaled_bilinear_scanline_565_565_SRC (ui
- vx += unit_x;
- *dst++ = d;
- }
- }
-
- #endif
-
- FAST_BILINEAR_MAINLOOP_COMMON (565_565_cover_SRC,
-- scaled_bilinear_scanline_565_565_SRC,
-+ scaled_bilinear_scanline_565_565_SRC, NULL,
- uint16_t, uint32_t, uint16_t,
- COVER, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (565_565_pad_SRC,
-- scaled_bilinear_scanline_565_565_SRC,
-+ scaled_bilinear_scanline_565_565_SRC, NULL,
- uint16_t, uint32_t, uint16_t,
- PAD, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (565_565_none_SRC,
-- scaled_bilinear_scanline_565_565_SRC,
-+ scaled_bilinear_scanline_565_565_SRC, NULL,
- uint16_t, uint32_t, uint16_t,
- NONE, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (565_565_normal_SRC,
-- scaled_bilinear_scanline_565_565_SRC,
-+ scaled_bilinear_scanline_565_565_SRC, NULL,
- uint16_t, uint32_t, uint16_t,
- NORMAL, FLAG_NONE)
-
- FAST_BILINEAR_MAINLOOP_COMMON (8888_565_cover_OVER,
-- scaled_bilinear_scanline_8888_565_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER, NULL,
- uint32_t, uint32_t, uint16_t,
- COVER, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (8888_565_pad_OVER,
-- scaled_bilinear_scanline_8888_565_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER, NULL,
- uint32_t, uint32_t, uint16_t,
- PAD, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (8888_565_none_OVER,
-- scaled_bilinear_scanline_8888_565_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER, NULL,
- uint32_t, uint32_t, uint16_t,
- NONE, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (8888_565_normal_OVER,
-- scaled_bilinear_scanline_8888_565_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER, NULL,
- uint32_t, uint32_t, uint16_t,
- NORMAL, FLAG_NONE)
-
- FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_cover_OVER,
-- scaled_bilinear_scanline_8888_8888_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- COVER, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_pad_OVER,
-- scaled_bilinear_scanline_8888_8888_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- PAD, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_none_OVER,
-- scaled_bilinear_scanline_8888_8888_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- NONE, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_normal_OVER,
-- scaled_bilinear_scanline_8888_8888_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- NORMAL, FLAG_NONE)
-
- #define REPEAT_MIN_WIDTH 32
-
- static void
- fast_composite_tiled_repeat (pixman_implementation_t *imp,
- pixman_composite_info_t *info)
-diff --git a/gfx/cairo/libpixman/src/pixman-inlines.h b/gfx/cairo/libpixman/src/pixman-inlines.h
---- a/gfx/cairo/libpixman/src/pixman-inlines.h
-+++ b/gfx/cairo/libpixman/src/pixman-inlines.h
-@@ -816,18 +816,48 @@ bilinear_pad_repeat_get_scanline_bounds
- *
- * Note: normally the sum of 'weight_top' and 'weight_bottom' is equal to 256,
- * but sometimes it may be less than that for NONE repeat when handling
- * fuzzy antialiased top or bottom image edges. Also both top and
- * bottom weight variables are guaranteed to have value in 0-255
- * range and can fit into unsigned byte or be used with 8-bit SIMD
- * multiplication instructions.
- */
--#define FAST_BILINEAR_MAINLOOP_INT(scale_func_name, scanline_func, src_type_t, mask_type_t, \
-- dst_type_t, repeat_mode, flags) \
-+
-+/* Replace a single "scanline_func" with "fetch_func" & "op_func" to allow optional
-+ * two stage processing (bilinear fetch to a temp buffer, followed by unscaled
-+ * combine), "op_func" may be NULL, in this case we keep old behavior.
-+ * This is ugly and gcc issues some warnings, but works.
-+ *
-+ * An advice: clang has much better error reporting than gcc for deeply nested macros.
-+ */
-+
-+#define scanline_func(dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buf, mask, src_top, src_bottom, width, \
-+ weight_top, weight_bottom, vx, unit_x, max_vx, zero_src) \
-+ do { \
-+ if (op_func != NULL) \
-+ { \
-+ fetch_func ((void *)scanline_buf, (mask), (src_top), (src_bottom), (width), \
-+ (weight_top), (weight_bottom), (vx), (unit_x), (max_vx), (zero_src)); \
-+ ((void (*)(dst_type_t *, const mask_type_t *, const src_type_t *, int)) op_func)\
-+ ((dst), (mask), (src_type_t *)scanline_buf, (width)); \
-+ } \
-+ else \
-+ { \
-+ fetch_func ((void*)(dst), (mask), (src_top), (src_bottom), (width), (weight_top), \
-+ (weight_bottom), (vx), (unit_x), (max_vx), (zero_src)); \
-+ } \
-+ } while (0)
-+
-+
-+#define SCANLINE_BUFFER_LENGTH 3072
-+
-+#define FAST_BILINEAR_MAINLOOP_INT(scale_func_name, fetch_func, op_func, src_type_t, \
-+ mask_type_t, dst_type_t, repeat_mode, flags) \
- static void \
- fast_composite_scaled_bilinear ## scale_func_name (pixman_implementation_t *imp, \
- pixman_composite_info_t *info) \
- { \
- PIXMAN_COMPOSITE_ARGS (info); \
- dst_type_t *dst_line; \
- mask_type_t *mask_line; \
- src_type_t *src_first_line; \
-@@ -842,16 +872,19 @@ fast_composite_scaled_bilinear ## scale_
- mask_type_t solid_mask; \
- const mask_type_t *mask = &solid_mask; \
- int src_stride, mask_stride, dst_stride; \
- \
- int src_width; \
- pixman_fixed_t src_width_fixed; \
- int max_x; \
- pixman_bool_t need_src_extension; \
-+ \
-+ uint64_t stack_scanline_buffer[SCANLINE_BUFFER_LENGTH]; \
-+ uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer; \
- \
- PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, dst_type_t, dst_stride, dst_line, 1); \
- if (flags & FLAG_HAVE_SOLID_MASK) \
- { \
- solid_mask = _pixman_image_get_solid (imp, mask_image, dest_image->bits.format); \
- mask_stride = 0; \
- } \
- else if (flags & FLAG_HAVE_NON_SOLID_MASK) \
-@@ -914,16 +947,24 @@ fast_composite_scaled_bilinear ## scale_
- else \
- { \
- src_width = src_image->bits.width; \
- need_src_extension = FALSE; \
- } \
- \
- src_width_fixed = pixman_int_to_fixed (src_width); \
- } \
-+ \
-+ if (op_func != NULL && width * sizeof(src_type_t) > sizeof(stack_scanline_buffer)) \
-+ { \
-+ scanline_buffer = pixman_malloc_ab (width, sizeof(src_type_t)); \
-+ \
-+ if (!scanline_buffer) \
-+ return; \
-+ } \
- \
- while (--height >= 0) \
- { \
- int weight1, weight2; \
- dst = dst_line; \
- dst_line += dst_stride; \
- vx = v.vector[0]; \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
-@@ -956,36 +997,39 @@ fast_composite_scaled_bilinear ## scale_
- repeat (PIXMAN_REPEAT_PAD, &y2, src_image->bits.height); \
- src1 = src_first_line + src_stride * y1; \
- src2 = src_first_line + src_stride * y2; \
- \
- if (left_pad > 0) \
- { \
- buf1[0] = buf1[1] = src1[0]; \
- buf2[0] = buf2[1] = src2[0]; \
-- scanline_func (dst, mask, \
-- buf1, buf2, left_pad, weight1, weight2, 0, 0, 0, FALSE); \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, buf1, buf2, left_pad, weight1, weight2, \
-+ 0, 0, 0, FALSE); \
- dst += left_pad; \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
- mask += left_pad; \
- } \
- if (width > 0) \
- { \
-- scanline_func (dst, mask, \
-- src1, src2, width, weight1, weight2, vx, unit_x, 0, FALSE); \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, src1, src2, width, weight1, weight2, \
-+ vx, unit_x, 0, FALSE); \
- dst += width; \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
- mask += width; \
- } \
- if (right_pad > 0) \
- { \
- buf1[0] = buf1[1] = src1[src_image->bits.width - 1]; \
- buf2[0] = buf2[1] = src2[src_image->bits.width - 1]; \
-- scanline_func (dst, mask, \
-- buf1, buf2, right_pad, weight1, weight2, 0, 0, 0, FALSE); \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, buf1, buf2, right_pad, weight1, weight2, \
-+ 0, 0, 0, FALSE); \
- } \
- } \
- else if (PIXMAN_REPEAT_ ## repeat_mode == PIXMAN_REPEAT_NONE) \
- { \
- src_type_t *src1, *src2; \
- src_type_t buf1[2]; \
- src_type_t buf2[2]; \
- /* handle top/bottom zero padding by just setting weights to 0 if needed */ \
-@@ -1011,64 +1055,67 @@ fast_composite_scaled_bilinear ## scale_
- } \
- src1 = src_first_line + src_stride * y1; \
- src2 = src_first_line + src_stride * y2; \
- \
- if (left_pad > 0) \
- { \
- buf1[0] = buf1[1] = 0; \
- buf2[0] = buf2[1] = 0; \
-- scanline_func (dst, mask, \
-- buf1, buf2, left_pad, weight1, weight2, 0, 0, 0, TRUE); \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, buf1, buf2, left_pad, weight1, weight2, \
-+ 0, 0, 0, TRUE); \
- dst += left_pad; \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
- mask += left_pad; \
- } \
- if (left_tz > 0) \
- { \
- buf1[0] = 0; \
- buf1[1] = src1[0]; \
- buf2[0] = 0; \
- buf2[1] = src2[0]; \
-- scanline_func (dst, mask, \
-- buf1, buf2, left_tz, weight1, weight2, \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, buf1, buf2, left_tz, weight1, weight2, \
- pixman_fixed_frac (vx), unit_x, 0, FALSE); \
- dst += left_tz; \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
- mask += left_tz; \
- vx += left_tz * unit_x; \
- } \
- if (width > 0) \
- { \
-- scanline_func (dst, mask, \
-- src1, src2, width, weight1, weight2, vx, unit_x, 0, FALSE); \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, src1, src2, width, weight1, weight2, \
-+ vx, unit_x, 0, FALSE); \
- dst += width; \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
- mask += width; \
- vx += width * unit_x; \
- } \
- if (right_tz > 0) \
- { \
- buf1[0] = src1[src_image->bits.width - 1]; \
- buf1[1] = 0; \
- buf2[0] = src2[src_image->bits.width - 1]; \
- buf2[1] = 0; \
-- scanline_func (dst, mask, \
-- buf1, buf2, right_tz, weight1, weight2, \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, buf1, buf2, right_tz, weight1, weight2, \
- pixman_fixed_frac (vx), unit_x, 0, FALSE); \
- dst += right_tz; \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
- mask += right_tz; \
- } \
- if (right_pad > 0) \
- { \
- buf1[0] = buf1[1] = 0; \
- buf2[0] = buf2[1] = 0; \
-- scanline_func (dst, mask, \
-- buf1, buf2, right_pad, weight1, weight2, 0, 0, 0, TRUE); \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, buf1, buf2, right_pad, weight1, weight2, \
-+ 0, 0, 0, TRUE); \
- } \
- } \
- else if (PIXMAN_REPEAT_ ## repeat_mode == PIXMAN_REPEAT_NORMAL) \
- { \
- int32_t num_pixels; \
- int32_t width_remain; \
- src_type_t * src_line_top; \
- src_type_t * src_line_bottom; \
-@@ -1120,17 +1167,18 @@ fast_composite_scaled_bilinear ## scale_
- * vx is in range [0, src_width_fixed - pixman_fixed_e] \
- * So we are safe from overflow. \
- */ \
- num_pixels = ((src_width_fixed - vx - pixman_fixed_e) / unit_x) + 1; \
- \
- if (num_pixels > width_remain) \
- num_pixels = width_remain; \
- \
-- scanline_func (dst, mask, buf1, buf2, num_pixels, \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, \
-+ dst, scanline_buffer, mask, buf1, buf2, num_pixels, \
- weight1, weight2, pixman_fixed_frac(vx), \
- unit_x, src_width_fixed, FALSE); \
- \
- width_remain -= num_pixels; \
- vx += num_pixels * unit_x; \
- dst += num_pixels; \
- \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
-@@ -1149,41 +1197,47 @@ fast_composite_scaled_bilinear ## scale_
- * So we are safe from overflow here. \
- */ \
- num_pixels = ((src_width_fixed - pixman_fixed_1 - vx - pixman_fixed_e) \
- / unit_x) + 1; \
- \
- if (num_pixels > width_remain) \
- num_pixels = width_remain; \
- \
-- scanline_func (dst, mask, src_line_top, src_line_bottom, num_pixels, \
-- weight1, weight2, vx, unit_x, src_width_fixed, FALSE); \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, \
-+ dst, scanline_buffer, mask, src_line_top, src_line_bottom, \
-+ num_pixels, weight1, weight2, vx, unit_x, src_width_fixed, \
-+ FALSE); \
- \
- width_remain -= num_pixels; \
- vx += num_pixels * unit_x; \
- dst += num_pixels; \
- \
- if (flags & FLAG_HAVE_NON_SOLID_MASK) \
- mask += num_pixels; \
- } \
- } \
- } \
- else \
- { \
-- scanline_func (dst, mask, src_first_line + src_stride * y1, \
-+ scanline_func (dst_type_t, mask_type_t, src_type_t, fetch_func, op_func, dst, \
-+ scanline_buffer, mask, \
-+ src_first_line + src_stride * y1, \
- src_first_line + src_stride * y2, width, \
- weight1, weight2, vx, unit_x, max_vx, FALSE); \
- } \
- } \
-+ if (scanline_buffer != (uint8_t *) stack_scanline_buffer) \
-+ free (scanline_buffer); \
- }
-
- /* A workaround for old sun studio, see: https://bugs.freedesktop.org/show_bug.cgi?id=32764 */
--#define FAST_BILINEAR_MAINLOOP_COMMON(scale_func_name, scanline_func, src_type_t, mask_type_t, \
-+#define FAST_BILINEAR_MAINLOOP_COMMON(scale_func_name, fetch_func, op_func, src_type_t, mask_type_t,\
- dst_type_t, repeat_mode, flags) \
-- FAST_BILINEAR_MAINLOOP_INT(_ ## scale_func_name, scanline_func, src_type_t, mask_type_t,\
-+ FAST_BILINEAR_MAINLOOP_INT(_ ## scale_func_name, fetch_func, op_func, src_type_t, mask_type_t,\
- dst_type_t, repeat_mode, flags)
-
- #define SCALED_BILINEAR_FLAGS \
- (FAST_PATH_SCALE_TRANSFORM | \
- FAST_PATH_NO_ALPHA_MAP | \
- FAST_PATH_BILINEAR_FILTER | \
- FAST_PATH_NO_ACCESSORS | \
- FAST_PATH_NARROW_FORMAT)
-diff --git a/gfx/cairo/libpixman/src/pixman-sse2.c b/gfx/cairo/libpixman/src/pixman-sse2.c
---- a/gfx/cairo/libpixman/src/pixman-sse2.c
-+++ b/gfx/cairo/libpixman/src/pixman-sse2.c
-@@ -5404,30 +5404,33 @@ scaled_bilinear_scanline_sse2_8888_8888_
- if (w & 1)
- {
- BILINEAR_INTERPOLATE_ONE_PIXEL (pix1);
- *dst = pix1;
- }
-
- }
-
-+/* Add extra NULL argument to the existing bilinear fast paths to indicate
-+ * that we don't need two-pass processing */
-+
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_cover_SRC,
-- scaled_bilinear_scanline_sse2_8888_8888_SRC,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, NULL,
- uint32_t, uint32_t, uint32_t,
- COVER, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_pad_SRC,
-- scaled_bilinear_scanline_sse2_8888_8888_SRC,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, NULL,
- uint32_t, uint32_t, uint32_t,
- PAD, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_none_SRC,
-- scaled_bilinear_scanline_sse2_8888_8888_SRC,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, NULL,
- uint32_t, uint32_t, uint32_t,
- NONE, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_normal_SRC,
-- scaled_bilinear_scanline_sse2_8888_8888_SRC,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, NULL,
- uint32_t, uint32_t, uint32_t,
- NORMAL, FLAG_NONE)
-
- static force_inline void
- scaled_bilinear_scanline_sse2_8888_8888_OVER (uint32_t * dst,
- const uint32_t * mask,
- const uint32_t * src_top,
- const uint32_t * src_bottom,
-@@ -5505,32 +5508,66 @@ scaled_bilinear_scanline_sse2_8888_8888_
- }
-
- w--;
- dst++;
- }
- }
-
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_cover_OVER,
-- scaled_bilinear_scanline_sse2_8888_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- COVER, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_pad_OVER,
-- scaled_bilinear_scanline_sse2_8888_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- PAD, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_none_OVER,
-- scaled_bilinear_scanline_sse2_8888_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- NONE, FLAG_NONE)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_normal_OVER,
-- scaled_bilinear_scanline_sse2_8888_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_OVER, NULL,
- uint32_t, uint32_t, uint32_t,
- NORMAL, FLAG_NONE)
-
-+
-+/* An example of SSE2 two-stage bilinear_over_8888_0565 fast path, which is implemented
-+ as scaled_bilinear_scanline_sse2_8888_8888_SRC + op_bilinear_over_8888_0565 */
-+
-+void op_bilinear_over_8888_0565(uint16_t *dst, const uint32_t *mask, const uint32_t *src, int width)
-+{
-+ /* Note: this is not really fast and should be based on 8 pixel loop from sse2_composite_over_8888_0565 */
-+ while (--width >= 0)
-+ {
-+ *dst = composite_over_8888_0565pixel (*src, *dst);
-+ src++;
-+ dst++;
-+ }
-+}
-+
-+FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_0565_cover_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ COVER, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_0565_pad_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ PAD, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_0565_none_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ NONE, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_0565_normal_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8888_SRC, op_bilinear_over_8888_0565,
-+ uint32_t, uint32_t, uint16_t,
-+ NORMAL, FLAG_NONE)
-+
-+/*****************************/
-+
- static force_inline void
- scaled_bilinear_scanline_sse2_8888_8_8888_OVER (uint32_t * dst,
- const uint8_t * mask,
- const uint32_t * src_top,
- const uint32_t * src_bottom,
- int32_t w,
- int wt,
- int wb,
-@@ -5669,29 +5706,29 @@ scaled_bilinear_scanline_sse2_8888_8_888
- }
-
- w--;
- dst++;
- }
- }
-
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8_8888_cover_OVER,
-- scaled_bilinear_scanline_sse2_8888_8_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8_8888_OVER, NULL,
- uint32_t, uint8_t, uint32_t,
- COVER, FLAG_HAVE_NON_SOLID_MASK)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8_8888_pad_OVER,
-- scaled_bilinear_scanline_sse2_8888_8_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8_8888_OVER, NULL,
- uint32_t, uint8_t, uint32_t,
- PAD, FLAG_HAVE_NON_SOLID_MASK)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8_8888_none_OVER,
-- scaled_bilinear_scanline_sse2_8888_8_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8_8888_OVER, NULL,
- uint32_t, uint8_t, uint32_t,
- NONE, FLAG_HAVE_NON_SOLID_MASK)
- FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8_8888_normal_OVER,
-- scaled_bilinear_scanline_sse2_8888_8_8888_OVER,
-+ scaled_bilinear_scanline_sse2_8888_8_8888_OVER, NULL,
- uint32_t, uint8_t, uint32_t,
- NORMAL, FLAG_HAVE_NON_SOLID_MASK)
-
- static const pixman_fast_path_t sse2_fast_paths[] =
- {
- /* PIXMAN_OP_OVER */
- PIXMAN_STD_FAST_PATH (OVER, solid, a8, r5g6b5, sse2_composite_over_n_8_0565),
- PIXMAN_STD_FAST_PATH (OVER, solid, a8, b5g6r5, sse2_composite_over_n_8_0565),
-@@ -5808,16 +5845,21 @@ static const pixman_fast_path_t sse2_fas
- SIMPLE_BILINEAR_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, sse2_8888_8888),
- SIMPLE_BILINEAR_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8, sse2_8888_8888),
-
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, sse2_8888_8_8888),
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8, sse2_8888_8_8888),
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, sse2_8888_8_8888),
- SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8, sse2_8888_8_8888),
-
-+ /* and here the needed entries are added to the fast path table */
-+
-+ SIMPLE_BILINEAR_FAST_PATH (OVER, a8r8g8b8, r5g6b5, sse2_8888_0565),
-+ SIMPLE_BILINEAR_FAST_PATH (OVER, a8b8g8r8, b5g6r5, sse2_8888_0565),
-+
- { PIXMAN_OP_NONE },
- };
-
- static pixman_bool_t
- sse2_blt (pixman_implementation_t *imp,
- uint32_t * src_bits,
- uint32_t * dst_bits,
- int src_stride,
-
diff --git a/gfx/cairo/pixman-android-cpu-detect.patch b/gfx/cairo/pixman-android-cpu-detect.patch
deleted file mode 100644
index 130af5130..000000000
--- a/gfx/cairo/pixman-android-cpu-detect.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/gfx/cairo/libpixman/src/pixman-cpu.c b/gfx/cairo/libpixman/src/pixman-cpu.c
---- a/gfx/cairo/libpixman/src/pixman-cpu.c
-+++ b/gfx/cairo/libpixman/src/pixman-cpu.c
-@@ -257,19 +257,22 @@ pixman_arm_read_auxv()
- arm_tests_initialized = TRUE;
- return;
- }
-
- fread(buf, sizeof(char), 1024, f);
- fclose(f);
- pos = strstr(buf, ver_token);
- if (pos) {
-- int ver = *(pos + strlen(ver_token)) - '0';
-- arm_has_v7 = ver >= 7;
-- arm_has_v6 = ver >= 6;
-+ char vchar = *(pos + strlen(ver_token));
-+ if (vchar >= '0' && vchar <= '9') {
-+ int ver = vchar - '0';
-+ arm_has_v7 = ver >= 7;
-+ arm_has_v6 = ver >= 6;
-+ }
- }
- arm_has_neon = strstr(buf, "neon") != NULL;
- arm_has_vfp = strstr(buf, "vfp") != NULL;
- arm_has_iwmmxt = strstr(buf, "iwmmxt") != NULL;
- arm_tests_initialized = TRUE;
- }
-
- #else
diff --git a/gfx/cairo/pixman-bilinear-fastpath.patch b/gfx/cairo/pixman-bilinear-fastpath.patch
deleted file mode 100644
index b2c5f270c..000000000
--- a/gfx/cairo/pixman-bilinear-fastpath.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-changeset: 94061:73a9b24d863a
-tag: bilin
-tag: qbase
-tag: qtip
-tag: tip
-user: Jeff Muizelaar <jmuizelaar@mozilla.com>
-date: Tue May 15 18:26:16 2012 -0400
-summary: Bug 754364. Add bilinear non-repeat and repeat fast paths. r=joe
-
-diff --git a/gfx/cairo/libpixman/src/pixman-fast-path.c b/gfx/cairo/libpixman/src/pixman-fast-path.c
---- a/gfx/cairo/libpixman/src/pixman-fast-path.c
-+++ b/gfx/cairo/libpixman/src/pixman-fast-path.c
-@@ -1186,16 +1186,228 @@ FAST_NEAREST (8888_565_none, 8888, 0565,
- FAST_NEAREST (8888_565_pad, 8888, 0565, uint32_t, uint16_t, SRC, PAD)
- FAST_NEAREST (8888_565_normal, 8888, 0565, uint32_t, uint16_t, SRC, NORMAL)
- FAST_NEAREST (565_565_normal, 0565, 0565, uint16_t, uint16_t, SRC, NORMAL)
- FAST_NEAREST (8888_565_cover, 8888, 0565, uint32_t, uint16_t, OVER, COVER)
- FAST_NEAREST (8888_565_none, 8888, 0565, uint32_t, uint16_t, OVER, NONE)
- FAST_NEAREST (8888_565_pad, 8888, 0565, uint32_t, uint16_t, OVER, PAD)
- FAST_NEAREST (8888_565_normal, 8888, 0565, uint32_t, uint16_t, OVER, NORMAL)
-
-+static force_inline void
-+scaled_bilinear_scanline_8888_565_OVER (uint16_t * dst,
-+ const uint32_t * mask,
-+ const uint32_t * src_top,
-+ const uint32_t * src_bottom,
-+ int32_t w,
-+ int wt,
-+ int wb,
-+ pixman_fixed_t vx,
-+ pixman_fixed_t unit_x,
-+ pixman_fixed_t max_vx,
-+ pixman_bool_t zero_src)
-+{
-+ while ((w -= 1) >= 0)
-+ {
-+ uint32_t tl = src_top [pixman_fixed_to_int (vx)];
-+ uint32_t tr = src_top [pixman_fixed_to_int (vx) + 1];
-+ uint32_t bl = src_bottom [pixman_fixed_to_int (vx)];
-+ uint32_t br = src_bottom [pixman_fixed_to_int (vx) + 1];
-+ uint32_t src, result;
-+ uint16_t d;
-+ d = *dst;
-+ src = bilinear_interpolation (tl, tr,
-+ bl, br,
-+ interpolation_coord(vx),
-+ wb >> (8 - INTERPOLATION_PRECISION_BITS));
-+ vx += unit_x;
-+ result = over (src, CONVERT_0565_TO_0888 (d));
-+ *dst++ = CONVERT_8888_TO_0565(result);
-+ }
-+}
-+
-+static force_inline void
-+scaled_bilinear_scanline_8888_8888_OVER (uint32_t * dst,
-+ const uint32_t * mask,
-+ const uint32_t * src_top,
-+ const uint32_t * src_bottom,
-+ int32_t w,
-+ int wt,
-+ int wb,
-+ pixman_fixed_t vx,
-+ pixman_fixed_t unit_x,
-+ pixman_fixed_t max_vx,
-+ pixman_bool_t zero_src)
-+{
-+ while ((w -= 1) >= 0)
-+ {
-+ uint32_t tl = src_top [pixman_fixed_to_int (vx)];
-+ uint32_t tr = src_top [pixman_fixed_to_int (vx) + 1];
-+ uint32_t bl = src_bottom [pixman_fixed_to_int (vx)];
-+ uint32_t br = src_bottom [pixman_fixed_to_int (vx) + 1];
-+ uint32_t src;
-+ uint32_t d;
-+ uint32_t result;
-+ d = *dst;
-+ src = bilinear_interpolation (tl, tr,
-+ bl, br,
-+ interpolation_coord(vx),
-+ wb >> (8 - INTERPOLATION_PRECISION_BITS));
-+ vx += unit_x;
-+ *dst++ = over (src, d);
-+ }
-+}
-+
-+#if 1
-+
-+static force_inline void
-+scaled_bilinear_scanline_565_565_SRC (uint16_t * dst,
-+ const uint32_t * mask,
-+ const uint16_t * src_top,
-+ const uint16_t * src_bottom,
-+ int32_t w,
-+ int wt,
-+ int wb,
-+ pixman_fixed_t vx,
-+ pixman_fixed_t unit_x,
-+ pixman_fixed_t max_vx,
-+ pixman_bool_t zero_src)
-+{
-+ while ((w -= 1) >= 0)
-+ {
-+ uint16_t tl = src_top [pixman_fixed_to_int (vx)];
-+ uint16_t tr = src_top [pixman_fixed_to_int (vx) + 1];
-+ uint16_t bl = src_bottom [pixman_fixed_to_int (vx)];
-+ uint16_t br = src_bottom [pixman_fixed_to_int (vx) + 1];
-+ uint32_t d;
-+ d = bilinear_interpolation(CONVERT_0565_TO_8888(tl),
-+ CONVERT_0565_TO_8888(tr),
-+ CONVERT_0565_TO_8888(bl),
-+ CONVERT_0565_TO_8888(br),
-+ interpolation_coord(vx),
-+ wb >> (8 - INTERPOLATION_PRECISION_BITS));
-+ vx += unit_x;
-+ *dst++ = CONVERT_8888_TO_0565(d);
-+ }
-+}
-+
-+#else
-+
-+#define SK_G16_MASK_IN_PLACE 0xfc0
-+
-+static inline uint32_t SkExpand_rgb_16(uint16_t c) {
-+
-+ return ((c & SK_G16_MASK_IN_PLACE) << 16) | (c & ~SK_G16_MASK_IN_PLACE);
-+}
-+
-+/** Compress an expanded value (from SkExpand_rgb_16) back down to a 16bit
-+ color value. The computation yields only 16bits of valid data, but we claim
-+ to return 32bits, so that the compiler won't generate extra instructions to
-+ "clean" the top 16bits. However, the top 16 can contain garbage, so it is
-+ up to the caller to safely ignore them.
-+*/
-+static inline uint16_t SkCompact_rgb_16(uint32_t c) {
-+ return ((c >> 16) & SK_G16_MASK_IN_PLACE) | (c & ~SK_G16_MASK_IN_PLACE);
-+}
-+// returns expanded * 5bits
-+static inline uint32_t Filter_565_Expanded(unsigned x, unsigned y,
-+ uint32_t a00, uint32_t a01,
-+ uint32_t a10, uint32_t a11) {
-+ a00 = SkExpand_rgb_16(a00);
-+ a01 = SkExpand_rgb_16(a01);
-+ a10 = SkExpand_rgb_16(a10);
-+ a11 = SkExpand_rgb_16(a11);
-+
-+ int xy = x * y >> 3;
-+ return a00 * (32 - 2*y - 2*x + xy) +
-+ a01 * (2*x - xy) +
-+ a10 * (2*y - xy) +
-+ a11 * xy;
-+}
-+
-+
-+
-+static force_inline void
-+scaled_bilinear_scanline_565_565_SRC (uint16_t * dst,
-+ const uint32_t * mask,
-+ const uint16_t * src_top,
-+ const uint16_t * src_bottom,
-+ int32_t w,
-+ int wt,
-+ int wb,
-+ pixman_fixed_t vx,
-+ pixman_fixed_t unit_x,
-+ pixman_fixed_t max_vx,
-+ pixman_bool_t zero_src)
-+{
-+ while ((w -= 1) >= 0)
-+ {
-+ uint16_t tl = src_top [pixman_fixed_to_int (vx)];
-+ uint16_t tr = src_top [pixman_fixed_to_int (vx) + 1];
-+ uint16_t bl = src_bottom [pixman_fixed_to_int (vx)];
-+ uint16_t br = src_bottom [pixman_fixed_to_int (vx) + 1];
-+
-+ uint32_t tmp = Filter_565_Expanded((vx>>12)&0xf, wb>>4, tl, tr, bl, br);
-+ vx += unit_x;
-+ *dst++ = SkCompact_rgb_16((tmp) >> 5);
-+ }
-+}
-+
-+
-+#endif
-+FAST_BILINEAR_MAINLOOP_COMMON (565_565_cover_SRC,
-+ scaled_bilinear_scanline_565_565_SRC,
-+ uint16_t, uint32_t, uint16_t,
-+ COVER, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (565_565_pad_SRC,
-+ scaled_bilinear_scanline_565_565_SRC,
-+ uint16_t, uint32_t, uint16_t,
-+ PAD, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (565_565_none_SRC,
-+ scaled_bilinear_scanline_565_565_SRC,
-+ uint16_t, uint32_t, uint16_t,
-+ NONE, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (565_565_normal_SRC,
-+ scaled_bilinear_scanline_565_565_SRC,
-+ uint16_t, uint32_t, uint16_t,
-+ NORMAL, FLAG_NONE)
-+
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_565_cover_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER,
-+ uint32_t, uint32_t, uint16_t,
-+ COVER, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_565_pad_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER,
-+ uint32_t, uint32_t, uint16_t,
-+ PAD, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_565_none_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER,
-+ uint32_t, uint32_t, uint16_t,
-+ NONE, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_565_normal_OVER,
-+ scaled_bilinear_scanline_8888_565_OVER,
-+ uint32_t, uint32_t, uint16_t,
-+ NORMAL, FLAG_NONE)
-+
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_cover_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER,
-+ uint32_t, uint32_t, uint32_t,
-+ COVER, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_pad_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER,
-+ uint32_t, uint32_t, uint32_t,
-+ PAD, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_none_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER,
-+ uint32_t, uint32_t, uint32_t,
-+ NONE, FLAG_NONE)
-+FAST_BILINEAR_MAINLOOP_COMMON (8888_8888_normal_OVER,
-+ scaled_bilinear_scanline_8888_8888_OVER,
-+ uint32_t, uint32_t, uint32_t,
-+ NORMAL, FLAG_NONE)
-+
- #define REPEAT_MIN_WIDTH 32
-
- static void
- fast_composite_tiled_repeat (pixman_implementation_t *imp,
- pixman_composite_info_t *info)
- {
- PIXMAN_COMPOSITE_ARGS (info);
- pixman_composite_func_t func;
-@@ -1960,16 +2172,20 @@ static const pixman_fast_path_t c_fast_p
- PIXMAN_any,
- (FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | FAST_PATH_BITS_IMAGE |
- FAST_PATH_NORMAL_REPEAT),
- PIXMAN_any, 0,
- PIXMAN_any, FAST_PATH_STD_DEST_FLAGS,
- fast_composite_tiled_repeat
- },
-
-+ SIMPLE_BILINEAR_FAST_PATH (SRC, r5g6b5, r5g6b5, 565_565),
-+ SIMPLE_BILINEAR_FAST_PATH (OVER, a8r8g8b8, r5g6b5, 8888_565),
-+ SIMPLE_BILINEAR_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, 8888_8888),
-+
- { PIXMAN_OP_NONE },
- };
-
- #ifdef WORDS_BIGENDIAN
- #define A1_FILL_MASK(n, offs) (((1U << (n)) - 1) << (32 - (offs) - (n)))
- #else
- #define A1_FILL_MASK(n, offs) (((1U << (n)) - 1) << (offs))
- #endif
-diff --git a/gfx/cairo/libpixman/src/pixman-inlines.h b/gfx/cairo/libpixman/src/pixman-inlines.h
---- a/gfx/cairo/libpixman/src/pixman-inlines.h
-+++ b/gfx/cairo/libpixman/src/pixman-inlines.h
-@@ -80,16 +80,21 @@ repeat (pixman_repeat_t repeat, int *c,
- }
- return TRUE;
- }
-
- #ifdef MOZ_GFX_OPTIMIZE_MOBILE
- #define LOW_QUALITY_INTERPOLATION
- #endif
-
-+#ifdef LOW_QUALITY_INTERPOLATION
-+#define INTERPOLATION_PRECISION_BITS 4
-+#else
-+#define INTERPOLATION_PRECISION_BITS 8
-+#endif
- static force_inline int32_t
- interpolation_coord(pixman_fixed_t t)
- {
- #ifdef LOW_QUALITY_INTERPOLATION
- return (t >> 12) & 0xf;
- #else
- return (t >> 8) & 0xff;
- #endif
diff --git a/gfx/cairo/pixman-component-alpha.patch b/gfx/cairo/pixman-component-alpha.patch
deleted file mode 100644
index f6a6f4a95..000000000
--- a/gfx/cairo/pixman-component-alpha.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-commit d14b8c688f4cbe6c9289955d9ce7257c07869f9e
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Wed May 6 10:19:04 2009 -0400
-
- create getter for component alpha
-
-diff --git a/gfx/cairo/libpixman/src/pixman-image.c b/gfx/cairo/libpixman/src/pixman-image.c
-index e80c479..2c49f92 100644
---- a/gfx/cairo/libpixman/src/pixman-image.c
-+++ b/gfx/cairo/libpixman/src/pixman-image.c
-@@ -563,6 +563,11 @@ pixman_image_set_component_alpha (pixman_image_t *image,
- image->common.component_alpha = component_alpha;
- }
-
-+PIXMAN_EXPORT pixman_bool_t
-+pixman_image_get_component_alpha (pixman_image_t *image)
-+{
-+ return image->common.component_alpha;
-+}
-
- PIXMAN_EXPORT void
- pixman_image_set_accessors (pixman_image_t *image,
-diff --git a/gfx/cairo/libpixman/src/pixman.h b/gfx/cairo/libpixman/src/pixman.h
-index 49c39d5..522a866 100644
---- a/gfx/cairo/libpixman/src/pixman.h
-+++ b/gfx/cairo/libpixman/src/pixman.h
-@@ -767,6 +767,7 @@ void pixman_image_set_alpha_map (pixman_image_t
- int16_t y);
- void pixman_image_set_component_alpha (pixman_image_t *image,
- pixman_bool_t component_alpha);
-+pixman_bool_t pixman_image_get_component_alpha (pixman_image_t *image);
- void pixman_image_set_accessors (pixman_image_t *image,
- pixman_read_memory_func_t read_func,
- pixman_write_memory_func_t write_func);
diff --git a/gfx/cairo/pixman-dither.patch b/gfx/cairo/pixman-dither.patch
deleted file mode 100644
index 633a8d728..000000000
--- a/gfx/cairo/pixman-dither.patch
+++ /dev/null
@@ -1,310 +0,0 @@
-diff --git a/gfx/cairo/libpixman/src/pixman-dither.h b/gfx/cairo/libpixman/src/pixman-dither.h
-new file mode 100644
---- /dev/null
-+++ b/gfx/cairo/libpixman/src/pixman-dither.h
-@@ -0,0 +1,51 @@
-+#define R16_BITS 5
-+#define G16_BITS 6
-+#define B16_BITS 5
-+
-+#define R16_SHIFT (B16_BITS + G16_BITS)
-+#define G16_SHIFT (B16_BITS)
-+#define B16_SHIFT 0
-+
-+#define MASK 0xff
-+#define ONE_HALF 0x80
-+
-+#define A_SHIFT 8 * 3
-+#define R_SHIFT 8 * 2
-+#define G_SHIFT 8
-+#define A_MASK 0xff000000
-+#define R_MASK 0xff0000
-+#define G_MASK 0xff00
-+
-+#define RB_MASK 0xff00ff
-+#define AG_MASK 0xff00ff00
-+#define RB_ONE_HALF 0x800080
-+#define RB_MASK_PLUS_ONE 0x10000100
-+
-+#define ALPHA_8(x) ((x) >> A_SHIFT)
-+#define RED_8(x) (((x) >> R_SHIFT) & MASK)
-+#define GREEN_8(x) (((x) >> G_SHIFT) & MASK)
-+#define BLUE_8(x) ((x) & MASK)
-+
-+// This uses the same dithering technique that Skia does.
-+// It is essentially preturbing the lower bit based on the
-+// high bit
-+static inline uint16_t dither_32_to_16(uint32_t c)
-+{
-+ uint8_t b = BLUE_8(c);
-+ uint8_t g = GREEN_8(c);
-+ uint8_t r = RED_8(c);
-+ r = ((r << 1) - ((r >> (8 - R16_BITS) << (8 - R16_BITS)) | (r >> R16_BITS))) >> (8 - R16_BITS);
-+ g = ((g << 1) - ((g >> (8 - G16_BITS) << (8 - G16_BITS)) | (g >> G16_BITS))) >> (8 - G16_BITS);
-+ b = ((b << 1) - ((b >> (8 - B16_BITS) << (8 - B16_BITS)) | (b >> B16_BITS))) >> (8 - B16_BITS);
-+ return ((r << R16_SHIFT) | (g << G16_SHIFT) | (b << B16_SHIFT));
-+}
-+
-+static inline uint16_t dither_8888_to_0565(uint32_t color, pixman_bool_t toggle)
-+{
-+ // alternate between a preturbed truncation and a regular truncation
-+ if (toggle) {
-+ return dither_32_to_16(color);
-+ } else {
-+ return CONVERT_8888_TO_0565(color);
-+ }
-+}
-diff --git a/gfx/cairo/libpixman/src/pixman-linear-gradient.c b/gfx/cairo/libpixman/src/pixman-linear-gradient.c
---- a/gfx/cairo/libpixman/src/pixman-linear-gradient.c
-+++ b/gfx/cairo/libpixman/src/pixman-linear-gradient.c
-@@ -26,16 +26,18 @@
- */
-
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
- #include <stdlib.h>
- #include "pixman-private.h"
-
-+#include "pixman-dither.h"
-+
- static pixman_bool_t
- linear_gradient_is_horizontal (pixman_image_t *image,
- int x,
- int y,
- int width,
- int height)
- {
- linear_gradient_t *linear = (linear_gradient_t *)image;
-@@ -222,25 +224,28 @@ linear_get_scanline_narrow (pixman_iter_
- return iter->buffer;
- }
-
- static uint16_t convert_8888_to_0565(uint32_t color)
- {
- return CONVERT_8888_TO_0565(color);
- }
-
-+
-+
- static uint32_t *
- linear_get_scanline_16 (pixman_iter_t *iter,
- const uint32_t *mask)
- {
- pixman_image_t *image = iter->image;
- int x = iter->x;
- int y = iter->y;
- int width = iter->width;
- uint16_t * buffer = (uint16_t*)iter->buffer;
-+ pixman_bool_t toggle = ((x ^ y) & 1);
-
- pixman_vector_t v, unit;
- pixman_fixed_32_32_t l;
- pixman_fixed_48_16_t dx, dy;
- gradient_t *gradient = (gradient_t *)image;
- linear_gradient_t *linear = (linear_gradient_t *)image;
- uint16_t *end = buffer + width;
- pixman_gradient_walker_t walker;
-@@ -294,34 +299,47 @@ linear_get_scanline_16 (pixman_iter_t *
- t = ((dx * v.vector[0] + dy * v.vector[1]) -
- (dx * linear->p1.x + dy * linear->p1.y) * v2) * invden;
- inc = (dx * unit.vector[0] + dy * unit.vector[1]) * invden;
- }
- next_inc = 0;
-
- if (((pixman_fixed_32_32_t )(inc * width)) == 0)
- {
-- register uint16_t color;
-+ register uint32_t color;
-+ uint16_t dither_diff;
-+ uint16_t color16;
-+ uint16_t color16b;
-
-- color = convert_8888_to_0565(_pixman_gradient_walker_pixel (&walker, t));
-- while (buffer < end)
-- *buffer++ = color;
-+ color = _pixman_gradient_walker_pixel (&walker, t);
-+ color16 = dither_8888_to_0565(color, toggle);
-+ color16b = dither_8888_to_0565(color, toggle^1);
-+ // compute the difference
-+ dither_diff = color16 ^ color16b;
-+ while (buffer < end) {
-+ *buffer++ = color16;
-+ // use dither_diff to toggle between color16 and color16b
-+ color16 ^= dither_diff;
-+ toggle ^= 1;
-+ }
- }
- else
- {
- int i;
-
- i = 0;
- while (buffer < end)
- {
- if (!mask || *mask++)
- {
-- *buffer = convert_8888_to_0565(_pixman_gradient_walker_pixel (&walker,
-- t + next_inc));
-+ *buffer = dither_8888_to_0565(_pixman_gradient_walker_pixel (&walker,
-+ t + next_inc),
-+ toggle);
- }
-+ toggle ^= 1;
- i++;
- next_inc = inc * i;
- buffer++;
- }
- }
- }
- else
- {
-@@ -340,18 +358,20 @@ linear_get_scanline_16 (pixman_iter_t *
-
- invden = pixman_fixed_1 * (double) pixman_fixed_1 /
- (l * (double) v.vector[2]);
- v2 = v.vector[2] * (1. / pixman_fixed_1);
- t = ((dx * v.vector[0] + dy * v.vector[1]) -
- (dx * linear->p1.x + dy * linear->p1.y) * v2) * invden;
- }
-
-- *buffer = convert_8888_to_0565(_pixman_gradient_walker_pixel (&walker, t));
-+ *buffer = dither_8888_to_0565(_pixman_gradient_walker_pixel (&walker, t),
-+ toggle);
- }
-+ toggle ^= 1;
-
- ++buffer;
-
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
- }
- }
-@@ -369,17 +389,18 @@ linear_get_scanline_wide (pixman_iter_t
- pixman_expand ((uint64_t *)buffer, buffer, PIXMAN_a8r8g8b8, iter->width);
-
- return buffer;
- }
-
- void
- _pixman_linear_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter)
- {
-- if (linear_gradient_is_horizontal (
-+ // XXX: we can't use this optimization when dithering
-+ if (0 && linear_gradient_is_horizontal (
- iter->image, iter->x, iter->y, iter->width, iter->height))
- {
- if (iter->flags & ITER_16)
- linear_get_scanline_16 (iter, NULL);
- else if (iter->flags & ITER_NARROW)
- linear_get_scanline_narrow (iter, NULL);
- else
- linear_get_scanline_wide (iter, NULL);
-diff --git a/gfx/cairo/libpixman/src/pixman-radial-gradient.c b/gfx/cairo/libpixman/src/pixman-radial-gradient.c
---- a/gfx/cairo/libpixman/src/pixman-radial-gradient.c
-+++ b/gfx/cairo/libpixman/src/pixman-radial-gradient.c
-@@ -29,16 +29,18 @@
-
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
- #include <stdlib.h>
- #include <math.h>
- #include "pixman-private.h"
-
-+#include "pixman-dither.h"
-+
- static inline pixman_fixed_32_32_t
- dot (pixman_fixed_48_16_t x1,
- pixman_fixed_48_16_t y1,
- pixman_fixed_48_16_t z1,
- pixman_fixed_48_16_t x2,
- pixman_fixed_48_16_t y2,
- pixman_fixed_48_16_t z2)
- {
-@@ -489,16 +491,17 @@ radial_get_scanline_16 (pixman_iter_t *i
- * <=> for every p, the radiuses associated with the two t solutions
- * have opposite sign
- */
- pixman_image_t *image = iter->image;
- int x = iter->x;
- int y = iter->y;
- int width = iter->width;
- uint16_t *buffer = iter->buffer;
-+ pixman_bool_t toggle = ((x ^ y) & 1);
-
- gradient_t *gradient = (gradient_t *)image;
- radial_gradient_t *radial = (radial_gradient_t *)image;
- uint16_t *end = buffer + width;
- pixman_gradient_walker_t walker;
- pixman_vector_t v, unit;
-
- /* reference point is the center of the pixel */
-@@ -575,25 +578,27 @@ radial_get_scanline_16 (pixman_iter_t *i
- unit.vector[0], unit.vector[1], 0);
- ddc = 2 * dot (unit.vector[0], unit.vector[1], 0,
- unit.vector[0], unit.vector[1], 0);
-
- while (buffer < end)
- {
- if (!mask || *mask++)
- {
-- *buffer = convert_8888_to_0565(
-+ *buffer = dither_8888_to_0565(
- radial_compute_color (radial->a, b, c,
- radial->inva,
- radial->delta.radius,
- radial->mindr,
- &walker,
-- image->common.repeat));
-+ image->common.repeat),
-+ toggle);
- }
-
-+ toggle ^= 1;
- b += db;
- c += dc;
- dc += ddc;
- ++buffer;
- }
- }
- else
- {
-@@ -621,31 +626,33 @@ radial_get_scanline_16 (pixman_iter_t *i
- radial->delta.x, radial->delta.y,
- radial->delta.radius);
- /* / pixman_fixed_1 / pixman_fixed_1 */
-
- c = fdot (pdx, pdy, -radial->c1.radius,
- pdx, pdy, radial->c1.radius);
- /* / pixman_fixed_1 / pixman_fixed_1 */
-
-- *buffer = convert_8888_to_0565 (
-+ *buffer = dither_8888_to_0565 (
- radial_compute_color (radial->a, b, c,
- radial->inva,
- radial->delta.radius,
- radial->mindr,
- &walker,
-- image->common.repeat));
-+ image->common.repeat),
-+ toggle);
- }
- else
- {
- *buffer = 0;
- }
- }
-
- ++buffer;
-+ toggle ^= 1;
-
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
- }
- }
-
- iter->y++;
-
diff --git a/gfx/cairo/pixman-enable-altivec-acceleration.patch b/gfx/cairo/pixman-enable-altivec-acceleration.patch
deleted file mode 100644
index d0685cce1..000000000
--- a/gfx/cairo/pixman-enable-altivec-acceleration.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-# HG changeset patch
-# Parent d0b3d7af190b3c62397ece2bc33b429d903e455d
-
-diff -r d0b3d7af190b gfx/cairo/libpixman/src/Makefile.in
---- a/gfx/cairo/libpixman/src/Makefile.in Sat Nov 24 14:26:11 2012 +0100
-+++ b/gfx/cairo/libpixman/src/Makefile.in Thu Nov 29 22:20:59 2012 +0100
-@@ -42,6 +42,10 @@
- endif
-
- ifdef GNU_CC
-+ifeq (ppc,$(findstring ppc,$(OS_TEST)))
-+USE_VMX=1
-+VMX_CFLAGS=-maltivec
-+endif
- ifeq (86,$(findstring 86,$(OS_TEST)))
- USE_MMX=1
- MMX_CFLAGS=-mmmx -Winline
-@@ -156,3 +160,6 @@
- pixman-sse2.$(OBJ_SUFFIX): COMPILE_CFLAGS += $(SSE2_CFLAGS)
-
- pixman-arm-neon.$(OBJ_SUFFIX): COMPILE_CFLAGS += $(ARM_NEON_CFLAGS)
-+
-+pixman-vmx.$(OBJ_SUFFIX): COMPILE_CFLAGS += $(VMX_CFLAGS)
-+
-diff -r d0b3d7af190b gfx/cairo/libpixman/src/pixman-vmx.c
---- a/gfx/cairo/libpixman/src/pixman-vmx.c Sat Nov 24 14:26:11 2012 +0100
-+++ b/gfx/cairo/libpixman/src/pixman-vmx.c Thu Nov 29 22:20:59 2012 +0100
-@@ -25,7 +25,10 @@
- * Based on fbmmx.c by Owen Taylor, Søren Sandmann and Nicholas Miell
- */
-
-+#ifdef HAVE_CONFIG_H
- #include <config.h>
-+#endif
-+
- #include "pixman-private.h"
- #include "pixman-combine32.h"
- #include <altivec.h>
diff --git a/gfx/cairo/pixman-export.patch b/gfx/cairo/pixman-export.patch
deleted file mode 100644
index 78ca8c669..000000000
--- a/gfx/cairo/pixman-export.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/gfx/cairo/libpixman/src/pixman-compiler.h b/gfx/cairo/libpixman/src/pixman-compiler.h
---- a/gfx/cairo/libpixman/src/pixman-compiler.h
-+++ b/gfx/cairo/libpixman/src/pixman-compiler.h
-@@ -59,26 +59,33 @@
- # ifndef force_inline
- # define force_inline inline
- # endif
- # ifndef noinline
- # define noinline
- # endif
- #endif
-
-+/* In libxul builds we don't ever want to export pixman symbols */
-+#if 1
-+# define PIXMAN_EXPORT cairo_public
-+#else
-+
- /* GCC visibility */
- #if defined(__GNUC__) && __GNUC__ >= 4 && !defined(_WIN32)
- # define PIXMAN_EXPORT __attribute__ ((visibility("default")))
- /* Sun Studio 8 visibility */
- #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
- # define PIXMAN_EXPORT __global
- #else
- # define PIXMAN_EXPORT
- #endif
-
-+#endif
-+
- /* TLS */
- #if defined(PIXMAN_NO_TLS)
-
- # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
- static type name
- # define PIXMAN_GET_THREAD_LOCAL(name) \
- (&name)
-
diff --git a/gfx/cairo/pixman-image-transform.patch b/gfx/cairo/pixman-image-transform.patch
deleted file mode 100644
index 2f93d315a..000000000
--- a/gfx/cairo/pixman-image-transform.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-# HG changeset patch
-# User Jeff Muizelaar <jmuizelaar@mozilla.com>
-# Date 1299543337 18000
-# Node ID 57f411f16517fa3abc31b6b081dd31420c4d9b45
-# Parent e56ecd8b3a68c158025207c5fd081d043e28f5ce
-Bug 637828. Reset the transform on the dest image. r=joe
-
-We can get into a situation where the destination image has a transform
-because we use it as source. The transform set when the image is a source
-sticks around and when we use it as a destination pixman gets confused.
-
-It seems like the code at fault here is really pixman. I think that pixman
-should probably not be using a transformed fetch on the destination image under
-any circumstances.
-
-For example, in this case we're fetching destination pixels from a different
-part of the image than we're storing them to. I can't see any reason for
-wanting this behaviour.
-
-However, reseting the transform seemed like the easiest solution.
-
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -1138,16 +1138,27 @@ _cairo_image_surface_composite (cairo_op
- return status;
-
- status = _cairo_image_surface_set_attributes (src, &src_attr,
- dst_x + width / 2.,
- dst_y + height / 2.);
- if (unlikely (status))
- goto CLEANUP_SURFACES;
-
-+ /* we sometimes get destinations with transforms.
-+ * we're not equiped to deal with this */
-+ {
-+ static const pixman_transform_t id = {
-+ {{ pixman_fixed_1, 0, 0 },
-+ { 0, pixman_fixed_1, 0 },
-+ { 0, 0, pixman_fixed_1 }}
-+ };
-+ pixman_image_set_transform (dst->pixman_image, &id);
-+ }
-+
- if (mask) {
- status = _cairo_image_surface_set_attributes (mask, &mask_attr,
- dst_x + width / 2.,
- dst_y + height / 2.);
- if (unlikely (status))
- goto CLEANUP_SURFACES;
-
- pixman_image_composite (_pixman_operator (op),
diff --git a/gfx/cairo/pixman-limits.patch b/gfx/cairo/pixman-limits.patch
deleted file mode 100644
index bc820e673..000000000
--- a/gfx/cairo/pixman-limits.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-commit 3c275c75e381184fb3fa0537c4bfce50b44690e7
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Fri Apr 20 00:12:32 2012 -0400
-
- limits
-
-diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
-index 2ec2594..de05c0e 100644
---- a/pixman/pixman-utils.c
-+++ b/pixman/pixman-utils.c
-@@ -27,6 +27,7 @@
- #endif
- #include <stdio.h>
- #include <stdlib.h>
-+#include <limits.h>
-
- #include "pixman-private.h"
-
diff --git a/gfx/cairo/pixman-lowres-interp.patch b/gfx/cairo/pixman-lowres-interp.patch
deleted file mode 100644
index e2572f000..000000000
--- a/gfx/cairo/pixman-lowres-interp.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-summary: Bug 689707. Use lower precision bilinear interpolation. r=joe
-
-diff --git a/gfx/cairo/libpixman/src/pixman-bits-image.c b/gfx/cairo/libpixman/src/pixman-bits-image.c
---- a/gfx/cairo/libpixman/src/pixman-bits-image.c
-+++ b/gfx/cairo/libpixman/src/pixman-bits-image.c
-@@ -124,18 +124,18 @@ bits_image_fetch_pixel_bilinear (bits_im
- int height = image->height;
- int x1, y1, x2, y2;
- uint32_t tl, tr, bl, br;
- int32_t distx, disty;
-
- x1 = x - pixman_fixed_1 / 2;
- y1 = y - pixman_fixed_1 / 2;
-
-- distx = (x1 >> 8) & 0xff;
-- disty = (y1 >> 8) & 0xff;
-+ distx = interpolation_coord(x1);
-+ disty = interpolation_coord(y1);
-
- x1 = pixman_fixed_to_int (x1);
- y1 = pixman_fixed_to_int (y1);
- x2 = x1 + 1;
- y2 = y1 + 1;
-
- if (repeat_mode != PIXMAN_REPEAT_NONE)
- {
-@@ -190,17 +190,17 @@ bits_image_fetch_bilinear_no_repeat_8888
-
- if (!pixman_transform_point_3d (bits->common.transform, &v))
- return;
-
- ux = ux_top = ux_bottom = bits->common.transform->matrix[0][0];
- x = x_top = x_bottom = v.vector[0] - pixman_fixed_1/2;
-
- y = v.vector[1] - pixman_fixed_1/2;
-- disty = (y >> 8) & 0xff;
-+ disty = interpolation_coord(y);
-
- /* Load the pointers to the first and second lines from the source
- * image that bilinear code must read.
- *
- * The main trick in this code is about the check if any line are
- * outside of the image;
- *
- * When I realize that a line (any one) is outside, I change
-@@ -299,17 +299,17 @@ bits_image_fetch_bilinear_no_repeat_8888
- while (buffer < end && x < 0)
- {
- uint32_t tr, br;
- int32_t distx;
-
- tr = top_row[pixman_fixed_to_int (x_top) + 1] | top_mask;
- br = bottom_row[pixman_fixed_to_int (x_bottom) + 1] | bottom_mask;
-
-- distx = (x >> 8) & 0xff;
-+ distx = interpolation_coord(x);
-
- *buffer++ = bilinear_interpolation (0, tr, 0, br, distx, disty);
-
- x += ux;
- x_top += ux_top;
- x_bottom += ux_bottom;
- mask += mask_inc;
- }
-@@ -324,17 +324,17 @@ bits_image_fetch_bilinear_no_repeat_8888
- uint32_t tl, tr, bl, br;
- int32_t distx;
-
- tl = top_row [pixman_fixed_to_int (x_top)] | top_mask;
- tr = top_row [pixman_fixed_to_int (x_top) + 1] | top_mask;
- bl = bottom_row [pixman_fixed_to_int (x_bottom)] | bottom_mask;
- br = bottom_row [pixman_fixed_to_int (x_bottom) + 1] | bottom_mask;
-
-- distx = (x >> 8) & 0xff;
-+ distx = interpolation_coord(x);
-
- *buffer = bilinear_interpolation (tl, tr, bl, br, distx, disty);
- }
-
- buffer++;
- x += ux;
- x_top += ux_top;
- x_bottom += ux_bottom;
-@@ -348,17 +348,17 @@ bits_image_fetch_bilinear_no_repeat_8888
- if (*mask)
- {
- uint32_t tl, bl;
- int32_t distx;
-
- tl = top_row [pixman_fixed_to_int (x_top)] | top_mask;
- bl = bottom_row [pixman_fixed_to_int (x_bottom)] | bottom_mask;
-
-- distx = (x >> 8) & 0xff;
-+ distx = interpolation_coord(x);
-
- *buffer = bilinear_interpolation (tl, 0, bl, 0, distx, disty);
- }
-
- buffer++;
- x += ux;
- x_top += ux_top;
- x_bottom += ux_bottom;
-@@ -675,18 +675,18 @@ bits_image_fetch_bilinear_affine (pixman
- const uint8_t *row2;
-
- if (mask && !mask[i])
- goto next;
-
- x1 = x - pixman_fixed_1 / 2;
- y1 = y - pixman_fixed_1 / 2;
-
-- distx = (x1 >> 8) & 0xff;
-- disty = (y1 >> 8) & 0xff;
-+ distx = interpolation_coord(x1);
-+ disty = interpolation_coord(y1);
-
- y1 = pixman_fixed_to_int (y1);
- y2 = y1 + 1;
- x1 = pixman_fixed_to_int (x1);
- x2 = x1 + 1;
-
- if (repeat_mode != PIXMAN_REPEAT_NONE)
- {
-diff --git a/gfx/cairo/libpixman/src/pixman-inlines.h b/gfx/cairo/libpixman/src/pixman-inlines.h
---- a/gfx/cairo/libpixman/src/pixman-inlines.h
-+++ b/gfx/cairo/libpixman/src/pixman-inlines.h
-@@ -76,16 +76,31 @@ repeat (pixman_repeat_t repeat, int *c,
- {
- *c = MOD (*c, size * 2);
- if (*c >= size)
- *c = size * 2 - *c - 1;
- }
- return TRUE;
- }
-
-+#ifdef MOZ_GFX_OPTIMIZE_MOBILE
-+#define LOW_QUALITY_INTERPOLATION
-+#endif
-+
-+static force_inline int32_t
-+interpolation_coord(pixman_fixed_t t)
-+{
-+#ifdef LOW_QUALITY_INTERPOLATION
-+ return (t >> 12) & 0xf;
-+#else
-+ return (t >> 8) & 0xff;
-+#endif
-+}
-+
-+
- #if SIZEOF_LONG > 4
-
- static force_inline uint32_t
- bilinear_interpolation (uint32_t tl, uint32_t tr,
- uint32_t bl, uint32_t br,
- int distx, int disty)
- {
- uint64_t distxy, distxiy, distixy, distixiy;
-@@ -122,16 +137,44 @@ bilinear_interpolation (uint32_t tl, uin
- f = tl64 * distixiy + tr64 * distxiy + bl64 * distixy + br64 * distxy;
- r |= ((f >> 16) & 0x000000ff00000000ull) | (f & 0xff000000ull);
-
- return (uint32_t)(r >> 16);
- }
-
- #else
-
-+#ifdef LOW_QUALITY_INTERPOLATION
-+/* Based on Filter_32_opaque_portable from Skia */
-+static force_inline uint32_t
-+bilinear_interpolation(uint32_t a00, uint32_t a01,
-+ uint32_t a10, uint32_t a11,
-+ int x, int y)
-+{
-+ int xy = x * y;
-+ static const uint32_t mask = 0xff00ff;
-+
-+ int scale = 256 - 16*y - 16*x + xy;
-+ uint32_t lo = (a00 & mask) * scale;
-+ uint32_t hi = ((a00 >> 8) & mask) * scale;
-+
-+ scale = 16*x - xy;
-+ lo += (a01 & mask) * scale;
-+ hi += ((a01 >> 8) & mask) * scale;
-+
-+ scale = 16*y - xy;
-+ lo += (a10 & mask) * scale;
-+ hi += ((a10 >> 8) & mask) * scale;
-+
-+ lo += (a11 & mask) * xy;
-+ hi += ((a11 >> 8) & mask) * xy;
-+
-+ return ((lo >> 8) & mask) | (hi & ~mask);
-+}
-+#else
- static force_inline uint32_t
- bilinear_interpolation (uint32_t tl, uint32_t tr,
- uint32_t bl, uint32_t br,
- int distx, int disty)
- {
- int distxy, distxiy, distixy, distixiy;
- uint32_t f, r;
-
-@@ -164,17 +207,17 @@ bilinear_interpolation (uint32_t tl, uin
-
- /* Alpha */
- f = (tl & 0x0000ff00) * distixiy + (tr & 0x0000ff00) * distxiy
- + (bl & 0x0000ff00) * distixy + (br & 0x0000ff00) * distxy;
- r |= f & 0xff000000;
-
- return r;
- }
--
-+#endif
- #endif
-
- /*
- * For each scanline fetched from source image with PAD repeat:
- * - calculate how many pixels need to be padded on the left side
- * - calculate how many pixels need to be padded on the right side
- * - update width to only count pixels which are fetched from the image
- * All this information is returned via 'width', 'left_pad', 'right_pad'
diff --git a/gfx/cairo/pixman-rename-and-endian.patch b/gfx/cairo/pixman-rename-and-endian.patch
deleted file mode 100644
index 41006695f..000000000
--- a/gfx/cairo/pixman-rename-and-endian.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/gfx/cairo/libpixman/src/pixman.h b/gfx/cairo/libpixman/src/pixman.h
---- a/gfx/cairo/libpixman/src/pixman.h
-+++ b/gfx/cairo/libpixman/src/pixman.h
-@@ -64,16 +64,18 @@ SOFTWARE.
- * 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.
- */
-
- #ifndef PIXMAN_H__
- #define PIXMAN_H__
-
-+#include "cairo-platform.h"
-+
- #include <pixman-version.h>
-
- /*
- * Standard integers
- */
- #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
- # include <inttypes.h>
- #elif defined (_MSC_VER)
diff --git a/gfx/cairo/pixman-xp-dll-workaround b/gfx/cairo/pixman-xp-dll-workaround
deleted file mode 100644
index e5d1fcbf8..000000000
--- a/gfx/cairo/pixman-xp-dll-workaround
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/gfx/cairo/libpixman/src/pixman-compiler.h b/gfx/cairo/libpixman/src/pixman-compiler.h
---- a/gfx/cairo/libpixman/src/pixman-compiler.h
-+++ b/gfx/cairo/libpixman/src/pixman-compiler.h
-@@ -114,20 +114,22 @@
-
- #elif defined(TLS)
-
- # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
- static TLS type name
- # define PIXMAN_GET_THREAD_LOCAL(name) \
- (&name)
-
--#elif defined(__MINGW32__)
-+#elif defined(__MINGW32__) || defined(PIXMAN_USE_XP_DLL_TLS_WORKAROUND)
-
- # define _NO_W32_PSEUDO_MODIFIERS
- # include <windows.h>
-+#undef IN
-+#undef OUT
-
- # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
- static volatile int tls_ ## name ## _initialized = 0; \
- static void *tls_ ## name ## _mutex = NULL; \
- static unsigned tls_ ## name ## _index; \
- \
- static type * \
- tls_ ## name ## _alloc (void) \
diff --git a/gfx/cairo/premultiply-alpha-solid-gradients.patch b/gfx/cairo/premultiply-alpha-solid-gradients.patch
deleted file mode 100644
index 665f64969..000000000
--- a/gfx/cairo/premultiply-alpha-solid-gradients.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Fix single and multi-stop solid gradients by multiplying by the alpha component. r=roc
-
-This cairo commit that caused the problem: 2d790daa957471670f4ae0d3b22da89e4ee7111f.
-It was merged into mozilla-central with 1effb72d30cf
-
-diff --git a/gfx/cairo/cairo/src/cairo-pattern.c b/gfx/cairo/cairo/src/cairo-pattern.c
---- a/gfx/cairo/cairo/src/cairo-pattern.c
-+++ b/gfx/cairo/cairo/src/cairo-pattern.c
-@@ -2262,8 +2262,17 @@ _cairo_pattern_acquire_surface (const ca
-
- if (src->n_stops)
- {
-+ cairo_color_t color;
-+
-+ /* multiply by alpha */
-+ _cairo_color_init_rgba (&color,
-+ src->stops->color.red,
-+ src->stops->color.green,
-+ src->stops->color.blue,
-+ src->stops->color.alpha);
-+
- _cairo_pattern_init_solid (&solid,
-- &src->stops->color,
-+ &color,
- CAIRO_CONTENT_COLOR_ALPHA);
- }
- else
-@@ -2295,9 +2304,17 @@ _cairo_pattern_acquire_surface (const ca
- }
- if (i == src->n_stops) {
- cairo_solid_pattern_t solid;
-+ cairo_color_t color;
-+
-+ /* multiply by alpha */
-+ _cairo_color_init_rgba (&color,
-+ src->stops->color.red,
-+ src->stops->color.green,
-+ src->stops->color.blue,
-+ src->stops->color.alpha);
-
- _cairo_pattern_init_solid (&solid,
-- &src->stops->color,
-+ &color,
- CAIRO_CONTENT_COLOR_ALPHA);
-
- status =
diff --git a/gfx/cairo/quartz-cache-CGImageRef.patch b/gfx/cairo/quartz-cache-CGImageRef.patch
deleted file mode 100644
index f27f03081..000000000
--- a/gfx/cairo/quartz-cache-CGImageRef.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-changeset: 42954:7881873b2b5d
-user: Robert O'Callahan <robert@ocallahan.org>
-date: Tue Jun 01 11:19:45 2010 +1200
-summary: Bug 552537. Cache the CGImageRef that we create for a CGBitmapContext so that we can take advantage of Quartz caching optimizations. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-private.h b/gfx/cairo/cairo/src/cairo-quartz-private.h
---- a/gfx/cairo/cairo/src/cairo-quartz-private.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz-private.h
-@@ -49,16 +49,24 @@ typedef struct cairo_quartz_surface {
-
- CGContextRef cgContext;
- CGAffineTransform cgContextBaseCTM;
-
- void *imageData;
- cairo_surface_t *imageSurfaceEquiv;
-
- cairo_surface_clipper_t clipper;
-+
-+ /**
-+ * If non-null, this is a CGImage representing the contents of the surface.
-+ * We clear this out before any painting into the surface, so that we
-+ * don't force a copy to be created.
-+ */
-+ CGImageRef bitmapContextImage;
-+
- cairo_rectangle_int_t extents;
- } cairo_quartz_surface_t;
-
- typedef struct cairo_quartz_image_surface {
- cairo_surface_t base;
-
- cairo_rectangle_int_t extents;
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1134,19 +1134,24 @@ _cairo_surface_to_cgimage (cairo_surface
- if (stype == CAIRO_SURFACE_TYPE_QUARTZ) {
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) source;
- if (IS_EMPTY(surface)) {
- *image_out = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
-
- if (_cairo_quartz_is_cgcontext_bitmap_context (surface->cgContext)) {
-- *image_out = CGBitmapContextCreateImage (surface->cgContext);
-- if (*image_out)
-- return CAIRO_STATUS_SUCCESS;
-+ if (!surface->bitmapContextImage) {
-+ surface->bitmapContextImage =
-+ CGBitmapContextCreateImage (surface->cgContext);
-+ }
-+ if (surface->bitmapContextImage) {
-+ *image_out = CGImageRetain (surface->bitmapContextImage);
-+ return CAIRO_STATUS_SUCCESS;
-+ }
- }
- }
-
- if (stype != CAIRO_SURFACE_TYPE_IMAGE) {
- status = _cairo_surface_acquire_source_image (source,
- &isurf, &image_extra);
- if (status)
- return status;
-@@ -1589,16 +1594,29 @@ _cairo_quartz_setup_radial_source (cairo
-
- CGColorSpaceRelease(rgb);
- CGFunctionRelease(gradFunc);
-
- state->action = DO_SHADING;
- }
-
- /**
-+ * Call this before any operation that can modify the contents of a
-+ * cairo_quartz_surface_t.
-+ */
-+static void
-+_cairo_quartz_surface_will_change (cairo_quartz_surface_t *surface)
-+{
-+ if (surface->bitmapContextImage) {
-+ CGImageRelease (surface->bitmapContextImage);
-+ surface->bitmapContextImage = NULL;
-+ }
-+}
-+
-+/**
- * Sets up internal state to be used to draw the source mask, stored in
- * cairo_quartz_state_t. Guarantees to call CGContextSaveGState on
- * surface->cgContext.
- */
- static cairo_quartz_drawing_state_t
- _cairo_quartz_setup_state (cairo_quartz_surface_t *surface,
- const cairo_pattern_t *source,
- cairo_operator_t op,
-@@ -1609,16 +1627,18 @@ _cairo_quartz_setup_state (cairo_quartz_
- cairo_status_t status;
-
- state.context = context;
- state.image = NULL;
- state.imageSurface = NULL;
- state.shading = NULL;
- state.pattern = NULL;
-
-+ _cairo_quartz_surface_will_change (surface);
-+
- // Save before we change the pattern, colorspace, etc. so that
- // we can restore and make sure that quartz releases our
- // pattern (which may be stack allocated)
- CGContextSaveGState(context);
-
- CGContextSetInterpolationQuality (context, _cairo_quartz_filter_to_quartz (source->filter));
-
- status = _cairo_quartz_surface_set_cairo_operator (surface, op);
-@@ -1936,16 +1956,21 @@ _cairo_quartz_surface_finish (void *abst
- /* Restore our saved gstate that we use to reset clipping */
- CGContextRestoreGState (surface->cgContext);
- _cairo_surface_clipper_reset (&surface->clipper);
-
- CGContextRelease (surface->cgContext);
-
- surface->cgContext = NULL;
-
-+ if (surface->bitmapContextImage) {
-+ CGImageRelease (surface->bitmapContextImage);
-+ surface->bitmapContextImage = NULL;
-+ }
-+
- if (surface->imageSurfaceEquiv) {
- cairo_surface_destroy (surface->imageSurfaceEquiv);
- surface->imageSurfaceEquiv = NULL;
- }
-
- if (surface->imageData) {
- free (surface->imageData);
- surface->imageData = NULL;
-@@ -2006,16 +2031,18 @@ _cairo_quartz_surface_acquire_dest_image
- cairo_rectangle_int_t *image_rect,
- void **image_extra)
- {
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_int_status_t status;
-
- ND((stderr, "%p _cairo_quartz_surface_acquire_dest_image\n", surface));
-
-+ _cairo_quartz_surface_will_change (surface);
-+
- status = _cairo_quartz_get_image (surface, image_out);
- if (status)
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
- *image_rect = surface->extents;
- *image_extra = NULL;
-
- return CAIRO_STATUS_SUCCESS;
-@@ -2939,16 +2966,17 @@ _cairo_quartz_surface_create_internal (C
- */
- CGContextSaveGState (cgContext);
-
- surface->cgContext = cgContext;
- surface->cgContextBaseCTM = CGContextGetCTM (cgContext);
-
- surface->imageData = NULL;
- surface->imageSurfaceEquiv = NULL;
-+ surface->bitmapContextImage = NULL;
-
- return surface;
- }
-
- /**
- * cairo_quartz_surface_create_for_cg_context
- * @cgContext: the existing CGContext for which to create the surface
- * @width: width of the surface, in pixels
-
diff --git a/gfx/cairo/quartz-cg-layers-fix-fallback.patch b/gfx/cairo/quartz-cg-layers-fix-fallback.patch
deleted file mode 100644
index bcebab350..000000000
--- a/gfx/cairo/quartz-cg-layers-fix-fallback.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Bug 572912. Fix surface type passed to cairo_quartz_surface_create during fallback for CGLayers. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -2026,17 +2026,17 @@ _cairo_quartz_surface_acquire_image (voi
-
- /* ND((stderr, "%p _cairo_quartz_surface_acquire_image\n", surface)); */
-
- status = _cairo_quartz_get_image (surface, image_out);
-
- if (status == CAIRO_INT_STATUS_UNSUPPORTED && surface->cgLayer) {
- /* copy the layer into a Quartz bitmap context so we can get the data */
- cairo_surface_t *tmp =
-- cairo_quartz_surface_create (CAIRO_CONTENT_COLOR_ALPHA,
-+ cairo_quartz_surface_create (CAIRO_FORMAT_ARGB32,
- surface->extents.width,
- surface->extents.height);
- cairo_quartz_surface_t *tmp_surface = (cairo_quartz_surface_t *) tmp;
-
- /* if surface creation failed, we won't have a Quartz surface here */
- if (cairo_surface_get_type (tmp) == CAIRO_SURFACE_TYPE_QUARTZ &&
- tmp_surface->imageSurfaceEquiv) {
- CGContextSaveGState (tmp_surface->cgContext);
-@@ -2049,16 +2049,17 @@ _cairo_quartz_surface_acquire_image (voi
- CGContextDrawLayerAtPoint (tmp_surface->cgContext,
- CGPointMake (0.0, 0.0),
- surface->cgLayer);
- CGContextRestoreGState (tmp_surface->cgContext);
-
- *image_out = (cairo_image_surface_t*)
- cairo_surface_reference(tmp_surface->imageSurfaceEquiv);
- *image_extra = tmp;
-+ status = CAIRO_STATUS_SUCCESS;
- } else {
- cairo_surface_destroy (tmp);
- }
- }
-
- if (status)
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
diff --git a/gfx/cairo/quartz-cglayers.patch b/gfx/cairo/quartz-cglayers.patch
deleted file mode 100644
index bb3d44d9e..000000000
--- a/gfx/cairo/quartz-cglayers.patch
+++ /dev/null
@@ -1,715 +0,0 @@
-changeset: 42959:e1964291f8ff
-user: Robert O'Callahan <robert@ocallahan.org>
-date: Tue Jun 01 11:33:23 2010 +1200
-summary: Bug 568189. Implement CGLayer-backed cairo-quartz surfaces. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-private.h b/gfx/cairo/cairo/src/cairo-quartz-private.h
---- a/gfx/cairo/cairo/src/cairo-quartz-private.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz-private.h
-@@ -57,16 +57,21 @@ typedef struct cairo_quartz_surface {
-
- /**
- * If non-null, this is a CGImage representing the contents of the surface.
- * We clear this out before any painting into the surface, so that we
- * don't force a copy to be created.
- */
- CGImageRef bitmapContextImage;
-
-+ /**
-+ * If non-null, this is the CGLayer for the surface.
-+ */
-+ CGLayerRef cgLayer;
-+
- cairo_rectangle_int_t extents;
- } cairo_quartz_surface_t;
-
- typedef struct cairo_quartz_image_surface {
- cairo_surface_t base;
-
- cairo_rectangle_int_t extents;
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1110,18 +1110,17 @@ CreateRepeatingRadialGradientFunction (c
- static void
- DataProviderReleaseCallback (void *info, const void *data, size_t size)
- {
- cairo_surface_t *surface = (cairo_surface_t *) info;
- cairo_surface_destroy (surface);
- }
-
- static cairo_status_t
--_cairo_surface_to_cgimage (cairo_surface_t *target,
-- cairo_surface_t *source,
-+_cairo_surface_to_cgimage (cairo_surface_t *source,
- CGImageRef *image_out)
- {
- cairo_status_t status = CAIRO_STATUS_SUCCESS;
- cairo_surface_type_t stype = cairo_surface_get_type (source);
- cairo_image_surface_t *isurf;
- CGImageRef image;
- void *image_extra;
-
-@@ -1267,17 +1266,17 @@ _cairo_quartz_cairo_repeating_surface_pa
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- spattern = (cairo_surface_pattern_t *) apattern;
- pat_surf = spattern->surface;
-
- is_bounded = _cairo_surface_get_extents (pat_surf, &extents);
- assert (is_bounded);
-
-- status = _cairo_surface_to_cgimage ((cairo_surface_t*) dest, pat_surf, &image);
-+ status = _cairo_surface_to_cgimage (pat_surf, &image);
- if (status)
- return status;
- if (image == NULL)
- return CAIRO_INT_STATUS_NOTHING_TO_DO;
-
- info = malloc(sizeof(SurfacePatternDrawInfo));
- if (!info)
- return CAIRO_STATUS_NO_MEMORY;
-@@ -1339,33 +1338,39 @@ _cairo_quartz_cairo_repeating_surface_pa
- }
-
- typedef enum {
- DO_SOLID,
- DO_SHADING,
- DO_PATTERN,
- DO_IMAGE,
- DO_TILED_IMAGE,
-+ DO_LAYER,
- DO_UNSUPPORTED,
- DO_NOTHING
- } cairo_quartz_action_t;
-
- /* State used during a drawing operation. */
- typedef struct {
- CGContextRef context;
- cairo_quartz_action_t action;
-
-- // Used with DO_SHADING, DO_IMAGE and DO_TILED_IMAGE
-+ // Used with DO_SHADING, DO_IMAGE, DO_TILED_IMAGE and DO_LAYER
- CGAffineTransform transform;
-
- // Used with DO_IMAGE and DO_TILED_IMAGE
- CGImageRef image;
- cairo_surface_t *imageSurface;
-+
-+ // Used with DO_IMAGE, DO_TILED_IMAGE and DO_LAYER
- CGRect imageRect;
-
-+ // Used with DO_LAYER
-+ CGLayerRef layer;
-+
- // Used with DO_SHADING
- CGShadingRef shading;
-
- // Used with DO_PATTERN
- CGPatternRef pattern;
- } cairo_quartz_drawing_state_t;
-
- static void
-@@ -1423,17 +1428,17 @@ _cairo_quartz_setup_fallback_source (cai
- _cairo_pattern_transform (&pattern.base,
- &fallback->device_transform_inverse);
- status = _cairo_surface_paint (fallback,
- CAIRO_OPERATOR_SOURCE,
- &pattern.base, NULL);
- }
- #endif
-
-- status = _cairo_surface_to_cgimage (&surface->base, fallback, &img);
-+ status = _cairo_surface_to_cgimage (fallback, &img);
- if (status) {
- state->action = DO_UNSUPPORTED;
- return;
- }
- if (img == NULL) {
- state->action = DO_NOTHING;
- return;
- }
-@@ -1624,16 +1629,17 @@ _cairo_quartz_setup_state (cairo_quartz_
- {
- CGContextRef context = surface->cgContext;
- cairo_quartz_drawing_state_t state;
- cairo_status_t status;
-
- state.context = context;
- state.image = NULL;
- state.imageSurface = NULL;
-+ state.layer = NULL;
- state.shading = NULL;
- state.pattern = NULL;
-
- _cairo_quartz_surface_will_change (surface);
-
- // Save before we change the pattern, colorspace, etc. so that
- // we can restore and make sure that quartz releases our
- // pattern (which may be stack allocated)
-@@ -1689,33 +1695,43 @@ _cairo_quartz_setup_state (cairo_quartz_
- CGImageRef img;
- cairo_matrix_t m = spat->base.matrix;
- cairo_rectangle_int_t extents;
- CGAffineTransform xform;
- CGRect srcRect;
- cairo_fixed_t fw, fh;
- cairo_bool_t is_bounded;
-
-- status = _cairo_surface_to_cgimage ((cairo_surface_t *) surface, pat_surf, &img);
-+ cairo_matrix_invert(&m);
-+ _cairo_quartz_cairo_matrix_to_quartz (&m, &state.transform);
-+
-+ if (cairo_surface_get_type (pat_surf) == CAIRO_SURFACE_TYPE_QUARTZ) {
-+ cairo_quartz_surface_t *quartz_surf = (cairo_quartz_surface_t *) pat_surf;
-+ if (quartz_surf->cgLayer && source->extend == CAIRO_EXTEND_NONE) {
-+ state.imageRect = CGRectMake (0, 0, quartz_surf->extents.width, quartz_surf->extents.height);
-+ state.layer = quartz_surf->cgLayer;
-+ state.action = DO_LAYER;
-+ return state;
-+ }
-+ }
-+
-+ status = _cairo_surface_to_cgimage (pat_surf, &img);
- if (status) {
- state.action = DO_UNSUPPORTED;
- return state;
- }
- if (img == NULL) {
- state.action = DO_NOTHING;
- return state;
- }
-
- CGContextSetRGBFillColor (surface->cgContext, 0, 0, 0, 1);
-
- state.image = img;
-
-- cairo_matrix_invert(&m);
-- _cairo_quartz_cairo_matrix_to_quartz (&m, &state.transform);
--
- is_bounded = _cairo_surface_get_extents (pat_surf, &extents);
- assert (is_bounded);
-
- if (source->extend == CAIRO_EXTEND_NONE) {
- state.imageRect = CGRectMake (0, 0, extents.width, extents.height);
- state.action = DO_IMAGE;
- return state;
- }
-@@ -1820,33 +1836,48 @@ _cairo_quartz_teardown_state (cairo_quar
-
- CGContextRestoreGState(state->context);
- }
-
-
- static void
- _cairo_quartz_draw_image (cairo_quartz_drawing_state_t *state, cairo_operator_t op)
- {
-- assert (state && state->image && (state->action == DO_IMAGE || state->action == DO_TILED_IMAGE));
-+ assert (state &&
-+ ((state->image && (state->action == DO_IMAGE || state->action == DO_TILED_IMAGE)) ||
-+ (state->layer && state->action == DO_LAYER)));
-
- CGContextConcatCTM (state->context, state->transform);
- CGContextTranslateCTM (state->context, 0, state->imageRect.size.height);
- CGContextScaleCTM (state->context, 1, -1);
-
-- if (state->action == DO_IMAGE) {
-- CGContextDrawImage (state->context, state->imageRect, state->image);
-+ if (state->action == DO_TILED_IMAGE) {
-+ CGContextDrawTiledImagePtr (state->context, state->imageRect, state->image);
-+ /* no need to worry about unbounded operators, since tiled images
-+ fill the entire clip region */
-+ } else {
-+ if (state->action == DO_LAYER) {
-+ /* Note that according to Apple docs it's completely legal
-+ * to draw a CGLayer to any CGContext, even one it wasn't
-+ * created for.
-+ */
-+ CGContextDrawLayerAtPoint (state->context, state->imageRect.origin,
-+ state->layer);
-+ } else {
-+ CGContextDrawImage (state->context, state->imageRect, state->image);
-+ }
-+
- if (!_cairo_operator_bounded_by_source (op)) {
- CGContextBeginPath (state->context);
- CGContextAddRect (state->context, state->imageRect);
- CGContextAddRect (state->context, CGContextGetClipBoundingBox (state->context));
- CGContextSetRGBFillColor (state->context, 0, 0, 0, 0);
- CGContextEOFillPath (state->context);
- }
-- } else
-- CGContextDrawTiledImagePtr (state->context, state->imageRect, state->image);
-+ }
- }
-
-
- /*
- * get source/dest image implementation
- */
-
- /* Read the image from the surface's front buffer */
-@@ -1971,95 +2002,153 @@ _cairo_quartz_surface_finish (void *abst
- surface->imageSurfaceEquiv = NULL;
- }
-
- if (surface->imageData) {
- free (surface->imageData);
- surface->imageData = NULL;
- }
-
-+ if (surface->cgLayer) {
-+ CGLayerRelease (surface->cgLayer);
-+ }
-+
- return CAIRO_STATUS_SUCCESS;
- }
-
- static cairo_status_t
--_cairo_quartz_surface_acquire_source_image (void *abstract_surface,
-- cairo_image_surface_t **image_out,
-- void **image_extra)
-+_cairo_quartz_surface_acquire_image (void *abstract_surface,
-+ cairo_image_surface_t **image_out,
-+ void **image_extra)
- {
- cairo_int_status_t status;
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
-
-- //ND((stderr, "%p _cairo_quartz_surface_acquire_source_image\n", surface));
-+ *image_extra = NULL;
-+
-+ /* ND((stderr, "%p _cairo_quartz_surface_acquire_image\n", surface)); */
-
- status = _cairo_quartz_get_image (surface, image_out);
-+
-+ if (status == CAIRO_INT_STATUS_UNSUPPORTED && surface->cgLayer) {
-+ /* copy the layer into a Quartz bitmap context so we can get the data */
-+ cairo_surface_t *tmp =
-+ cairo_quartz_surface_create (CAIRO_CONTENT_COLOR_ALPHA,
-+ surface->extents.width,
-+ surface->extents.height);
-+ cairo_quartz_surface_t *tmp_surface = (cairo_quartz_surface_t *) tmp;
-+
-+ /* if surface creation failed, we won't have a Quartz surface here */
-+ if (cairo_surface_get_type (tmp) == CAIRO_SURFACE_TYPE_QUARTZ &&
-+ tmp_surface->imageSurfaceEquiv) {
-+ CGContextSaveGState (tmp_surface->cgContext);
-+ CGContextTranslateCTM (tmp_surface->cgContext, 0, surface->extents.height);
-+ CGContextScaleCTM (tmp_surface->cgContext, 1, -1);
-+ /* Note that according to Apple docs it's completely legal
-+ * to draw a CGLayer to any CGContext, even one it wasn't
-+ * created for.
-+ */
-+ CGContextDrawLayerAtPoint (tmp_surface->cgContext,
-+ CGPointMake (0.0, 0.0),
-+ surface->cgLayer);
-+ CGContextRestoreGState (tmp_surface->cgContext);
-+
-+ *image_out = (cairo_image_surface_t*)
-+ cairo_surface_reference(tmp_surface->imageSurfaceEquiv);
-+ *image_extra = tmp;
-+ } else {
-+ cairo_surface_destroy (tmp);
-+ }
-+ }
-+
- if (status)
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
-- *image_extra = NULL;
--
- return CAIRO_STATUS_SUCCESS;
- }
-
- static void
- _cairo_quartz_surface_release_source_image (void *abstract_surface,
- cairo_image_surface_t *image,
- void *image_extra)
- {
- cairo_surface_destroy ((cairo_surface_t *) image);
-+
-+ if (image_extra) {
-+ cairo_surface_destroy ((cairo_surface_t *) image_extra);
-+ }
- }
-
-
- static cairo_status_t
- _cairo_quartz_surface_acquire_dest_image (void *abstract_surface,
- cairo_rectangle_int_t *interest_rect,
- cairo_image_surface_t **image_out,
- cairo_rectangle_int_t *image_rect,
- void **image_extra)
- {
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
-- cairo_int_status_t status;
-
- ND((stderr, "%p _cairo_quartz_surface_acquire_dest_image\n", surface));
-
-- _cairo_quartz_surface_will_change (surface);
--
-- status = _cairo_quartz_get_image (surface, image_out);
-- if (status)
-- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
--
- *image_rect = surface->extents;
- *image_extra = NULL;
-
-- return CAIRO_STATUS_SUCCESS;
-+ _cairo_quartz_surface_will_change (surface);
-+
-+ return _cairo_quartz_surface_acquire_image (abstract_surface,
-+ image_out, image_extra);
- }
-
- static void
- _cairo_quartz_surface_release_dest_image (void *abstract_surface,
- cairo_rectangle_int_t *interest_rect,
- cairo_image_surface_t *image,
- cairo_rectangle_int_t *image_rect,
- void *image_extra)
- {
-- //cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
--
-- //ND((stderr, "%p _cairo_quartz_surface_release_dest_image\n", surface));
-+ /* ND((stderr, "%p _cairo_quartz_surface_release_dest_image\n", surface)); */
-
- cairo_surface_destroy ((cairo_surface_t *) image);
-+
-+ if (image_extra) {
-+ /* we need to write the data from the temp surface back to the layer */
-+ cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
-+ cairo_quartz_surface_t *tmp_surface = (cairo_quartz_surface_t *) image_extra;
-+ CGImageRef img;
-+ cairo_status_t status = _cairo_surface_to_cgimage (&tmp_surface->base, &img);
-+ if (status) {
-+ cairo_surface_destroy (&tmp_surface->base);
-+ return;
-+ }
-+
-+ CGContextSaveGState (surface->cgContext);
-+ CGContextTranslateCTM (surface->cgContext, 0, surface->extents.height);
-+ CGContextScaleCTM (surface->cgContext, 1, -1);
-+ CGContextDrawImage (surface->cgContext,
-+ CGRectMake (0.0, 0.0, surface->extents.width, surface->extents.height),
-+ img);
-+ CGContextRestoreGState (surface->cgContext);
-+
-+ cairo_surface_destroy (&tmp_surface->base);
-+ }
- }
-
- static cairo_surface_t *
- _cairo_quartz_surface_create_similar (void *abstract_surface,
- cairo_content_t content,
- int width,
- int height)
- {
-- /*cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;*/
--
-+ cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_format_t format;
-
-+ if (surface->cgLayer)
-+ return cairo_quartz_surface_create_cg_layer (abstract_surface, width, height);
-+
- if (content == CAIRO_CONTENT_COLOR_ALPHA)
- format = CAIRO_FORMAT_ARGB32;
- else if (content == CAIRO_CONTENT_COLOR)
- format = CAIRO_FORMAT_RGB24;
- else if (content == CAIRO_CONTENT_ALPHA)
- format = CAIRO_FORMAT_A8;
- else
- return NULL;
-@@ -2113,17 +2202,17 @@ _cairo_quartz_surface_clone_similar (voi
- _cairo_quartz_surface_create_internal (NULL, CAIRO_CONTENT_COLOR_ALPHA,
- qsurf->extents.width, qsurf->extents.height);
- *clone_offset_x = 0;
- *clone_offset_y = 0;
- return CAIRO_STATUS_SUCCESS;
- }
- }
-
-- status = _cairo_surface_to_cgimage ((cairo_surface_t*) abstract_surface, src, &quartz_image);
-+ status = _cairo_surface_to_cgimage (src, &quartz_image);
- if (status)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- new_format = CAIRO_FORMAT_ARGB32; /* assumed */
- if (_cairo_surface_is_image (src)) {
- new_format = ((cairo_image_surface_t *) src)->format;
- }
-
-@@ -2194,17 +2283,18 @@ _cairo_quartz_surface_paint (void *abstr
- if (state.action == DO_SOLID || state.action == DO_PATTERN) {
- CGContextFillRect (state.context, CGRectMake(surface->extents.x,
- surface->extents.y,
- surface->extents.width,
- surface->extents.height));
- } else if (state.action == DO_SHADING) {
- CGContextConcatCTM (state.context, state.transform);
- CGContextDrawShading (state.context, state.shading);
-- } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE ||
-+ state.action == DO_LAYER) {
- _cairo_quartz_draw_image (&state, op);
- } else if (state.action != DO_NOTHING) {
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- _cairo_quartz_teardown_state (&state);
-
- ND((stderr, "-- paint\n"));
-@@ -2291,17 +2381,18 @@ _cairo_quartz_surface_fill (void *abstra
- // with the shading
- if (fill_rule == CAIRO_FILL_RULE_WINDING)
- CGContextClip (state.context);
- else
- CGContextEOClip (state.context);
-
- CGContextConcatCTM (state.context, state.transform);
- CGContextDrawShading (state.context, state.shading);
-- } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE ||
-+ state.action == DO_LAYER) {
- if (fill_rule == CAIRO_FILL_RULE_WINDING)
- CGContextClip (state.context);
- else
- CGContextEOClip (state.context);
-
- _cairo_quartz_draw_image (&state, op);
- } else if (state.action != DO_NOTHING) {
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
-@@ -2416,17 +2507,18 @@ _cairo_quartz_surface_stroke (void *abst
- if (rv)
- goto BAIL;
-
- if (!_cairo_operator_bounded_by_mask (op) && CGContextCopyPathPtr)
- path_for_unbounded = CGContextCopyPathPtr (state.context);
-
- if (state.action == DO_SOLID || state.action == DO_PATTERN) {
- CGContextStrokePath (state.context);
-- } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE ||
-+ state.action == DO_LAYER) {
- CGContextReplacePathWithStrokedPath (state.context);
- CGContextClip (state.context);
-
- CGContextSetCTM (state.context, origCTM);
- _cairo_quartz_draw_image (&state, op);
- } else if (state.action == DO_SHADING) {
- CGContextReplacePathWithStrokedPath (state.context);
- CGContextClip (state.context);
-@@ -2511,17 +2603,18 @@ _cairo_quartz_surface_show_glyphs (void
- &glyph_extents, NULL);
- state = _cairo_quartz_setup_state (surface, source, op, &glyph_extents);
- } else {
- state = _cairo_quartz_setup_state (surface, source, op, NULL);
- }
-
- if (state.action == DO_SOLID || state.action == DO_PATTERN) {
- CGContextSetTextDrawingMode (state.context, kCGTextFill);
-- } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE || state.action == DO_SHADING) {
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE ||
-+ state.action == DO_SHADING || state.action == DO_LAYER) {
- CGContextSetTextDrawingMode (state.context, kCGTextClip);
- isClipping = TRUE;
- } else {
- if (state.action != DO_NOTHING)
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
- goto BAIL;
- }
-
-@@ -2622,17 +2715,18 @@ _cairo_quartz_surface_show_glyphs (void
-
- CGContextShowGlyphsWithAdvances (state.context,
- cg_glyphs,
- cg_advances,
- num_glyphs);
-
- CGContextSetCTM (state.context, ctm);
-
-- if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
-+ if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE ||
-+ state.action == DO_LAYER) {
- _cairo_quartz_draw_image (&state, op);
- } else if (state.action == DO_SHADING) {
- CGContextConcatCTM (state.context, state.transform);
- CGContextDrawShading (state.context, state.shading);
- }
-
- BAIL:
- if (didForceFontSmoothing)
-@@ -2679,17 +2773,17 @@ _cairo_quartz_surface_mask_with_surface
- cairo_clip_t *clip)
- {
- CGRect rect;
- CGImageRef img;
- cairo_surface_t *pat_surf = mask->surface;
- cairo_status_t status = CAIRO_STATUS_SUCCESS;
- CGAffineTransform ctm, mask_matrix;
-
-- status = _cairo_surface_to_cgimage ((cairo_surface_t *) surface, pat_surf, &img);
-+ status = _cairo_surface_to_cgimage (pat_surf, &img);
- if (status)
- return status;
- if (img == NULL) {
- if (!_cairo_operator_bounded_by_mask (op))
- CGContextClearRect (surface->cgContext, CGContextGetClipBoundingBox (surface->cgContext));
- return CAIRO_STATUS_SUCCESS;
- }
-
-@@ -2869,17 +2963,17 @@ _cairo_quartz_surface_clipper_intersect_
- }
-
- // XXXtodo implement show_page; need to figure out how to handle begin/end
-
- static const struct _cairo_surface_backend cairo_quartz_surface_backend = {
- CAIRO_SURFACE_TYPE_QUARTZ,
- _cairo_quartz_surface_create_similar,
- _cairo_quartz_surface_finish,
-- _cairo_quartz_surface_acquire_source_image,
-+ _cairo_quartz_surface_acquire_image,
- _cairo_quartz_surface_release_source_image,
- _cairo_quartz_surface_acquire_dest_image,
- _cairo_quartz_surface_release_dest_image,
- _cairo_quartz_surface_clone_similar,
- NULL, /* composite */
- NULL, /* fill_rectangles */
- NULL, /* composite_trapezoids */
- NULL, /* create_span_renderer */
-@@ -2950,16 +3044,17 @@ _cairo_quartz_surface_create_internal (C
- CGContextSaveGState (cgContext);
-
- surface->cgContext = cgContext;
- surface->cgContextBaseCTM = CGContextGetCTM (cgContext);
-
- surface->imageData = NULL;
- surface->imageSurfaceEquiv = NULL;
- surface->bitmapContextImage = NULL;
-+ surface->cgLayer = NULL;
-
- return surface;
- }
-
- /**
- * cairo_quartz_surface_create_for_cg_context
- * @cgContext: the existing CGContext for which to create the surface
- * @width: width of the surface, in pixels
-@@ -3002,16 +3097,88 @@ cairo_quartz_surface_create_for_cg_conte
- // create_internal will have set an error
- return (cairo_surface_t*) surf;
- }
-
- return (cairo_surface_t *) surf;
- }
-
- /**
-+ * cairo_quartz_cglayer_surface_create_similar
-+ * @surface: The returned surface can be efficiently drawn into this
-+ * destination surface (if tiling is not used)."
-+ * @width: width of the surface, in pixels
-+ * @height: height of the surface, in pixels
-+ *
-+ * Creates a Quartz surface backed by a CGLayer, if the given surface
-+ * is a Quartz surface; the CGLayer is created to match the surface's
-+ * Quartz context. Otherwise just calls cairo_surface_create_similar
-+ * with CAIRO_CONTENT_COLOR_ALPHA.
-+ * The returned surface can be efficiently blitted to the given surface,
-+ * but tiling and 'extend' modes other than NONE are not so efficient.
-+ *
-+ * Return value: the newly created surface.
-+ *
-+ * Since: 1.10
-+ **/
-+cairo_surface_t *
-+cairo_quartz_surface_create_cg_layer (cairo_surface_t *surface,
-+ unsigned int width,
-+ unsigned int height)
-+{
-+ cairo_quartz_surface_t *surf;
-+ CGLayerRef layer;
-+ CGContextRef ctx;
-+ CGContextRef cgContext;
-+
-+ cgContext = cairo_quartz_surface_get_cg_context (surface);
-+ if (!cgContext)
-+ return cairo_surface_create_similar (surface, CAIRO_CONTENT_COLOR_ALPHA,
-+ width, height);
-+
-+ if (!_cairo_quartz_verify_surface_size(width, height))
-+ return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
-+
-+ /* If we pass zero width or height into CGLayerCreateWithContext below,
-+ * it will fail.
-+ */
-+ if (width == 0 || height == 0) {
-+ return (cairo_surface_t*)
-+ _cairo_quartz_surface_create_internal (NULL, CAIRO_CONTENT_COLOR_ALPHA,
-+ width, height);
-+ }
-+
-+ layer = CGLayerCreateWithContext (cgContext,
-+ CGSizeMake (width, height),
-+ NULL);
-+ if (!layer)
-+ return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
-+
-+ ctx = CGLayerGetContext (layer);
-+ /* Flip it when we draw into it, so that when we finally composite it
-+ * to a flipped target, the directions match and Quartz will optimize
-+ * the composition properly
-+ */
-+ CGContextTranslateCTM (ctx, 0, height);
-+ CGContextScaleCTM (ctx, 1, -1);
-+
-+ CGContextRetain (ctx);
-+ surf = _cairo_quartz_surface_create_internal (ctx, CAIRO_CONTENT_COLOR_ALPHA,
-+ width, height);
-+ if (surf->base.status) {
-+ CGLayerRelease (layer);
-+ // create_internal will have set an error
-+ return (cairo_surface_t*) surf;
-+ }
-+ surf->cgLayer = layer;
-+
-+ return (cairo_surface_t *) surf;
-+}
-+
-+/**
- * cairo_quartz_surface_create
- * @format: format of pixels in the surface to create
- * @width: width of the surface, in pixels
- * @height: height of the surface, in pixels
- *
- * Creates a Quartz surface backed by a CGBitmap. The surface is
- * created using the Device RGB (or Device Gray, for A8) color space.
- * All Cairo operations, including those that require software
-diff --git a/gfx/cairo/cairo/src/cairo-quartz.h b/gfx/cairo/cairo/src/cairo-quartz.h
---- a/gfx/cairo/cairo/src/cairo-quartz.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz.h
-@@ -45,16 +45,21 @@
- CAIRO_BEGIN_DECLS
-
- cairo_public cairo_surface_t *
- cairo_quartz_surface_create (cairo_format_t format,
- unsigned int width,
- unsigned int height);
-
- cairo_public cairo_surface_t *
-+cairo_quartz_surface_create_cg_layer (cairo_surface_t *surface,
-+ unsigned int width,
-+ unsigned int height);
-+
-+cairo_public cairo_surface_t *
- cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
- unsigned int width,
- unsigned int height);
-
- cairo_public CGContextRef
- cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
-
- cairo_public CGContextRef
-
diff --git a/gfx/cairo/quartz-check-imageSurfaceEquiv.patch b/gfx/cairo/quartz-check-imageSurfaceEquiv.patch
deleted file mode 100644
index 1d84ab27e..000000000
--- a/gfx/cairo/quartz-check-imageSurfaceEquiv.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Daniel Holbert <dholbert@cs.stanford.edu>
-Bug 612662 patch 3: Drop cairo_quartz_surface_t's "imageSurfaceEquiv" member if we fail to create it. r=roc a=blocking-final+
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -3152,17 +3152,28 @@ cairo_quartz_surface_create (cairo_forma
- if (surf->base.status) {
- CGContextRelease (cgc);
- free (imageData);
- // create_internal will have set an error
- return (cairo_surface_t*) surf;
- }
-
- surf->imageData = imageData;
-- surf->imageSurfaceEquiv = cairo_image_surface_create_for_data (imageData, format, width, height, stride);
-+
-+ cairo_surface_t* tmpImageSurfaceEquiv =
-+ cairo_image_surface_create_for_data (imageData, format,
-+ width, height, stride);
-+
-+ if (cairo_surface_status (tmpImageSurfaceEquiv)) {
-+ // Tried & failed to create an imageSurfaceEquiv!
-+ cairo_surface_destroy (tmpImageSurfaceEquiv);
-+ surf->imageSurfaceEquiv = NULL;
-+ } else {
-+ surf->imageSurfaceEquiv = tmpImageSurfaceEquiv;
-+ }
-
- return (cairo_surface_t *) surf;
- }
-
- /**
- * cairo_quartz_surface_get_cg_context
- * @surface: the Cairo Quartz surface
- *
diff --git a/gfx/cairo/quartz-const-globals.patch b/gfx/cairo/quartz-const-globals.patch
deleted file mode 100644
index 8db32270a..000000000
--- a/gfx/cairo/quartz-const-globals.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1249558626 -43200
-# Node ID 963b9451ad305924738d05d997a640698cd3af91
-# Parent e564f3ab4ea6e3b5dd9c4e9e6042d3a84c229dde
-Bug 508730. Clean up Quartz gradient code by moving some local variables to static const globals. r=jmuizelaar
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -684,51 +684,50 @@ ComputeGradientValue (void *info, const
- grad->stops[i-1].color.blue * ap +
- grad->stops[i].color.blue * bp;
- out[3] =
- grad->stops[i-1].color.alpha * ap +
- grad->stops[i].color.alpha * bp;
- }
- }
-
-+static const float gradient_output_value_ranges[8] = {
-+ 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f
-+};
-+static const CGFunctionCallbacks gradient_callbacks = {
-+ 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy
-+};
-+
- static CGFunctionRef
- CreateGradientFunction (const cairo_gradient_pattern_t *gpat)
- {
- cairo_pattern_t *pat;
- float input_value_range[2] = { 0.f, 1.f };
-- float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f };
-- CGFunctionCallbacks callbacks = {
-- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy
-- };
-
- if (_cairo_pattern_create_copy (&pat, &gpat->base))
- /* quartz doesn't deal very well with malloc failing, so there's
- * not much point in us trying either */
- return NULL;
-
- return CGFunctionCreate (pat,
- 1,
- input_value_range,
- 4,
-- output_value_ranges,
-- &callbacks);
-+ gradient_output_value_ranges,
-+ &gradient_callbacks);
- }
-
- static CGFunctionRef
- CreateRepeatingLinearGradientFunction (cairo_quartz_surface_t *surface,
- const cairo_gradient_pattern_t *gpat,
- CGPoint *start, CGPoint *end,
- CGAffineTransform matrix)
- {
- cairo_pattern_t *pat;
- float input_value_range[2];
-- float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f };
-- CGFunctionCallbacks callbacks = {
-- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy
-- };
-
- CGPoint mstart, mend;
-
- double dx, dy;
- int x_rep_start = 0, x_rep_end = 0;
- int y_rep_start = 0, y_rep_end = 0;
-
- int rep_start, rep_end;
-@@ -787,18 +786,18 @@ CreateRepeatingLinearGradientFunction (c
- /* quartz doesn't deal very well with malloc failing, so there's
- * not much point in us trying either */
- return NULL;
-
- return CGFunctionCreate (pat,
- 1,
- input_value_range,
- 4,
-- output_value_ranges,
-- &callbacks);
-+ gradient_output_value_ranges,
-+ &gradient_callbacks);
- }
-
- static void
- UpdateRadialParameterToIncludePoint(double *max_t, CGPoint *center,
- double dr, double dx, double dy,
- double x, double y)
- {
- /* Compute a parameter t such that a circle centered at
-@@ -847,20 +846,16 @@ CreateRepeatingRadialGradientFunction (c
- const cairo_gradient_pattern_t *gpat,
- CGPoint *start, double *start_radius,
- CGPoint *end, double *end_radius)
- {
- CGRect clip = CGContextGetClipBoundingBox (surface->cgContext);
- CGAffineTransform transform;
- cairo_pattern_t *pat;
- float input_value_range[2];
-- float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f };
-- CGFunctionCallbacks callbacks = {
-- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy
-- };
- CGPoint *inner;
- double *inner_radius;
- CGPoint *outer;
- double *outer_radius;
- /* minimum and maximum t-parameter values that will make our gradient
- cover the clipBox */
- double t_min, t_max, t_temp;
- /* outer minus inner */
-@@ -927,18 +922,18 @@ CreateRepeatingRadialGradientFunction (c
- /* quartz doesn't deal very well with malloc failing, so there's
- * not much point in us trying either */
- return NULL;
-
- return CGFunctionCreate (pat,
- 1,
- input_value_range,
- 4,
-- output_value_ranges,
-- &callbacks);
-+ gradient_output_value_ranges,
-+ &gradient_callbacks);
- }
-
- /* Obtain a CGImageRef from a #cairo_surface_t * */
-
- static void
- DataProviderReleaseCallback (void *info, const void *data, size_t size)
- {
- cairo_surface_t *surface = (cairo_surface_t *) info;
diff --git a/gfx/cairo/quartz-create-for-data.patch b/gfx/cairo/quartz-create-for-data.patch
deleted file mode 100644
index ae374fafe..000000000
--- a/gfx/cairo/quartz-create-for-data.patch
+++ /dev/null
@@ -1,309 +0,0 @@
-diff --git a/gfx/cairo/README b/gfx/cairo/README
---- a/gfx/cairo/README
-+++ b/gfx/cairo/README
-@@ -71,16 +71,18 @@ quartz-cache-CGImageRef.patch: cache CGI
- quartz-remove-snapshot.patch: remove broken implementation of backend snapshot
-
- quartz-cglayers.patch: add support for cairo surfaces backed by CGLayers
-
- quartz-cglayers-fix-fallback.patch: Bug 572912; fix bug in fallback code in previous patch
-
- quartz-get-image.patch: Bug 575521; add a way to get the image surface associated with a surface
-
-+quartz-create-for-data.patch: Bug 575521; add a way to create quartz surfaces backed with application-provided data
-+
- premultiply-alpha-solid-gradients.patch: bug 539165; multiply the solid color by the alpha component before using it for a solid surface
-
- xlib-initialize-members.path: bug 548793; initialize XRender version if the server doesn't have the extension
-
- remove-comma: remove a comma from enum
-
- d2d.patch: add d2d support
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-private.h b/gfx/cairo/cairo/src/cairo-quartz-private.h
---- a/gfx/cairo/cairo/src/cairo-quartz-private.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz-private.h
-@@ -63,16 +63,18 @@ typedef struct cairo_quartz_surface {
- CGImageRef bitmapContextImage;
-
- /**
- * If non-null, this is the CGLayer for the surface.
- */
- CGLayerRef cgLayer;
-
- cairo_rectangle_int_t extents;
-+
-+ cairo_bool_t ownsData;
- } cairo_quartz_surface_t;
-
- typedef struct cairo_quartz_image_surface {
- cairo_surface_t base;
-
- cairo_rectangle_int_t extents;
-
- CGImageRef image;
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1880,20 +1880,21 @@ _cairo_quartz_surface_finish (void *abst
- surface->cgContext = NULL;
-
- if (surface->bitmapContextImage) {
- CGImageRelease (surface->bitmapContextImage);
- surface->bitmapContextImage = NULL;
- }
-
- if (surface->imageSurfaceEquiv) {
-- _cairo_image_surface_assume_ownership_of_data (surface->imageSurfaceEquiv);
-+ if (surface->ownsData)
-+ _cairo_image_surface_assume_ownership_of_data (surface->imageSurfaceEquiv);
- cairo_surface_destroy (surface->imageSurfaceEquiv);
- surface->imageSurfaceEquiv = NULL;
-- } else if (surface->imageData) {
-+ } else if (surface->imageData && surface->ownsData) {
- free (surface->imageData);
- }
-
- surface->imageData = NULL;
-
- if (surface->cgLayer) {
- CGLayerRelease (surface->cgLayer);
- }
-@@ -2888,16 +2889,17 @@ _cairo_quartz_surface_create_internal (C
-
- surface->cgContext = cgContext;
- surface->cgContextBaseCTM = CGContextGetCTM (cgContext);
-
- surface->imageData = NULL;
- surface->imageSurfaceEquiv = NULL;
- surface->bitmapContextImage = NULL;
- surface->cgLayer = NULL;
-+ surface->ownsData = TRUE;
-
- return surface;
- }
-
- /**
- * cairo_quartz_surface_create_for_cg_context
- * @cgContext: the existing CGContext for which to create the surface
- * @width: width of the surface, in pixels
-@@ -3031,23 +3033,103 @@ cairo_quartz_surface_create_cg_layer (ca
- *
- * Since: 1.4
- **/
- cairo_surface_t *
- cairo_quartz_surface_create (cairo_format_t format,
- unsigned int width,
- unsigned int height)
- {
-+ int stride;
-+ unsigned char *data;
-+
-+ if (!_cairo_quartz_verify_surface_size(width, height))
-+ return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
-+
-+ if (width == 0 || height == 0) {
-+ return (cairo_surface_t*) _cairo_quartz_surface_create_internal (NULL, _cairo_content_from_format (format),
-+ width, height);
-+ }
-+
-+ if (format == CAIRO_FORMAT_ARGB32 ||
-+ format == CAIRO_FORMAT_RGB24)
-+ {
-+ stride = width * 4;
-+ } else if (format == CAIRO_FORMAT_A8) {
-+ stride = width;
-+ } else if (format == CAIRO_FORMAT_A1) {
-+ /* I don't think we can usefully support this, as defined by
-+ * cairo_format_t -- these are 1-bit pixels stored in 32-bit
-+ * quantities.
-+ */
-+ return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
-+ } else {
-+ return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
-+ }
-+
-+ /* The Apple docs say that for best performance, the stride and the data
-+ * pointer should be 16-byte aligned. malloc already aligns to 16-bytes,
-+ * so we don't have to anything special on allocation.
-+ */
-+ stride = (stride + 15) & ~15;
-+
-+ data = _cairo_malloc_ab (height, stride);
-+ if (!data) {
-+ return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
-+ }
-+
-+ /* zero the memory to match the image surface behaviour */
-+ memset (data, 0, height * stride);
-+
-+ cairo_quartz_surface_t *surf;
-+ surf = (cairo_quartz_surface_t *) cairo_quartz_surface_create_for_data
-+ (data, format, width, height, stride);
-+ if (surf->base.status) {
-+ free (data);
-+ return (cairo_surface_t *) surf;
-+ }
-+
-+ // We created this data, so we can delete it.
-+ surf->ownsData = TRUE;
-+
-+ return (cairo_surface_t *) surf;
-+}
-+
-+/**
-+ * cairo_quartz_surface_create_for_data
-+ * @data: a pointer to a buffer supplied by the application in which
-+ * to write contents. This pointer must be suitably aligned for any
-+ * kind of variable, (for example, a pointer returned by malloc).
-+ * @format: format of pixels in the surface to create
-+ * @width: width of the surface, in pixels
-+ * @height: height of the surface, in pixels
-+ *
-+ * Creates a Quartz surface backed by a CGBitmap. The surface is
-+ * created using the Device RGB (or Device Gray, for A8) color space.
-+ * All Cairo operations, including those that require software
-+ * rendering, will succeed on this surface.
-+ *
-+ * Return value: the newly created surface.
-+ *
-+ * Since: 1.12
-+ **/
-+cairo_surface_t *
-+cairo_quartz_surface_create_for_data (unsigned char *data,
-+ cairo_format_t format,
-+ unsigned int width,
-+ unsigned int height,
-+ unsigned int stride)
-+{
- cairo_quartz_surface_t *surf;
- CGContextRef cgc;
- CGColorSpaceRef cgColorspace;
- CGBitmapInfo bitinfo;
-- void *imageData;
-- int stride;
-+ void *imageData = data;
- int bitsPerComponent;
-+ unsigned int i;
-
- // verify width and height of surface
- if (!_cairo_quartz_verify_surface_size(width, height))
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
-
- if (width == 0 || height == 0) {
- return (cairo_surface_t*) _cairo_quartz_surface_create_internal (NULL, _cairo_content_from_format (format),
- width, height);
-@@ -3058,47 +3140,30 @@ cairo_quartz_surface_create (cairo_forma
- {
- cgColorspace = CGColorSpaceCreateDeviceRGB();
- bitinfo = kCGBitmapByteOrder32Host;
- if (format == CAIRO_FORMAT_ARGB32)
- bitinfo |= kCGImageAlphaPremultipliedFirst;
- else
- bitinfo |= kCGImageAlphaNoneSkipFirst;
- bitsPerComponent = 8;
-- stride = width * 4;
- } else if (format == CAIRO_FORMAT_A8) {
- cgColorspace = NULL;
-- stride = width;
- bitinfo = kCGImageAlphaOnly;
- bitsPerComponent = 8;
- } else if (format == CAIRO_FORMAT_A1) {
- /* I don't think we can usefully support this, as defined by
- * cairo_format_t -- these are 1-bit pixels stored in 32-bit
- * quantities.
- */
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
- } else {
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
- }
-
-- /* The Apple docs say that for best performance, the stride and the data
-- * pointer should be 16-byte aligned. malloc already aligns to 16-bytes,
-- * so we don't have to anything special on allocation.
-- */
-- stride = (stride + 15) & ~15;
--
-- imageData = _cairo_malloc_ab (height, stride);
-- if (!imageData) {
-- CGColorSpaceRelease (cgColorspace);
-- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
-- }
--
-- /* zero the memory to match the image surface behaviour */
-- memset (imageData, 0, height * stride);
--
- cgc = CGBitmapContextCreate (imageData,
- width,
- height,
- bitsPerComponent,
- stride,
- cgColorspace,
- bitinfo);
- CGColorSpaceRelease (cgColorspace);
-@@ -3118,16 +3183,17 @@ cairo_quartz_surface_create (cairo_forma
- CGContextRelease (cgc);
- free (imageData);
- // create_internal will have set an error
- return (cairo_surface_t*) surf;
- }
-
- surf->imageData = imageData;
- surf->imageSurfaceEquiv = cairo_image_surface_create_for_data (imageData, format, width, height, stride);
-+ surf->ownsData = FALSE;
-
- return (cairo_surface_t *) surf;
- }
-
- /**
- * cairo_quartz_surface_get_cg_context
- * @surface: the Cairo Quartz surface
- *
-diff --git a/gfx/cairo/cairo/src/cairo-quartz.h b/gfx/cairo/cairo/src/cairo-quartz.h
---- a/gfx/cairo/cairo/src/cairo-quartz.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz.h
-@@ -45,16 +45,23 @@
- CAIRO_BEGIN_DECLS
-
- cairo_public cairo_surface_t *
- cairo_quartz_surface_create (cairo_format_t format,
- unsigned int width,
- unsigned int height);
-
- cairo_public cairo_surface_t *
-+cairo_quartz_surface_create_for_data (unsigned char *data,
-+ cairo_format_t format,
-+ unsigned int width,
-+ unsigned int height,
-+ unsigned int stride);
-+
-+cairo_public cairo_surface_t *
- cairo_quartz_surface_create_cg_layer (cairo_surface_t *surface,
- unsigned int width,
- unsigned int height);
-
- cairo_public cairo_surface_t *
- cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
- unsigned int width,
- unsigned int height);
-diff --git a/gfx/cairo/cairo/src/cairo-rename.h b/gfx/cairo/cairo/src/cairo-rename.h
---- a/gfx/cairo/cairo/src/cairo-rename.h
-+++ b/gfx/cairo/cairo/src/cairo-rename.h
-@@ -176,16 +176,17 @@
- #define cairo_qpainter_surface_get_image _moz_cairo_qpainter_surface_get_image
- #define cairo_qpainter_surface_get_qimage _moz_cairo_qpainter_surface_get_qimage
- #define cairo_qpainter_surface_get_qpainter _moz_cairo_qpainter_surface_get_qpainter
- #define cairo_quartz_font_face_create_for_atsu_font_id _moz_cairo_quartz_font_face_create_for_atsu_font_id
- #define cairo_quartz_font_face_create_for_cgfont _moz_cairo_quartz_font_face_create_for_cgfont
- #define cairo_quartz_image_surface_create _moz_cairo_quartz_image_surface_create
- #define cairo_quartz_image_surface_get_image _moz_cairo_quartz_image_surface_get_image
- #define cairo_quartz_surface_create _moz_cairo_quartz_surface_create
-+#define cairo_quartz_surface_create_for_data _moz_cairo_quartz_surface_create_for_data
- #define cairo_quartz_surface_create_for_cg_context _moz_cairo_quartz_surface_create_for_cg_context
- #define cairo_quartz_surface_get_cg_context _moz_cairo_quartz_surface_get_cg_context
- #define cairo_quartz_surface_get_image _moz_cairo_quartz_surface_get_image
- #define cairo_rectangle _moz_cairo_rectangle
- #define cairo_rectangle_list_destroy _moz_cairo_rectangle_list_destroy
- #define cairo_reference _moz_cairo_reference
- #define cairo_rel_curve_to _moz_cairo_rel_curve_to
- #define cairo_rel_line_to _moz_cairo_rel_line_to
diff --git a/gfx/cairo/quartz-fallback.patch b/gfx/cairo/quartz-fallback.patch
deleted file mode 100644
index ca41b6e1f..000000000
--- a/gfx/cairo/quartz-fallback.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1250204857 -43200
-# Node ID cc6bebbd93bb9d8606fe06b997f890acc17996fb
-# Parent caea8b548962f0df38e8e9032e9f57ef0fd099ec
-Bug 507939 - Remove erroneous clip rect fixup which caused repainting errors with repeating radial gradients on Mac. r=jmuizelaar
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1033,38 +1033,29 @@ typedef enum {
- DO_TILED_IMAGE
- } cairo_quartz_action_t;
-
- static cairo_quartz_action_t
- _cairo_quartz_setup_fallback_source (cairo_quartz_surface_t *surface,
- const cairo_pattern_t *source)
- {
- CGRect clipBox = CGContextGetClipBoundingBox (surface->cgContext);
-- CGAffineTransform ctm;
- double x0, y0, w, h;
-
- cairo_surface_t *fallback;
- cairo_t *fallback_cr;
- CGImageRef img;
- cairo_pattern_t *source_copy;
-
- cairo_status_t status;
-
- if (clipBox.size.width == 0.0f ||
- clipBox.size.height == 0.0f)
- return DO_NOTHING;
-
-- // the clipBox is in userspace, so:
-- ctm = CGContextGetCTM (surface->cgContext);
-- ctm = CGAffineTransformInvert (ctm);
-- clipBox = CGRectApplyAffineTransform (clipBox, ctm);
--
-- // get the Y flip right -- the CTM will always have a Y flip in place
-- clipBox.origin.y = surface->extents.height - (clipBox.origin.y + clipBox.size.height);
--
- x0 = floor(clipBox.origin.x);
- y0 = floor(clipBox.origin.y);
- w = ceil(clipBox.origin.x + clipBox.size.width) - x0;
- h = ceil(clipBox.origin.y + clipBox.size.height) - y0;
-
- /* Create a temporary the size of the clip surface, and position
- * it so that the device origin coincides with the original surface */
- fallback = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, (int) w, (int) h);
-@@ -1717,18 +1708,20 @@ _cairo_quartz_surface_paint (void *abstr
- action = _cairo_quartz_setup_source (surface, source);
-
- if (action == DO_SOLID || action == DO_PATTERN) {
- CGContextFillRect (surface->cgContext, CGRectMake(surface->extents.x,
- surface->extents.y,
- surface->extents.width,
- surface->extents.height));
- } else if (action == DO_SHADING) {
-+ CGContextSaveGState (surface->cgContext);
- CGContextConcatCTM (surface->cgContext, surface->sourceTransform);
- CGContextDrawShading (surface->cgContext, surface->sourceShading);
-+ CGContextRestoreGState (surface->cgContext);
- } else if (action == DO_IMAGE || action == DO_TILED_IMAGE) {
- CGContextSaveGState (surface->cgContext);
-
- CGContextConcatCTM (surface->cgContext, surface->sourceTransform);
- CGContextTranslateCTM (surface->cgContext, 0, surface->sourceImageRect.size.height);
- CGContextScaleCTM (surface->cgContext, 1, -1);
-
- if (action == DO_IMAGE)
diff --git a/gfx/cairo/quartz-first-stop.patch b/gfx/cairo/quartz-first-stop.patch
deleted file mode 100644
index 5ea4b916c..000000000
--- a/gfx/cairo/quartz-first-stop.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -690,31 +690,51 @@ ComputeGradientValue (void *info, const
- }
-
- static const float gradient_output_value_ranges[8] = {
- 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f
- };
- static const CGFunctionCallbacks gradient_callbacks = {
- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy
- };
-+/* Quartz will clamp input values to the input range.
-+
-+ Our stops are all in the range 0.0 to 1.0. However, the color before the
-+ beginning of the gradient line is obtained by Quartz computing a negative
-+ position on the gradient line, clamping it to the input range we specified
-+ for our color function, and then calling our color function (actually it
-+ pre-samples the color function into an array, but that doesn't matter just
-+ here). Therefore if we set the lower bound to 0.0, a negative position
-+ on the gradient line will pass 0.0 to ComputeGradientValue, which will
-+ select the last color stop with position 0, although it should select
-+ the first color stop (this matters when there are multiple color stops with
-+ position 0).
-+
-+ Therefore we pass a small negative number as the lower bound of the input
-+ range, so this value gets passed into ComputeGradientValue, which will
-+ return the color of the first stop. The number should be small because
-+ as far as I can tell, Quartz pre-samples the entire input range of the color
-+ function into an array of fixed size, so if the input range is larger
-+ than needed, the resolution of the gradient will be unnecessarily low.
-+*/
-+static const float nonrepeating_gradient_input_value_range[2] = { -0.001f, 1.f };
-
- static CGFunctionRef
- CreateGradientFunction (const cairo_gradient_pattern_t *gpat)
- {
- cairo_pattern_t *pat;
-- float input_value_range[2] = { 0.f, 1.f };
-
- if (_cairo_pattern_create_copy (&pat, &gpat->base))
- /* quartz doesn't deal very well with malloc failing, so there's
- * not much point in us trying either */
- return NULL;
-
- return CGFunctionCreate (pat,
- 1,
-- input_value_range,
-+ nonrepeating_gradient_input_value_range,
- 4,
- gradient_output_value_ranges,
- &gradient_callbacks);
- }
-
- static void
- UpdateLinearParametersToIncludePoint(double *min_t, double *max_t, CGPoint *start,
- double dx, double dy,
diff --git a/gfx/cairo/quartz-fix-PAD.patch b/gfx/cairo/quartz-fix-PAD.patch
deleted file mode 100644
index 0e5ed3107..000000000
--- a/gfx/cairo/quartz-fix-PAD.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From: Robert O'Callahan <robert@ocallahan.org>
-Bug 593270. Part 2: Treat EXTEND_PAD like EXTEND_NONE when painting. r=jrmuizel,a=joe
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1464,35 +1464,35 @@ static void
- _cairo_quartz_setup_surface_source (cairo_quartz_surface_t *surface,
- const cairo_surface_pattern_t *spat,
- cairo_rectangle_int_t *extents,
- cairo_quartz_drawing_state_t *state)
- {
- const cairo_pattern_t *source = &spat->base;
- CGContextRef context = state->context;
-
-- if (source->extend == CAIRO_EXTEND_NONE ||
-+ if (source->extend == CAIRO_EXTEND_NONE || source->extend == CAIRO_EXTEND_PAD ||
- (CGContextDrawTiledImagePtr && source->extend == CAIRO_EXTEND_REPEAT))
- {
- cairo_surface_t *pat_surf = spat->surface;
- CGImageRef img;
- cairo_matrix_t m = spat->base.matrix;
- cairo_rectangle_int_t extents;
- CGAffineTransform xform;
- CGRect srcRect;
- cairo_fixed_t fw, fh;
- cairo_bool_t is_bounded;
-+ cairo_bool_t repeat = source->extend == CAIRO_EXTEND_REPEAT;
- cairo_status_t status;
-
- cairo_matrix_invert(&m);
- _cairo_quartz_cairo_matrix_to_quartz (&m, &state->transform);
-
- /* Draw nonrepeating CGLayer surface using DO_LAYER */
-- if (source->extend == CAIRO_EXTEND_NONE ||
-- (CGContextDrawTiledImagePtr && source->extend == CAIRO_EXTEND_REPEAT))
-+ if (!repeat && cairo_surface_get_type (pat_surf) == CAIRO_SURFACE_TYPE_QUARTZ) {
- cairo_quartz_surface_t *quartz_surf = (cairo_quartz_surface_t *) pat_surf;
- if (quartz_surf->cgLayer) {
- state->imageRect = CGRectMake (0, 0, quartz_surf->extents.width, quartz_surf->extents.height);
- state->layer = quartz_surf->cgLayer;
- state->action = DO_LAYER;
- return;
- }
- }
-@@ -1510,17 +1510,17 @@ _cairo_quartz_setup_surface_source (cair
- /* XXXroc what is this for? */
- CGContextSetRGBFillColor (surface->cgContext, 0, 0, 0, 1);
-
- state->image = img;
-
- is_bounded = _cairo_surface_get_extents (pat_surf, &extents);
- assert (is_bounded);
-
-- if (source->extend == CAIRO_EXTEND_NONE) {
-+ if (!repeat) {
- state->imageRect = CGRectMake (0, 0, extents.width, extents.height);
- state->action = DO_IMAGE;
- return;
- }
-
- /* Quartz seems to tile images at pixel-aligned regions only -- this
- * leads to seams if the image doesn't end up scaling to fill the
- * space exactly. The CGPattern tiling approach doesn't have this
diff --git a/gfx/cairo/quartz-get-image-performance.patch b/gfx/cairo/quartz-get-image-performance.patch
deleted file mode 100644
index ff3618cf8..000000000
--- a/gfx/cairo/quartz-get-image-performance.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-# HG changeset patch
-# User Matt Woodrow <mwoodrow@mozilla.com>
-# Date 1314162877 -43200
-# Node ID 87458c4670dcd16be5a5715d741ee2ca4cf18d0f
-# Parent 95eb700a64591cda694c284a9f8ad08c11e3dd97
-Bug 675837 - Only flush Quartz surfaces on the success paths during cairo_quartz_get_image. r=roc
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1909,30 +1909,30 @@ _cairo_quartz_get_image (cairo_quartz_su
- unsigned char *imageData;
- cairo_image_surface_t *isurf;
-
- if (IS_EMPTY(surface)) {
- *image_out = (cairo_image_surface_t*) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
- return CAIRO_STATUS_SUCCESS;
- }
-
-- CGContextFlush(surface->cgContext);
--
- if (surface->imageSurfaceEquiv) {
-+ CGContextFlush(surface->cgContext);
- *image_out = (cairo_image_surface_t*) cairo_surface_reference(surface->imageSurfaceEquiv);
- return CAIRO_STATUS_SUCCESS;
- }
-
- if (_cairo_quartz_is_cgcontext_bitmap_context(surface->cgContext)) {
- unsigned int stride;
- unsigned int bitinfo;
- unsigned int bpc, bpp;
- CGColorSpaceRef colorspace;
- unsigned int color_comps;
-
-+ CGContextFlush(surface->cgContext);
- imageData = (unsigned char *) CGBitmapContextGetData(surface->cgContext);
-
- #ifdef USE_10_3_WORKAROUNDS
- bitinfo = CGBitmapContextGetAlphaInfo (surface->cgContext);
- #else
- bitinfo = CGBitmapContextGetBitmapInfo (surface->cgContext);
- #endif
- stride = CGBitmapContextGetBytesPerRow (surface->cgContext);
diff --git a/gfx/cairo/quartz-get-image.patch b/gfx/cairo/quartz-get-image.patch
deleted file mode 100644
index e95d82d54..000000000
--- a/gfx/cairo/quartz-get-image.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-diff --git a/gfx/cairo/README b/gfx/cairo/README
---- a/gfx/cairo/README
-+++ b/gfx/cairo/README
-@@ -69,16 +69,18 @@ quartz-state.patch: bug 522859; refactor
- quartz-cache-CGImageRef.patch: cache CGImageRef for a CGBitmapContext; when we reuse it, Quartz will cache stuff, improving performance
-
- quartz-remove-snapshot.patch: remove broken implementation of backend snapshot
-
- quartz-cglayers.patch: add support for cairo surfaces backed by CGLayers
-
- quartz-cglayers-fix-fallback.patch: Bug 572912; fix bug in fallback code in previous patch
-
-+quartz-get-image.patch: Bug 575521; add a way to get the image surface associated with a surface
-+
- premultiply-alpha-solid-gradients.patch: bug 539165; multiply the solid color by the alpha component before using it for a solid surface
-
- xlib-initialize-members.path: bug 548793; initialize XRender version if the server doesn't have the extension
-
- remove-comma: remove a comma from enum
-
- d2d.patch: add d2d support
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1880,24 +1880,24 @@ _cairo_quartz_surface_finish (void *abst
- surface->cgContext = NULL;
-
- if (surface->bitmapContextImage) {
- CGImageRelease (surface->bitmapContextImage);
- surface->bitmapContextImage = NULL;
- }
-
- if (surface->imageSurfaceEquiv) {
-+ _cairo_image_surface_assume_ownership_of_data (surface->imageSurfaceEquiv);
- cairo_surface_destroy (surface->imageSurfaceEquiv);
- surface->imageSurfaceEquiv = NULL;
-+ } else if (surface->imageData) {
-+ free (surface->imageData);
- }
-
-- if (surface->imageData) {
-- free (surface->imageData);
-- surface->imageData = NULL;
-- }
-+ surface->imageData = NULL;
-
- if (surface->cgLayer) {
- CGLayerRelease (surface->cgLayer);
- }
-
- return CAIRO_STATUS_SUCCESS;
- }
-
-@@ -3200,16 +3200,28 @@ cairo_quartz_finish_cg_context_with_clip
- cairo_quartz_surface_t *quartz = (cairo_quartz_surface_t*)surface;
-
- if (cairo_surface_get_type(surface) != CAIRO_SURFACE_TYPE_QUARTZ)
- return;
-
- CGContextRestoreGState (quartz->cgContext);
- }
-
-+cairo_surface_t *
-+cairo_quartz_surface_get_image (cairo_surface_t *surface)
-+{
-+ cairo_quartz_surface_t *quartz = (cairo_quartz_surface_t *)surface;
-+ cairo_image_surface_t *image;
-+
-+ if (_cairo_quartz_get_image(quartz, &image))
-+ return NULL;
-+
-+ return (cairo_surface_t *)image;
-+}
-+
- /* Debug stuff */
-
- #ifdef QUARTZ_DEBUG
-
- #include <Movies.h>
-
- void ExportCGImageToPNGFile(CGImageRef inImageRef, char* dest)
- {
-diff --git a/gfx/cairo/cairo/src/cairo-quartz.h b/gfx/cairo/cairo/src/cairo-quartz.h
---- a/gfx/cairo/cairo/src/cairo-quartz.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz.h
-@@ -63,16 +63,19 @@ cairo_public CGContextRef
- cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
-
- cairo_public CGContextRef
- cairo_quartz_get_cg_context_with_clip (cairo_t *cr);
-
- cairo_public void
- cairo_quartz_finish_cg_context_with_clip (cairo_t *cr);
-
-+cairo_public cairo_surface_t *
-+cairo_quartz_surface_get_image (cairo_surface_t *surface);
-+
- #if CAIRO_HAS_QUARTZ_FONT
-
- /*
- * Quartz font support
- */
-
- cairo_public cairo_font_face_t *
- cairo_quartz_font_face_create_for_cgfont (CGFontRef font);
-diff --git a/gfx/cairo/cairo/src/cairo-rename.h b/gfx/cairo/cairo/src/cairo-rename.h
---- a/gfx/cairo/cairo/src/cairo-rename.h
-+++ b/gfx/cairo/cairo/src/cairo-rename.h
-@@ -178,16 +178,17 @@
- #define cairo_qpainter_surface_get_qpainter _moz_cairo_qpainter_surface_get_qpainter
- #define cairo_quartz_font_face_create_for_atsu_font_id _moz_cairo_quartz_font_face_create_for_atsu_font_id
- #define cairo_quartz_font_face_create_for_cgfont _moz_cairo_quartz_font_face_create_for_cgfont
- #define cairo_quartz_image_surface_create _moz_cairo_quartz_image_surface_create
- #define cairo_quartz_image_surface_get_image _moz_cairo_quartz_image_surface_get_image
- #define cairo_quartz_surface_create _moz_cairo_quartz_surface_create
- #define cairo_quartz_surface_create_for_cg_context _moz_cairo_quartz_surface_create_for_cg_context
- #define cairo_quartz_surface_get_cg_context _moz_cairo_quartz_surface_get_cg_context
-+#define cairo_quartz_surface_get_image _moz_cairo_quartz_surface_get_image
- #define cairo_rectangle _moz_cairo_rectangle
- #define cairo_rectangle_list_destroy _moz_cairo_rectangle_list_destroy
- #define cairo_reference _moz_cairo_reference
- #define cairo_rel_curve_to _moz_cairo_rel_curve_to
- #define cairo_rel_line_to _moz_cairo_rel_line_to
- #define cairo_rel_move_to _moz_cairo_rel_move_to
- #define cairo_reset_clip _moz_cairo_reset_clip
- #define cairo_restore _moz_cairo_restore
diff --git a/gfx/cairo/quartz-glyph-extents.patch b/gfx/cairo/quartz-glyph-extents.patch
deleted file mode 100644
index 311404292..000000000
--- a/gfx/cairo/quartz-glyph-extents.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/gfx/cairo/cairo/src/cairo-quartz-font.c Wed Dec 23 14:17:44 2009 -0500
-+++ b/gfx/cairo/cairo/src/cairo-quartz-font.c Wed Dec 23 20:45:00 2009 +0000
-@@ -420,6 +420,16 @@ _cairo_quartz_init_glyph_metrics (cairo_
- !CGFontGetGlyphBBoxesPtr (font_face->cgFont, &glyph, 1, &bbox))
- goto FAIL;
-
-+ /* broken fonts like Al Bayan return incorrect bounds for some null characters,
-+ see https://bugzilla.mozilla.org/show_bug.cgi?id=534260 */
-+ if (unlikely (bbox.origin.x == -32767 &&
-+ bbox.origin.y == -32767 &&
-+ bbox.size.width == 65534 &&
-+ bbox.size.height == 65534)) {
-+ bbox.origin.x = bbox.origin.y = 0;
-+ bbox.size.width = bbox.size.height = 0;
-+ }
-+
- status = _cairo_matrix_compute_basis_scale_factors (&font->base.scale,
- &xscale, &yscale, 1);
- if (status)
diff --git a/gfx/cairo/quartz-is-clear.patch b/gfx/cairo/quartz-is-clear.patch
deleted file mode 100644
index 714951b44..000000000
--- a/gfx/cairo/quartz-is-clear.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-commit df2b22c8c6677d531194579c82a55e855adff706
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Thu Apr 8 15:43:41 2010 -0400
-
- Propagate is_clear flag to quartz_image_surface
-
-diff --git a/src/cairo-quartz-image-surface.c b/src/cairo-quartz-image-surface.c
-index 5a624eb..b8809d5 100644
---- a/src/cairo-quartz-image-surface.c
-+++ b/src/cairo-quartz-image-surface.c
-@@ -146,6 +146,8 @@ _cairo_quartz_image_surface_flush (void *asurface)
- surface->image = newImage;
- CGImageRelease (oldImage);
-
-+ surface->base.is_clear = surface->imageSurface->base.is_clear;
-+
- return CAIRO_STATUS_SUCCESS;
- }
-
-@@ -267,6 +269,8 @@ cairo_quartz_image_surface_create (cairo_surface_t *surface)
- qisurf->image = image;
- qisurf->imageSurface = image_surface;
-
-+ qisurf->base.is_clear = image_surface->base.is_clear;
-+
- return &qisurf->base;
- }
-
diff --git a/gfx/cairo/quartz-layers-content.patch b/gfx/cairo/quartz-layers-content.patch
deleted file mode 100644
index 243d1f017..000000000
--- a/gfx/cairo/quartz-layers-content.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -2040,17 +2040,18 @@ _cairo_quartz_surface_create_similar (vo
- cairo_content_t content,
- int width,
- int height)
- {
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_format_t format;
-
- if (surface->cgLayer)
-- return cairo_quartz_surface_create_cg_layer (abstract_surface, width, height);
-+ return cairo_quartz_surface_create_cg_layer (abstract_surface, content,
-+ width, height);
-
- if (content == CAIRO_CONTENT_COLOR_ALPHA)
- format = CAIRO_FORMAT_ARGB32;
- else if (content == CAIRO_CONTENT_COLOR)
- format = CAIRO_FORMAT_RGB24;
- else if (content == CAIRO_CONTENT_ALPHA)
- format = CAIRO_FORMAT_A8;
- else
-@@ -2960,54 +2961,55 @@ cairo_quartz_surface_create_for_cg_conte
-
- return (cairo_surface_t *) surf;
- }
-
- /**
- * cairo_quartz_cglayer_surface_create_similar
- * @surface: The returned surface can be efficiently drawn into this
- * destination surface (if tiling is not used)."
-+ * @content: the content type of the surface
- * @width: width of the surface, in pixels
- * @height: height of the surface, in pixels
- *
- * Creates a Quartz surface backed by a CGLayer, if the given surface
- * is a Quartz surface; the CGLayer is created to match the surface's
-- * Quartz context. Otherwise just calls cairo_surface_create_similar
-- * with CAIRO_CONTENT_COLOR_ALPHA.
-+ * Quartz context. Otherwise just calls cairo_surface_create_similar.
- * The returned surface can be efficiently blitted to the given surface,
- * but tiling and 'extend' modes other than NONE are not so efficient.
- *
- * Return value: the newly created surface.
- *
- * Since: 1.10
- **/
- cairo_surface_t *
- cairo_quartz_surface_create_cg_layer (cairo_surface_t *surface,
-+ cairo_content_t content,
- unsigned int width,
- unsigned int height)
- {
- cairo_quartz_surface_t *surf;
- CGLayerRef layer;
- CGContextRef ctx;
- CGContextRef cgContext;
-
- cgContext = cairo_quartz_surface_get_cg_context (surface);
- if (!cgContext)
-- return cairo_surface_create_similar (surface, CAIRO_CONTENT_COLOR_ALPHA,
-+ return cairo_surface_create_similar (surface, content,
- width, height);
-
- if (!_cairo_quartz_verify_surface_size(width, height))
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
-
- /* If we pass zero width or height into CGLayerCreateWithContext below,
- * it will fail.
- */
- if (width == 0 || height == 0) {
- return (cairo_surface_t*)
-- _cairo_quartz_surface_create_internal (NULL, CAIRO_CONTENT_COLOR_ALPHA,
-+ _cairo_quartz_surface_create_internal (NULL, content,
- width, height);
- }
-
- layer = CGLayerCreateWithContext (cgContext,
- CGSizeMake (width, height),
- NULL);
- if (!layer)
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
-@@ -3016,18 +3018,18 @@ cairo_quartz_surface_create_cg_layer (ca
- /* Flip it when we draw into it, so that when we finally composite it
- * to a flipped target, the directions match and Quartz will optimize
- * the composition properly
- */
- CGContextTranslateCTM (ctx, 0, height);
- CGContextScaleCTM (ctx, 1, -1);
-
- CGContextRetain (ctx);
-- surf = _cairo_quartz_surface_create_internal (ctx, CAIRO_CONTENT_COLOR_ALPHA,
-- width, height);
-+ surf = _cairo_quartz_surface_create_internal (ctx, content,
-+ width, height);
- if (surf->base.status) {
- CGLayerRelease (layer);
- // create_internal will have set an error
- return (cairo_surface_t*) surf;
- }
- surf->cgLayer = layer;
-
- return (cairo_surface_t *) surf;
-diff --git a/gfx/cairo/cairo/src/cairo-quartz.h b/gfx/cairo/cairo/src/cairo-quartz.h
---- a/gfx/cairo/cairo/src/cairo-quartz.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz.h
-@@ -46,16 +46,17 @@ CAIRO_BEGIN_DECLS
-
- cairo_public cairo_surface_t *
- cairo_quartz_surface_create (cairo_format_t format,
- unsigned int width,
- unsigned int height);
-
- cairo_public cairo_surface_t *
- cairo_quartz_surface_create_cg_layer (cairo_surface_t *surface,
-+ cairo_content_t content,
- unsigned int width,
- unsigned int height);
-
- cairo_public cairo_surface_t *
- cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
- unsigned int width,
- unsigned int height);
-
diff --git a/gfx/cairo/quartz-mark-dirty.patch b/gfx/cairo/quartz-mark-dirty.patch
deleted file mode 100644
index ddaaf94e8..000000000
--- a/gfx/cairo/quartz-mark-dirty.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Date: Thu Jan 5 18:40:01 2012 -0500
-
-Bug 715704. Add a quartz implementation of mark_dirty_rectangle. r=roc
-
-We need to drop our CGImage cache when the surface has been changed by outside users.
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -3116,16 +3116,27 @@ _cairo_quartz_surface_clipper_intersect_
- CGContextEOClip (surface->cgContext);
- }
-
- ND((stderr, "-- intersect_clip_path\n"));
-
- return CAIRO_STATUS_SUCCESS;
- }
-
-+static cairo_status_t
-+_cairo_quartz_surface_mark_dirty_rectangle (void *abstract_surface,
-+ int x, int y,
-+ int width, int height)
-+{
-+ cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
-+ _cairo_quartz_surface_will_change (surface);
-+ return CAIRO_STATUS_SUCCESS;
-+}
-+
-+
- // XXXtodo implement show_page; need to figure out how to handle begin/end
-
- static const struct _cairo_surface_backend cairo_quartz_surface_backend = {
- CAIRO_SURFACE_TYPE_QUARTZ,
- _cairo_quartz_surface_create_similar,
- _cairo_quartz_surface_finish,
- _cairo_quartz_surface_acquire_image,
- _cairo_quartz_surface_release_source_image,
-@@ -3138,17 +3149,17 @@ static const struct _cairo_surface_backe
- NULL, /* create_span_renderer */
- NULL, /* check_span_renderer */
- NULL, /* copy_page */
- NULL, /* show_page */
- _cairo_quartz_surface_get_extents,
- NULL, /* old_show_glyphs */
- NULL, /* get_font_options */
- NULL, /* flush */
-- NULL, /* mark_dirty_rectangle */
-+ _cairo_quartz_surface_mark_dirty_rectangle,
- NULL, /* scaled_font_fini */
- NULL, /* scaled_glyph_fini */
-
- _cairo_quartz_surface_paint,
- _cairo_quartz_surface_mask,
- _cairo_quartz_surface_stroke,
- _cairo_quartz_surface_fill,
- _cairo_quartz_surface_show_glyphs,
diff --git a/gfx/cairo/quartz-mask-non-OVER.patch b/gfx/cairo/quartz-mask-non-OVER.patch
deleted file mode 100644
index a6d94be12..000000000
--- a/gfx/cairo/quartz-mask-non-OVER.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From: Robert O'Callahan <robert@ocallahan.org>
-Bug 579985. Using CGContextSetAlpha to implement mask alpha doesn't work for some operators. r=jrmuizel,a=blocking
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -2734,17 +2734,19 @@ _cairo_quartz_surface_mask (void *abstra
-
- if (IS_EMPTY(surface))
- return CAIRO_STATUS_SUCCESS;
-
- rv = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
- if (unlikely (rv))
- return rv;
-
-- if (mask->type == CAIRO_PATTERN_TYPE_SOLID) {
-+ /* Using CGContextSetAlpha to implement mask alpha doesn't work for all operators. */
-+ if (mask->type == CAIRO_PATTERN_TYPE_SOLID &&
-+ op == CAIRO_OPERATOR_OVER) {
- /* This is easy; we just need to paint with the alpha. */
- cairo_solid_pattern_t *solid_mask = (cairo_solid_pattern_t *) mask;
-
- CGContextSetAlpha (surface->cgContext, solid_mask->color.alpha);
- rv = _cairo_quartz_surface_paint (surface, op, source, clip);
- CGContextSetAlpha (surface->cgContext, 1.0);
-
- return rv;
-diff --git a/layout/reftests/bugs/579985-1-ref.html b/layout/reftests/bugs/579985-1-ref.html
-new file mode 100644
---- /dev/null
-+++ b/layout/reftests/bugs/579985-1-ref.html
-@@ -0,0 +1,6 @@
-+<!DOCTYPE HTML>
-+<html>
-+<body>
-+<div style="width:100px; height:100px; background:blue; opacity:0.5;">Hello</div>
-+</body>
-+</html>
-diff --git a/layout/reftests/bugs/579985-1.html b/layout/reftests/bugs/579985-1.html
-new file mode 100644
---- /dev/null
-+++ b/layout/reftests/bugs/579985-1.html
-@@ -0,0 +1,16 @@
-+<!DOCTYPE HTML>
-+<html class="reftest-wait">
-+<head>
-+<script>
-+function doTest() {
-+ var d = document.getElementById("d");
-+ d.style.opacity = 0.75;
-+ document.documentElement.removeAttribute("class");
-+}
-+window.addEventListener("MozReftestInvalidate", doTest, false);
-+</script>
-+</head>
-+<body>
-+<div id="d" style="width:100px; height:100px; background:blue;">Hello</div>
-+</body>
-+</html>
-diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list
---- a/layout/reftests/bugs/reftest.list
-+++ b/layout/reftests/bugs/reftest.list
-@@ -1499,16 +1499,17 @@ random-if(layersGPUAccelerated) == 56499
- == 571347-3.html 571347-3-ref.html
- == 572598-1.html 572598-ref.html
- == 574898-1.html 574898-ref.html
- == 579655-1.html 579655-1-ref.html
- == 577838-1.html 577838-1-ref.html
- == 577838-2.html 577838-2-ref.html
- random-if(layersGPUAccelerated) == 579323-1.html 579323-1-ref.html
- == 579349-1.html 579349-1-ref.html
-+== 579985-1.html 579985-1-ref.html
- == 580160-1.html 580160-1-ref.html
- HTTP(..) == 580863-1.html 580863-1-ref.html
- random-if(layersGPUAccelerated) == 581317-1.html 581317-1-ref.html
- == 581579-1.html 581579-1-ref.html
- == 582037-1a.html 582037-1-ref.html
- == 582037-1b.html 582037-1-ref.html
- == 582037-2a.html 582037-2-ref.html
- == 582037-2b.html 582037-2-ref.html
diff --git a/gfx/cairo/quartz-minimize-gradient-repeat.patch b/gfx/cairo/quartz-minimize-gradient-repeat.patch
deleted file mode 100644
index 9782bef11..000000000
--- a/gfx/cairo/quartz-minimize-gradient-repeat.patch
+++ /dev/null
@@ -1,561 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1249558989 -43200
-# Node ID 0bac4c903d2bb1d5c0d5426209001fc2a77cc105
-# Parent 963b9451ad305924738d05d997a640698cd3af91
-Bug 508730. Don't repeat a Quartz gradient more times than necessary, to avoid Quartz quality problems when there are lots of repeated color stops. r=jmuizelaar
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -710,82 +710,100 @@ CreateGradientFunction (const cairo_grad
- return CGFunctionCreate (pat,
- 1,
- input_value_range,
- 4,
- gradient_output_value_ranges,
- &gradient_callbacks);
- }
-
-+static void
-+UpdateLinearParametersToIncludePoint(double *min_t, double *max_t, CGPoint *start,
-+ double dx, double dy,
-+ double x, double y)
-+{
-+ /* Compute a parameter t such that a line perpendicular to the (dx,dy)
-+ vector, passing through (start->x + dx*t, start->y + dy*t), also
-+ passes through (x,y).
-+
-+ Let px = x - start->x, py = y - start->y.
-+ t is given by
-+ (px - dx*t)*dx + (py - dy*t)*dy = 0
-+
-+ Solving for t we get
-+ numerator = dx*px + dy*py
-+ denominator = dx^2 + dy^2
-+ t = numerator/denominator
-+
-+ In CreateRepeatingLinearGradientFunction we know the length of (dx,dy)
-+ is not zero. (This is checked in _cairo_quartz_setup_linear_source.)
-+ */
-+ double px = x - start->x;
-+ double py = y - start->y;
-+ double numerator = dx*px + dy*py;
-+ double denominator = dx*dx + dy*dy;
-+ double t = numerator/denominator;
-+
-+ if (*min_t > t) {
-+ *min_t = t;
-+ }
-+ if (*max_t < t) {
-+ *max_t = t;
-+ }
-+}
-+
- static CGFunctionRef
- CreateRepeatingLinearGradientFunction (cairo_quartz_surface_t *surface,
- const cairo_gradient_pattern_t *gpat,
- CGPoint *start, CGPoint *end,
-- CGAffineTransform matrix)
-+ cairo_rectangle_int_t *extents)
- {
- cairo_pattern_t *pat;
- float input_value_range[2];
-+ double t_min = 0.;
-+ double t_max = 0.;
-+ double dx = end->x - start->x;
-+ double dy = end->y - start->y;
-+ double bounds_x1, bounds_x2, bounds_y1, bounds_y2;
-
-- CGPoint mstart, mend;
-+ if (!extents) {
-+ extents = &surface->extents;
-+ }
-+ bounds_x1 = extents->x;
-+ bounds_y1 = extents->y;
-+ bounds_x2 = extents->x + extents->width;
-+ bounds_y2 = extents->y + extents->height;
-+ _cairo_matrix_transform_bounding_box (&gpat->base.matrix,
-+ &bounds_x1, &bounds_y1,
-+ &bounds_x2, &bounds_y2,
-+ NULL);
-
-- double dx, dy;
-- int x_rep_start = 0, x_rep_end = 0;
-- int y_rep_start = 0, y_rep_end = 0;
-+ UpdateLinearParametersToIncludePoint(&t_min, &t_max, start, dx, dy,
-+ bounds_x1, bounds_y1);
-+ UpdateLinearParametersToIncludePoint(&t_min, &t_max, start, dx, dy,
-+ bounds_x2, bounds_y1);
-+ UpdateLinearParametersToIncludePoint(&t_min, &t_max, start, dx, dy,
-+ bounds_x2, bounds_y2);
-+ UpdateLinearParametersToIncludePoint(&t_min, &t_max, start, dx, dy,
-+ bounds_x1, bounds_y2);
-
-- int rep_start, rep_end;
--
-- // figure out how many times we'd need to repeat the gradient pattern
-- // to cover the whole (transformed) surface area
-- mstart = CGPointApplyAffineTransform (*start, matrix);
-- mend = CGPointApplyAffineTransform (*end, matrix);
--
-- dx = fabs (mend.x - mstart.x);
-- dy = fabs (mend.y - mstart.y);
--
-- if (dx > 1e-6) {
-- x_rep_start = (int) ceil(MIN(mstart.x, mend.x) / dx);
-- x_rep_end = (int) ceil((surface->extents.width - MAX(mstart.x, mend.x)) / dx);
--
-- if (mend.x < mstart.x) {
-- int swap = x_rep_end;
-- x_rep_end = x_rep_start;
-- x_rep_start = swap;
-- }
-- }
--
-- if (dy > 1e-6) {
-- y_rep_start = (int) ceil(MIN(mstart.y, mend.y) / dy);
-- y_rep_end = (int) ceil((surface->extents.width - MAX(mstart.y, mend.y)) / dy);
--
-- if (mend.y < mstart.y) {
-- int swap = y_rep_end;
-- y_rep_end = y_rep_start;
-- y_rep_start = swap;
-- }
-- }
--
-- rep_start = MAX(x_rep_start, y_rep_start);
-- rep_end = MAX(x_rep_end, y_rep_end);
--
-- // extend the line between start and end by rep_start times from the start
-- // and rep_end times from the end
--
-- dx = end->x - start->x;
-- dy = end->y - start->y;
--
-- start->x = start->x - dx * rep_start;
-- start->y = start->y - dy * rep_start;
--
-- end->x = end->x + dx * rep_end;
-- end->y = end->y + dy * rep_end;
-+ /* Move t_min and t_max to the nearest usable integer to try to avoid
-+ subtle variations due to numerical instability, especially accidentally
-+ cutting off a pixel. Extending the gradient repetitions is always safe. */
-+ t_min = floor (t_min);
-+ t_max = ceil (t_max);
-+ end->x = start->x + dx*t_max;
-+ end->y = start->y + dy*t_max;
-+ start->x = start->x + dx*t_min;
-+ start->y = start->y + dy*t_min;
-
- // set the input range for the function -- the function knows how to
- // map values outside of 0.0 .. 1.0 to that range for REPEAT/REFLECT.
-- input_value_range[0] = 0.0 - 1.0 * rep_start;
-- input_value_range[1] = 1.0 + 1.0 * rep_end;
-+ input_value_range[0] = t_min;
-+ input_value_range[1] = t_max;
-
- if (_cairo_pattern_create_copy (&pat, &gpat->base))
- /* quartz doesn't deal very well with malloc failing, so there's
- * not much point in us trying either */
- return NULL;
-
- return CGFunctionCreate (pat,
- 1,
-@@ -840,35 +858,43 @@ UpdateRadialParameterToIncludePoint(doub
- }
- }
-
- /* This must only be called when one of the circles properly contains the other */
- static CGFunctionRef
- CreateRepeatingRadialGradientFunction (cairo_quartz_surface_t *surface,
- const cairo_gradient_pattern_t *gpat,
- CGPoint *start, double *start_radius,
-- CGPoint *end, double *end_radius)
-+ CGPoint *end, double *end_radius,
-+ cairo_rectangle_int_t *extents)
- {
-- CGRect clip = CGContextGetClipBoundingBox (surface->cgContext);
-- CGAffineTransform transform;
- cairo_pattern_t *pat;
- float input_value_range[2];
- CGPoint *inner;
- double *inner_radius;
- CGPoint *outer;
- double *outer_radius;
- /* minimum and maximum t-parameter values that will make our gradient
- cover the clipBox */
- double t_min, t_max, t_temp;
- /* outer minus inner */
- double dr, dx, dy;
-+ double bounds_x1, bounds_x2, bounds_y1, bounds_y2;
-
-- _cairo_quartz_cairo_matrix_to_quartz (&gpat->base.matrix, &transform);
-- /* clip is in cairo device coordinates; get it into cairo user space */
-- clip = CGRectApplyAffineTransform (clip, transform);
-+ if (!extents) {
-+ extents = &surface->extents;
-+ }
-+ bounds_x1 = extents->x;
-+ bounds_y1 = extents->y;
-+ bounds_x2 = extents->x + extents->width;
-+ bounds_y2 = extents->y + extents->height;
-+ _cairo_matrix_transform_bounding_box (&gpat->base.matrix,
-+ &bounds_x1, &bounds_y1,
-+ &bounds_x2, &bounds_y2,
-+ NULL);
-
- if (*start_radius < *end_radius) {
- /* end circle contains start circle */
- inner = start;
- outer = end;
- inner_radius = start_radius;
- outer_radius = end_radius;
- } else {
-@@ -878,36 +904,37 @@ CreateRepeatingRadialGradientFunction (c
- inner_radius = end_radius;
- outer_radius = start_radius;
- }
-
- dr = *outer_radius - *inner_radius;
- dx = outer->x - inner->x;
- dy = outer->y - inner->y;
-
-+ /* We can't round or fudge t_min here, it has to be as accurate as possible. */
- t_min = -(*inner_radius/dr);
- inner->x += t_min*dx;
- inner->y += t_min*dy;
- *inner_radius = 0.;
-
- t_temp = 0.;
- UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-- clip.origin.x, clip.origin.y);
-+ bounds_x1, bounds_y1);
- UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-- clip.origin.x + clip.size.width, clip.origin.y);
-+ bounds_x2, bounds_y1);
- UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-- clip.origin.x + clip.size.width, clip.origin.y + clip.size.height);
-+ bounds_x2, bounds_y2);
- UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-- clip.origin.x, clip.origin.y + clip.size.height);
-+ bounds_x1, bounds_y2);
- /* UpdateRadialParameterToIncludePoint assumes t=0 means radius 0.
- But for the parameter values we use with Quartz, t_min means radius 0.
-- Also, add a small fudge factor to avoid rounding issues. Since the
-- circles are alway expanding and containing the earlier circles, this is
-- OK. */
-- t_temp += 1e-6;
-+ Since the circles are alway expanding and contain the earlier circles,
-+ it's safe to extend t_max/t_temp as much as we want, so round t_temp up
-+ to the nearest integer. This may help us give stable results. */
-+ t_temp = ceil (t_temp);
- t_max = t_min + t_temp;
- outer->x = inner->x + t_temp*dx;
- outer->y = inner->y + t_temp*dy;
- *outer_radius = t_temp*dr;
-
- /* set the input range for the function -- the function knows how to
- map values outside of 0.0 .. 1.0 to that range for REPEAT/REFLECT. */
- if (*start_radius < *end_radius) {
-@@ -1218,33 +1245,57 @@ _cairo_quartz_setup_fallback_source (cai
- surface->sourceImageRect = CGRectMake (0.0, 0.0, w, h);
- surface->sourceImage = img;
- surface->sourceImageSurface = fallback;
- surface->sourceTransform = CGAffineTransformMakeTranslation (x0, y0);
-
- return DO_IMAGE;
- }
-
-+/*
-+Quartz does not support repeating radients. We handle repeating gradients
-+by manually extending the gradient and repeating color stops. We need to
-+minimize the number of repetitions since Quartz seems to sample our color
-+function across the entire range, even if part of that range is not needed
-+for the visible area of the gradient, and it samples with some fixed resolution,
-+so if the gradient range is too large it samples with very low resolution and
-+the gradient is very coarse. CreateRepeatingLinearGradientFunction and
-+CreateRepeatingRadialGradientFunction compute the number of repetitions needed
-+based on the extents of the object (the clip region cannot be used here since
-+we don't want the rasterization of the entire gradient to depend on the
-+clip region).
-+*/
- static cairo_quartz_action_t
- _cairo_quartz_setup_linear_source (cairo_quartz_surface_t *surface,
-- const cairo_linear_pattern_t *lpat)
-+ const cairo_linear_pattern_t *lpat,
-+ cairo_rectangle_int_t *extents)
- {
- const cairo_pattern_t *abspat = &lpat->base.base;
- cairo_matrix_t mat;
- CGPoint start, end;
- CGFunctionRef gradFunc;
- CGColorSpaceRef rgb;
- bool extend = abspat->extend == CAIRO_EXTEND_PAD;
-
- if (lpat->base.n_stops == 0) {
- CGContextSetRGBStrokeColor (surface->cgContext, 0., 0., 0., 0.);
- CGContextSetRGBFillColor (surface->cgContext, 0., 0., 0., 0.);
- return DO_SOLID;
- }
-
-+ if (lpat->p1.x == lpat->p2.x &&
-+ lpat->p1.y == lpat->p2.y) {
-+ /* Quartz handles cases where the vector has no length very
-+ * differently from pixman.
-+ * Whatever the correct behaviour is, let's at least have only pixman's
-+ * implementation to worry about.
-+ */
-+ return _cairo_quartz_setup_fallback_source (surface, abspat);
-+ }
-+
- mat = abspat->matrix;
- cairo_matrix_invert (&mat);
- _cairo_quartz_cairo_matrix_to_quartz (&mat, &surface->sourceTransform);
-
- rgb = CGColorSpaceCreateDeviceRGB();
-
- start = CGPointMake (_cairo_fixed_to_double (lpat->p1.x),
- _cairo_fixed_to_double (lpat->p1.y));
-@@ -1254,33 +1305,34 @@ _cairo_quartz_setup_linear_source (cairo
- if (abspat->extend == CAIRO_EXTEND_NONE ||
- abspat->extend == CAIRO_EXTEND_PAD)
- {
- gradFunc = CreateGradientFunction (&lpat->base);
- } else {
- gradFunc = CreateRepeatingLinearGradientFunction (surface,
- &lpat->base,
- &start, &end,
-- surface->sourceTransform);
-+ extents);
- }
-
- surface->sourceShading = CGShadingCreateAxial (rgb,
- start, end,
- gradFunc,
- extend, extend);
-
- CGColorSpaceRelease(rgb);
- CGFunctionRelease(gradFunc);
-
- return DO_SHADING;
- }
-
- static cairo_quartz_action_t
- _cairo_quartz_setup_radial_source (cairo_quartz_surface_t *surface,
-- const cairo_radial_pattern_t *rpat)
-+ const cairo_radial_pattern_t *rpat,
-+ cairo_rectangle_int_t *extents)
- {
- const cairo_pattern_t *abspat = &rpat->base.base;
- cairo_matrix_t mat;
- CGPoint start, end;
- CGFunctionRef gradFunc;
- CGColorSpaceRef rgb;
- bool extend = abspat->extend == CAIRO_EXTEND_PAD;
- double c1x = _cairo_fixed_to_double (rpat->c1.x);
-@@ -1322,17 +1374,18 @@ _cairo_quartz_setup_radial_source (cairo
- if (abspat->extend == CAIRO_EXTEND_NONE ||
- abspat->extend == CAIRO_EXTEND_PAD)
- {
- gradFunc = CreateGradientFunction (&rpat->base);
- } else {
- gradFunc = CreateRepeatingRadialGradientFunction (surface,
- &rpat->base,
- &start, &r1,
-- &end, &r2);
-+ &end, &r2,
-+ extents);
- }
-
- surface->sourceShading = CGShadingCreateRadial (rgb,
- start,
- r1,
- end,
- r2,
- gradFunc,
-@@ -1341,17 +1394,18 @@ _cairo_quartz_setup_radial_source (cairo
- CGColorSpaceRelease(rgb);
- CGFunctionRelease(gradFunc);
-
- return DO_SHADING;
- }
-
- static cairo_quartz_action_t
- _cairo_quartz_setup_source (cairo_quartz_surface_t *surface,
-- const cairo_pattern_t *source)
-+ const cairo_pattern_t *source,
-+ cairo_rectangle_int_t *extents)
- {
- assert (!(surface->sourceImage || surface->sourceShading || surface->sourcePattern));
-
- surface->oldInterpolationQuality = CGContextGetInterpolationQuality (surface->cgContext);
- CGContextSetInterpolationQuality (surface->cgContext, _cairo_quartz_filter_to_quartz (source->filter));
-
- if (source->type == CAIRO_PATTERN_TYPE_SOLID) {
- cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) source;
-@@ -1367,24 +1421,22 @@ _cairo_quartz_setup_source (cairo_quartz
- solid->color.blue,
- solid->color.alpha);
-
- return DO_SOLID;
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_LINEAR) {
- const cairo_linear_pattern_t *lpat = (const cairo_linear_pattern_t *)source;
-- return _cairo_quartz_setup_linear_source (surface, lpat);
--
-+ return _cairo_quartz_setup_linear_source (surface, lpat, extents);
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_RADIAL) {
- const cairo_radial_pattern_t *rpat = (const cairo_radial_pattern_t *)source;
-- return _cairo_quartz_setup_radial_source (surface, rpat);
--
-+ return _cairo_quartz_setup_radial_source (surface, rpat, extents);
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_SURFACE &&
- (source->extend == CAIRO_EXTEND_NONE || (CGContextDrawTiledImagePtr && source->extend == CAIRO_EXTEND_REPEAT)))
- {
- const cairo_surface_pattern_t *spat = (const cairo_surface_pattern_t *) source;
- cairo_surface_t *pat_surf = spat->surface;
- CGImageRef img;
-@@ -1852,17 +1904,17 @@ _cairo_quartz_surface_paint (void *abstr
- if (IS_EMPTY(surface))
- return CAIRO_STATUS_SUCCESS;
-
- if (op == CAIRO_OPERATOR_DEST)
- return CAIRO_STATUS_SUCCESS;
-
- CGContextSetCompositeOperation (surface->cgContext, _cairo_quartz_cairo_operator_to_quartz (op));
-
-- action = _cairo_quartz_setup_source (surface, source);
-+ action = _cairo_quartz_setup_source (surface, source, NULL);
-
- if (action == DO_SOLID || action == DO_PATTERN) {
- CGContextFillRect (surface->cgContext, CGRectMake(surface->extents.x,
- surface->extents.y,
- surface->extents.width,
- surface->extents.height));
- } else if (action == DO_SHADING) {
- CGContextSaveGState (surface->cgContext);
-@@ -1886,16 +1938,35 @@ _cairo_quartz_surface_paint (void *abstr
- }
-
- _cairo_quartz_teardown_source (surface, source);
-
- ND((stderr, "-- paint\n"));
- return rv;
- }
-
-+static cairo_bool_t
-+_cairo_quartz_source_needs_extents (const cairo_pattern_t *source)
-+{
-+ /* For repeating gradients we need to manually extend the gradient and
-+ repeat stops, since Quartz doesn't support repeating gradients natively.
-+ We need to minimze the number of repeated stops, and since rasterization
-+ depends on the number of repetitions we use (even if some of the
-+ repetitions go beyond the extents of the object or outside the clip
-+ region), it's important to use the same number of repetitions when
-+ rendering an object no matter what the clip region is. So the
-+ computation of the repetition count cannot depended on the clip region,
-+ and should only depend on the object extents, so we need to compute
-+ the object extents for repeating gradients. */
-+ return (source->type == CAIRO_PATTERN_TYPE_LINEAR ||
-+ source->type == CAIRO_PATTERN_TYPE_RADIAL) &&
-+ (source->extend == CAIRO_EXTEND_REPEAT ||
-+ source->extend == CAIRO_EXTEND_REFLECT);
-+}
-+
- static cairo_int_status_t
- _cairo_quartz_surface_fill (void *abstract_surface,
- cairo_operator_t op,
- const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
- cairo_fill_rule_t fill_rule,
- double tolerance,
- cairo_antialias_t antialias,
-@@ -1926,17 +1997,27 @@ _cairo_quartz_surface_fill (void *abstra
- return CAIRO_STATUS_SUCCESS;
- }
-
- CGContextSaveGState (surface->cgContext);
-
- CGContextSetShouldAntialias (surface->cgContext, (antialias != CAIRO_ANTIALIAS_NONE));
- CGContextSetCompositeOperation (surface->cgContext, _cairo_quartz_cairo_operator_to_quartz (op));
-
-- action = _cairo_quartz_setup_source (surface, source);
-+ if (_cairo_quartz_source_needs_extents (source))
-+ {
-+ /* We don't need precise extents since these are only used to
-+ compute the number of gradient reptitions needed to cover the
-+ object. */
-+ cairo_rectangle_int_t path_extents;
-+ _cairo_path_fixed_approximate_fill_extents (path, &path_extents);
-+ action = _cairo_quartz_setup_source (surface, source, &path_extents);
-+ } else {
-+ action = _cairo_quartz_setup_source (surface, source, NULL);
-+ }
-
- CGContextBeginPath (surface->cgContext);
-
- stroke.cgContext = surface->cgContext;
- stroke.ctm_inverse = NULL;
- rv = _cairo_quartz_cairo_path_to_quartz_context (path, &stroke);
- if (rv)
- goto BAIL;
-@@ -2059,17 +2140,24 @@ _cairo_quartz_surface_stroke (void *abst
-
- CGContextSetLineDash (surface->cgContext, style->dash_offset, fdash, max_dashes);
- if (fdash != sdash)
- free (fdash);
- }
-
- CGContextSetCompositeOperation (surface->cgContext, _cairo_quartz_cairo_operator_to_quartz (op));
-
-- action = _cairo_quartz_setup_source (surface, source);
-+ if (_cairo_quartz_source_needs_extents (source))
-+ {
-+ cairo_rectangle_int_t path_extents;
-+ _cairo_path_fixed_approximate_stroke_extents (path, style, ctm, &path_extents);
-+ action = _cairo_quartz_setup_source (surface, source, &path_extents);
-+ } else {
-+ action = _cairo_quartz_setup_source (surface, source, NULL);
-+ }
-
- CGContextBeginPath (surface->cgContext);
-
- stroke.cgContext = surface->cgContext;
- stroke.ctm_inverse = ctm_inverse;
- rv = _cairo_quartz_cairo_path_to_quartz_context (path, &stroke);
- if (rv)
- goto BAIL;
-@@ -2180,17 +2268,26 @@ _cairo_quartz_surface_show_glyphs (void
- if (op == CAIRO_OPERATOR_DEST)
- return CAIRO_STATUS_SUCCESS;
-
- if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_QUARTZ)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- CGContextSaveGState (surface->cgContext);
-
-- action = _cairo_quartz_setup_source (surface, source);
-+ if (_cairo_quartz_source_needs_extents (source))
-+ {
-+ cairo_rectangle_int_t glyph_extents;
-+ _cairo_scaled_font_glyph_device_extents (scaled_font, glyphs, num_glyphs,
-+ &glyph_extents);
-+ action = _cairo_quartz_setup_source (surface, source, &glyph_extents);
-+ } else {
-+ action = _cairo_quartz_setup_source (surface, source, NULL);
-+ }
-+
- if (action == DO_SOLID || action == DO_PATTERN) {
- CGContextSetTextDrawingMode (surface->cgContext, kCGTextFill);
- } else if (action == DO_IMAGE || action == DO_TILED_IMAGE || action == DO_SHADING) {
- CGContextSetTextDrawingMode (surface->cgContext, kCGTextClip);
- isClipping = TRUE;
- } else {
- if (action != DO_NOTHING)
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
diff --git a/gfx/cairo/quartz-optimize-OVER.patch b/gfx/cairo/quartz-optimize-OVER.patch
deleted file mode 100644
index 2c587459b..000000000
--- a/gfx/cairo/quartz-optimize-OVER.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From: Robert O'Callahan <robert@ocallahan.org>
-Bug 579885. Part 4: Paint opaque surfaces using kPrivateCGCompositeCopy when possible. r=jrmuizel,a=blocking
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -122,16 +122,17 @@ static void (*CGContextClipToMaskPtr) (C
- static void (*CGContextDrawTiledImagePtr) (CGContextRef, CGRect, CGImageRef) = NULL;
- static unsigned int (*CGContextGetTypePtr) (CGContextRef) = NULL;
- static void (*CGContextSetShouldAntialiasFontsPtr) (CGContextRef, bool) = NULL;
- static bool (*CGContextGetShouldAntialiasFontsPtr) (CGContextRef) = NULL;
- static bool (*CGContextGetShouldSmoothFontsPtr) (CGContextRef) = NULL;
- static void (*CGContextSetAllowsFontSmoothingPtr) (CGContextRef, bool) = NULL;
- static bool (*CGContextGetAllowsFontSmoothingPtr) (CGContextRef) = NULL;
- static void (*CGContextReplacePathWithClipPathPtr) (CGContextRef) = NULL;
-+static CGFloat (*CGContextGetAlphaPtr) (CGContextRef) = NULL;
-
- static SInt32 _cairo_quartz_osx_version = 0x0;
-
- static cairo_bool_t _cairo_quartz_symbol_lookup_done = FALSE;
-
- /*
- * Utility functions
- */
-@@ -157,16 +158,17 @@ static void quartz_ensure_symbols(void)
- CGContextDrawTiledImagePtr = dlsym(RTLD_DEFAULT, "CGContextDrawTiledImage");
- CGContextGetTypePtr = dlsym(RTLD_DEFAULT, "CGContextGetType");
- CGContextSetShouldAntialiasFontsPtr = dlsym(RTLD_DEFAULT, "CGContextSetShouldAntialiasFonts");
- CGContextGetShouldAntialiasFontsPtr = dlsym(RTLD_DEFAULT, "CGContextGetShouldAntialiasFonts");
- CGContextGetShouldSmoothFontsPtr = dlsym(RTLD_DEFAULT, "CGContextGetShouldSmoothFonts");
- CGContextReplacePathWithClipPathPtr = dlsym(RTLD_DEFAULT, "CGContextReplacePathWithClipPath");
- CGContextGetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextGetAllowsFontSmoothing");
- CGContextSetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextSetAllowsFontSmoothing");
-+ CGContextGetAlphaPtr = dlsym(RTLD_DEFAULT, "CGContextGetAlpha");
-
- if (Gestalt(gestaltSystemVersion, &_cairo_quartz_osx_version) != noErr) {
- // assume 10.4
- _cairo_quartz_osx_version = 0x1040;
- }
-
- _cairo_quartz_symbol_lookup_done = TRUE;
- }
-@@ -1698,16 +1700,28 @@ _cairo_quartz_setup_state (cairo_quartz_
-
- if (source->type == CAIRO_PATTERN_TYPE_RADIAL) {
- const cairo_radial_pattern_t *rpat = (const cairo_radial_pattern_t *)source;
- _cairo_quartz_setup_radial_source (surface, rpat, extents, &state);
- return state;
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_SURFACE) {
-+ if (op == CAIRO_OPERATOR_OVER && _cairo_pattern_is_opaque (source) &&
-+ CGContextGetAlphaPtr &&
-+ CGContextGetAlphaPtr (surface->cgContext) == 1.0) {
-+ // Quartz won't touch pixels outside the bounds of the
-+ // source surface, so we can just go ahead and use Copy here
-+ // to accelerate things.
-+ // Quartz won't necessarily be able to do this optimization internally;
-+ // for CGLayer surfaces, we can know all the pixels are opaque
-+ // (because it's CONTENT_COLOR), but Quartz won't know.
-+ CGContextSetCompositeOperation (context, kPrivateCGCompositeCopy);
-+ }
-+
- const cairo_surface_pattern_t *spat = (const cairo_surface_pattern_t *) source;
- _cairo_quartz_setup_surface_source (surface, spat, extents, &state);
- return state;
- }
-
- state.action = DO_UNSUPPORTED;
- return state;
- }
diff --git a/gfx/cairo/quartz-refactor-surface-setup.patch b/gfx/cairo/quartz-refactor-surface-setup.patch
deleted file mode 100644
index 22e2d0ee1..000000000
--- a/gfx/cairo/quartz-refactor-surface-setup.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-From: Robert O'Callahan <robert@ocallahan.org>
-Bug 593270. Part 1: Move surface setup code to a helper function. r=jrmuizel,a=joe
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1455,16 +1455,147 @@ _cairo_quartz_setup_radial_source (cairo
- extend, extend);
-
- CGColorSpaceRelease(rgb);
- CGFunctionRelease(gradFunc);
-
- state->action = DO_SHADING;
- }
-
-+static void
-+_cairo_quartz_setup_surface_source (cairo_quartz_surface_t *surface,
-+ const cairo_surface_pattern_t *spat,
-+ cairo_rectangle_int_t *extents,
-+ cairo_quartz_drawing_state_t *state)
-+{
-+ const cairo_pattern_t *source = &spat->base;
-+ CGContextRef context = state->context;
-+
-+ if (source->extend == CAIRO_EXTEND_NONE ||
-+ (CGContextDrawTiledImagePtr && source->extend == CAIRO_EXTEND_REPEAT))
-+ {
-+ cairo_surface_t *pat_surf = spat->surface;
-+ CGImageRef img;
-+ cairo_matrix_t m = spat->base.matrix;
-+ cairo_rectangle_int_t extents;
-+ CGAffineTransform xform;
-+ CGRect srcRect;
-+ cairo_fixed_t fw, fh;
-+ cairo_bool_t is_bounded;
-+ cairo_status_t status;
-+
-+ cairo_matrix_invert(&m);
-+ _cairo_quartz_cairo_matrix_to_quartz (&m, &state->transform);
-+
-+ /* Draw nonrepeating CGLayer surface using DO_LAYER */
-+ if (source->extend == CAIRO_EXTEND_NONE ||
-+ (CGContextDrawTiledImagePtr && source->extend == CAIRO_EXTEND_REPEAT))
-+ cairo_quartz_surface_t *quartz_surf = (cairo_quartz_surface_t *) pat_surf;
-+ if (quartz_surf->cgLayer) {
-+ state->imageRect = CGRectMake (0, 0, quartz_surf->extents.width, quartz_surf->extents.height);
-+ state->layer = quartz_surf->cgLayer;
-+ state->action = DO_LAYER;
-+ return;
-+ }
-+ }
-+
-+ status = _cairo_surface_to_cgimage (pat_surf, &img);
-+ if (status) {
-+ state->action = DO_UNSUPPORTED;
-+ return;
-+ }
-+ if (img == NULL) {
-+ state->action = DO_NOTHING;
-+ return;
-+ }
-+
-+ /* XXXroc what is this for? */
-+ CGContextSetRGBFillColor (surface->cgContext, 0, 0, 0, 1);
-+
-+ state->image = img;
-+
-+ is_bounded = _cairo_surface_get_extents (pat_surf, &extents);
-+ assert (is_bounded);
-+
-+ if (source->extend == CAIRO_EXTEND_NONE) {
-+ state->imageRect = CGRectMake (0, 0, extents.width, extents.height);
-+ state->action = DO_IMAGE;
-+ return;
-+ }
-+
-+ /* Quartz seems to tile images at pixel-aligned regions only -- this
-+ * leads to seams if the image doesn't end up scaling to fill the
-+ * space exactly. The CGPattern tiling approach doesn't have this
-+ * problem. Check if we're going to fill up the space (within some
-+ * epsilon), and if not, fall back to the CGPattern type.
-+ */
-+
-+ xform = CGAffineTransformConcat (CGContextGetCTM (context),
-+ state->transform);
-+
-+ srcRect = CGRectMake (0, 0, extents.width, extents.height);
-+ srcRect = CGRectApplyAffineTransform (srcRect, xform);
-+
-+ fw = _cairo_fixed_from_double (srcRect.size.width);
-+ fh = _cairo_fixed_from_double (srcRect.size.height);
-+
-+ if ((fw & CAIRO_FIXED_FRAC_MASK) <= CAIRO_FIXED_EPSILON &&
-+ (fh & CAIRO_FIXED_FRAC_MASK) <= CAIRO_FIXED_EPSILON)
-+ {
-+ /* We're good to use DrawTiledImage, but ensure that
-+ * the math works out */
-+
-+ srcRect.size.width = round(srcRect.size.width);
-+ srcRect.size.height = round(srcRect.size.height);
-+
-+ xform = CGAffineTransformInvert (xform);
-+
-+ srcRect = CGRectApplyAffineTransform (srcRect, xform);
-+
-+ state->imageRect = srcRect;
-+ state->action = DO_TILED_IMAGE;
-+ return;
-+ }
-+
-+ /* Fall through to generic SURFACE case */
-+ }
-+
-+ CGFloat patternAlpha = 1.0f;
-+ CGColorSpaceRef patternSpace;
-+ CGPatternRef pattern;
-+ cairo_int_status_t status;
-+
-+ status = _cairo_quartz_cairo_repeating_surface_pattern_to_quartz (surface, source, &pattern);
-+ if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) {
-+ state->action = DO_NOTHING;
-+ return;
-+ }
-+ if (status) {
-+ state->action = DO_UNSUPPORTED;
-+ return;
-+ }
-+
-+ patternSpace = CGColorSpaceCreatePattern (NULL);
-+ CGContextSetFillColorSpace (context, patternSpace);
-+ CGContextSetFillPattern (context, pattern, &patternAlpha);
-+ CGContextSetStrokeColorSpace (context, patternSpace);
-+ CGContextSetStrokePattern (context, pattern, &patternAlpha);
-+ CGColorSpaceRelease (patternSpace);
-+
-+ /* Quartz likes to munge the pattern phase (as yet unexplained
-+ * why); force it to 0,0 as we've already baked in the correct
-+ * pattern translation into the pattern matrix
-+ */
-+ CGContextSetPatternPhase (context, CGSizeMake(0,0));
-+
-+ state->pattern = pattern;
-+ state->action = DO_PATTERN;
-+ return;
-+}
-+
- /**
- * Call this before any operation that can modify the contents of a
- * cairo_quartz_surface_t.
- */
- static void
- _cairo_quartz_surface_will_change (cairo_quartz_surface_t *surface)
- {
- if (surface->bitmapContextImage) {
-@@ -1566,133 +1697,19 @@ _cairo_quartz_setup_state (cairo_quartz_
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_RADIAL) {
- const cairo_radial_pattern_t *rpat = (const cairo_radial_pattern_t *)source;
- _cairo_quartz_setup_radial_source (surface, rpat, extents, &state);
- return state;
- }
-
-- if (source->type == CAIRO_PATTERN_TYPE_SURFACE &&
-- (source->extend == CAIRO_EXTEND_NONE || (CGContextDrawTiledImagePtr && source->extend == CAIRO_EXTEND_REPEAT)))
-- {
-+ if (source->type == CAIRO_PATTERN_TYPE_SURFACE) {
- const cairo_surface_pattern_t *spat = (const cairo_surface_pattern_t *) source;
-- cairo_surface_t *pat_surf = spat->surface;
-- CGImageRef img;
-- cairo_matrix_t m = spat->base.matrix;
-- cairo_rectangle_int_t extents;
-- CGAffineTransform xform;
-- CGRect srcRect;
-- cairo_fixed_t fw, fh;
-- cairo_bool_t is_bounded;
--
-- cairo_matrix_invert(&m);
-- _cairo_quartz_cairo_matrix_to_quartz (&m, &state.transform);
--
-- if (cairo_surface_get_type (pat_surf) == CAIRO_SURFACE_TYPE_QUARTZ) {
-- cairo_quartz_surface_t *quartz_surf = (cairo_quartz_surface_t *) pat_surf;
-- if (quartz_surf->cgLayer && source->extend == CAIRO_EXTEND_NONE) {
-- state.imageRect = CGRectMake (0, 0, quartz_surf->extents.width, quartz_surf->extents.height);
-- state.layer = quartz_surf->cgLayer;
-- state.action = DO_LAYER;
-- return state;
-- }
-- }
--
-- status = _cairo_surface_to_cgimage (pat_surf, &img);
-- if (status) {
-- state.action = DO_UNSUPPORTED;
-- return state;
-- }
-- if (img == NULL) {
-- state.action = DO_NOTHING;
-- return state;
-- }
--
-- CGContextSetRGBFillColor (surface->cgContext, 0, 0, 0, 1);
--
-- state.image = img;
--
-- is_bounded = _cairo_surface_get_extents (pat_surf, &extents);
-- assert (is_bounded);
--
-- if (source->extend == CAIRO_EXTEND_NONE) {
-- state.imageRect = CGRectMake (0, 0, extents.width, extents.height);
-- state.action = DO_IMAGE;
-- return state;
-- }
--
-- /* Quartz seems to tile images at pixel-aligned regions only -- this
-- * leads to seams if the image doesn't end up scaling to fill the
-- * space exactly. The CGPattern tiling approach doesn't have this
-- * problem. Check if we're going to fill up the space (within some
-- * epsilon), and if not, fall back to the CGPattern type.
-- */
--
-- xform = CGAffineTransformConcat (CGContextGetCTM (context),
-- state.transform);
--
-- srcRect = CGRectMake (0, 0, extents.width, extents.height);
-- srcRect = CGRectApplyAffineTransform (srcRect, xform);
--
-- fw = _cairo_fixed_from_double (srcRect.size.width);
-- fh = _cairo_fixed_from_double (srcRect.size.height);
--
-- if ((fw & CAIRO_FIXED_FRAC_MASK) <= CAIRO_FIXED_EPSILON &&
-- (fh & CAIRO_FIXED_FRAC_MASK) <= CAIRO_FIXED_EPSILON)
-- {
-- /* We're good to use DrawTiledImage, but ensure that
-- * the math works out */
--
-- srcRect.size.width = round(srcRect.size.width);
-- srcRect.size.height = round(srcRect.size.height);
--
-- xform = CGAffineTransformInvert (xform);
--
-- srcRect = CGRectApplyAffineTransform (srcRect, xform);
--
-- state.imageRect = srcRect;
-- state.action = DO_TILED_IMAGE;
-- return state;
-- }
--
-- /* Fall through to generic SURFACE case */
-- }
--
-- if (source->type == CAIRO_PATTERN_TYPE_SURFACE) {
-- CGFloat patternAlpha = 1.0f;
-- CGColorSpaceRef patternSpace;
-- CGPatternRef pattern;
-- cairo_int_status_t status;
--
-- status = _cairo_quartz_cairo_repeating_surface_pattern_to_quartz (surface, source, &pattern);
-- if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) {
-- state.action = DO_NOTHING;
-- return state;
-- }
-- if (status) {
-- state.action = DO_UNSUPPORTED;
-- return state;
-- }
--
-- patternSpace = CGColorSpaceCreatePattern (NULL);
-- CGContextSetFillColorSpace (context, patternSpace);
-- CGContextSetFillPattern (context, pattern, &patternAlpha);
-- CGContextSetStrokeColorSpace (context, patternSpace);
-- CGContextSetStrokePattern (context, pattern, &patternAlpha);
-- CGColorSpaceRelease (patternSpace);
--
-- /* Quartz likes to munge the pattern phase (as yet unexplained
-- * why); force it to 0,0 as we've already baked in the correct
-- * pattern translation into the pattern matrix
-- */
-- CGContextSetPatternPhase (context, CGSizeMake(0,0));
--
-- state.pattern = pattern;
-- state.action = DO_PATTERN;
-+ _cairo_quartz_setup_surface_source (surface, spat, extents, &state);
- return state;
- }
-
- state.action = DO_UNSUPPORTED;
- return state;
- }
-
- /**
diff --git a/gfx/cairo/quartz-remove-snapshot.patch b/gfx/cairo/quartz-remove-snapshot.patch
deleted file mode 100644
index 5cc2cddb4..000000000
--- a/gfx/cairo/quartz-remove-snapshot.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-changeset: 42958:dd0f1f0a96b3
-user: Robert O'Callahan <robert@ocallahan.org>
-date: Tue Jun 01 11:33:05 2010 +1200
-summary: Bug 568189. Part 3: Remove snapshot backend function since it doesn't work and we may as well just fall back. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1993,33 +1993,16 @@ _cairo_quartz_surface_acquire_source_ima
- if (status)
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
- *image_extra = NULL;
-
- return CAIRO_STATUS_SUCCESS;
- }
-
--static cairo_surface_t *
--_cairo_quartz_surface_snapshot (void *abstract_surface)
--{
-- cairo_int_status_t status;
-- cairo_quartz_surface_t *surface = abstract_surface;
-- cairo_image_surface_t *image;
--
-- if (surface->imageSurfaceEquiv)
-- return NULL;
--
-- status = _cairo_quartz_get_image (surface, &image);
-- if (unlikely (status))
-- return _cairo_surface_create_in_error (CAIRO_STATUS_NO_MEMORY);
--
-- return &image->base;
--}
--
- static void
- _cairo_quartz_surface_release_source_image (void *abstract_surface,
- cairo_image_surface_t *image,
- void *image_extra)
- {
- cairo_surface_destroy ((cairo_surface_t *) image);
- }
-
-@@ -2916,17 +2899,17 @@ static const struct _cairo_surface_backe
- _cairo_quartz_surface_stroke,
- _cairo_quartz_surface_fill,
- #if CAIRO_HAS_QUARTZ_FONT
- _cairo_quartz_surface_show_glyphs,
- #else
- NULL, /* show_glyphs */
- #endif
-
-- _cairo_quartz_surface_snapshot,
-+ NULL, /* snapshot */
- NULL, /* is_similar */
- NULL /* fill_stroke */
- };
-
- cairo_quartz_surface_t *
- _cairo_quartz_surface_create_internal (CGContextRef cgContext,
- cairo_content_t content,
- unsigned int width,
-
diff --git a/gfx/cairo/quartz-repeating-radial-gradients.patch b/gfx/cairo/quartz-repeating-radial-gradients.patch
deleted file mode 100644
index 67fca30d0..000000000
--- a/gfx/cairo/quartz-repeating-radial-gradients.patch
+++ /dev/null
@@ -1,305 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1249558156 -43200
-# Node ID e564f3ab4ea6e3b5dd9c4e9e6042d3a84c229dde
-# Parent 6ef9993a30bf2f983c9d64d7441d2e3b6b935de1
-Bug 508227. Don't fallback to Quartz for repeating radial gradients. r=jmuizelaar
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -708,20 +708,20 @@ CreateGradientFunction (const cairo_grad
- 1,
- input_value_range,
- 4,
- output_value_ranges,
- &callbacks);
- }
-
- static CGFunctionRef
--CreateRepeatingGradientFunction (cairo_quartz_surface_t *surface,
-- const cairo_gradient_pattern_t *gpat,
-- CGPoint *start, CGPoint *end,
-- CGAffineTransform matrix)
-+CreateRepeatingLinearGradientFunction (cairo_quartz_surface_t *surface,
-+ const cairo_gradient_pattern_t *gpat,
-+ CGPoint *start, CGPoint *end,
-+ CGAffineTransform matrix)
- {
- cairo_pattern_t *pat;
- float input_value_range[2];
- float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f };
- CGFunctionCallbacks callbacks = {
- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy
- };
-
-@@ -791,16 +791,156 @@ CreateRepeatingGradientFunction (cairo_q
- return CGFunctionCreate (pat,
- 1,
- input_value_range,
- 4,
- output_value_ranges,
- &callbacks);
- }
-
-+static void
-+UpdateRadialParameterToIncludePoint(double *max_t, CGPoint *center,
-+ double dr, double dx, double dy,
-+ double x, double y)
-+{
-+ /* Compute a parameter t such that a circle centered at
-+ (center->x + dx*t, center->y + dy*t) with radius dr*t contains the
-+ point (x,y).
-+
-+ Let px = x - center->x, py = y - center->y.
-+ Parameter values for which t is on the circle are given by
-+ (px - dx*t)^2 + (py - dy*t)^2 = (t*dr)^2
-+
-+ Solving for t using the quadratic formula, and simplifying, we get
-+ numerator = dx*px + dy*py +-
-+ sqrt( dr^2*(px^2 + py^2) - (dx*py - dy*px)^2 )
-+ denominator = dx^2 + dy^2 - dr^2
-+ t = numerator/denominator
-+
-+ In CreateRepeatingRadialGradientFunction we know the outer circle
-+ contains the inner circle. Therefore the distance between the circle
-+ centers plus the radius of the inner circle is less than the radius of
-+ the outer circle. (This is checked in _cairo_quartz_setup_radial_source.)
-+ Therefore
-+ dx^2 + dy^2 < dr^2
-+ So the denominator is negative and the larger solution for t is given by
-+ numerator = dx*px + dy*py -
-+ sqrt( dr^2*(px^2 + py^2) - (dx*py - dy*px)^2 )
-+ denominator = dx^2 + dy^2 - dr^2
-+ t = numerator/denominator
-+ dx^2 + dy^2 < dr^2 also ensures that the operand of sqrt is positive.
-+ */
-+ double px = x - center->x;
-+ double py = y - center->y;
-+ double dx_py_minus_dy_px = dx*py - dy*px;
-+ double numerator = dx*px + dy*py -
-+ sqrt (dr*dr*(px*px + py*py) - dx_py_minus_dy_px*dx_py_minus_dy_px);
-+ double denominator = dx*dx + dy*dy - dr*dr;
-+ double t = numerator/denominator;
-+
-+ if (*max_t < t) {
-+ *max_t = t;
-+ }
-+}
-+
-+/* This must only be called when one of the circles properly contains the other */
-+static CGFunctionRef
-+CreateRepeatingRadialGradientFunction (cairo_quartz_surface_t *surface,
-+ const cairo_gradient_pattern_t *gpat,
-+ CGPoint *start, double *start_radius,
-+ CGPoint *end, double *end_radius)
-+{
-+ CGRect clip = CGContextGetClipBoundingBox (surface->cgContext);
-+ CGAffineTransform transform;
-+ cairo_pattern_t *pat;
-+ float input_value_range[2];
-+ float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f };
-+ CGFunctionCallbacks callbacks = {
-+ 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy
-+ };
-+ CGPoint *inner;
-+ double *inner_radius;
-+ CGPoint *outer;
-+ double *outer_radius;
-+ /* minimum and maximum t-parameter values that will make our gradient
-+ cover the clipBox */
-+ double t_min, t_max, t_temp;
-+ /* outer minus inner */
-+ double dr, dx, dy;
-+
-+ _cairo_quartz_cairo_matrix_to_quartz (&gpat->base.matrix, &transform);
-+ /* clip is in cairo device coordinates; get it into cairo user space */
-+ clip = CGRectApplyAffineTransform (clip, transform);
-+
-+ if (*start_radius < *end_radius) {
-+ /* end circle contains start circle */
-+ inner = start;
-+ outer = end;
-+ inner_radius = start_radius;
-+ outer_radius = end_radius;
-+ } else {
-+ /* start circle contains end circle */
-+ inner = end;
-+ outer = start;
-+ inner_radius = end_radius;
-+ outer_radius = start_radius;
-+ }
-+
-+ dr = *outer_radius - *inner_radius;
-+ dx = outer->x - inner->x;
-+ dy = outer->y - inner->y;
-+
-+ t_min = -(*inner_radius/dr);
-+ inner->x += t_min*dx;
-+ inner->y += t_min*dy;
-+ *inner_radius = 0.;
-+
-+ t_temp = 0.;
-+ UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-+ clip.origin.x, clip.origin.y);
-+ UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-+ clip.origin.x + clip.size.width, clip.origin.y);
-+ UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-+ clip.origin.x + clip.size.width, clip.origin.y + clip.size.height);
-+ UpdateRadialParameterToIncludePoint(&t_temp, inner, dr, dx, dy,
-+ clip.origin.x, clip.origin.y + clip.size.height);
-+ /* UpdateRadialParameterToIncludePoint assumes t=0 means radius 0.
-+ But for the parameter values we use with Quartz, t_min means radius 0.
-+ Also, add a small fudge factor to avoid rounding issues. Since the
-+ circles are alway expanding and containing the earlier circles, this is
-+ OK. */
-+ t_temp += 1e-6;
-+ t_max = t_min + t_temp;
-+ outer->x = inner->x + t_temp*dx;
-+ outer->y = inner->y + t_temp*dy;
-+ *outer_radius = t_temp*dr;
-+
-+ /* set the input range for the function -- the function knows how to
-+ map values outside of 0.0 .. 1.0 to that range for REPEAT/REFLECT. */
-+ if (*start_radius < *end_radius) {
-+ input_value_range[0] = t_min;
-+ input_value_range[1] = t_max;
-+ } else {
-+ input_value_range[0] = -t_max;
-+ input_value_range[1] = -t_min;
-+ }
-+
-+ if (_cairo_pattern_create_copy (&pat, &gpat->base))
-+ /* quartz doesn't deal very well with malloc failing, so there's
-+ * not much point in us trying either */
-+ return NULL;
-+
-+ return CGFunctionCreate (pat,
-+ 1,
-+ input_value_range,
-+ 4,
-+ output_value_ranges,
-+ &callbacks);
-+}
-+
- /* Obtain a CGImageRef from a #cairo_surface_t * */
-
- static void
- DataProviderReleaseCallback (void *info, const void *data, size_t size)
- {
- cairo_surface_t *surface = (cairo_surface_t *) info;
- cairo_surface_destroy (surface);
- }
-@@ -1112,23 +1252,24 @@ _cairo_quartz_setup_linear_source (cairo
- rgb = CGColorSpaceCreateDeviceRGB();
-
- start = CGPointMake (_cairo_fixed_to_double (lpat->p1.x),
- _cairo_fixed_to_double (lpat->p1.y));
- end = CGPointMake (_cairo_fixed_to_double (lpat->p2.x),
- _cairo_fixed_to_double (lpat->p2.y));
-
- if (abspat->extend == CAIRO_EXTEND_NONE ||
-- abspat->extend == CAIRO_EXTEND_PAD)
-+ abspat->extend == CAIRO_EXTEND_PAD)
- {
- gradFunc = CreateGradientFunction (&lpat->base);
- } else {
-- gradFunc = CreateRepeatingGradientFunction (surface,
-- &lpat->base,
-- &start, &end, surface->sourceTransform);
-+ gradFunc = CreateRepeatingLinearGradientFunction (surface,
-+ &lpat->base,
-+ &start, &end,
-+ surface->sourceTransform);
- }
-
- surface->sourceShading = CGShadingCreateAxial (rgb,
- start, end,
- gradFunc,
- extend, extend);
-
- CGColorSpaceRelease(rgb);
-@@ -1142,52 +1283,68 @@ _cairo_quartz_setup_radial_source (cairo
- const cairo_radial_pattern_t *rpat)
- {
- const cairo_pattern_t *abspat = &rpat->base.base;
- cairo_matrix_t mat;
- CGPoint start, end;
- CGFunctionRef gradFunc;
- CGColorSpaceRef rgb;
- bool extend = abspat->extend == CAIRO_EXTEND_PAD;
-+ double c1x = _cairo_fixed_to_double (rpat->c1.x);
-+ double c1y = _cairo_fixed_to_double (rpat->c1.y);
-+ double c2x = _cairo_fixed_to_double (rpat->c2.x);
-+ double c2y = _cairo_fixed_to_double (rpat->c2.y);
-+ double r1 = _cairo_fixed_to_double (rpat->r1);
-+ double r2 = _cairo_fixed_to_double (rpat->r2);
-+ double dx = c1x - c2x;
-+ double dy = c1y - c2y;
-+ double centerDistance = sqrt (dx*dx + dy*dy);
-
- if (rpat->base.n_stops == 0) {
- CGContextSetRGBStrokeColor (surface->cgContext, 0., 0., 0., 0.);
- CGContextSetRGBFillColor (surface->cgContext, 0., 0., 0., 0.);
- return DO_SOLID;
- }
-
-- if (abspat->extend == CAIRO_EXTEND_REPEAT ||
-- abspat->extend == CAIRO_EXTEND_REFLECT)
-- {
-- /* I started trying to map these to Quartz, but it's much harder
-- * then the linear case (I think it would involve doing multiple
-- * Radial shadings). So, instead, let's just render an image
-- * for pixman to draw the shading into, and use that.
-+ if (r2 <= centerDistance + r1 + 1e-6 && /* circle 2 doesn't contain circle 1 */
-+ r1 <= centerDistance + r2 + 1e-6) { /* circle 1 doesn't contain circle 2 */
-+ /* Quartz handles cases where neither circle contains the other very
-+ * differently from pixman.
-+ * Whatever the correct behaviour is, let's at least have only pixman's
-+ * implementation to worry about.
-+ * Note that this also catches the cases where r1 == r2.
- */
-- return _cairo_quartz_setup_fallback_source (surface, &rpat->base.base);
-+ return _cairo_quartz_setup_fallback_source (surface, abspat);
- }
-
- mat = abspat->matrix;
- cairo_matrix_invert (&mat);
- _cairo_quartz_cairo_matrix_to_quartz (&mat, &surface->sourceTransform);
-
- rgb = CGColorSpaceCreateDeviceRGB();
-
-- start = CGPointMake (_cairo_fixed_to_double (rpat->c1.x),
-- _cairo_fixed_to_double (rpat->c1.y));
-- end = CGPointMake (_cairo_fixed_to_double (rpat->c2.x),
-- _cairo_fixed_to_double (rpat->c2.y));
-+ start = CGPointMake (c1x, c1y);
-+ end = CGPointMake (c2x, c2y);
-
-- gradFunc = CreateGradientFunction (&rpat->base);
-+ if (abspat->extend == CAIRO_EXTEND_NONE ||
-+ abspat->extend == CAIRO_EXTEND_PAD)
-+ {
-+ gradFunc = CreateGradientFunction (&rpat->base);
-+ } else {
-+ gradFunc = CreateRepeatingRadialGradientFunction (surface,
-+ &rpat->base,
-+ &start, &r1,
-+ &end, &r2);
-+ }
-
- surface->sourceShading = CGShadingCreateRadial (rgb,
- start,
-- _cairo_fixed_to_double (rpat->r1),
-+ r1,
- end,
-- _cairo_fixed_to_double (rpat->r2),
-+ r2,
- gradFunc,
- extend, extend);
-
- CGColorSpaceRelease(rgb);
- CGFunctionRelease(gradFunc);
-
- return DO_SHADING;
- }
diff --git a/gfx/cairo/quartz-state.patch b/gfx/cairo/quartz-state.patch
deleted file mode 100644
index d4c04f706..000000000
--- a/gfx/cairo/quartz-state.patch
+++ /dev/null
@@ -1,1190 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-private.h b/gfx/cairo/cairo/src/cairo-quartz-private.h
---- a/gfx/cairo/cairo/src/cairo-quartz-private.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz-private.h
-@@ -50,30 +50,16 @@ typedef struct cairo_quartz_surface {
- CGContextRef cgContext;
- CGAffineTransform cgContextBaseCTM;
-
- void *imageData;
- cairo_surface_t *imageSurfaceEquiv;
-
- cairo_surface_clipper_t clipper;
- cairo_rectangle_int_t extents;
--
-- /* These are stored while drawing operations are in place, set up
-- * by quartz_setup_source() and quartz_finish_source()
-- */
-- CGAffineTransform sourceTransform;
--
-- CGImageRef sourceImage;
-- cairo_surface_t *sourceImageSurface;
-- CGRect sourceImageRect;
--
-- CGShadingRef sourceShading;
-- CGPatternRef sourcePattern;
--
-- CGInterpolationQuality oldInterpolationQuality;
- } cairo_quartz_surface_t;
-
- typedef struct cairo_quartz_image_surface {
- cairo_surface_t base;
-
- cairo_rectangle_int_t extents;
-
- CGImageRef image;
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -1333,36 +1333,59 @@ _cairo_quartz_cairo_repeating_surface_pa
- return CAIRO_STATUS_SUCCESS;
- }
-
- typedef enum {
- DO_SOLID,
- DO_SHADING,
- DO_PATTERN,
- DO_IMAGE,
-+ DO_TILED_IMAGE,
- DO_UNSUPPORTED,
-- DO_NOTHING,
-- DO_TILED_IMAGE
-+ DO_NOTHING
- } cairo_quartz_action_t;
-
--static cairo_quartz_action_t
-+/* State used during a drawing operation. */
-+typedef struct {
-+ CGContextRef context;
-+ cairo_quartz_action_t action;
-+
-+ // Used with DO_SHADING, DO_IMAGE and DO_TILED_IMAGE
-+ CGAffineTransform transform;
-+
-+ // Used with DO_IMAGE and DO_TILED_IMAGE
-+ CGImageRef image;
-+ cairo_surface_t *imageSurface;
-+ CGRect imageRect;
-+
-+ // Used with DO_SHADING
-+ CGShadingRef shading;
-+
-+ // Used with DO_PATTERN
-+ CGPatternRef pattern;
-+} cairo_quartz_drawing_state_t;
-+
-+static void
- _cairo_quartz_setup_fallback_source (cairo_quartz_surface_t *surface,
-- const cairo_pattern_t *source)
-+ const cairo_pattern_t *source,
-+ cairo_quartz_drawing_state_t *state)
- {
-- CGRect clipBox = CGContextGetClipBoundingBox (surface->cgContext);
-+ CGRect clipBox = CGContextGetClipBoundingBox (state->context);
- double x0, y0, w, h;
-
- cairo_surface_t *fallback;
- CGImageRef img;
-
- cairo_status_t status;
-
- if (clipBox.size.width == 0.0f ||
-- clipBox.size.height == 0.0f)
-- return DO_NOTHING;
-+ clipBox.size.height == 0.0f) {
-+ state->action = DO_NOTHING;
-+ return;
-+ }
-
- x0 = floor(clipBox.origin.x);
- y0 = floor(clipBox.origin.y);
- w = ceil(clipBox.origin.x + clipBox.size.width) - x0;
- h = ceil(clipBox.origin.y + clipBox.size.height) - y0;
-
- /* Create a temporary the size of the clip surface, and position
- * it so that the device origin coincides with the original surface */
-@@ -1396,73 +1419,79 @@ _cairo_quartz_setup_fallback_source (cai
- &fallback->device_transform_inverse);
- status = _cairo_surface_paint (fallback,
- CAIRO_OPERATOR_SOURCE,
- &pattern.base, NULL);
- }
- #endif
-
- status = _cairo_surface_to_cgimage (&surface->base, fallback, &img);
-- if (status)
-- return DO_UNSUPPORTED;
-- if (img == NULL)
-- return DO_NOTHING;
--
-- surface->sourceImageRect = CGRectMake (0.0, 0.0, w, h);
-- surface->sourceImage = img;
-- surface->sourceImageSurface = fallback;
-- surface->sourceTransform = CGAffineTransformMakeTranslation (x0, y0);
--
-- return DO_IMAGE;
-+ if (status) {
-+ state->action = DO_UNSUPPORTED;
-+ return;
-+ }
-+ if (img == NULL) {
-+ state->action = DO_NOTHING;
-+ return;
-+ }
-+
-+ state->imageRect = CGRectMake (0.0, 0.0, w, h);
-+ state->image = img;
-+ state->imageSurface = fallback;
-+ state->transform = CGAffineTransformMakeTranslation (x0, y0);
-+ state->action = DO_IMAGE;
- }
-
- /*
- Quartz does not support repeating radients. We handle repeating gradients
- by manually extending the gradient and repeating color stops. We need to
- minimize the number of repetitions since Quartz seems to sample our color
- function across the entire range, even if part of that range is not needed
- for the visible area of the gradient, and it samples with some fixed resolution,
- so if the gradient range is too large it samples with very low resolution and
- the gradient is very coarse. CreateRepeatingLinearGradientFunction and
- CreateRepeatingRadialGradientFunction compute the number of repetitions needed
- based on the extents of the object (the clip region cannot be used here since
- we don't want the rasterization of the entire gradient to depend on the
- clip region).
- */
--static cairo_quartz_action_t
-+static void
- _cairo_quartz_setup_linear_source (cairo_quartz_surface_t *surface,
- const cairo_linear_pattern_t *lpat,
-- cairo_rectangle_int_t *extents)
-+ cairo_rectangle_int_t *extents,
-+ cairo_quartz_drawing_state_t *state)
- {
- const cairo_pattern_t *abspat = &lpat->base.base;
- cairo_matrix_t mat;
- CGPoint start, end;
- CGFunctionRef gradFunc;
- CGColorSpaceRef rgb;
- bool extend = abspat->extend == CAIRO_EXTEND_PAD;
-
- if (lpat->base.n_stops == 0) {
-- CGContextSetRGBStrokeColor (surface->cgContext, 0., 0., 0., 0.);
-- CGContextSetRGBFillColor (surface->cgContext, 0., 0., 0., 0.);
-- return DO_SOLID;
-+ CGContextSetRGBStrokeColor (state->context, 0., 0., 0., 0.);
-+ CGContextSetRGBFillColor (state->context, 0., 0., 0., 0.);
-+ state->action = DO_SOLID;
-+ return;
- }
-
- if (lpat->p1.x == lpat->p2.x &&
- lpat->p1.y == lpat->p2.y) {
- /* Quartz handles cases where the vector has no length very
- * differently from pixman.
- * Whatever the correct behaviour is, let's at least have only pixman's
- * implementation to worry about.
- */
-- return _cairo_quartz_setup_fallback_source (surface, abspat);
-+ _cairo_quartz_setup_fallback_source (surface, abspat, state);
-+ return;
- }
-
- mat = abspat->matrix;
- cairo_matrix_invert (&mat);
-- _cairo_quartz_cairo_matrix_to_quartz (&mat, &surface->sourceTransform);
-+ _cairo_quartz_cairo_matrix_to_quartz (&mat, &state->transform);
-
- rgb = CGColorSpaceCreateDeviceRGB();
-
- start = CGPointMake (_cairo_fixed_to_double (lpat->p1.x),
- _cairo_fixed_to_double (lpat->p1.y));
- end = CGPointMake (_cairo_fixed_to_double (lpat->p2.x),
- _cairo_fixed_to_double (lpat->p2.y));
-
-@@ -1472,31 +1501,32 @@ _cairo_quartz_setup_linear_source (cairo
- gradFunc = CreateGradientFunction (&lpat->base);
- } else {
- gradFunc = CreateRepeatingLinearGradientFunction (surface,
- &lpat->base,
- &start, &end,
- extents);
- }
-
-- surface->sourceShading = CGShadingCreateAxial (rgb,
-- start, end,
-- gradFunc,
-- extend, extend);
-+ state->shading = CGShadingCreateAxial (rgb,
-+ start, end,
-+ gradFunc,
-+ extend, extend);
-
- CGColorSpaceRelease(rgb);
- CGFunctionRelease(gradFunc);
-
-- return DO_SHADING;
-+ state->action = DO_SHADING;
- }
-
--static cairo_quartz_action_t
-+static void
- _cairo_quartz_setup_radial_source (cairo_quartz_surface_t *surface,
- const cairo_radial_pattern_t *rpat,
-- cairo_rectangle_int_t *extents)
-+ cairo_rectangle_int_t *extents,
-+ cairo_quartz_drawing_state_t *state)
- {
- const cairo_pattern_t *abspat = &rpat->base.base;
- cairo_matrix_t mat;
- CGPoint start, end;
- CGFunctionRef gradFunc;
- CGColorSpaceRef rgb;
- bool extend = abspat->extend == CAIRO_EXTEND_PAD;
- double c1x = _cairo_fixed_to_double (rpat->c1.x);
-@@ -1505,35 +1535,37 @@ _cairo_quartz_setup_radial_source (cairo
- double c2y = _cairo_fixed_to_double (rpat->c2.y);
- double r1 = _cairo_fixed_to_double (rpat->r1);
- double r2 = _cairo_fixed_to_double (rpat->r2);
- double dx = c1x - c2x;
- double dy = c1y - c2y;
- double centerDistance = sqrt (dx*dx + dy*dy);
-
- if (rpat->base.n_stops == 0) {
-- CGContextSetRGBStrokeColor (surface->cgContext, 0., 0., 0., 0.);
-- CGContextSetRGBFillColor (surface->cgContext, 0., 0., 0., 0.);
-- return DO_SOLID;
-+ CGContextSetRGBStrokeColor (state->context, 0., 0., 0., 0.);
-+ CGContextSetRGBFillColor (state->context, 0., 0., 0., 0.);
-+ state->action = DO_SOLID;
-+ return;
- }
-
- if (r2 <= centerDistance + r1 + 1e-6 && /* circle 2 doesn't contain circle 1 */
- r1 <= centerDistance + r2 + 1e-6) { /* circle 1 doesn't contain circle 2 */
- /* Quartz handles cases where neither circle contains the other very
- * differently from pixman.
- * Whatever the correct behaviour is, let's at least have only pixman's
- * implementation to worry about.
- * Note that this also catches the cases where r1 == r2.
- */
-- return _cairo_quartz_setup_fallback_source (surface, abspat);
-+ _cairo_quartz_setup_fallback_source (surface, abspat, state);
-+ return;
- }
-
- mat = abspat->matrix;
- cairo_matrix_invert (&mat);
-- _cairo_quartz_cairo_matrix_to_quartz (&mat, &surface->sourceTransform);
-+ _cairo_quartz_cairo_matrix_to_quartz (&mat, &state->transform);
-
- rgb = CGColorSpaceCreateDeviceRGB();
-
- start = CGPointMake (c1x, c1y);
- end = CGPointMake (c2x, c2y);
-
- if (abspat->extend == CAIRO_EXTEND_NONE ||
- abspat->extend == CAIRO_EXTEND_PAD)
-@@ -1542,111 +1574,146 @@ _cairo_quartz_setup_radial_source (cairo
- } else {
- gradFunc = CreateRepeatingRadialGradientFunction (surface,
- &rpat->base,
- &start, &r1,
- &end, &r2,
- extents);
- }
-
-- surface->sourceShading = CGShadingCreateRadial (rgb,
-- start,
-- r1,
-- end,
-- r2,
-- gradFunc,
-- extend, extend);
-+ state->shading = CGShadingCreateRadial (rgb,
-+ start,
-+ r1,
-+ end,
-+ r2,
-+ gradFunc,
-+ extend, extend);
-
- CGColorSpaceRelease(rgb);
- CGFunctionRelease(gradFunc);
-
-- return DO_SHADING;
-+ state->action = DO_SHADING;
- }
-
--static cairo_quartz_action_t
--_cairo_quartz_setup_source (cairo_quartz_surface_t *surface,
-- const cairo_pattern_t *source,
-- cairo_rectangle_int_t *extents)
-+/**
-+ * Sets up internal state to be used to draw the source mask, stored in
-+ * cairo_quartz_state_t. Guarantees to call CGContextSaveGState on
-+ * surface->cgContext.
-+ */
-+static cairo_quartz_drawing_state_t
-+_cairo_quartz_setup_state (cairo_quartz_surface_t *surface,
-+ const cairo_pattern_t *source,
-+ cairo_operator_t op,
-+ cairo_rectangle_int_t *extents)
- {
-- assert (!(surface->sourceImage || surface->sourceShading || surface->sourcePattern));
--
-- surface->oldInterpolationQuality = CGContextGetInterpolationQuality (surface->cgContext);
-- CGContextSetInterpolationQuality (surface->cgContext, _cairo_quartz_filter_to_quartz (source->filter));
-+ CGContextRef context = surface->cgContext;
-+ cairo_quartz_drawing_state_t state;
-+ cairo_status_t status;
-+
-+ state.context = context;
-+ state.image = NULL;
-+ state.imageSurface = NULL;
-+ state.shading = NULL;
-+ state.pattern = NULL;
-+
-+ // Save before we change the pattern, colorspace, etc. so that
-+ // we can restore and make sure that quartz releases our
-+ // pattern (which may be stack allocated)
-+ CGContextSaveGState(context);
-+
-+ CGContextSetInterpolationQuality (context, _cairo_quartz_filter_to_quartz (source->filter));
-+
-+ status = _cairo_quartz_surface_set_cairo_operator (surface, op);
-+ if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) {
-+ state.action = DO_NOTHING;
-+ return state;
-+ }
-+ if (status) {
-+ state.action = DO_UNSUPPORTED;
-+ return state;
-+ }
-
- if (source->type == CAIRO_PATTERN_TYPE_SOLID) {
- cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) source;
-
-- CGContextSetRGBStrokeColor (surface->cgContext,
-+ CGContextSetRGBStrokeColor (context,
- solid->color.red,
- solid->color.green,
- solid->color.blue,
- solid->color.alpha);
-- CGContextSetRGBFillColor (surface->cgContext,
-+ CGContextSetRGBFillColor (context,
- solid->color.red,
- solid->color.green,
- solid->color.blue,
- solid->color.alpha);
-
-- return DO_SOLID;
-+ state.action = DO_SOLID;
-+ return state;
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_LINEAR) {
- const cairo_linear_pattern_t *lpat = (const cairo_linear_pattern_t *)source;
-- return _cairo_quartz_setup_linear_source (surface, lpat, extents);
-+ _cairo_quartz_setup_linear_source (surface, lpat, extents, &state);
-+ return state;
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_RADIAL) {
- const cairo_radial_pattern_t *rpat = (const cairo_radial_pattern_t *)source;
-- return _cairo_quartz_setup_radial_source (surface, rpat, extents);
-+ _cairo_quartz_setup_radial_source (surface, rpat, extents, &state);
-+ return state;
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_SURFACE &&
- (source->extend == CAIRO_EXTEND_NONE || (CGContextDrawTiledImagePtr && source->extend == CAIRO_EXTEND_REPEAT)))
- {
- const cairo_surface_pattern_t *spat = (const cairo_surface_pattern_t *) source;
- cairo_surface_t *pat_surf = spat->surface;
- CGImageRef img;
- cairo_matrix_t m = spat->base.matrix;
- cairo_rectangle_int_t extents;
-- cairo_status_t status;
- CGAffineTransform xform;
- CGRect srcRect;
- cairo_fixed_t fw, fh;
- cairo_bool_t is_bounded;
-
- status = _cairo_surface_to_cgimage ((cairo_surface_t *) surface, pat_surf, &img);
-- if (status)
-- return DO_UNSUPPORTED;
-- if (img == NULL)
-- return DO_NOTHING;
-+ if (status) {
-+ state.action = DO_UNSUPPORTED;
-+ return state;
-+ }
-+ if (img == NULL) {
-+ state.action = DO_NOTHING;
-+ return state;
-+ }
-
- CGContextSetRGBFillColor (surface->cgContext, 0, 0, 0, 1);
-
-- surface->sourceImage = img;
-+ state.image = img;
-
- cairo_matrix_invert(&m);
-- _cairo_quartz_cairo_matrix_to_quartz (&m, &surface->sourceTransform);
-+ _cairo_quartz_cairo_matrix_to_quartz (&m, &state.transform);
-
- is_bounded = _cairo_surface_get_extents (pat_surf, &extents);
- assert (is_bounded);
-
- if (source->extend == CAIRO_EXTEND_NONE) {
-- surface->sourceImageRect = CGRectMake (0, 0, extents.width, extents.height);
-- return DO_IMAGE;
-+ state.imageRect = CGRectMake (0, 0, extents.width, extents.height);
-+ state.action = DO_IMAGE;
-+ return state;
- }
-
- /* Quartz seems to tile images at pixel-aligned regions only -- this
- * leads to seams if the image doesn't end up scaling to fill the
- * space exactly. The CGPattern tiling approach doesn't have this
- * problem. Check if we're going to fill up the space (within some
- * epsilon), and if not, fall back to the CGPattern type.
- */
-
-- xform = CGAffineTransformConcat (CGContextGetCTM (surface->cgContext),
-- surface->sourceTransform);
-+ xform = CGAffineTransformConcat (CGContextGetCTM (context),
-+ state.transform);
-
- srcRect = CGRectMake (0, 0, extents.width, extents.height);
- srcRect = CGRectApplyAffineTransform (srcRect, xform);
-
- fw = _cairo_fixed_from_double (srcRect.size.width);
- fh = _cairo_fixed_from_double (srcRect.size.height);
-
- if ((fw & CAIRO_FIXED_FRAC_MASK) <= CAIRO_FIXED_EPSILON &&
-@@ -1657,111 +1724,109 @@ _cairo_quartz_setup_source (cairo_quartz
-
- srcRect.size.width = round(srcRect.size.width);
- srcRect.size.height = round(srcRect.size.height);
-
- xform = CGAffineTransformInvert (xform);
-
- srcRect = CGRectApplyAffineTransform (srcRect, xform);
-
-- surface->sourceImageRect = srcRect;
--
-- return DO_TILED_IMAGE;
-+ state.imageRect = srcRect;
-+ state.action = DO_TILED_IMAGE;
-+ return state;
- }
-
- /* Fall through to generic SURFACE case */
- }
-
- if (source->type == CAIRO_PATTERN_TYPE_SURFACE) {
- CGFloat patternAlpha = 1.0f;
- CGColorSpaceRef patternSpace;
- CGPatternRef pattern;
- cairo_int_status_t status;
-
- status = _cairo_quartz_cairo_repeating_surface_pattern_to_quartz (surface, source, &pattern);
-- if (status == CAIRO_INT_STATUS_NOTHING_TO_DO)
-- return DO_NOTHING;
-- if (status)
-- return DO_UNSUPPORTED;
--
-- // Save before we change the pattern, colorspace, etc. so that
-- // we can restore and make sure that quartz releases our
-- // pattern (which may be stack allocated)
-- CGContextSaveGState(surface->cgContext);
--
-- patternSpace = CGColorSpaceCreatePattern(NULL);
-- CGContextSetFillColorSpace (surface->cgContext, patternSpace);
-- CGContextSetFillPattern (surface->cgContext, pattern, &patternAlpha);
-- CGContextSetStrokeColorSpace (surface->cgContext, patternSpace);
-- CGContextSetStrokePattern (surface->cgContext, pattern, &patternAlpha);
-+ if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) {
-+ state.action = DO_NOTHING;
-+ return state;
-+ }
-+ if (status) {
-+ state.action = DO_UNSUPPORTED;
-+ return state;
-+ }
-+
-+ patternSpace = CGColorSpaceCreatePattern (NULL);
-+ CGContextSetFillColorSpace (context, patternSpace);
-+ CGContextSetFillPattern (context, pattern, &patternAlpha);
-+ CGContextSetStrokeColorSpace (context, patternSpace);
-+ CGContextSetStrokePattern (context, pattern, &patternAlpha);
- CGColorSpaceRelease (patternSpace);
-
- /* Quartz likes to munge the pattern phase (as yet unexplained
- * why); force it to 0,0 as we've already baked in the correct
- * pattern translation into the pattern matrix
- */
-- CGContextSetPatternPhase (surface->cgContext, CGSizeMake(0,0));
--
-- surface->sourcePattern = pattern;
--
-- return DO_PATTERN;
-+ CGContextSetPatternPhase (context, CGSizeMake(0,0));
-+
-+ state.pattern = pattern;
-+ state.action = DO_PATTERN;
-+ return state;
- }
-
-- return DO_UNSUPPORTED;
-+ state.action = DO_UNSUPPORTED;
-+ return state;
- }
-
-+/**
-+ * 1) Tears down internal state used to draw the source
-+ * 2) Does CGContextRestoreGState(state->context)
-+ */
- static void
--_cairo_quartz_teardown_source (cairo_quartz_surface_t *surface,
-- const cairo_pattern_t *source)
-+_cairo_quartz_teardown_state (cairo_quartz_drawing_state_t *state)
- {
-- CGContextSetInterpolationQuality (surface->cgContext, surface->oldInterpolationQuality);
--
-- if (surface->sourceImage) {
-- CGImageRelease(surface->sourceImage);
-- surface->sourceImage = NULL;
--
-- cairo_surface_destroy(surface->sourceImageSurface);
-- surface->sourceImageSurface = NULL;
-+ if (state->image) {
-+ CGImageRelease(state->image);
- }
-
-- if (surface->sourceShading) {
-- CGShadingRelease(surface->sourceShading);
-- surface->sourceShading = NULL;
-+ if (state->imageSurface) {
-+ cairo_surface_destroy(state->imageSurface);
- }
-
-- if (surface->sourcePattern) {
-- CGPatternRelease(surface->sourcePattern);
-- // To tear down the pattern and colorspace
-- CGContextRestoreGState(surface->cgContext);
--
-- surface->sourcePattern = NULL;
-+ if (state->shading) {
-+ CGShadingRelease(state->shading);
- }
-+
-+ if (state->pattern) {
-+ CGPatternRelease(state->pattern);
-+ }
-+
-+ CGContextRestoreGState(state->context);
- }
-
-
- static void
--_cairo_quartz_draw_image (cairo_quartz_surface_t *surface, cairo_operator_t op, cairo_quartz_action_t action)
-+_cairo_quartz_draw_image (cairo_quartz_drawing_state_t *state, cairo_operator_t op)
- {
-- assert (surface && surface->sourceImage && (action == DO_IMAGE || action == DO_TILED_IMAGE));
--
-- CGContextConcatCTM (surface->cgContext, surface->sourceTransform);
-- CGContextTranslateCTM (surface->cgContext, 0, surface->sourceImageRect.size.height);
-- CGContextScaleCTM (surface->cgContext, 1, -1);
--
-- if (action == DO_IMAGE) {
-- CGContextDrawImage (surface->cgContext, surface->sourceImageRect, surface->sourceImage);
-- if (!_cairo_operator_bounded_by_source(op)) {
-- CGContextBeginPath (surface->cgContext);
-- CGContextAddRect (surface->cgContext, surface->sourceImageRect);
-- CGContextAddRect (surface->cgContext, CGContextGetClipBoundingBox (surface->cgContext));
-- CGContextSetRGBFillColor (surface->cgContext, 0, 0, 0, 0);
-- CGContextEOFillPath (surface->cgContext);
-+ assert (state && state->image && (state->action == DO_IMAGE || state->action == DO_TILED_IMAGE));
-+
-+ CGContextConcatCTM (state->context, state->transform);
-+ CGContextTranslateCTM (state->context, 0, state->imageRect.size.height);
-+ CGContextScaleCTM (state->context, 1, -1);
-+
-+ if (state->action == DO_IMAGE) {
-+ CGContextDrawImage (state->context, state->imageRect, state->image);
-+ if (!_cairo_operator_bounded_by_source (op)) {
-+ CGContextBeginPath (state->context);
-+ CGContextAddRect (state->context, state->imageRect);
-+ CGContextAddRect (state->context, CGContextGetClipBoundingBox (state->context));
-+ CGContextSetRGBFillColor (state->context, 0, 0, 0, 0);
-+ CGContextEOFillPath (state->context);
- }
- } else
-- CGContextDrawTiledImagePtr (surface->cgContext, surface->sourceImageRect, surface->sourceImage);
-+ CGContextDrawTiledImagePtr (state->context, state->imageRect, state->image);
- }
-
-
- /*
- * get source/dest image implementation
- */
-
- /* Read the image from the surface's front buffer */
-@@ -2098,52 +2163,44 @@ _cairo_quartz_surface_get_extents (void
- static cairo_int_status_t
- _cairo_quartz_surface_paint (void *abstract_surface,
- cairo_operator_t op,
- const cairo_pattern_t *source,
- cairo_clip_t *clip)
- {
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
-- cairo_quartz_action_t action;
-+ cairo_quartz_drawing_state_t state;
-
- ND((stderr, "%p _cairo_quartz_surface_paint op %d source->type %d\n", surface, op, source->type));
-
- if (IS_EMPTY(surface))
- return CAIRO_STATUS_SUCCESS;
-
- rv = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
- if (unlikely (rv))
- return rv;
-
-- rv = _cairo_quartz_surface_set_cairo_operator (surface, op);
-- if (unlikely (rv))
-- return rv == CAIRO_INT_STATUS_NOTHING_TO_DO ? CAIRO_STATUS_SUCCESS : rv;
--
-- action = _cairo_quartz_setup_source (surface, source, NULL);
--
-- if (action == DO_SOLID || action == DO_PATTERN) {
-- CGContextFillRect (surface->cgContext, CGRectMake(surface->extents.x,
-- surface->extents.y,
-- surface->extents.width,
-- surface->extents.height));
-- } else if (action == DO_SHADING) {
-- CGContextSaveGState (surface->cgContext);
-- CGContextConcatCTM (surface->cgContext, surface->sourceTransform);
-- CGContextDrawShading (surface->cgContext, surface->sourceShading);
-- CGContextRestoreGState (surface->cgContext);
-- } else if (action == DO_IMAGE || action == DO_TILED_IMAGE) {
-- CGContextSaveGState (surface->cgContext);
-- _cairo_quartz_draw_image (surface, op, action);
-- CGContextRestoreGState (surface->cgContext);
-- } else if (action != DO_NOTHING) {
-+ state = _cairo_quartz_setup_state (surface, source, op, NULL);
-+
-+ if (state.action == DO_SOLID || state.action == DO_PATTERN) {
-+ CGContextFillRect (state.context, CGRectMake(surface->extents.x,
-+ surface->extents.y,
-+ surface->extents.width,
-+ surface->extents.height));
-+ } else if (state.action == DO_SHADING) {
-+ CGContextConcatCTM (state.context, state.transform);
-+ CGContextDrawShading (state.context, state.shading);
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
-+ _cairo_quartz_draw_image (&state, op);
-+ } else if (state.action != DO_NOTHING) {
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
-- _cairo_quartz_teardown_source (surface, source);
-+ _cairo_quartz_teardown_state (&state);
-
- ND((stderr, "-- paint\n"));
- return rv;
- }
-
- static cairo_bool_t
- _cairo_quartz_source_needs_extents (const cairo_pattern_t *source)
- {
-@@ -2170,91 +2227,83 @@ _cairo_quartz_surface_fill (void *abstra
- cairo_path_fixed_t *path,
- cairo_fill_rule_t fill_rule,
- double tolerance,
- cairo_antialias_t antialias,
- cairo_clip_t *clip)
- {
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
-- cairo_quartz_action_t action;
-+ cairo_quartz_drawing_state_t state;
- quartz_stroke_t stroke;
- CGPathRef path_for_unbounded = NULL;
-
- ND((stderr, "%p _cairo_quartz_surface_fill op %d source->type %d\n", surface, op, source->type));
-
- if (IS_EMPTY(surface))
- return CAIRO_STATUS_SUCCESS;
-
- rv = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
- if (unlikely (rv))
- return rv;
-
-- rv = _cairo_quartz_surface_set_cairo_operator (surface, op);
-- if (unlikely (rv))
-- return rv == CAIRO_INT_STATUS_NOTHING_TO_DO ? CAIRO_STATUS_SUCCESS : rv;
--
-- CGContextSaveGState (surface->cgContext);
--
-- CGContextSetShouldAntialias (surface->cgContext, (antialias != CAIRO_ANTIALIAS_NONE));
--
- if (_cairo_quartz_source_needs_extents (source))
- {
- /* We don't need precise extents since these are only used to
- compute the number of gradient reptitions needed to cover the
- object. */
- cairo_rectangle_int_t path_extents;
- _cairo_path_fixed_approximate_fill_extents (path, &path_extents);
-- action = _cairo_quartz_setup_source (surface, source, &path_extents);
-+ state = _cairo_quartz_setup_state (surface, source, op, &path_extents);
- } else {
-- action = _cairo_quartz_setup_source (surface, source, NULL);
-+ state = _cairo_quartz_setup_state (surface, source, op, NULL);
- }
-
-- CGContextBeginPath (surface->cgContext);
--
-- stroke.cgContext = surface->cgContext;
-+ CGContextSetShouldAntialias (state.context, (antialias != CAIRO_ANTIALIAS_NONE));
-+
-+ CGContextBeginPath (state.context);
-+
-+ stroke.cgContext = state.context;
- stroke.ctm_inverse = NULL;
- rv = _cairo_quartz_cairo_path_to_quartz_context (path, &stroke);
- if (rv)
- goto BAIL;
-
- if (!_cairo_operator_bounded_by_mask(op) && CGContextCopyPathPtr)
-- path_for_unbounded = CGContextCopyPathPtr (surface->cgContext);
--
-- if (action == DO_SOLID || action == DO_PATTERN) {
-+ path_for_unbounded = CGContextCopyPathPtr (state.context);
-+
-+ if (state.action == DO_SOLID || state.action == DO_PATTERN) {
- if (fill_rule == CAIRO_FILL_RULE_WINDING)
-- CGContextFillPath (surface->cgContext);
-+ CGContextFillPath (state.context);
- else
-- CGContextEOFillPath (surface->cgContext);
-- } else if (action == DO_SHADING) {
-+ CGContextEOFillPath (state.context);
-+ } else if (state.action == DO_SHADING) {
-
- // we have to clip and then paint the shading; we can't fill
- // with the shading
- if (fill_rule == CAIRO_FILL_RULE_WINDING)
-- CGContextClip (surface->cgContext);
-+ CGContextClip (state.context);
- else
-- CGContextEOClip (surface->cgContext);
--
-- CGContextConcatCTM (surface->cgContext, surface->sourceTransform);
-- CGContextDrawShading (surface->cgContext, surface->sourceShading);
-- } else if (action == DO_IMAGE || action == DO_TILED_IMAGE) {
-+ CGContextEOClip (state.context);
-+
-+ CGContextConcatCTM (state.context, state.transform);
-+ CGContextDrawShading (state.context, state.shading);
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
- if (fill_rule == CAIRO_FILL_RULE_WINDING)
-- CGContextClip (surface->cgContext);
-+ CGContextClip (state.context);
- else
-- CGContextEOClip (surface->cgContext);
--
-- _cairo_quartz_draw_image (surface, op, action);
-- } else if (action != DO_NOTHING) {
-+ CGContextEOClip (state.context);
-+
-+ _cairo_quartz_draw_image (&state, op);
-+ } else if (state.action != DO_NOTHING) {
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- BAIL:
-- _cairo_quartz_teardown_source (surface, source);
--
-- CGContextRestoreGState (surface->cgContext);
-+ _cairo_quartz_teardown_state (&state);
-
- if (path_for_unbounded) {
- unbounded_op_data_t ub;
- ub.op = UNBOUNDED_STROKE_FILL;
- ub.u.stroke_fill.cgPath = path_for_unbounded;
- ub.u.stroke_fill.fill_rule = fill_rule;
-
- _cairo_quartz_fixup_unbounded_operation (surface, &ub, antialias);
-@@ -2274,44 +2323,49 @@ _cairo_quartz_surface_stroke (void *abst
- cairo_matrix_t *ctm,
- cairo_matrix_t *ctm_inverse,
- double tolerance,
- cairo_antialias_t antialias,
- cairo_clip_t *clip)
- {
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
-- cairo_quartz_action_t action;
-+ cairo_quartz_drawing_state_t state;
- quartz_stroke_t stroke;
- CGAffineTransform origCTM, strokeTransform;
- CGPathRef path_for_unbounded = NULL;
-
- ND((stderr, "%p _cairo_quartz_surface_stroke op %d source->type %d\n", surface, op, source->type));
-
- if (IS_EMPTY(surface))
- return CAIRO_STATUS_SUCCESS;
-
- rv = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
- if (unlikely (rv))
- return rv;
-
-- rv = _cairo_quartz_surface_set_cairo_operator (surface, op);
-- if (unlikely (rv))
-- return rv == CAIRO_INT_STATUS_NOTHING_TO_DO ? CAIRO_STATUS_SUCCESS : rv;
-+ if (_cairo_quartz_source_needs_extents (source))
-+ {
-+ cairo_rectangle_int_t path_extents;
-+ _cairo_path_fixed_approximate_stroke_extents (path, style, ctm, &path_extents);
-+ state = _cairo_quartz_setup_state (surface, source, op, &path_extents);
-+ } else {
-+ state = _cairo_quartz_setup_state (surface, source, op, NULL);
-+ }
-
- // Turning antialiasing off used to cause misrendering with
- // single-pixel lines (e.g. 20,10.5 -> 21,10.5 end up being rendered as 2 pixels).
- // That's been since fixed in at least 10.5, and in the latest 10.4 dot releases.
-- CGContextSetShouldAntialias (surface->cgContext, (antialias != CAIRO_ANTIALIAS_NONE));
-- CGContextSetLineWidth (surface->cgContext, style->line_width);
-- CGContextSetLineCap (surface->cgContext, _cairo_quartz_cairo_line_cap_to_quartz (style->line_cap));
-- CGContextSetLineJoin (surface->cgContext, _cairo_quartz_cairo_line_join_to_quartz (style->line_join));
-- CGContextSetMiterLimit (surface->cgContext, style->miter_limit);
--
-- origCTM = CGContextGetCTM (surface->cgContext);
-+ CGContextSetShouldAntialias (state.context, (antialias != CAIRO_ANTIALIAS_NONE));
-+ CGContextSetLineWidth (state.context, style->line_width);
-+ CGContextSetLineCap (state.context, _cairo_quartz_cairo_line_cap_to_quartz (style->line_cap));
-+ CGContextSetLineJoin (state.context, _cairo_quartz_cairo_line_join_to_quartz (style->line_join));
-+ CGContextSetMiterLimit (state.context, style->miter_limit);
-+
-+ origCTM = CGContextGetCTM (state.context);
-
- if (style->dash && style->num_dashes) {
- #define STATIC_DASH 32
- CGFloat sdash[STATIC_DASH];
- CGFloat *fdash = sdash;
- double offset = style->dash_offset;
- unsigned int max_dashes = style->num_dashes;
- unsigned int k;
-@@ -2330,90 +2384,75 @@ _cairo_quartz_surface_stroke (void *abst
- if (max_dashes > STATIC_DASH)
- fdash = _cairo_malloc_ab (max_dashes, sizeof (CGFloat));
- if (fdash == NULL)
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
- for (k = 0; k < max_dashes; k++)
- fdash[k] = (CGFloat) style->dash[k % style->num_dashes];
- }
-- CGContextSetLineDash (surface->cgContext, offset, fdash, max_dashes);
-+ CGContextSetLineDash (state.context, offset, fdash, max_dashes);
- if (fdash != sdash)
- free (fdash);
- } else
-- CGContextSetLineDash (surface->cgContext, 0, NULL, 0);
--
-- CGContextSaveGState (surface->cgContext);
--
--
-- if (_cairo_quartz_source_needs_extents (source))
-- {
-- cairo_rectangle_int_t path_extents;
-- _cairo_path_fixed_approximate_stroke_extents (path, style, ctm, &path_extents);
-- action = _cairo_quartz_setup_source (surface, source, &path_extents);
-- } else {
-- action = _cairo_quartz_setup_source (surface, source, NULL);
-- }
-+ CGContextSetLineDash (state.context, 0, NULL, 0);
-
- _cairo_quartz_cairo_matrix_to_quartz (ctm, &strokeTransform);
-- CGContextConcatCTM (surface->cgContext, strokeTransform);
--
-- CGContextBeginPath (surface->cgContext);
--
-- stroke.cgContext = surface->cgContext;
-+ CGContextConcatCTM (state.context, strokeTransform);
-+
-+ CGContextBeginPath (state.context);
-+
-+ stroke.cgContext = state.context;
- stroke.ctm_inverse = ctm_inverse;
- rv = _cairo_quartz_cairo_path_to_quartz_context (path, &stroke);
- if (rv)
- goto BAIL;
-
- if (!_cairo_operator_bounded_by_mask (op) && CGContextCopyPathPtr)
-- path_for_unbounded = CGContextCopyPathPtr (surface->cgContext);
--
-- if (action == DO_SOLID || action == DO_PATTERN) {
-- CGContextStrokePath (surface->cgContext);
-- } else if (action == DO_IMAGE || action == DO_TILED_IMAGE) {
-- CGContextReplacePathWithStrokedPath (surface->cgContext);
-- CGContextClip (surface->cgContext);
--
-- CGContextSetCTM (surface->cgContext, origCTM);
-- _cairo_quartz_draw_image (surface, op, action);
-- } else if (action == DO_SHADING) {
-- CGContextReplacePathWithStrokedPath (surface->cgContext);
-- CGContextClip (surface->cgContext);
--
-- CGContextSetCTM (surface->cgContext, origCTM);
--
-- CGContextConcatCTM (surface->cgContext, surface->sourceTransform);
-- CGContextDrawShading (surface->cgContext, surface->sourceShading);
-- } else if (action != DO_NOTHING) {
-+ path_for_unbounded = CGContextCopyPathPtr (state.context);
-+
-+ if (state.action == DO_SOLID || state.action == DO_PATTERN) {
-+ CGContextStrokePath (state.context);
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
-+ CGContextReplacePathWithStrokedPath (state.context);
-+ CGContextClip (state.context);
-+
-+ CGContextSetCTM (state.context, origCTM);
-+ _cairo_quartz_draw_image (&state, op);
-+ } else if (state.action == DO_SHADING) {
-+ CGContextReplacePathWithStrokedPath (state.context);
-+ CGContextClip (state.context);
-+
-+ CGContextSetCTM (state.context, origCTM);
-+
-+ CGContextConcatCTM (state.context, state.transform);
-+ CGContextDrawShading (state.context, state.shading);
-+ } else if (state.action != DO_NOTHING) {
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
-+ goto BAIL;
- }
-
-+ if (path_for_unbounded) {
-+ CGContextSetCTM (state.context, origCTM);
-+ CGContextConcatCTM (state.context, strokeTransform);
-+
-+ CGContextBeginPath (state.context);
-+ CGContextAddPath (state.context, path_for_unbounded);
-+ CGPathRelease (path_for_unbounded);
-+
-+ CGContextReplacePathWithStrokedPath (state.context);
-+
-+ CGContextAddRect (state.context, CGContextGetClipBoundingBox (state.context));
-+
-+ CGContextSetRGBFillColor (state.context, 0., 0., 0., 0.);
-+ CGContextEOFillPath (state.context);
-+ }
-+
- BAIL:
-- _cairo_quartz_teardown_source (surface, source);
--
-- CGContextRestoreGState (surface->cgContext);
--
-- if (path_for_unbounded) {
-- CGContextSaveGState (surface->cgContext);
-- CGContextConcatCTM (surface->cgContext, strokeTransform);
--
-- CGContextBeginPath (surface->cgContext);
-- CGContextAddPath (surface->cgContext, path_for_unbounded);
-- CGPathRelease (path_for_unbounded);
--
-- CGContextReplacePathWithStrokedPath (surface->cgContext);
--
-- CGContextAddRect (surface->cgContext, CGContextGetClipBoundingBox (surface->cgContext));
--
-- CGContextSetRGBFillColor (surface->cgContext, 0., 0., 0., 0.);
-- CGContextEOFillPath (surface->cgContext);
--
-- CGContextRestoreGState (surface->cgContext);
-- }
-+ _cairo_quartz_teardown_state (&state);
-
- ND((stderr, "-- stroke\n"));
- return rv;
- }
-
- #if CAIRO_HAS_QUARTZ_FONT
- static cairo_int_status_t
- _cairo_quartz_surface_show_glyphs (void *abstract_surface,
-@@ -2429,17 +2468,17 @@ _cairo_quartz_surface_show_glyphs (void
- #define STATIC_BUF_SIZE 64
- CGGlyph glyphs_static[STATIC_BUF_SIZE];
- CGSize cg_advances_static[STATIC_BUF_SIZE];
- CGGlyph *cg_glyphs = &glyphs_static[0];
- CGSize *cg_advances = &cg_advances_static[0];
-
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
-- cairo_quartz_action_t action;
-+ cairo_quartz_drawing_state_t state;
- float xprev, yprev;
- int i;
- CGFontRef cgfref = NULL;
-
- cairo_bool_t isClipping = FALSE;
- cairo_bool_t didForceFontSmoothing = FALSE;
-
- if (IS_EMPTY(surface))
-@@ -2450,65 +2489,59 @@ _cairo_quartz_surface_show_glyphs (void
-
- if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_QUARTZ)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- rv = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
- if (unlikely (rv))
- return rv;
-
-- rv = _cairo_quartz_surface_set_cairo_operator (surface, op);
-- if (unlikely (rv))
-- return rv == CAIRO_INT_STATUS_NOTHING_TO_DO ? CAIRO_STATUS_SUCCESS : rv;
--
-- CGContextSaveGState (surface->cgContext);
--
- if (_cairo_quartz_source_needs_extents (source))
- {
- cairo_rectangle_int_t glyph_extents;
- _cairo_scaled_font_glyph_device_extents (scaled_font, glyphs, num_glyphs,
- &glyph_extents, NULL);
-- action = _cairo_quartz_setup_source (surface, source, &glyph_extents);
-+ state = _cairo_quartz_setup_state (surface, source, op, &glyph_extents);
- } else {
-- action = _cairo_quartz_setup_source (surface, source, NULL);
-+ state = _cairo_quartz_setup_state (surface, source, op, NULL);
- }
-
-- if (action == DO_SOLID || action == DO_PATTERN) {
-- CGContextSetTextDrawingMode (surface->cgContext, kCGTextFill);
-- } else if (action == DO_IMAGE || action == DO_TILED_IMAGE || action == DO_SHADING) {
-- CGContextSetTextDrawingMode (surface->cgContext, kCGTextClip);
-+ if (state.action == DO_SOLID || state.action == DO_PATTERN) {
-+ CGContextSetTextDrawingMode (state.context, kCGTextFill);
-+ } else if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE || state.action == DO_SHADING) {
-+ CGContextSetTextDrawingMode (state.context, kCGTextClip);
- isClipping = TRUE;
- } else {
-- if (action != DO_NOTHING)
-+ if (state.action != DO_NOTHING)
- rv = CAIRO_INT_STATUS_UNSUPPORTED;
- goto BAIL;
- }
-
- /* this doesn't addref */
- cgfref = _cairo_quartz_scaled_font_get_cg_font_ref (scaled_font);
-- CGContextSetFont (surface->cgContext, cgfref);
-- CGContextSetFontSize (surface->cgContext, 1.0);
-+ CGContextSetFont (state.context, cgfref);
-+ CGContextSetFontSize (state.context, 1.0);
-
- switch (scaled_font->options.antialias) {
- case CAIRO_ANTIALIAS_SUBPIXEL:
-- CGContextSetShouldAntialias (surface->cgContext, TRUE);
-- CGContextSetShouldSmoothFonts (surface->cgContext, TRUE);
-+ CGContextSetShouldAntialias (state.context, TRUE);
-+ CGContextSetShouldSmoothFonts (state.context, TRUE);
- if (CGContextSetAllowsFontSmoothingPtr &&
-- !CGContextGetAllowsFontSmoothingPtr (surface->cgContext))
-+ !CGContextGetAllowsFontSmoothingPtr (state.context))
- {
- didForceFontSmoothing = TRUE;
-- CGContextSetAllowsFontSmoothingPtr (surface->cgContext, TRUE);
-+ CGContextSetAllowsFontSmoothingPtr (state.context, TRUE);
- }
- break;
- case CAIRO_ANTIALIAS_NONE:
-- CGContextSetShouldAntialias (surface->cgContext, FALSE);
-+ CGContextSetShouldAntialias (state.context, FALSE);
- break;
- case CAIRO_ANTIALIAS_GRAY:
-- CGContextSetShouldAntialias (surface->cgContext, TRUE);
-- CGContextSetShouldSmoothFonts (surface->cgContext, FALSE);
-+ CGContextSetShouldAntialias (state.context, TRUE);
-+ CGContextSetShouldSmoothFonts (state.context, FALSE);
- break;
- case CAIRO_ANTIALIAS_DEFAULT:
- /* Don't do anything */
- break;
- }
-
- if (num_glyphs > STATIC_BUF_SIZE) {
- cg_glyphs = (CGGlyph*) _cairo_malloc_ab (num_glyphs, sizeof(CGGlyph));
-@@ -2532,17 +2565,17 @@ _cairo_quartz_surface_show_glyphs (void
- textTransform = CGAffineTransformScale (textTransform, 1.0, -1.0);
- textTransform = CGAffineTransformConcat (CGAffineTransformMake(scaled_font->ctm.xx,
- -scaled_font->ctm.yx,
- -scaled_font->ctm.xy,
- scaled_font->ctm.yy,
- 0., 0.),
- textTransform);
-
-- CGContextSetTextMatrix (surface->cgContext, textTransform);
-+ CGContextSetTextMatrix (state.context, textTransform);
-
- /* Convert our glyph positions to glyph advances. We need n-1 advances,
- * since the advance at index 0 is applied after glyph 0. */
- xprev = glyphs[0].x;
- yprev = glyphs[0].y;
-
- cg_glyphs[0] = glyphs[0].index;
-
-@@ -2569,40 +2602,38 @@ _cairo_quartz_surface_show_glyphs (void
-
- #if 0
- for (i = 0; i < num_glyphs; i++) {
- ND((stderr, "[%d: %d %f,%f]\n", i, cg_glyphs[i], cg_advances[i].width, cg_advances[i].height));
- }
- #endif
-
- /* Translate to the first glyph's position before drawing */
-- ctm = CGContextGetCTM (surface->cgContext);
-- CGContextTranslateCTM (surface->cgContext, glyphs[0].x, glyphs[0].y);
--
-- CGContextShowGlyphsWithAdvances (surface->cgContext,
-+ ctm = CGContextGetCTM (state.context);
-+ CGContextTranslateCTM (state.context, glyphs[0].x, glyphs[0].y);
-+
-+ CGContextShowGlyphsWithAdvances (state.context,
- cg_glyphs,
- cg_advances,
- num_glyphs);
-
-- CGContextSetCTM (surface->cgContext, ctm);
--
-- if (action == DO_IMAGE || action == DO_TILED_IMAGE) {
-- _cairo_quartz_draw_image (surface, op, action);
-- } else if (action == DO_SHADING) {
-- CGContextConcatCTM (surface->cgContext, surface->sourceTransform);
-- CGContextDrawShading (surface->cgContext, surface->sourceShading);
-+ CGContextSetCTM (state.context, ctm);
-+
-+ if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE) {
-+ _cairo_quartz_draw_image (&state, op);
-+ } else if (state.action == DO_SHADING) {
-+ CGContextConcatCTM (state.context, state.transform);
-+ CGContextDrawShading (state.context, state.shading);
- }
-
- BAIL:
-- _cairo_quartz_teardown_source (surface, source);
--
- if (didForceFontSmoothing)
-- CGContextSetAllowsFontSmoothingPtr (surface->cgContext, FALSE);
--
-- CGContextRestoreGState (surface->cgContext);
-+ CGContextSetAllowsFontSmoothingPtr (state.context, FALSE);
-+
-+ _cairo_quartz_teardown_state (&state);
-
- if (rv == CAIRO_STATUS_SUCCESS &&
- cgfref &&
- !_cairo_operator_bounded_by_mask (op))
- {
- unbounded_op_data_t ub;
- ub.op = UNBOUNDED_SHOW_GLYPHS;
-
diff --git a/gfx/cairo/quartz-support-color-emoji-font.patch b/gfx/cairo/quartz-support-color-emoji-font.patch
deleted file mode 100644
index 5fb88b271..000000000
--- a/gfx/cairo/quartz-support-color-emoji-font.patch
+++ /dev/null
@@ -1,432 +0,0 @@
-From: Jonathan Kew <jkew@mozilla.com>
-bug 715798 pt 1 - support Apple Color Emoji font in cairo-quartz backend. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-font.c b/gfx/cairo/cairo/src/cairo-quartz-font.c
---- a/gfx/cairo/cairo/src/cairo-quartz-font.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-font.c
-@@ -85,16 +85,20 @@ typedef struct {
- int descent;
- int leading;
- } quartz_CGFontMetrics;
- static quartz_CGFontMetrics* (*CGFontGetHMetricsPtr) (CGFontRef fontRef) = NULL;
- static int (*CGFontGetAscentPtr) (CGFontRef fontRef) = NULL;
- static int (*CGFontGetDescentPtr) (CGFontRef fontRef) = NULL;
- static int (*CGFontGetLeadingPtr) (CGFontRef fontRef) = NULL;
-
-+/* CTFontCreateWithGraphicsFont is not public until 10.5. */
-+typedef const struct __CTFontDescriptor *CTFontDescriptorRef;
-+static CTFontRef (*CTFontCreateWithGraphicsFontPtr) (CGFontRef, CGFloat, const CGAffineTransform *, CTFontDescriptorRef) = NULL;
-+
- static cairo_bool_t _cairo_quartz_font_symbol_lookup_done = FALSE;
- static cairo_bool_t _cairo_quartz_font_symbols_present = FALSE;
-
- static void
- quartz_font_ensure_symbols(void)
- {
- if (_cairo_quartz_font_symbol_lookup_done)
- return;
-@@ -122,16 +126,18 @@ quartz_font_ensure_symbols(void)
- CGFontGetHMetricsPtr = dlsym(RTLD_DEFAULT, "CGFontGetHMetrics");
- CGFontGetAscentPtr = dlsym(RTLD_DEFAULT, "CGFontGetAscent");
- CGFontGetDescentPtr = dlsym(RTLD_DEFAULT, "CGFontGetDescent");
- CGFontGetLeadingPtr = dlsym(RTLD_DEFAULT, "CGFontGetLeading");
-
- CGContextGetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextGetAllowsFontSmoothing");
- CGContextSetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextSetAllowsFontSmoothing");
-
-+ CTFontCreateWithGraphicsFontPtr = dlsym(RTLD_DEFAULT, "CTFontCreateWithGraphicsFont");
-+
- if ((CGFontCreateWithFontNamePtr || CGFontCreateWithNamePtr) &&
- CGFontGetGlyphBBoxesPtr &&
- CGFontGetGlyphsForUnicharsPtr &&
- CGFontGetUnitsPerEmPtr &&
- CGFontGetGlyphAdvancesPtr &&
- CGFontGetGlyphPathPtr &&
- (CGFontGetHMetricsPtr || (CGFontGetAscentPtr && CGFontGetDescentPtr && CGFontGetLeadingPtr)))
- _cairo_quartz_font_symbols_present = TRUE;
-@@ -145,16 +151,17 @@ typedef struct _cairo_quartz_scaled_font
- struct _cairo_quartz_scaled_font {
- cairo_scaled_font_t base;
- };
-
- struct _cairo_quartz_font_face {
- cairo_font_face_t base;
-
- CGFontRef cgFont;
-+ CTFontRef ctFont;
- };
-
- /*
- * font face backend
- */
-
- static cairo_status_t
- _cairo_quartz_font_face_create_for_toy (cairo_toy_font_face_t *toy_face,
-@@ -229,16 +236,20 @@ static cairo_status_t
- return CAIRO_STATUS_SUCCESS;
- }
-
- static void
- _cairo_quartz_font_face_destroy (void *abstract_face)
- {
- cairo_quartz_font_face_t *font_face = (cairo_quartz_font_face_t*) abstract_face;
-
-+ if (font_face->ctFont) {
-+ CFRelease (font_face->ctFont);
-+ }
-+
- CGFontRelease (font_face->cgFont);
- }
-
- static const cairo_scaled_font_backend_t _cairo_quartz_scaled_font_backend;
-
- static cairo_status_t
- _cairo_quartz_font_face_scaled_font_create (void *abstract_face,
- const cairo_matrix_t *font_matrix,
-@@ -353,16 +364,22 @@ cairo_quartz_font_face_create_for_cgfont
- if (!font_face) {
- cairo_status_t ignore_status;
- ignore_status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
- return (cairo_font_face_t *)&_cairo_font_face_nil;
- }
-
- font_face->cgFont = CGFontRetain (font);
-
-+ if (CTFontCreateWithGraphicsFontPtr) {
-+ font_face->ctFont = CTFontCreateWithGraphicsFontPtr (font, 1.0, NULL, NULL);
-+ } else {
-+ font_face->ctFont = NULL;
-+ }
-+
- _cairo_font_face_init (&font_face->base, &_cairo_quartz_font_face_backend);
-
- return &font_face->base;
- }
-
- /*
- * scaled font backend
- */
-@@ -772,16 +789,24 @@ static const cairo_scaled_font_backend_t
- CGFontRef
- _cairo_quartz_scaled_font_get_cg_font_ref (cairo_scaled_font_t *abstract_font)
- {
- cairo_quartz_font_face_t *ffont = _cairo_quartz_scaled_to_face(abstract_font);
-
- return ffont->cgFont;
- }
-
-+CTFontRef
-+_cairo_quartz_scaled_font_get_ct_font_ref (cairo_scaled_font_t *abstract_font)
-+{
-+ cairo_quartz_font_face_t *ffont = _cairo_quartz_scaled_to_face(abstract_font);
-+
-+ return ffont->ctFont;
-+}
-+
- #ifndef __LP64__
- /*
- * compat with old ATSUI backend
- */
-
- /**
- * cairo_quartz_font_face_create_for_atsu_font_id
- * @font_id: an ATSUFontID for the font.
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-private.h b/gfx/cairo/cairo/src/cairo-quartz-private.h
---- a/gfx/cairo/cairo/src/cairo-quartz-private.h
-+++ b/gfx/cairo/cairo/src/cairo-quartz-private.h
-@@ -45,16 +45,19 @@
- #include "cairo-surface-clipper-private.h"
-
- #ifdef CGFLOAT_DEFINED
- typedef CGFloat cairo_quartz_float_t;
- #else
- typedef float cairo_quartz_float_t;
- #endif
-
-+/* define CTFontRef for pre-10.5 SDKs */
-+typedef const struct __CTFont *CTFontRef;
-+
- typedef struct cairo_quartz_surface {
- cairo_surface_t base;
-
- CGContextRef cgContext;
- CGAffineTransform cgContextBaseCTM;
-
- void *imageData;
- cairo_surface_t *imageSurfaceEquiv;
-@@ -99,15 +102,18 @@ CGImageRef
- cairo_bool_t interpolate,
- CGColorSpaceRef colorSpaceOverride,
- CGDataProviderReleaseDataCallback releaseCallback,
- void *releaseInfo);
-
- CGFontRef
- _cairo_quartz_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont);
-
-+CTFontRef
-+_cairo_quartz_scaled_font_get_ct_font_ref (cairo_scaled_font_t *sfont);
-+
- #else
-
- # error Cairo was not compiled with support for the quartz backend
-
- #endif /* CAIRO_HAS_QUARTZ_SURFACE */
-
- #endif /* CAIRO_QUARTZ_PRIVATE_H */
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -130,16 +130,19 @@ static void (*CGContextClipToMaskPtr) (C
- static void (*CGContextDrawTiledImagePtr) (CGContextRef, CGRect, CGImageRef) = NULL;
- static unsigned int (*CGContextGetTypePtr) (CGContextRef) = NULL;
- static void (*CGContextSetShouldAntialiasFontsPtr) (CGContextRef, bool) = NULL;
- static void (*CGContextSetAllowsFontSmoothingPtr) (CGContextRef, bool) = NULL;
- static bool (*CGContextGetAllowsFontSmoothingPtr) (CGContextRef) = NULL;
- static CGPathRef (*CGContextCopyPathPtr) (CGContextRef) = NULL;
- static CGFloat (*CGContextGetAlphaPtr) (CGContextRef) = NULL;
-
-+/* CTFontDrawGlyphs is not available until 10.7 */
-+static void (*CTFontDrawGlyphsPtr) (CTFontRef, const CGGlyph[], const CGPoint[], size_t, CGContextRef) = NULL;
-+
- static SInt32 _cairo_quartz_osx_version = 0x0;
-
- static cairo_bool_t _cairo_quartz_symbol_lookup_done = FALSE;
-
- /*
- * Utility functions
- */
-
-@@ -167,16 +170,18 @@ static void quartz_ensure_symbols(void)
- CGContextDrawTiledImagePtr = dlsym(RTLD_DEFAULT, "CGContextDrawTiledImage");
- CGContextGetTypePtr = dlsym(RTLD_DEFAULT, "CGContextGetType");
- CGContextSetShouldAntialiasFontsPtr = dlsym(RTLD_DEFAULT, "CGContextSetShouldAntialiasFonts");
- CGContextCopyPathPtr = dlsym(RTLD_DEFAULT, "CGContextCopyPath");
- CGContextGetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextGetAllowsFontSmoothing");
- CGContextSetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextSetAllowsFontSmoothing");
- CGContextGetAlphaPtr = dlsym(RTLD_DEFAULT, "CGContextGetAlpha");
-
-+ CTFontDrawGlyphsPtr = dlsym(RTLD_DEFAULT, "CTFontDrawGlyphs");
-+
- if (Gestalt(gestaltSystemVersion, &_cairo_quartz_osx_version) != noErr) {
- // assume 10.5
- _cairo_quartz_osx_version = 0x1050;
- }
-
- _cairo_quartz_symbol_lookup_done = TRUE;
- }
-
-@@ -605,20 +610,23 @@ static inline void
- dst->d = src->yy;
- dst->tx = src->x0;
- dst->ty = src->y0;
- }
-
- typedef struct {
- bool isClipping;
- CGGlyph *cg_glyphs;
-- CGSize *cg_advances;
-+ union {
-+ CGSize *cg_advances;
-+ CGPoint *cg_positions;
-+ } u;
- size_t nglyphs;
- CGAffineTransform textTransform;
-- CGFontRef font;
-+ cairo_scaled_font_t *scaled_font;
- CGPoint origin;
- } unbounded_show_glyphs_t;
-
- typedef struct {
- CGPathRef cgPath;
- cairo_fill_rule_t fill_rule;
- } unbounded_stroke_fill_t;
-
-@@ -686,36 +694,43 @@ static void
- CGContextBeginPath (cgc);
- CGContextAddPath (cgc, op->u.stroke_fill.cgPath);
-
- if (op->u.stroke_fill.fill_rule == CAIRO_FILL_RULE_WINDING)
- CGContextFillPath (cgc);
- else
- CGContextEOFillPath (cgc);
- } else if (op->op == UNBOUNDED_SHOW_GLYPHS) {
-- CGContextSetFont (cgc, op->u.show_glyphs.font);
-- CGContextSetFontSize (cgc, 1.0);
-- CGContextSetTextMatrix (cgc, CGAffineTransformIdentity);
-- CGContextTranslateCTM (cgc, op->u.show_glyphs.origin.x, op->u.show_glyphs.origin.y);
-- CGContextConcatCTM (cgc, op->u.show_glyphs.textTransform);
--
- if (op->u.show_glyphs.isClipping) {
- /* Note that the comment in show_glyphs about kCGTextClip
- * and the text transform still applies here; however, the
- * cg_advances we have were already transformed, so we
- * don't have to do anything. */
- CGContextSetTextDrawingMode (cgc, kCGTextClip);
- CGContextSaveGState (cgc);
- }
--
-- CGContextShowGlyphsWithAdvances (cgc,
-- op->u.show_glyphs.cg_glyphs,
-- op->u.show_glyphs.cg_advances,
-- op->u.show_glyphs.nglyphs);
--
-+ CGContextTranslateCTM (cgc, op->u.show_glyphs.origin.x, op->u.show_glyphs.origin.y);
-+ CGContextConcatCTM (cgc, op->u.show_glyphs.textTransform);
-+ if (CTFontDrawGlyphsPtr) {
-+ CTFontDrawGlyphsPtr (_cairo_quartz_scaled_font_get_ct_font_ref (op->u.show_glyphs.scaled_font),
-+ op->u.show_glyphs.cg_glyphs,
-+ op->u.show_glyphs.u.cg_positions,
-+ op->u.show_glyphs.nglyphs,
-+ cgc);
-+ } else {
-+ CGContextSetFont (cgc, _cairo_quartz_scaled_font_get_cg_font_ref (op->u.show_glyphs.scaled_font));
-+ CGContextSetFontSize (cgc, 1.0);
-+ CGContextSetTextMatrix (cgc, CGAffineTransformIdentity);
-+
-+ CGContextShowGlyphsWithAdvances (cgc,
-+ op->u.show_glyphs.cg_glyphs,
-+ op->u.show_glyphs.u.cg_advances,
-+ op->u.show_glyphs.nglyphs);
-+
-+ }
- if (op->u.show_glyphs.isClipping) {
- CGContextClearRect (cgc, clipBoxRound);
- CGContextRestoreGState (cgc);
- }
- } else if (op->op == UNBOUNDED_MASK) {
- CGAffineTransform ctm = CGContextGetCTM (cgc);
- CGContextSaveGState (cgc);
- CGContextConcatCTM (cgc, op->u.mask.maskTransform);
-@@ -2684,16 +2699,19 @@ static cairo_int_status_t
- cairo_clip_t *clip,
- int *remaining_glyphs)
- {
- CGAffineTransform textTransform, ctm, invTextTransform;
- #define STATIC_BUF_SIZE 64
- CGGlyph glyphs_static[STATIC_BUF_SIZE];
- CGSize cg_advances_static[STATIC_BUF_SIZE];
- CGGlyph *cg_glyphs = &glyphs_static[0];
-+ /* We'll use the cg_advances array for either advances or positions,
-+ depending which API we're using to actually draw. The types involved
-+ have the same size, so this is safe. */
- CGSize *cg_advances = &cg_advances_static[0];
-
- cairo_rectangle_int_t glyph_extents;
- cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
- cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
- cairo_quartz_drawing_state_t state;
- cairo_quartz_float_t xprev, yprev;
- int i;
-@@ -2796,41 +2814,62 @@ static cairo_int_status_t
- invTextTransform = CGAffineTransformMake (scaled_font->scale_inverse.xx,
- -scaled_font->scale_inverse.yx,
- scaled_font->scale_inverse.xy,
- -scaled_font->scale_inverse.yy,
- 0.0, 0.0);
-
- CGContextSetTextMatrix (state.context, CGAffineTransformIdentity);
-
-- /* Convert our glyph positions to glyph advances. We need n-1 advances,
-- * since the advance at index 0 is applied after glyph 0. */
-- xprev = glyphs[0].x;
-- yprev = glyphs[0].y;
--
-- cg_glyphs[0] = glyphs[0].index;
--
-- for (i = 1; i < num_glyphs; i++) {
-- cairo_quartz_float_t xf = glyphs[i].x;
-- cairo_quartz_float_t yf = glyphs[i].y;
-- cg_glyphs[i] = glyphs[i].index;
-- cg_advances[i - 1] = CGSizeApplyAffineTransform(CGSizeMake (xf - xprev, yf - yprev), invTextTransform);
-- xprev = xf;
-- yprev = yf;
-- }
--
- /* Translate to the first glyph's position before drawing */
- ctm = CGContextGetCTM (state.context);
- CGContextTranslateCTM (state.context, glyphs[0].x, glyphs[0].y);
- CGContextConcatCTM (state.context, textTransform);
-
-- CGContextShowGlyphsWithAdvances (state.context,
-- cg_glyphs,
-- cg_advances,
-- num_glyphs);
-+ if (CTFontDrawGlyphsPtr) {
-+ /* If CTFontDrawGlyphs is available (i.e. OS X 10.7 or later), we want to use
-+ * that in preference to CGContextShowGlyphsWithAdvances so that colored-bitmap
-+ * fonts like Apple Color Emoji will render properly.
-+ * For this, we need to convert our glyph positions to Core Graphics's CGPoint.
-+ * We borrow the cg_advances array, as CGPoint and CGSize are the same size. */
-+
-+ CGPoint *cg_positions = (CGPoint*) cg_advances;
-+ cairo_quartz_float_t origin_x = glyphs[0].x;
-+ cairo_quartz_float_t origin_y = glyphs[0].y;
-+
-+ for (i = 0; i < num_glyphs; i++) {
-+ CGPoint pt = CGPointMake (glyphs[i].x - origin_x, glyphs[i].y - origin_y);
-+ cg_positions[i] = CGPointApplyAffineTransform (pt, invTextTransform);
-+ cg_glyphs[i] = glyphs[i].index;
-+ }
-+
-+ CTFontDrawGlyphsPtr (_cairo_quartz_scaled_font_get_ct_font_ref (scaled_font),
-+ cg_glyphs, cg_positions, num_glyphs, state.context);
-+ } else {
-+ /* Convert our glyph positions to glyph advances. We need n-1 advances,
-+ * since the advance at index 0 is applied after glyph 0. */
-+ xprev = glyphs[0].x;
-+ yprev = glyphs[0].y;
-+
-+ cg_glyphs[0] = glyphs[0].index;
-+
-+ for (i = 1; i < num_glyphs; i++) {
-+ cairo_quartz_float_t xf = glyphs[i].x;
-+ cairo_quartz_float_t yf = glyphs[i].y;
-+ cg_glyphs[i] = glyphs[i].index;
-+ cg_advances[i - 1] = CGSizeApplyAffineTransform(CGSizeMake (xf - xprev, yf - yprev), invTextTransform);
-+ xprev = xf;
-+ yprev = yf;
-+ }
-+
-+ CGContextShowGlyphsWithAdvances (state.context,
-+ cg_glyphs,
-+ cg_advances,
-+ num_glyphs);
-+ }
-
- CGContextSetCTM (state.context, ctm);
-
- if (state.action == DO_IMAGE || state.action == DO_TILED_IMAGE ||
- state.action == DO_LAYER) {
- _cairo_quartz_draw_image (&state, op);
- } else if (state.action == DO_SHADING) {
- CGContextConcatCTM (state.context, state.transform);
-@@ -2847,20 +2886,27 @@ BAIL:
- cgfref &&
- !_cairo_operator_bounded_by_mask (op))
- {
- unbounded_op_data_t ub;
- ub.op = UNBOUNDED_SHOW_GLYPHS;
-
- ub.u.show_glyphs.isClipping = isClipping;
- ub.u.show_glyphs.cg_glyphs = cg_glyphs;
-- ub.u.show_glyphs.cg_advances = cg_advances;
-+ if (CTFontDrawGlyphsPtr) {
-+ /* we're using Core Text API: the cg_advances array was
-+ reused (above) for glyph positions */
-+ CGPoint *cg_positions = (CGPoint*) cg_advances;
-+ ub.u.show_glyphs.u.cg_positions = cg_positions;
-+ } else {
-+ ub.u.show_glyphs.u.cg_advances = cg_advances;
-+ }
- ub.u.show_glyphs.nglyphs = num_glyphs;
- ub.u.show_glyphs.textTransform = textTransform;
-- ub.u.show_glyphs.font = cgfref;
-+ ub.u.show_glyphs.scaled_font = scaled_font;
- ub.u.show_glyphs.origin = CGPointMake (glyphs[0].x, glyphs[0].y);
-
- _cairo_quartz_fixup_unbounded_operation (surface, &ub, scaled_font->options.antialias);
- }
-
-
- if (cg_advances != &cg_advances_static[0]) {
- free (cg_advances);
diff --git a/gfx/cairo/quartz-surface-mask-patch b/gfx/cairo/quartz-surface-mask-patch
deleted file mode 100644
index d5ee7d8be..000000000
--- a/gfx/cairo/quartz-surface-mask-patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
-@@ -128,20 +128,22 @@ CG_EXTERN CGImageRef CGBitmapContextCrea
- */
- static void (*CGContextClipToMaskPtr) (CGContextRef, CGRect, CGImageRef) = NULL;
- static void (*CGContextDrawTiledImagePtr) (CGContextRef, CGRect, CGImageRef) = NULL;
- static unsigned int (*CGContextGetTypePtr) (CGContextRef) = NULL;
- static void (*CGContextSetShouldAntialiasFontsPtr) (CGContextRef, bool) = NULL;
- static void (*CGContextSetAllowsFontSmoothingPtr) (CGContextRef, bool) = NULL;
- static bool (*CGContextGetAllowsFontSmoothingPtr) (CGContextRef) = NULL;
- static CGPathRef (*CGContextCopyPathPtr) (CGContextRef) = NULL;
- static CGFloat (*CGContextGetAlphaPtr) (CGContextRef) = NULL;
-
-+static SInt32 _cairo_quartz_osx_version = 0x0;
-+
- static cairo_bool_t _cairo_quartz_symbol_lookup_done = FALSE;
-
- /*
- * Utility functions
- */
-
- #ifdef QUARTZ_DEBUG
- static void quartz_surface_to_png (cairo_quartz_surface_t *nq, char *dest);
- static void quartz_image_to_png (CGImageRef, char *dest);
- #endif
-@@ -163,20 +165,25 @@ static void quartz_ensure_symbols(void)
-
- CGContextClipToMaskPtr = dlsym(RTLD_DEFAULT, "CGContextClipToMask");
- CGContextDrawTiledImagePtr = dlsym(RTLD_DEFAULT, "CGContextDrawTiledImage");
- CGContextGetTypePtr = dlsym(RTLD_DEFAULT, "CGContextGetType");
- CGContextSetShouldAntialiasFontsPtr = dlsym(RTLD_DEFAULT, "CGContextSetShouldAntialiasFonts");
- CGContextCopyPathPtr = dlsym(RTLD_DEFAULT, "CGContextCopyPath");
- CGContextGetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextGetAllowsFontSmoothing");
- CGContextSetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextSetAllowsFontSmoothing");
- CGContextGetAlphaPtr = dlsym(RTLD_DEFAULT, "CGContextGetAlpha");
-
-+ if (Gestalt(gestaltSystemVersion, &_cairo_quartz_osx_version) != noErr) {
-+ // assume 10.5
-+ _cairo_quartz_osx_version = 0x1050;
-+ }
-+
- _cairo_quartz_symbol_lookup_done = TRUE;
- }
-
- CGImageRef
- _cairo_quartz_create_cgimage (cairo_format_t format,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- void *data,
- cairo_bool_t interpolate,
-@@ -3028,22 +3035,25 @@ static cairo_int_status_t
- CGContextSetAlpha (surface->cgContext, solid_mask->color.alpha);
- rv = _cairo_quartz_surface_paint_cg (surface, op, source, clip);
- CGContextSetAlpha (surface->cgContext, 1.0);
-
- return rv;
- }
-
- /* If we have CGContextClipToMask, we can do more complex masks */
- if (CGContextClipToMaskPtr) {
- /* For these, we can skip creating a temporary surface, since we already have one */
-- if (mask->type == CAIRO_PATTERN_TYPE_SURFACE && mask->extend == CAIRO_EXTEND_NONE)
-+ /* For some reason this doesn't work reliably on OS X 10.5. See bug 721663. */
-+ if (_cairo_quartz_osx_version >= 0x1060 && mask->type == CAIRO_PATTERN_TYPE_SURFACE &&
-+ mask->extend == CAIRO_EXTEND_NONE) {
- return _cairo_quartz_surface_mask_with_surface (surface, op, source, (cairo_surface_pattern_t *) mask, clip);
-+ }
-
- return _cairo_quartz_surface_mask_with_generic (surface, op, source, mask, clip);
- }
-
- /* So, CGContextClipToMask is not present in 10.3.9, so we're
- * doomed; if we have imageData, we can do fallback, otherwise
- * just pretend success.
- */
- if (surface->imageData)
- return CAIRO_INT_STATUS_UNSUPPORTED;
diff --git a/gfx/cairo/setlcdfilter_in_tree.patch b/gfx/cairo/setlcdfilter_in_tree.patch
deleted file mode 100644
index 5a9470cc2..000000000
--- a/gfx/cairo/setlcdfilter_in_tree.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c
---- a/gfx/cairo/cairo/src/cairo-ft-font.c
-+++ b/gfx/cairo/cairo/src/cairo-ft-font.c
-@@ -1361,21 +1361,25 @@ static cairo_status_t
- case FT_RENDER_MODE_MONO:
- case FT_RENDER_MODE_LIGHT:
- case FT_RENDER_MODE_NORMAL:
- case FT_RENDER_MODE_MAX:
- default:
- break;
- }
-
- if (!initialized_setLcdFilter) {
- initialized_setLcdFilter = 1;
-+#ifdef HAVE_FT_LIBRARY_SETLCDFILTER
-+ setLcdFilter = &FT_Library_SetLcdFilter;
-+#else
- setLcdFilter = (setLcdFilterFunc) dlsym(RTLD_DEFAULT, "FT_Library_SetLcdFilter");
-+#endif
- }
-
- if (setLcdFilter)
- setLcdFilter (library, lcd_filter);
-
- fterror = FT_Render_Glyph (face->glyph, render_mode);
-
- if (setLcdFilter)
- setLcdFilter (library, FT_LCD_FILTER_NONE);
-
-
diff --git a/gfx/cairo/support-new-style-atomic-primitives.patch b/gfx/cairo/support-new-style-atomic-primitives.patch
deleted file mode 100644
index 1830a4691..000000000
--- a/gfx/cairo/support-new-style-atomic-primitives.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 5d150ee111c222f09e78f4f88540964476327844 Mon Sep 17 00:00:00 2001
-From: Nathan Froyd <froydnj@mozilla.com>
-Date: Mon, 4 May 2015 13:38:41 -0400
-Subject: Support new-style __atomic_* primitives
-
-Recent versions of GCC/clang feature a new set of compiler intrinsics
-for performing atomic operations, motivated by the operations needed to
-support the C++11 memory model. These intrinsics are more flexible than
-the old __sync_* intrinstics and offer efficient support for atomic load
-and store operations.
-
-Having the load appear atomic to the compiler is particular important
-for tools like ThreadSanitizer so they don't report false positives on
-memory operations that we intend to be atomic.
-
-Patch from Nathan Froyd <froydnj@mozilla.com>
-
-diff --git a/src/cairo-atomic-private.h b/src/cairo-atomic-private.h
-index 327fed1..11b2887 100644
---- a/src/cairo-atomic-private.h
-+++ b/src/cairo-atomic-private.h
-@@ -53,6 +53,96 @@
-
- CAIRO_BEGIN_DECLS
-
-+/* C++11 atomic primitives were designed to be more flexible than the
-+ * __sync_* family of primitives. Despite the name, they are available
-+ * in C as well as C++. The motivating reason for using them is that
-+ * for _cairo_atomic_{int,ptr}_get, the compiler is able to see that
-+ * the load is intended to be atomic, as opposed to the __sync_*
-+ * version, below, where the load looks like a plain load. Having
-+ * the load appear atomic to the compiler is particular important for
-+ * tools like ThreadSanitizer so they don't report false positives on
-+ * memory operations that we intend to be atomic.
-+ */
-+#if HAVE_CXX11_ATOMIC_PRIMITIVES
-+
-+#define HAS_ATOMIC_OPS 1
-+
-+typedef int cairo_atomic_int_t;
-+
-+static cairo_always_inline cairo_atomic_int_t
-+_cairo_atomic_int_get (cairo_atomic_int_t *x)
-+{
-+ return __atomic_load_n(x, __ATOMIC_SEQ_CST);
-+}
-+
-+static cairo_always_inline void *
-+_cairo_atomic_ptr_get (void **x)
-+{
-+ return __atomic_load_n(x, __ATOMIC_SEQ_CST);
-+}
-+
-+# define _cairo_atomic_int_inc(x) ((void) __atomic_fetch_add(x, 1, __ATOMIC_SEQ_CST))
-+# define _cairo_atomic_int_dec(x) ((void) __atomic_fetch_sub(x, 1, __ATOMIC_SEQ_CST))
-+# define _cairo_atomic_int_dec_and_test(x) (__atomic_fetch_sub(x, 1, __ATOMIC_SEQ_CST) == 1)
-+
-+#if SIZEOF_VOID_P==SIZEOF_INT
-+typedef int cairo_atomic_intptr_t;
-+#elif SIZEOF_VOID_P==SIZEOF_LONG
-+typedef long cairo_atomic_intptr_t;
-+#elif SIZEOF_VOID_P==SIZEOF_LONG_LONG
-+typedef long long cairo_atomic_intptr_t;
-+#else
-+#error No matching integer pointer type
-+#endif
-+
-+static cairo_always_inline cairo_bool_t
-+_cairo_atomic_int_cmpxchg_impl(cairo_atomic_int_t *x,
-+ cairo_atomic_int_t oldv,
-+ cairo_atomic_int_t newv)
-+{
-+ cairo_atomic_int_t expected = oldv;
-+ return __atomic_compare_exchange_n(x, &expected, newv, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+}
-+
-+#define _cairo_atomic_int_cmpxchg(x, oldv, newv) \
-+ _cairo_atomic_int_cmpxchg_impl(x, oldv, newv)
-+
-+static cairo_always_inline cairo_atomic_int_t
-+_cairo_atomic_int_cmpxchg_return_old_impl(cairo_atomic_int_t *x,
-+ cairo_atomic_int_t oldv,
-+ cairo_atomic_int_t newv)
-+{
-+ cairo_atomic_int_t expected = oldv;
-+ (void) __atomic_compare_exchange_n(x, &expected, newv, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return expected;
-+}
-+
-+#define _cairo_atomic_int_cmpxchg_return_old(x, oldv, newv) \
-+ _cairo_atomic_int_cmpxchg_return_old_impl(x, oldv, newv)
-+
-+static cairo_always_inline cairo_bool_t
-+_cairo_atomic_ptr_cmpxchg_impl(void **x, void *oldv, void *newv)
-+{
-+ void *expected = oldv;
-+ return __atomic_compare_exchange_n(x, &expected, newv, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+}
-+
-+#define _cairo_atomic_ptr_cmpxchg(x, oldv, newv) \
-+ _cairo_atomic_ptr_cmpxchg_impl(x, oldv, newv)
-+
-+static cairo_always_inline void *
-+_cairo_atomic_ptr_cmpxchg_return_old_impl(void **x, void *oldv, void *newv)
-+{
-+ void *expected = oldv;
-+ (void) __atomic_compare_exchange_n(x, &expected, newv, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return expected;
-+}
-+
-+#define _cairo_atomic_ptr_cmpxchg_return_old(x, oldv, newv) \
-+ _cairo_atomic_ptr_cmpxchg_return_old_impl(x, oldv, newv)
-+
-+#endif
-+
- #if HAVE_INTEL_ATOMIC_PRIMITIVES
-
- #define HAS_ATOMIC_OPS 1
---
-cgit v0.10.2
-
diff --git a/gfx/cairo/surface-clipper.patch b/gfx/cairo/surface-clipper.patch
deleted file mode 100644
index 608841147..000000000
--- a/gfx/cairo/surface-clipper.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 061cc774a861f349334117203c301dee202f9f26
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Wed Apr 7 23:05:48 2010 -0400
-
- Remove an incorrect optimization that was causing the clip
- not to be set when it should've been.
-
- This happens when the path is equal but the parents aren't shared.
-
-diff --git a/src/cairo-surface-clipper.c b/src/cairo-surface-clipper.c
-index d536f0c..03610d1 100644
---- a/src/cairo-surface-clipper.c
-+++ b/src/cairo-surface-clipper.c
-@@ -78,12 +78,6 @@ _cairo_surface_clipper_set_clip (cairo_surface_clipper_t *clipper,
- if (clip != NULL && clip->path == clipper->clip.path)
- return CAIRO_STATUS_SUCCESS;
-
-- if (clip != NULL && clipper->clip.path != NULL &&
-- _cairo_path_fixed_equal (&clip->path->path, &clipper->clip.path->path))
-- {
-- return CAIRO_STATUS_SUCCESS;
-- }
--
- /* all clipped out state should never propagate this far */
- assert (clip == NULL || clip->path != NULL);
-
diff --git a/gfx/cairo/tee-surfaces-pointwise.patch b/gfx/cairo/tee-surfaces-pointwise.patch
deleted file mode 100644
index 180005fa6..000000000
--- a/gfx/cairo/tee-surfaces-pointwise.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1294019288 -46800
-# Node ID bacc54d452a9fddb5a0d6a1442ec7be4de81ffa7
-# Parent ccba8826be1451d0e61d0df38363dadffb20ba48
-Bug 593604. Part 2: When compositing a tee surface into another tee surface, try to compose the subsurfaces pointwise. r=jrmuizel,a=blocking
-
-diff --git a/gfx/cairo/cairo/src/cairo-tee-surface.c b/gfx/cairo/cairo/src/cairo-tee-surface.c
---- a/gfx/cairo/cairo/src/cairo-tee-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-tee-surface.c
-@@ -186,35 +186,72 @@ static void
- _cairo_tee_surface_get_font_options (void *abstract_surface,
- cairo_font_options_t *options)
- {
- cairo_tee_surface_t *surface = abstract_surface;
-
- _cairo_surface_wrapper_get_font_options (&surface->master, options);
- }
-
-+static const cairo_pattern_t *
-+_cairo_tee_surface_match_source (cairo_tee_surface_t *surface,
-+ const cairo_pattern_t *source,
-+ int index,
-+ cairo_surface_wrapper_t *dest,
-+ cairo_surface_pattern_t *temp)
-+{
-+ cairo_surface_t *s;
-+ cairo_status_t status = cairo_pattern_get_surface ((cairo_pattern_t *)source, &s);
-+ if (status == CAIRO_STATUS_SUCCESS &&
-+ cairo_surface_get_type (s) == CAIRO_SURFACE_TYPE_TEE) {
-+ cairo_surface_t *tee_surf = cairo_tee_surface_index (s, index);
-+ if (tee_surf->status == CAIRO_STATUS_SUCCESS &&
-+ tee_surf->backend == dest->target->backend) {
-+ status = _cairo_pattern_init_copy (&temp->base, source);
-+ if (status == CAIRO_STATUS_SUCCESS) {
-+ cairo_surface_destroy (temp->surface);
-+ temp->surface = tee_surf;
-+ cairo_surface_reference (temp->surface);
-+ return &temp->base;
-+ }
-+ }
-+ }
-+
-+ return source;
-+}
-+
- static cairo_int_status_t
- _cairo_tee_surface_paint (void *abstract_surface,
- cairo_operator_t op,
- const cairo_pattern_t *source,
- cairo_clip_t *clip)
- {
- cairo_tee_surface_t *surface = abstract_surface;
- cairo_surface_wrapper_t *slaves;
- int n, num_slaves;
- cairo_status_t status;
-+ const cairo_pattern_t *matched_source;
-+ cairo_surface_pattern_t temp;
-
-- status = _cairo_surface_wrapper_paint (&surface->master, op, source, clip);
-+ matched_source = _cairo_tee_surface_match_source (surface, source, 0, &surface->master, &temp);
-+ status = _cairo_surface_wrapper_paint (&surface->master, op, matched_source, clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
-
- num_slaves = _cairo_array_num_elements (&surface->slaves);
- slaves = _cairo_array_index (&surface->slaves, 0);
- for (n = 0; n < num_slaves; n++) {
-- status = _cairo_surface_wrapper_paint (&slaves[n], op, source, clip);
-+ matched_source = _cairo_tee_surface_match_source (surface, source, n + 1, &slaves[n], &temp);
-+ status = _cairo_surface_wrapper_paint (&slaves[n], op, matched_source, clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
- }
-
- return CAIRO_STATUS_SUCCESS;
- }
-
- static cairo_int_status_t
-@@ -223,27 +260,37 @@ _cairo_tee_surface_mask (void *abstrac
- const cairo_pattern_t *source,
- const cairo_pattern_t *mask,
- cairo_clip_t *clip)
- {
- cairo_tee_surface_t *surface = abstract_surface;
- cairo_surface_wrapper_t *slaves;
- int n, num_slaves;
- cairo_status_t status;
-+ const cairo_pattern_t *matched_source;
-+ cairo_surface_pattern_t temp;
-
-+ matched_source = _cairo_tee_surface_match_source (surface, source, 0, &surface->master, &temp);
- status = _cairo_surface_wrapper_mask (&surface->master,
-- op, source, mask, clip);
-+ op, matched_source, mask, clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
-
- num_slaves = _cairo_array_num_elements (&surface->slaves);
- slaves = _cairo_array_index (&surface->slaves, 0);
- for (n = 0; n < num_slaves; n++) {
-+ matched_source = _cairo_tee_surface_match_source (surface, source, n + 1, &slaves[n], &temp);
- status = _cairo_surface_wrapper_mask (&slaves[n],
-- op, source, mask, clip);
-+ op, matched_source, mask, clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
- }
-
- return CAIRO_STATUS_SUCCESS;
- }
-
- static cairo_int_status_t
-@@ -257,35 +304,45 @@ _cairo_tee_surface_stroke (void *abst
- double tolerance,
- cairo_antialias_t antialias,
- cairo_clip_t *clip)
- {
- cairo_tee_surface_t *surface = abstract_surface;
- cairo_surface_wrapper_t *slaves;
- int n, num_slaves;
- cairo_status_t status;
-+ const cairo_pattern_t *matched_source;
-+ cairo_surface_pattern_t temp;
-
-+ matched_source = _cairo_tee_surface_match_source (surface, source, 0, &surface->master, &temp);
- status = _cairo_surface_wrapper_stroke (&surface->master,
-- op, source,
-+ op, matched_source,
- path, style,
- ctm, ctm_inverse,
- tolerance, antialias,
- clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
-
- num_slaves = _cairo_array_num_elements (&surface->slaves);
- slaves = _cairo_array_index (&surface->slaves, 0);
- for (n = 0; n < num_slaves; n++) {
-+ matched_source = _cairo_tee_surface_match_source (surface, source, n + 1, &slaves[n], &temp);
- status = _cairo_surface_wrapper_stroke (&slaves[n],
-- op, source,
-+ op, matched_source,
- path, style,
- ctm, ctm_inverse,
- tolerance, antialias,
- clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
- }
-
- return CAIRO_STATUS_SUCCESS;
- }
-
- static cairo_int_status_t
-@@ -297,33 +354,43 @@ _cairo_tee_surface_fill (void *abstra
- double tolerance,
- cairo_antialias_t antialias,
- cairo_clip_t *clip)
- {
- cairo_tee_surface_t *surface = abstract_surface;
- cairo_surface_wrapper_t *slaves;
- int n, num_slaves;
- cairo_status_t status;
-+ const cairo_pattern_t *matched_source;
-+ cairo_surface_pattern_t temp;
-
-+ matched_source = _cairo_tee_surface_match_source (surface, source, 0, &surface->master, &temp);
- status = _cairo_surface_wrapper_fill (&surface->master,
-- op, source,
-+ op, matched_source,
- path, fill_rule,
- tolerance, antialias,
- clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
-
- num_slaves = _cairo_array_num_elements (&surface->slaves);
- slaves = _cairo_array_index (&surface->slaves, 0);
- for (n = 0; n < num_slaves; n++) {
-+ matched_source = _cairo_tee_surface_match_source (surface, source, n + 1, &slaves[n], &temp);
- status = _cairo_surface_wrapper_fill (&slaves[n],
-- op, source,
-+ op, matched_source,
- path, fill_rule,
- tolerance, antialias,
- clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- return status;
- }
-
- return CAIRO_STATUS_SUCCESS;
- }
-
- static cairo_bool_t
-@@ -346,46 +413,56 @@ _cairo_tee_surface_show_text_glyphs (voi
- cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip)
- {
- cairo_tee_surface_t *surface = abstract_surface;
- cairo_surface_wrapper_t *slaves;
- int n, num_slaves;
- cairo_status_t status;
- cairo_glyph_t *glyphs_copy;
-+ const cairo_pattern_t *matched_source;
-+ cairo_surface_pattern_t temp;
-
- /* XXX: This copying is ugly. */
- glyphs_copy = _cairo_malloc_ab (num_glyphs, sizeof (cairo_glyph_t));
- if (unlikely (glyphs_copy == NULL))
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
- memcpy (glyphs_copy, glyphs, sizeof (cairo_glyph_t) * num_glyphs);
-+ matched_source = _cairo_tee_surface_match_source (surface, source, 0, &surface->master, &temp);
- status = _cairo_surface_wrapper_show_text_glyphs (&surface->master, op,
-- source,
-+ matched_source,
- utf8, utf8_len,
- glyphs_copy, num_glyphs,
- clusters, num_clusters,
- cluster_flags,
- scaled_font,
- clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- goto CLEANUP;
-
- num_slaves = _cairo_array_num_elements (&surface->slaves);
- slaves = _cairo_array_index (&surface->slaves, 0);
- for (n = 0; n < num_slaves; n++) {
- memcpy (glyphs_copy, glyphs, sizeof (cairo_glyph_t) * num_glyphs);
-+ matched_source = _cairo_tee_surface_match_source (surface, source, n + 1, &slaves[n], &temp);
- status = _cairo_surface_wrapper_show_text_glyphs (&slaves[n], op,
-- source,
-+ matched_source,
- utf8, utf8_len,
- glyphs_copy, num_glyphs,
- clusters, num_clusters,
- cluster_flags,
- scaled_font,
- clip);
-+ if (matched_source == &temp.base) {
-+ _cairo_pattern_fini (&temp.base);
-+ }
- if (unlikely (status))
- goto CLEANUP;
- }
-
- CLEANUP:
- free (glyphs_copy);
- return status;
- }
diff --git a/gfx/cairo/text-path-filling-threshold.patch b/gfx/cairo/text-path-filling-threshold.patch
deleted file mode 100644
index 69efce093..000000000
--- a/gfx/cairo/text-path-filling-threshold.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
---- a/gfx/cairo/cairo/src/cairo-gstate.c
-+++ b/gfx/cairo/cairo/src/cairo-gstate.c
-@@ -1673,26 +1673,31 @@ _cairo_gstate_show_text_glyphs (cairo_gs
-
- source_pattern = &source_pattern_stack.base;
- status = _cairo_gstate_copy_transformed_source (gstate, &source_pattern);
- if (unlikely (status))
- goto CLEANUP_GLYPHS;
-
- /* For really huge font sizes, we can just do path;fill instead of
- * show_glyphs, as show_glyphs would put excess pressure on the cache,
-- * and moreover, not all components below us correctly handle huge font
-- * sizes. I wanted to set the limit at 256. But alas, seems like cairo's
-+ * not all components below us correctly handle huge font sizes, and
-+ * path filling can be cheaper since parts of glyphs are likely to be
-+ * clipped out. 256 seems like a good limit. But alas, seems like cairo's
- * rasterizer is something like ten times slower than freetype's for huge
-- * sizes. So, no win just yet. For now, do it for insanely-huge sizes,
-- * just to make sure we don't make anyone unhappy. When we get a really
-- * fast rasterizer in cairo, we may want to readjust this.
-+ * sizes. So, no win just yet when we're using cairo's rasterizer.
-+ * For now, if we're using cairo's rasterizer, use path filling only
-+ * for insanely-huge sizes, just to make sure we don't make anyone
-+ * unhappy. When we get a really fast rasterizer in cairo, we may
-+ * want to readjust this. The threshold calculation is
-+ * encapsulated in _cairo_surface_get_text_path_fill_threshold.
- *
- * Needless to say, do this only if show_text_glyphs is not available. */
- if (cairo_surface_has_show_text_glyphs (gstate->target) ||
-- _cairo_scaled_font_get_max_scale (gstate->scaled_font) <= 10240) {
-+ _cairo_scaled_font_get_max_scale (gstate->scaled_font) <=
-+ _cairo_surface_get_text_path_fill_threshold (gstate->target)) {
- status = _cairo_surface_show_text_glyphs (gstate->target,
- gstate->op,
- source_pattern,
- utf8, utf8_len,
- transformed_glyphs, num_glyphs,
- transformed_clusters, num_clusters,
- cluster_flags,
- gstate->scaled_font, NULL);
-diff --git a/gfx/cairo/cairo/src/cairo-surface.c b/gfx/cairo/cairo/src/cairo-surface.c
---- a/gfx/cairo/cairo/src/cairo-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-surface.c
-@@ -1120,16 +1120,22 @@ cairo_surface_get_fallback_resolution (c
- double *y_pixels_per_inch)
- {
- if (x_pixels_per_inch)
- *x_pixels_per_inch = surface->x_fallback_resolution;
- if (y_pixels_per_inch)
- *y_pixels_per_inch = surface->y_fallback_resolution;
- }
-
-+int
-+_cairo_surface_get_text_path_fill_threshold (const cairo_surface_t *surface)
-+{
-+ return surface->backend->fill == NULL ? 10240 : 256;
-+}
-+
- cairo_bool_t
- _cairo_surface_has_device_transform (cairo_surface_t *surface)
- {
- return ! _cairo_matrix_is_identity (&surface->device_transform);
- }
-
- /**
- * _cairo_surface_acquire_source_image:
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -2065,16 +2065,19 @@ _cairo_surface_composite_shape_fixup_unb
- int dst_x,
- int dst_y,
- unsigned int width,
- unsigned int height);
-
- cairo_private cairo_bool_t
- _cairo_surface_is_opaque (const cairo_surface_t *surface);
-
-+cairo_private int
-+_cairo_surface_get_text_path_fill_threshold (const cairo_surface_t *surface);
-+
- 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);
-
diff --git a/gfx/cairo/unicode-printing.patch b/gfx/cairo/unicode-printing.patch
deleted file mode 100644
index 09b3991ea..000000000
--- a/gfx/cairo/unicode-printing.patch
+++ /dev/null
@@ -1,333 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-@@ -1426,16 +1426,104 @@ _cairo_win32_printing_surface_fill (void
- }
-
- fflush(stderr);
-
- return status;
- }
-
- static cairo_int_status_t
-+_cairo_win32_printing_surface_emit_win32_glyphs (cairo_win32_surface_t *surface,
-+ cairo_operator_t op,
-+ const cairo_pattern_t *source,
-+ cairo_glyph_t *glyphs,
-+ int num_glyphs,
-+ cairo_scaled_font_t *scaled_font,
-+ cairo_clip_t *clip,
-+ int *remaining_glyphs)
-+{
-+ cairo_matrix_t ctm;
-+ cairo_glyph_t *unicode_glyphs;
-+ cairo_scaled_font_subsets_glyph_t subset_glyph;
-+ int i, first;
-+ cairo_bool_t sequence_is_unicode;
-+ cairo_status_t status = CAIRO_STATUS_SUCCESS;
-+
-+ /* Where possible reverse the glyph indices back to unicode
-+ * characters. Strings of glyphs that could not be reversed to
-+ * unicode will be printed with ETO_GLYPH_INDEX.
-+ *
-+ * As _cairo_win32_scaled_font_index_to_ucs4() is a slow
-+ * operation, the font subsetting function
-+ * _cairo_scaled_font_subsets_map_glyph() is used to obtain
-+ * the unicode value because it caches the reverse mapping in
-+ * the subsets.
-+ */
-+
-+ if (surface->has_ctm) {
-+ for (i = 0; i < num_glyphs; i++)
-+ cairo_matrix_transform_point (&surface->ctm, &glyphs[i].x, &glyphs[i].y);
-+ cairo_matrix_multiply (&ctm, &scaled_font->ctm, &surface->ctm);
-+ scaled_font = cairo_scaled_font_create (scaled_font->font_face,
-+ &scaled_font->font_matrix,
-+ &ctm,
-+ &scaled_font->options);
-+ }
-+
-+ unicode_glyphs = _cairo_malloc_ab (num_glyphs, sizeof (cairo_glyph_t));
-+ if (unicode_glyphs == NULL)
-+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-+
-+ memcpy (unicode_glyphs, glyphs, num_glyphs * sizeof (cairo_glyph_t));
-+ for (i = 0; i < num_glyphs; i++) {
-+ status = _cairo_scaled_font_subsets_map_glyph (surface->font_subsets,
-+ scaled_font,
-+ glyphs[i].index,
-+ NULL, 0,
-+ &subset_glyph);
-+ if (status)
-+ goto fail;
-+
-+ unicode_glyphs[i].index = subset_glyph.unicode;
-+ }
-+
-+ i = 0;
-+ first = 0;
-+ sequence_is_unicode = unicode_glyphs[0].index <= 0xffff;
-+ while (i < num_glyphs) {
-+ if (i == num_glyphs - 1 ||
-+ ((unicode_glyphs[i + 1].index < 0xffff) != sequence_is_unicode))
-+ {
-+ status = _cairo_win32_surface_show_glyphs_internal (
-+ surface,
-+ op,
-+ source,
-+ sequence_is_unicode ? &unicode_glyphs[first] : &glyphs[first],
-+ i - first + 1,
-+ scaled_font,
-+ clip,
-+ remaining_glyphs,
-+ ! sequence_is_unicode);
-+ first = i + 1;
-+ if (i < num_glyphs - 1)
-+ sequence_is_unicode = unicode_glyphs[i + 1].index <= 0xffff;
-+ }
-+ i++;
-+ }
-+
-+fail:
-+ if (surface->has_ctm)
-+ cairo_scaled_font_destroy (scaled_font);
-+
-+ free (unicode_glyphs);
-+
-+ return status;
-+}
-+
-+static cairo_int_status_t
- _cairo_win32_printing_surface_show_glyphs (void *abstract_surface,
- cairo_operator_t op,
- const cairo_pattern_t *source,
- cairo_glyph_t *glyphs,
- int num_glyphs,
- cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
- int *remaining_glyphs)
-@@ -1533,77 +1621,24 @@ _cairo_win32_printing_surface_show_glyph
- }
- }
- #endif
-
- #if CAIRO_HAS_WIN32_FONT
- if (cairo_scaled_font_get_type (scaled_font) == CAIRO_FONT_TYPE_WIN32 &&
- source->type == CAIRO_PATTERN_TYPE_SOLID)
- {
-- cairo_matrix_t ctm;
-- cairo_glyph_t *type1_glyphs = NULL;
-- cairo_scaled_font_subsets_glyph_t subset_glyph;
--
-- /* Calling ExtTextOutW() with ETO_GLYPH_INDEX and a Type 1
-- * font on a printer DC prints garbled text. The text displays
-- * correctly on a display DC. When using a printer
-- * DC, ExtTextOutW() only works with characters and not glyph
-- * indices.
-- *
-- * For Type 1 fonts the glyph indices are converted back to
-- * unicode characters before calling _cairo_win32_surface_show_glyphs().
-- *
-- * As _cairo_win32_scaled_font_index_to_ucs4() is a slow
-- * operation, the font subsetting function
-- * _cairo_scaled_font_subsets_map_glyph() is used to obtain
-- * the unicode value because it caches the reverse mapping in
-- * the subsets.
-- */
-- if (_cairo_win32_scaled_font_is_type1 (scaled_font)) {
-- type1_glyphs = _cairo_malloc_ab (num_glyphs, sizeof (cairo_glyph_t));
-- if (type1_glyphs == NULL) {
-- status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
-- goto FINISH;
-- }
-- memcpy (type1_glyphs, glyphs, num_glyphs * sizeof (cairo_glyph_t));
-- for (i = 0; i < num_glyphs; i++) {
-- status = _cairo_scaled_font_subsets_map_glyph (surface->font_subsets,
-- scaled_font,
-- type1_glyphs[i].index,
-- NULL, 0,
-- &subset_glyph);
-- if (status)
-- goto FINISH;
--
-- type1_glyphs[i].index = subset_glyph.unicode;
-- }
-- glyphs = type1_glyphs;
-- }
--
-- if (surface->has_ctm || surface->has_gdi_ctm) {
-- cairo_matrix_multiply (&ctm, &surface->ctm, &surface->gdi_ctm);
-- for (i = 0; i < num_glyphs; i++)
-- cairo_matrix_transform_point (&ctm, &glyphs[i].x, &glyphs[i].y);
-- cairo_matrix_multiply (&ctm, &scaled_font->ctm, &ctm);
-- scaled_font = cairo_scaled_font_create (scaled_font->font_face,
-- &scaled_font->font_matrix,
-- &ctm,
-- &scaled_font->options);
-- }
-- status = _cairo_win32_surface_show_glyphs (surface, op,
-- source, glyphs,
-- num_glyphs, scaled_font,
-- clip,
-- remaining_glyphs);
-- if (surface->has_ctm || surface->has_gdi_ctm)
-- cairo_scaled_font_destroy (scaled_font);
--
-- if (type1_glyphs != NULL)
-- free (type1_glyphs);
--
-+ status = _cairo_win32_printing_surface_emit_win32_glyphs (surface,
-+ op,
-+ source,
-+ glyphs,
-+ num_glyphs,
-+ scaled_font,
-+ clip,
-+ remaining_glyphs);
- goto FINISH;
- }
- #endif
-
- SaveDC (surface->dc);
- old_ctm = surface->ctm;
- old_has_ctm = surface->has_ctm;
- surface->has_ctm = TRUE;
-diff --git a/gfx/cairo/cairo/src/cairo-win32-private.h b/gfx/cairo/cairo/src/cairo-win32-private.h
---- a/gfx/cairo/cairo/src/cairo-win32-private.h
-+++ b/gfx/cairo/cairo/src/cairo-win32-private.h
-@@ -157,16 +157,27 @@ _cairo_win32_surface_get_extents (void
- uint32_t
- _cairo_win32_flags_for_dc (HDC dc);
-
- cairo_status_t
- _cairo_win32_surface_set_clip_region (void *abstract_surface,
- cairo_region_t *region);
-
- cairo_int_status_t
-+_cairo_win32_surface_show_glyphs_internal (void *surface,
-+ cairo_operator_t op,
-+ const cairo_pattern_t *source,
-+ cairo_glyph_t *glyphs,
-+ int num_glyphs,
-+ cairo_scaled_font_t *scaled_font,
-+ cairo_clip_t *clip,
-+ int *remaining_glyphs,
-+ cairo_bool_t glyph_indices);
-+
-+cairo_int_status_t
- _cairo_win32_surface_show_glyphs (void *surface,
- cairo_operator_t op,
- const cairo_pattern_t *source,
- cairo_glyph_t *glyphs,
- int num_glyphs,
- cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
- int *remaining_glyphs);
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -1607,24 +1607,25 @@ static cairo_status_t
- _cairo_win32_surface_flush (void *abstract_surface)
- {
- return _cairo_win32_surface_set_clip_region (abstract_surface, NULL);
- }
-
- #define STACK_GLYPH_SIZE 256
-
- cairo_int_status_t
--_cairo_win32_surface_show_glyphs (void *surface,
-- cairo_operator_t op,
-- const cairo_pattern_t *source,
-- cairo_glyph_t *glyphs,
-- int num_glyphs,
-- cairo_scaled_font_t *scaled_font,
-- cairo_clip_t *clip,
-- int *remaining_glyphs)
-+_cairo_win32_surface_show_glyphs_internal (void *surface,
-+ cairo_operator_t op,
-+ const cairo_pattern_t *source,
-+ cairo_glyph_t *glyphs,
-+ int num_glyphs,
-+ cairo_scaled_font_t *scaled_font,
-+ cairo_clip_t *clip,
-+ int *remaining_glyphs,
-+ cairo_bool_t glyph_indexing)
- {
- #ifdef CAIRO_HAS_WIN32_FONT
- if (scaled_font->backend->type == CAIRO_FONT_TYPE_DWRITE) {
- #ifdef CAIRO_HAS_DWRITE_FONT
- return _cairo_dwrite_show_glyphs_on_surface(surface, op, source, glyphs, num_glyphs, scaled_font, clip);
- #endif
- } else {
- cairo_win32_surface_t *dst = surface;
-@@ -1737,29 +1738,20 @@ _cairo_win32_surface_show_glyphs (void
- dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
- /* note that GDI coordinate system is inverted */
-
- logical_x = next_logical_x;
- logical_y = next_logical_y;
- }
- }
-
-- /* Using glyph indices for a Type 1 font does not work on a
-- * printer DC. The win32 printing surface will convert the the
-- * glyph indices of Type 1 fonts to the unicode values.
-- */
-- if ((dst->flags & CAIRO_WIN32_SURFACE_FOR_PRINTING) &&
-- _cairo_win32_scaled_font_is_type1 (scaled_font))
-- {
-+ if (glyph_indexing)
-+ glyph_index_option = ETO_GLYPH_INDEX;
-+ else
- glyph_index_option = 0;
-- }
-- else
-- {
-- glyph_index_option = ETO_GLYPH_INDEX;
-- }
-
- win_result = ExtTextOutW(dst->dc,
- start_x,
- start_y,
- glyph_index_option | ETO_PDY,
- NULL,
- glyph_buf,
- num_glyphs,
-@@ -1778,16 +1770,37 @@ _cairo_win32_surface_show_glyphs (void
- }
- #else
- return CAIRO_INT_STATUS_UNSUPPORTED;
- #endif
- }
-
- #undef STACK_GLYPH_SIZE
-
-+cairo_int_status_t
-+_cairo_win32_surface_show_glyphs (void *surface,
-+ cairo_operator_t op,
-+ const cairo_pattern_t *source,
-+ cairo_glyph_t *glyphs,
-+ int num_glyphs,
-+ cairo_scaled_font_t *scaled_font,
-+ cairo_clip_t *clip,
-+ int *remaining_glyphs)
-+{
-+ return _cairo_win32_surface_show_glyphs_internal (surface,
-+ op,
-+ source,
-+ glyphs,
-+ num_glyphs,
-+ scaled_font,
-+ clip,
-+ remaining_glyphs,
-+ TRUE);
-+}
-+
- static cairo_surface_t *
- cairo_win32_surface_create_internal (HDC hdc, cairo_format_t format)
- {
- cairo_win32_surface_t *surface;
-
- RECT rect;
-
- surface = malloc (sizeof (cairo_win32_surface_t));
diff --git a/gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch b/gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch
deleted file mode 100644
index 1670eaf73..000000000
--- a/gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From: Jonathan Kew <jkew@mozilla.com>
-bug 715798 pt 2 - fall back to show_text_glyphs even at huge sizes if scaled_font_glyph_path didn't work. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
---- a/gfx/cairo/cairo/src/cairo-gstate.c
-+++ b/gfx/cairo/cairo/src/cairo-gstate.c
-@@ -2002,23 +2002,34 @@ cairo_status_t
- cairo_path_fixed_t path;
-
- _cairo_path_fixed_init (&path);
-
- status = _cairo_scaled_font_glyph_path (gstate->scaled_font,
- transformed_glyphs, num_glyphs,
- &path);
-
-- if (status == CAIRO_STATUS_SUCCESS) {
-+ if (status == CAIRO_STATUS_SUCCESS && !_cairo_path_fixed_fill_is_empty (&path)) {
- status = _cairo_surface_fill (gstate->target, op, pattern,
- &path,
- CAIRO_FILL_RULE_WINDING,
- gstate->tolerance,
- gstate->scaled_font->options.antialias,
- _gstate_get_clip (gstate, &clip));
-+ } else {
-+ /* if _cairo_scaled_font_glyph_path() failed, maybe the font doesn't support
-+ * returning paths, so try the _cairo_surface_show_text_glyphs() option
-+ */
-+ status = _cairo_surface_show_text_glyphs (gstate->target, op, pattern,
-+ utf8, utf8_len,
-+ transformed_glyphs, num_glyphs,
-+ transformed_clusters, num_clusters,
-+ cluster_flags,
-+ gstate->scaled_font,
-+ _gstate_get_clip (gstate, &clip));
- }
-
- _cairo_path_fixed_fini (&path);
- }
-
- _cairo_clip_fini (&clip);
-
- CLEANUP_GLYPHS:
diff --git a/gfx/cairo/win32-ExtCreatePen-zero-size.patch b/gfx/cairo/win32-ExtCreatePen-zero-size.patch
deleted file mode 100644
index 3970015f7..000000000
--- a/gfx/cairo/win32-ExtCreatePen-zero-size.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From: Robert O'Callahan <robert@ocallahan.org>
-Bug 768348. Avoid ExtCreatePen failures by avoiding rounding widths and dash lengths down to zero. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-@@ -1251,22 +1251,24 @@ static cairo_int_status_t
- {
- cairo_win32_surface_t *surface = abstract_surface;
- cairo_int_status_t status;
- HPEN pen;
- LOGBRUSH brush;
- COLORREF color;
- XFORM xform;
- DWORD pen_style;
-+ DWORD pen_width;
- DWORD *dash_array;
- HGDIOBJ obj;
- unsigned int i;
- cairo_solid_pattern_t clear;
- cairo_matrix_t mat;
- double scale;
-+ double scaled_width;
-
- status = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
- if (status)
- return status;
-
- if (op == CAIRO_OPERATOR_CLEAR) {
- _cairo_win32_printing_surface_init_clear_color (surface, &clear);
- source = (cairo_pattern_t*) &clear;
-@@ -1288,17 +1290,21 @@ static cairo_int_status_t
- _cairo_matrix_factor_out_scale (&mat, &scale);
-
- pen_style = PS_GEOMETRIC;
- dash_array = NULL;
- if (style->num_dashes) {
- pen_style |= PS_USERSTYLE;
- dash_array = calloc (sizeof (DWORD), style->num_dashes);
- for (i = 0; i < style->num_dashes; i++) {
-- dash_array[i] = (DWORD) (scale * style->dash[i]);
-+ DWORD dashes = (DWORD) (scale * style->dash[i]);
-+ /* zero dash-lengths cause ExtCreatePen to fail. Make the dashes
-+ * longer if necessary.
-+ */
-+ dash_array[i] = MAX(1, dashes);
- }
- } else {
- pen_style |= PS_SOLID;
- }
-
- SetMiterLimit (surface->dc, (FLOAT) (style->miter_limit), NULL);
- if (source->type == CAIRO_PATTERN_TYPE_SOLID) {
- cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) source;
-@@ -1310,18 +1316,29 @@ static cairo_int_status_t
- /* Color not used as the pen will only be used by WidenPath() */
- color = RGB (0,0,0);
- }
- brush.lbStyle = BS_SOLID;
- brush.lbColor = color;
- brush.lbHatch = 0;
- pen_style |= _cairo_win32_line_cap (style->line_cap);
- pen_style |= _cairo_win32_line_join (style->line_join);
-+ scaled_width = scale * style->line_width;
-+ if (scaled_width == 0.0)
-+ return status;
-+ pen_width = (DWORD)scaled_width;
-+ if (pen_width == 0) {
-+ /* ExtCreatePen will fail if passed zero width. We have to choose
-+ * between drawing something too wide, or drawing nothing at all.
-+ * Let's draw something.
-+ */
-+ pen_width = 1;
-+ }
- pen = ExtCreatePen(pen_style,
-- scale * style->line_width,
-+ pen_width,
- &brush,
- style->num_dashes,
- dash_array);
- if (pen == NULL)
- return _cairo_win32_print_gdi_error ("_win32_surface_stroke:ExtCreatePen");
- obj = SelectObject (surface->dc, pen);
- if (obj == NULL)
- return _cairo_win32_print_gdi_error ("_win32_surface_stroke:SelectObject");
diff --git a/gfx/cairo/win32-avoid-extend-pad-fallback.patch b/gfx/cairo/win32-avoid-extend-pad-fallback.patch
deleted file mode 100644
index b04282ce9..000000000
--- a/gfx/cairo/win32-avoid-extend-pad-fallback.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -1114,17 +1114,17 @@ static cairo_int_status_t
- cairo_win32_surface_t *dst = abstract_dst;
- cairo_win32_surface_t *src;
- cairo_surface_pattern_t *src_surface_pattern;
- int alpha;
- double scalex, scaley;
- cairo_fixed_t x0_fixed, y0_fixed;
- cairo_int_status_t status;
-
-- cairo_bool_t needs_alpha, needs_scale, needs_repeat;
-+ cairo_bool_t needs_alpha, needs_scale, needs_repeat, needs_pad;
- cairo_image_surface_t *src_image = NULL;
-
- cairo_format_t src_format;
- cairo_rectangle_int_t src_extents;
-
- cairo_rectangle_int_t src_r = { src_x, src_y, width, height };
- cairo_rectangle_int_t dst_r = { dst_x, dst_y, width, height };
-
-@@ -1145,17 +1145,18 @@ static cairo_int_status_t
- {
- goto UNSUPPORTED;
- }
-
- if (pattern->type != CAIRO_PATTERN_TYPE_SURFACE)
- goto UNSUPPORTED;
-
- if (pattern->extend != CAIRO_EXTEND_NONE &&
-- pattern->extend != CAIRO_EXTEND_REPEAT)
-+ pattern->extend != CAIRO_EXTEND_REPEAT &&
-+ pattern->extend != CAIRO_EXTEND_PAD)
- goto UNSUPPORTED;
-
- if (mask_pattern) {
- /* FIXME: When we fully support RENDER style 4-channel
- * masks we need to check r/g/b != 1.0.
- */
- if (mask_pattern->type != CAIRO_PATTERN_TYPE_SOLID)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-@@ -1252,16 +1253,17 @@ static cairo_int_status_t
-
- /* If the src rectangle doesn't wholly lie within the src extents,
- * fudge things. We really need to do fixup on the unpainted
- * region -- e.g. the SOURCE operator is broken for areas outside
- * of the extents, because it won't clear that area to transparent
- * black.
- */
-
-+ needs_pad = FALSE;
- if (pattern->extend != CAIRO_EXTEND_REPEAT) {
- needs_repeat = FALSE;
-
- /* If the src rect and the extents of the source image don't overlap at all,
- * we can't do anything useful here.
- */
- if (src_r.x > src_extents.width || src_r.y > src_extents.height ||
- (src_r.x + src_r.width) < 0 || (src_r.y + src_r.height) < 0)
-@@ -1273,40 +1275,48 @@ static cairo_int_status_t
-
- if (src_r.x < 0) {
- src_r.width += src_r.x;
-
- dst_r.width += src_r.x;
- dst_r.x -= src_r.x;
-
- src_r.x = 0;
-+ needs_pad = TRUE;
- }
-
- if (src_r.y < 0) {
- src_r.height += src_r.y;
-
- dst_r.height += src_r.y;
- dst_r.y -= src_r.y;
-
- src_r.y = 0;
-+ needs_pad = TRUE;
- }
-
- if (src_r.x + src_r.width > src_extents.width) {
- src_r.width = src_extents.width - src_r.x;
- dst_r.width = src_r.width;
-+ needs_pad = TRUE;
- }
-
- if (src_r.y + src_r.height > src_extents.height) {
- src_r.height = src_extents.height - src_r.y;
- dst_r.height = src_r.height;
-+ needs_pad = TRUE;
- }
- } else {
- needs_repeat = TRUE;
- }
-
-+ if (pattern->extend == CAIRO_EXTEND_PAD && needs_pad) {
-+ goto UNSUPPORTED;
-+ }
-+
- /*
- * Operations that we can do:
- *
- * AlphaBlend uses the following formula for alpha when not use the per-pixel alpha (AlphaFormat = 0)
- * Dst.Alpha = Src.Alpha * (SCA/255.0) + Dst.Alpha * (1.0 - (SCA/255.0))
- * This turns into Dst.Alpha = Src.Alpha when SCA = 255.
- * (http://msdn.microsoft.com/en-us/library/aa921335.aspx)
- *
diff --git a/gfx/cairo/win32-canvas-glyph-position.patch b/gfx/cairo/win32-canvas-glyph-position.patch
deleted file mode 100644
index 4ed10596c..000000000
--- a/gfx/cairo/win32-canvas-glyph-position.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
---- a/gfx/cairo/cairo/src/cairo-win32-font.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
-@@ -1182,22 +1182,22 @@ _add_glyph (cairo_glyph_state_t *state,
- if (state->glyphs.num_elements > 0) {
- int dx;
-
- if (logical_y != state->last_y) {
- status = _flush_glyphs (state);
- if (status)
- return status;
- state->start_x = logical_x;
-+ } else {
-+ dx = logical_x - state->last_x;
-+ status = _cairo_array_append (&state->dx, &dx);
-+ if (status)
-+ return status;
- }
--
-- dx = logical_x - state->last_x;
-- status = _cairo_array_append (&state->dx, &dx);
-- if (status)
-- return status;
- } else {
- state->start_x = logical_x;
- }
-
- state->last_x = logical_x;
- state->last_y = logical_y;
-
- status = _cairo_array_append (&state->glyphs, &glyph_index);
diff --git a/gfx/cairo/win32-cleartype-clipping.patch b/gfx/cairo/win32-cleartype-clipping.patch
deleted file mode 100644
index 839e94039..000000000
--- a/gfx/cairo/win32-cleartype-clipping.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
---- a/gfx/cairo/cairo/src/cairo-win32-font.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
-@@ -986,6 +986,19 @@ _cairo_win32_scaled_font_init_glyph_metr
- &metrics, 0, NULL, &matrix) == GDI_ERROR) {
- status = _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_init_glyph_metrics:GetGlyphOutlineW");
- memset (&metrics, 0, sizeof (GLYPHMETRICS));
-+ } else {
-+ if (metrics.gmBlackBoxX > 0 && scaled_font->base.options.antialias != CAIRO_ANTIALIAS_NONE) {
-+ /* The bounding box reported by Windows supposedly contains the glyph's "black" area;
-+ * however, antialiasing (especially with ClearType) means that the actual image that
-+ * needs to be rendered may "bleed" into the adjacent pixels, mainly on the right side.
-+ * To avoid clipping the glyphs when drawn by _cairo_surface_fallback_show_glyphs,
-+ * for example, or other code that uses glyph extents to determine the area to update,
-+ * we add a pixel of "slop" to left side of the nominal "black" area returned by GDI,
-+ * and two pixels to the right (as tests show some glyphs bleed into this column).
-+ */
-+ metrics.gmptGlyphOrigin.x -= 1;
-+ metrics.gmBlackBoxX += 3;
-+ }
- }
- cairo_win32_scaled_font_done_font (&scaled_font->base);
- if (status)
diff --git a/gfx/cairo/win32-composite-src-mod.patch b/gfx/cairo/win32-composite-src-mod.patch
deleted file mode 100644
index f2f99940a..000000000
--- a/gfx/cairo/win32-composite-src-mod.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -928,16 +928,19 @@ _cairo_win32_surface_composite_inner (ca
- return _composite_alpha_blend (dst, src, alpha,
- src_r.x, src_r.y, src_r.width, src_r.height,
- dst_r.x, dst_r.y, dst_r.width, dst_r.height);
- }
-
- return CAIRO_STATUS_SUCCESS;
- }
-
-+/* from pixman-private.h */
-+#define MOD(a,b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
-+
- static cairo_int_status_t
- _cairo_win32_surface_composite (cairo_operator_t op,
- cairo_pattern_t *pattern,
- cairo_pattern_t *mask_pattern,
- void *abstract_dst,
- int src_x,
- int src_y,
- int mask_x,
-@@ -1209,18 +1212,18 @@ _cairo_win32_surface_composite (cairo_op
- /* If we need to repeat, we turn the repeated blit into
- * a bunch of piece-by-piece blits.
- */
- if (needs_repeat) {
- cairo_rectangle_int_t piece_src_r, piece_dst_r;
- uint32_t rendered_width = 0, rendered_height = 0;
- uint32_t to_render_height, to_render_width;
- int32_t piece_x, piece_y;
-- int32_t src_start_x = src_r.x % src_extents.width;
-- int32_t src_start_y = src_r.y % src_extents.height;
-+ int32_t src_start_x = MOD(src_r.x, src_extents.width);
-+ int32_t src_start_y = MOD(src_r.y, src_extents.height);
-
- if (needs_scale)
- goto UNSUPPORTED;
-
- /* If both the src and dest have an image, we may as well fall
- * back, because it will be faster than our separate blits.
- * Our blit code will be fastest when the src is a DDB and the
- * destination is a DDB.
diff --git a/gfx/cairo/win32-d3dsurface9.patch b/gfx/cairo/win32-d3dsurface9.patch
deleted file mode 100644
index b0e80252f..000000000
--- a/gfx/cairo/win32-d3dsurface9.patch
+++ /dev/null
@@ -1,465 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-rename.h b/gfx/cairo/cairo/src/cairo-rename.h
---- a/gfx/cairo/cairo/src/cairo-rename.h
-+++ b/gfx/cairo/cairo/src/cairo-rename.h
-@@ -335,16 +335,17 @@
- #define cairo_win32_font_face_create_for_logfontw_hfont _moz_cairo_win32_font_face_create_for_logfontw_hfont
- #define cairo_win32_printing_surface_create _moz_cairo_win32_printing_surface_create
- #define cairo_win32_scaled_font_done_font _moz_cairo_win32_scaled_font_done_font
- #define cairo_win32_scaled_font_get_device_to_logical _moz_cairo_win32_scaled_font_get_device_to_logical
- #define cairo_win32_scaled_font_get_logical_to_device _moz_cairo_win32_scaled_font_get_logical_to_device
- #define cairo_win32_scaled_font_get_metrics_factor _moz_cairo_win32_scaled_font_get_metrics_factor
- #define cairo_win32_scaled_font_select_font _moz_cairo_win32_scaled_font_select_font
- #define cairo_win32_surface_create _moz_cairo_win32_surface_create
-+#define cairo_win32_surface_create_with_d3dsurface9 _moz_cairo_win32_surface_create_with_d3dsurface9
- #define cairo_win32_surface_create_with_ddb _moz_cairo_win32_surface_create_with_ddb
- #define cairo_win32_surface_create_with_dib _moz_cairo_win32_surface_create_with_dib
- #define cairo_win32_surface_get_dc _moz_cairo_win32_surface_get_dc
- #define cairo_win32_surface_get_image _moz_cairo_win32_surface_get_image
- #define cairo_xcb_surface_create _moz_cairo_xcb_surface_create
- #define cairo_xcb_surface_create_for_bitmap _moz_cairo_xcb_surface_create_for_bitmap
- #define cairo_xcb_surface_create_with_xrender_format _moz_cairo_xcb_surface_create_with_xrender_format
- #define cairo_xcb_surface_set_size _moz_cairo_xcb_surface_set_size
-diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-@@ -1852,16 +1852,17 @@ cairo_win32_printing_surface_create (HDC
- }
-
- _cairo_surface_clipper_init (&surface->clipper,
- _cairo_win32_printing_surface_clipper_intersect_clip_path);
-
- surface->image = NULL;
- surface->format = CAIRO_FORMAT_RGB24;
- surface->content = CAIRO_CONTENT_COLOR_ALPHA;
-+ surface->d3d9surface = NULL;
-
- surface->dc = hdc;
- surface->bitmap = NULL;
- surface->is_dib = FALSE;
- surface->saved_dc_bitmap = NULL;
- surface->brush = NULL;
- surface->old_brush = NULL;
- surface->font_subsets = _cairo_scaled_font_subsets_create_scaled ();
-diff --git a/gfx/cairo/cairo/src/cairo-win32-private.h b/gfx/cairo/cairo/src/cairo-win32-private.h
---- a/gfx/cairo/cairo/src/cairo-win32-private.h
-+++ b/gfx/cairo/cairo/src/cairo-win32-private.h
-@@ -54,16 +54,18 @@ CAIRO_BEGIN_DECLS
-
- typedef struct _cairo_win32_surface {
- cairo_surface_t base;
-
- cairo_format_t format;
-
- HDC dc;
-
-+ struct IDirect3DSurface9 *d3d9surface;
-+
- /* We create off-screen surfaces as DIBs or DDBs, based on what we created
- * originally*/
- HBITMAP bitmap;
- cairo_bool_t is_dib;
-
- /* Used to save the initial 1x1 monochrome bitmap for the DC to
- * select back into the DC before deleting the DC and our
- * bitmap. For Windows XP, this doesn't seem to be necessary
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -54,16 +54,17 @@
- #include "cairo-win32-private.h"
- #include "cairo-scaled-font-subsets-private.h"
- #include "cairo-surface-fallback-private.h"
- #include "cairo-surface-clipper-private.h"
- #include "cairo-gstate-private.h"
- #include "cairo-private.h"
- #include <wchar.h>
- #include <windows.h>
-+#include <d3d9.h>
-
- #if defined(__MINGW32__) && !defined(ETO_PDY)
- # define ETO_PDY 0x2000
- #endif
-
- #undef DEBUG_COMPOSITE
-
- /* for older SDKs */
-@@ -384,16 +385,17 @@ static cairo_surface_t *
-
- surface->image = cairo_image_surface_create_for_data (bits, format,
- width, height, rowstride);
- status = surface->image->status;
- if (status)
- goto FAIL;
-
- surface->format = format;
-+ surface->d3d9surface = NULL;
-
- surface->clip_rect.x = 0;
- surface->clip_rect.y = 0;
- surface->clip_rect.width = width;
- surface->clip_rect.height = height;
-
- surface->initial_clip_rgn = NULL;
- surface->had_simple_clip = FALSE;
-@@ -481,26 +483,73 @@ cairo_status_t
- if (surface->bitmap) {
- SelectObject (surface->dc, surface->saved_dc_bitmap);
- DeleteObject (surface->bitmap);
- DeleteDC (surface->dc);
- } else {
- _cairo_win32_restore_initial_clip (surface);
- }
-
-+ if (surface->d3d9surface) {
-+ IDirect3DSurface9_ReleaseDC (surface->d3d9surface, surface->dc);
-+ IDirect3DSurface9_Release (surface->d3d9surface);
-+ }
-+
- if (surface->initial_clip_rgn)
- DeleteObject (surface->initial_clip_rgn);
-
- if (surface->font_subsets != NULL)
- _cairo_scaled_font_subsets_destroy (surface->font_subsets);
-
- return CAIRO_STATUS_SUCCESS;
- }
-
- static cairo_status_t
-+_cairo_win32_surface_d3d9_lock_rect (cairo_win32_surface_t *surface,
-+ int x,
-+ int y,
-+ int width,
-+ int height,
-+ cairo_image_surface_t **local_out)
-+{
-+ cairo_image_surface_t *local;
-+ cairo_int_status_t status;
-+
-+ RECT rectin = { x, y, x+width, y+height };
-+ D3DLOCKED_RECT rectout;
-+ HRESULT hr;
-+ hr = IDirect3DSurface9_ReleaseDC (surface->d3d9surface, surface->dc);
-+ hr = IDirect3DSurface9_LockRect (surface->d3d9surface,
-+ &rectout, &rectin, 0);
-+ surface->dc = 0; // Don't use the DC when this is locked!
-+ if (hr) {
-+ IDirect3DSurface9_GetDC (surface->d3d9surface, &surface->dc);
-+ return CAIRO_INT_STATUS_UNSUPPORTED;
-+ }
-+ local = cairo_image_surface_create_for_data (rectout.pBits,
-+ surface->format,
-+ width, height,
-+ rectout.Pitch);
-+ if (local == NULL) {
-+ IDirect3DSurface9_UnlockRect (surface->d3d9surface);
-+ IDirect3DSurface9_GetDC (surface->d3d9surface, &surface->dc);
-+ return CAIRO_INT_STATUS_UNSUPPORTED;
-+ }
-+ if (local->base.status) {
-+ IDirect3DSurface9_UnlockRect (surface->d3d9surface);
-+ IDirect3DSurface9_GetDC (surface->d3d9surface, &surface->dc);
-+ return local->base.status;
-+ }
-+
-+ *local_out = local;
-+
-+ return CAIRO_STATUS_SUCCESS;
-+}
-+
-+static cairo_status_t
- _cairo_win32_surface_get_subimage (cairo_win32_surface_t *surface,
- int x,
- int y,
- int width,
- int height,
- cairo_win32_surface_t **local_out)
- {
- cairo_win32_surface_t *local;
-@@ -599,17 +648,16 @@ static void
- }
-
- static cairo_status_t
- _cairo_win32_surface_acquire_source_image (void *abstract_surface,
- cairo_image_surface_t **image_out,
- void **image_extra)
- {
- cairo_win32_surface_t *surface = abstract_surface;
-- cairo_win32_surface_t *local;
- cairo_status_t status;
-
- if (!surface->image && !surface->is_dib && surface->bitmap &&
- (surface->flags & CAIRO_WIN32_SURFACE_CAN_CONVERT_TO_DIB) != 0)
- {
- /* This is a DDB, and we're being asked to use it as a source for
- * something that we couldn't support natively. So turn it into
- * a DIB, so that we have an equivalent image surface, as long
-@@ -619,69 +667,109 @@ static cairo_status_t
- }
-
- if (surface->image) {
- *image_out = (cairo_image_surface_t *)surface->image;
- *image_extra = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
-
-- status = _cairo_win32_surface_get_subimage (abstract_surface, 0, 0,
-- surface->extents.width,
-- surface->extents.height, &local);
-- if (status)
-- return status;
--
-- *image_out = (cairo_image_surface_t *)local->image;
-- *image_extra = local;
-+ if (surface->d3d9surface) {
-+ cairo_image_surface_t *local;
-+ status = _cairo_win32_surface_d3d9_lock_rect (abstract_surface, 0, 0,
-+ surface->extents.width,
-+ surface->extents.height, &local);
-+ if (status)
-+ return status;
-+
-+ *image_out = local;
-+ *image_extra = surface;
-+ } else {
-+ cairo_win32_surface_t *local;
-+ status = _cairo_win32_surface_get_subimage (abstract_surface, 0, 0,
-+ surface->extents.width,
-+ surface->extents.height, &local);
-+ if (status)
-+ return status;
-+
-+ *image_out = (cairo_image_surface_t *)local->image;
-+ *image_extra = local;
-+ }
-+ // image_extra is always of type cairo_win32_surface_t. For d3d9surface it points
-+ // to the original surface to get back the d3d9surface and properly unlock.
-+
- return CAIRO_STATUS_SUCCESS;
- }
-
- static void
- _cairo_win32_surface_release_source_image (void *abstract_surface,
- cairo_image_surface_t *image,
- void *image_extra)
- {
-+ cairo_win32_surface_t *surface = abstract_surface;
- cairo_win32_surface_t *local = image_extra;
-
-- if (local)
-+ if (local && local->d3d9surface) {
-+ IDirect3DSurface9_UnlockRect (local->d3d9surface);
-+ IDirect3DSurface9_GetDC (local->d3d9surface, &local->dc);
-+ cairo_surface_destroy ((cairo_surface_t *)image);
-+ } else {
- cairo_surface_destroy ((cairo_surface_t *)local);
-+ }
- }
-
- static cairo_status_t
- _cairo_win32_surface_acquire_dest_image (void *abstract_surface,
- cairo_rectangle_int_t *interest_rect,
- cairo_image_surface_t **image_out,
- cairo_rectangle_int_t *image_rect,
- void **image_extra)
- {
- cairo_win32_surface_t *surface = abstract_surface;
-- cairo_win32_surface_t *local = NULL;
- cairo_status_t status;
-
- if (surface->image) {
- GdiFlush();
-
- *image_out = (cairo_image_surface_t *) surface->image;
- *image_extra = NULL;
- *image_rect = surface->extents;
- return CAIRO_STATUS_SUCCESS;
- }
-
-- status = _cairo_win32_surface_get_subimage (abstract_surface,
-+ if (surface->d3d9surface) {
-+ cairo_image_surface_t *local = NULL;
-+ status = _cairo_win32_surface_d3d9_lock_rect (abstract_surface,
- interest_rect->x,
- interest_rect->y,
- interest_rect->width,
-- interest_rect->height,
-- &local);
-- if (status)
-- return status;
--
-- *image_out = (cairo_image_surface_t *) local->image;
-- *image_extra = local;
-+ interest_rect->height, &local);
-+
-+ if (status)
-+ return status;
-+
-+ *image_out = local;
-+ *image_extra = surface;
-+ } else {
-+ cairo_win32_surface_t *local = NULL;
-+ status = _cairo_win32_surface_get_subimage (abstract_surface,
-+ interest_rect->x,
-+ interest_rect->y,
-+ interest_rect->width,
-+ interest_rect->height, &local);
-+
-+ if (status)
-+ return status;
-+
-+ *image_out = (cairo_image_surface_t *) local->image;
-+ *image_extra = local;
-+ }
-+ // image_extra is always of type cairo_win32_surface_t. For d3d9surface it points
-+ // to the original surface to get back the d3d9surface and properly unlock.
-+
- *image_rect = *interest_rect;
- return CAIRO_STATUS_SUCCESS;
- }
-
- static void
- _cairo_win32_surface_release_dest_image (void *abstract_surface,
- cairo_rectangle_int_t *interest_rect,
- cairo_image_surface_t *image,
-@@ -689,29 +777,37 @@ static void
- void *image_extra)
- {
- cairo_win32_surface_t *surface = abstract_surface;
- cairo_win32_surface_t *local = image_extra;
-
- if (!local)
- return;
-
-- /* clear any clip that's currently set on the surface
-- so that we can blit uninhibited. */
-- _cairo_win32_surface_set_clip_region (surface, NULL);
--
-- if (!BitBlt (surface->dc,
-- image_rect->x, image_rect->y,
-- image_rect->width, image_rect->height,
-- local->dc,
-- 0, 0,
-- SRCCOPY))
-- _cairo_win32_print_gdi_error ("_cairo_win32_surface_release_dest_image");
--
-- cairo_surface_destroy ((cairo_surface_t *)local);
-+ if (local->d3d9surface) {
-+ IDirect3DSurface9_UnlockRect (local->d3d9surface);
-+ IDirect3DSurface9_GetDC (local->d3d9surface, &local->dc);
-+ cairo_surface_destroy ((cairo_surface_t *)image);
-+ } else {
-+
-+ /* clear any clip that's currently set on the surface
-+ so that we can blit uninhibited. */
-+ _cairo_win32_surface_set_clip_region (surface, NULL);
-+
-+ if (!BitBlt (surface->dc,
-+ image_rect->x, image_rect->y,
-+ image_rect->width, image_rect->height,
-+ local->dc,
-+ 0, 0,
-+ SRCCOPY))
-+ _cairo_win32_print_gdi_error ("_cairo_win32_surface_release_dest_image");
-+
-+ cairo_surface_destroy ((cairo_surface_t *)local);
-+ }
-+
- }
-
- cairo_status_t
- _cairo_win32_surface_set_clip_region (void *abstract_surface,
- cairo_region_t *region)
- {
- cairo_win32_surface_t *surface = abstract_surface;
- cairo_status_t status = CAIRO_STATUS_SUCCESS;
-@@ -1849,16 +1945,17 @@ cairo_win32_surface_create_internal (HDC
- free (surface);
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
- }
-
- surface->clip_region = NULL;
- surface->image = NULL;
- surface->format = format;
-
-+ surface->d3d9surface = NULL;
- surface->dc = hdc;
- surface->bitmap = NULL;
- surface->is_dib = FALSE;
- surface->saved_dc_bitmap = NULL;
- surface->brush = NULL;
- surface->old_brush = NULL;
- surface->font_subsets = NULL;
-
-@@ -2009,16 +2106,29 @@ cairo_win32_surface_create_with_ddb (HDC
-
- FINISH:
- if (screen_dc)
- ReleaseDC (NULL, screen_dc);
-
- return (cairo_surface_t*) new_surf;
- }
-
-+cairo_public cairo_surface_t *
-+cairo_win32_surface_create_with_d3dsurface9 (IDirect3DSurface9 *surface)
-+{
-+ HDC dc;
-+ cairo_win32_surface_t *win_surface;
-+
-+ IDirect3DSurface9_AddRef (surface);
-+ IDirect3DSurface9_GetDC (surface, &dc);
-+ win_surface = cairo_win32_surface_create_internal(dc, CAIRO_FORMAT_RGB24);
-+ win_surface->d3d9surface = surface;
-+ return (cairo_surface_t*) win_surface;
-+
-+}
- /**
- * _cairo_surface_is_win32:
- * @surface: a #cairo_surface_t
- *
- * Checks if a surface is a win32 surface. This will
- * return False if this is a win32 printing surface; use
- * _cairo_surface_is_win32_printing() to check for that.
- *
-diff --git a/gfx/cairo/cairo/src/cairo-win32.h b/gfx/cairo/cairo/src/cairo-win32.h
---- a/gfx/cairo/cairo/src/cairo-win32.h
-+++ b/gfx/cairo/cairo/src/cairo-win32.h
-@@ -59,17 +59,16 @@ cairo_win32_surface_create_with_ddb (HDC hdc,
- cairo_format_t format,
- int width,
- int height);
-
- cairo_public cairo_surface_t *
- cairo_win32_surface_create_with_dib (cairo_format_t format,
- int width,
- int height);
--
- cairo_public HDC
- cairo_win32_surface_get_dc (cairo_surface_t *surface);
-
- cairo_public HDC
- cairo_win32_get_dc_with_clip (cairo_t *cr);
-
- cairo_public cairo_surface_t *
- cairo_win32_surface_get_image (cairo_surface_t *surface);
-@@ -143,16 +142,21 @@ cairo_dwrite_scaled_font_get_force_GDI_classic(cairo_scaled_font_t *dwrite_scale
- void
- cairo_dwrite_set_cleartype_params(FLOAT gamma, FLOAT contrast, FLOAT level, int geometry, int mode);
-
- int
- cairo_dwrite_get_cleartype_rendering_mode();
-
- #endif /* CAIRO_HAS_DWRITE_FONT */
-
-+struct IDirect3DSurface9;
-+cairo_public cairo_surface_t *
-+cairo_win32_surface_create_with_d3dsurface9 (struct IDirect3DSurface9 *surface);
-+
-+
- #if CAIRO_HAS_D2D_SURFACE
-
- struct _cairo_device
- {
- int type;
- int refcount;
- };
-
diff --git a/gfx/cairo/win32-ddb-dib.patch b/gfx/cairo/win32-ddb-dib.patch
deleted file mode 100644
index a520d6e10..000000000
--- a/gfx/cairo/win32-ddb-dib.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-b=455513; add optional flag to allow converting a DDB to a DIB internally, if the surface is every used as a source; r=jmuizelaar
-
-If a DDB is used as a source for an operation that can't be handled
-natively by GDI, we end up needing to take a really slow path (creating a
-temporary surface for acquire_source) for each operation. If we convert
-the DDB to a DIB, we then end up having a real image buffer and can hand
-things off to pixman directly.
-
-This isn't the default mode because I'm not sure if there are cases where a
-DDB is explicitly needed (e.g. for printing), and it would change
-current cairo behaviour. It might become the default at some point in the
-future.
-
-diff --git a/gfx/cairo/cairo/src/cairo-win32-private.h b/gfx/cairo/cairo/src/cairo-win32-private.h
---- a/gfx/cairo/cairo/src/cairo-win32-private.h
-+++ b/gfx/cairo/cairo/src/cairo-win32-private.h
-@@ -117,6 +117,9 @@
-
- /* Whether we can use the CHECKJPEGFORMAT escape function */
- CAIRO_WIN32_SURFACE_CAN_CHECK_PNG = (1<<8),
-+
-+ /* if this DDB surface can be converted to a DIB if necessary */
-+ CAIRO_WIN32_SURFACE_CAN_CONVERT_TO_DIB = (1<<9),
- };
-
- cairo_status_t
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -560,6 +560,56 @@
- return CAIRO_STATUS_SUCCESS;
- }
-
-+static void
-+_cairo_win32_convert_ddb_to_dib (cairo_win32_surface_t *surface)
-+{
-+ cairo_win32_surface_t *new_surface;
-+ int width = surface->extents.width;
-+ int height = surface->extents.height;
-+
-+ BOOL ok;
-+ HBITMAP oldbitmap;
-+
-+ new_surface = (cairo_win32_surface_t*)
-+ _cairo_win32_surface_create_for_dc (surface->dc,
-+ surface->format,
-+ width,
-+ height);
-+
-+ if (new_surface->base.status)
-+ return;
-+
-+ /* DDB can't be 32bpp, so BitBlt is safe */
-+ ok = BitBlt (new_surface->dc,
-+ 0, 0, width, height,
-+ surface->dc,
-+ 0, 0, SRCCOPY);
-+
-+ if (!ok)
-+ goto out;
-+
-+ /* Now swap around new_surface and surface's internal bitmap
-+ * pointers. */
-+ DeleteDC (new_surface->dc);
-+ new_surface->dc = NULL;
-+
-+ oldbitmap = SelectObject (surface->dc, new_surface->bitmap);
-+ DeleteObject (oldbitmap);
-+
-+ surface->image = new_surface->image;
-+ surface->is_dib = new_surface->is_dib;
-+ surface->bitmap = new_surface->bitmap;
-+
-+ new_surface->bitmap = NULL;
-+ new_surface->image = NULL;
-+
-+ /* Finally update flags */
-+ surface->flags = _cairo_win32_flags_for_dc (surface->dc);
-+
-+ out:
-+ cairo_surface_destroy ((cairo_surface_t*)new_surface);
-+}
-+
- static cairo_status_t
- _cairo_win32_surface_acquire_source_image (void *abstract_surface,
- cairo_image_surface_t **image_out,
-@@ -568,6 +618,17 @@
- cairo_win32_surface_t *surface = abstract_surface;
- cairo_win32_surface_t *local = NULL;
- cairo_status_t status;
-+
-+ if (!surface->image && !surface->is_dib && surface->bitmap &&
-+ (surface->flags & CAIRO_WIN32_SURFACE_CAN_CONVERT_TO_DIB) != 0)
-+ {
-+ /* This is a DDB, and we're being asked to use it as a source for
-+ * something that we couldn't support natively. So turn it into
-+ * a DIB, so that we have an equivalent image surface, as long
-+ * as we're allowed to via flags.
-+ */
-+ _cairo_win32_convert_ddb_to_dib (surface);
-+ }
-
- if (surface->image) {
- *image_out = (cairo_image_surface_t *)surface->image;
-@@ -2133,3 +2194,61 @@
- free(rd);
- fflush (stderr);
- }
-+
-+/**
-+ * cairo_win32_surface_set_can_convert_to_dib
-+ * @surface: a #cairo_surface_t
-+ * @can_convert: a #cairo_bool_t indicating whether this surface can
-+ * be coverted to a DIB if necessary
-+ *
-+ * A DDB surface with this flag set can be converted to a DIB if it's
-+ * used as a source in a way that GDI can't natively handle; for
-+ * example, drawing a RGB24 DDB onto an ARGB32 DIB. Doing this
-+ * conversion results in a significant speed optimization, because we
-+ * can call on pixman to perform the operation natively, instead of
-+ * reading the data from the DC each time.
-+ *
-+ * Return value: %CAIRO_STATUS_SUCCESS if the flag was successfully
-+ * changed, or an error otherwise.
-+ *
-+ */
-+cairo_status_t
-+cairo_win32_surface_set_can_convert_to_dib (cairo_surface_t *asurface, cairo_bool_t can_convert)
-+{
-+ cairo_win32_surface_t *surface = (cairo_win32_surface_t*) asurface;
-+ if (surface->base.type != CAIRO_SURFACE_TYPE_WIN32)
-+ return CAIRO_STATUS_SURFACE_TYPE_MISMATCH;
-+
-+ if (surface->bitmap) {
-+ if (can_convert)
-+ surface->flags |= CAIRO_WIN32_SURFACE_CAN_CONVERT_TO_DIB;
-+ else
-+ surface->flags &= ~CAIRO_WIN32_SURFACE_CAN_CONVERT_TO_DIB;
-+ }
-+
-+ return CAIRO_STATUS_SUCCESS;
-+}
-+
-+/**
-+ * cairo_win32_surface_get_can_convert_to_dib
-+ * @surface: a #cairo_surface_t
-+ * @can_convert: a #cairo_bool_t* that receives the return value
-+ *
-+ * Returns the value of the flag indicating whether the surface can be
-+ * converted to a DIB if necessary, as set by
-+ * cairo_win32_surface_set_can_convert_to_dib.
-+ *
-+ * Return value: %CAIRO_STATUS_SUCCESS if the flag was successfully
-+ * retreived, or an error otherwise.
-+ *
-+ */
-+cairo_status_t
-+cairo_win32_surface_get_can_convert_to_dib (cairo_surface_t *asurface, cairo_bool_t *can_convert)
-+{
-+ cairo_win32_surface_t *surface = (cairo_win32_surface_t*) asurface;
-+ if (surface->base.type != CAIRO_SURFACE_TYPE_WIN32)
-+ return CAIRO_STATUS_SURFACE_TYPE_MISMATCH;
-+
-+ *can_convert = ((surface->flags & CAIRO_WIN32_SURFACE_CAN_CONVERT_TO_DIB) != 0);
-+ return CAIRO_STATUS_SUCCESS;
-+}
-diff --git a/gfx/cairo/cairo/src/cairo-win32.h b/gfx/cairo/cairo/src/cairo-win32.h
---- a/gfx/cairo/cairo/src/cairo-win32.h
-+++ b/gfx/cairo/cairo/src/cairo-win32.h
-@@ -68,6 +68,12 @@ cairo_win32_surface_get_dc (cairo_surface_t *surface);
- cairo_public cairo_surface_t *
- cairo_win32_surface_get_image (cairo_surface_t *surface);
-
-+cairo_public cairo_status_t
-+cairo_win32_surface_set_can_convert_to_dib (cairo_surface_t *surface, cairo_bool_t can_convert);
-+
-+cairo_public cairo_status_t
-+cairo_win32_surface_get_can_convert_to_dib (cairo_surface_t *surface, cairo_bool_t *can_convert);
-+
- #if CAIRO_HAS_WIN32_FONT
-
diff --git a/gfx/cairo/win32-ffs-gcc.patch b/gfx/cairo/win32-ffs-gcc.patch
deleted file mode 100644
index e7cc1d1f6..000000000
--- a/gfx/cairo/win32-ffs-gcc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-compiler-private.h b/gfx/cairo/cairo/src/cairo-compiler-private.h
-index ffac9ce..9a05831 100644
---- a/gfx/cairo/cairo/src/cairo-compiler-private.h
-+++ b/gfx/cairo/cairo/src/cairo-compiler-private.h
-@@ -229,16 +229,20 @@ ffs (int x)
-
- if (_BitScanForward(&i, x) != 0)
- return i + 1;
-
- return 0;
- }
- #endif
-
-+#elif defined(__WIN32__) && defined(__GNUC__)
-+
-+#define ffs(x) __builtin_ffs(x)
-+
- #endif
-
- #if defined(_MSC_VER) && defined(_M_IX86)
- /* When compiling with /Gy and /OPT:ICF identical functions will be folded in together.
- The CAIRO_ENSURE_UNIQUE macro ensures that a function is always unique and
- will never be folded into another one. Something like this might eventually
- be needed for GCC but it seems fine for now. */
- #define CAIRO_ENSURE_UNIQUE \
diff --git a/gfx/cairo/win32-gdi-font-cache-no-HFONT.patch b/gfx/cairo/win32-gdi-font-cache-no-HFONT.patch
deleted file mode 100644
index fe93095ae..000000000
--- a/gfx/cairo/win32-gdi-font-cache-no-HFONT.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-# HG changeset patch
-# User Robert O'Callahan <robert@ocallahan.org>
-# Date 1357107533 -46800
-# Node ID ed54dfdd2facb11a4d4158138b460a31de45e9f7
-# Parent ab6457cc16ec14ea07386dcfc57cad6b8a9ac55d
-Bug 717178. Part 3 alternative: don't put Win32 cairo_font_face_ts into the font-face cache if they were created with an explicit HFONT. r=jrmuizel
-
-diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
---- a/gfx/cairo/cairo/src/cairo-win32-font.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
-@@ -1941,16 +1942,21 @@ const cairo_font_face_backend_t _cairo_w
- * The primary purpose of this mapping is to provide unique
- * #cairo_font_face_t values so that our cache and mapping from
- * #cairo_font_face_t => #cairo_scaled_font_t works. Once the
- * corresponding #cairo_font_face_t objects fall out of downstream
- * caches, we don't need them in this hash table anymore.
- *
- * Modifications to this hash table are protected by
- * _cairo_win32_font_face_mutex.
-+ *
-+ * Only #cairo_font_face_t values with null 'hfont' (no
-+ * HFONT preallocated by caller) are stored in this table. We rely
-+ * on callers to manage the lifetime of the HFONT, and they can't
-+ * do that if we share #cairo_font_face_t values with other callers.
- */
-
- static cairo_hash_table_t *cairo_win32_font_face_hash_table = NULL;
-
- static int
- _cairo_win32_font_face_keys_equal (const void *key_a,
- const void *key_b);
-
-@@ -2036,22 +2042,24 @@ static int
- }
-
- static void
- _cairo_win32_font_face_destroy (void *abstract_face)
- {
- cairo_hash_table_t *hash_table;
- cairo_win32_font_face_t *font_face = abstract_face;
-
-- hash_table = _cairo_win32_font_face_hash_table_lock ();
-- if (unlikely (hash_table == NULL)) {
-- return;
-+ if (!font_face->hfont) {
-+ hash_table = _cairo_win32_font_face_hash_table_lock ();
-+ if (unlikely (hash_table == NULL)) {
-+ return;
-+ }
-+ _cairo_hash_table_remove (hash_table, &font_face->base.hash_entry);
-+ _cairo_win32_font_face_hash_table_unlock ();
- }
-- _cairo_hash_table_remove (hash_table, &font_face->base.hash_entry);
-- _cairo_win32_font_face_hash_table_unlock ();
- }
-
- /**
- * cairo_win32_font_face_create_for_logfontw_hfont:
- * @logfont: A #LOGFONTW structure specifying the font to use.
- * If @font is %NULL then the lfHeight, lfWidth, lfOrientation and lfEscapement
- * fields of this structure are ignored. Otherwise lfWidth, lfOrientation and
- * lfEscapement must be zero.
-@@ -2070,55 +2078,63 @@ static void
- **/
- cairo_font_face_t *
- cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont, HFONT font)
- {
- cairo_win32_font_face_t *font_face, key;
- cairo_hash_table_t *hash_table;
- cairo_status_t status;
-
-- hash_table = _cairo_win32_font_face_hash_table_lock ();
-- if (unlikely (hash_table == NULL)) {
-- _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
-- return (cairo_font_face_t *)&_cairo_font_face_nil;
-- }
-+ if (!font) {
-+ hash_table = _cairo_win32_font_face_hash_table_lock ();
-+ if (unlikely (hash_table == NULL)) {
-+ _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
-+ return (cairo_font_face_t *)&_cairo_font_face_nil;
-+ }
-
-- _cairo_win32_font_face_init_key (&key, logfont, font);
-+ _cairo_win32_font_face_init_key (&key, logfont, font);
-
-- /* Return existing unscaled font if it exists in the hash table. */
-- font_face = _cairo_hash_table_lookup (hash_table,
-- &key.base.hash_entry);
-- if (font_face != NULL) {
-- cairo_font_face_reference (&font_face->base);
-- goto DONE;
-+ /* Return existing unscaled font if it exists in the hash table. */
-+ font_face = _cairo_hash_table_lookup (hash_table,
-+ &key.base.hash_entry);
-+ if (font_face != NULL) {
-+ cairo_font_face_reference (&font_face->base);
-+ goto DONE;
-+ }
- }
-
- /* Otherwise create it and insert into hash table. */
- font_face = malloc (sizeof (cairo_win32_font_face_t));
- if (!font_face) {
- _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
- goto FAIL;
- }
-
- _cairo_win32_font_face_init_key (font_face, logfont, font);
- _cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
-+ assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
-
-- assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
-- status = _cairo_hash_table_insert (hash_table,
-- &font_face->base.hash_entry);
-- if (unlikely (status))
-- goto FAIL;
-+ if (!font) {
-+ status = _cairo_hash_table_insert (hash_table,
-+ &font_face->base.hash_entry);
-+ if (unlikely (status))
-+ goto FAIL;
-+ }
-
- DONE:
-- _cairo_win32_font_face_hash_table_unlock ();
-+ if (!font) {
-+ _cairo_win32_font_face_hash_table_unlock ();
-+ }
-
- return &font_face->base;
-
- FAIL:
-- _cairo_win32_font_face_hash_table_unlock ();
-+ if (!font) {
-+ _cairo_win32_font_face_hash_table_unlock ();
-+ }
-
- return (cairo_font_face_t *)&_cairo_font_face_nil;
- }
-
- /**
- * cairo_win32_font_face_create_for_logfontw:
- * @logfont: A #LOGFONTW structure specifying the font to use.
- * The lfHeight, lfWidth, lfOrientation and lfEscapement
diff --git a/gfx/cairo/win32-gdi-font-cache.patch b/gfx/cairo/win32-gdi-font-cache.patch
deleted file mode 100644
index e082a2e4d..000000000
--- a/gfx/cairo/win32-gdi-font-cache.patch
+++ /dev/null
@@ -1,375 +0,0 @@
-# HG changeset patch
-# User Andrea Canciani <ranma42@gmail.com>, Adrian Johnson <ajohnson@redneon.com>
-# Date 1354838294 -46800
-# Node ID 390df735b9d5c5ba07a4d3fe9ca2ebc9e7626a78
-# Parent e30a5b6a5a003b85fc1ca8b76719a56ef59d976e
-Bug 717178. Part 2: Import changesets eb29a25d, 6e3e3291 and 101fab7c from upstream.
-======
-
-From 101fab7cd8a90f7cf3d8113c792b3f8c2a9afb7d Mon Sep 17 00:00:00 2001
-From: Andrea Canciani <ranma42@gmail.com>
-Date: Wed, 15 Jun 2011 09:37:36 +0000
-Subject: win32-font: Improve static data reset function
-
-The hashtable is guaranteed to only contain font faces which are
-currently referenced, hence there is no need to remove any font face
-when it is reset (just like for toy-font).
-
-This makes the function simpler and fixes the assertion
-
-Assertion failed: predicate != NULL, file cairo-hash.c, line 373
-
-hit by multiple tests (the first one being "clear").
-
-See https://bugs.freedesktop.org/show_bug.cgi?id=38049
-
-======
-
-From eb29a25dd6dddc511388bf883c9b95843ecdb823 Mon Sep 17 00:00:00 2001
-From: Adrian Johnson <ajohnson@redneon.com>
-Date: Tue, 16 Nov 2010 13:18:39 +0000
-Subject: win32: Use a font_face hash table to provide unique font faces
-
-Similar to the freetype and toy font backends, use a hash table
-to map logfont,hfont to font faces.
-
-This fixes the multiple embedding of the same font in PDF.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=24849
-
-======
-
-From 6e3e329170ab4b96bc0d587c8071e869e228e758 Mon Sep 17 00:00:00 2001
-From: Adrian Johnson <ajohnson@redneon.com>
-Date: Thu, 18 Nov 2010 12:37:45 +0000
-Subject: win32: fix font_face hashing
-
-some bugs were discovered while testing with firefox
-
-======
-
-diff --git a/gfx/cairo/cairo/src/cairo-debug.c b/gfx/cairo/cairo/src/cairo-debug.c
---- a/gfx/cairo/cairo/src/cairo-debug.c
-+++ b/gfx/cairo/cairo/src/cairo-debug.c
-@@ -64,16 +64,20 @@ cairo_debug_reset_static_data (void)
- _cairo_scaled_font_map_destroy ();
-
- _cairo_toy_font_face_reset_static_data ();
-
- #if CAIRO_HAS_FT_FONT
- _cairo_ft_font_reset_static_data ();
- #endif
-
-+#if CAIRO_HAS_WIN32_FONT
-+ _cairo_win32_font_reset_static_data ();
-+#endif
-+
- _cairo_intern_string_reset_static_data ();
-
- _cairo_scaled_font_reset_static_data ();
-
- _cairo_pattern_reset_static_data ();
-
- _cairo_clip_reset_static_data ();
-
-diff --git a/gfx/cairo/cairo/src/cairo-mutex-list-private.h b/gfx/cairo/cairo/src/cairo-mutex-list-private.h
---- a/gfx/cairo/cairo/src/cairo-mutex-list-private.h
-+++ b/gfx/cairo/cairo/src/cairo-mutex-list-private.h
-@@ -46,16 +46,20 @@ CAIRO_MUTEX_DECLARE (_cairo_intern_strin
- CAIRO_MUTEX_DECLARE (_cairo_scaled_font_map_mutex)
- CAIRO_MUTEX_DECLARE (_cairo_scaled_glyph_page_cache_mutex)
- CAIRO_MUTEX_DECLARE (_cairo_scaled_font_error_mutex)
-
- #if CAIRO_HAS_FT_FONT
- CAIRO_MUTEX_DECLARE (_cairo_ft_unscaled_font_map_mutex)
- #endif
-
-+#if CAIRO_HAS_WIN32_FONT
-+CAIRO_MUTEX_DECLARE (_cairo_win32_font_face_mutex)
-+#endif
-+
- #if CAIRO_HAS_XLIB_SURFACE
- CAIRO_MUTEX_DECLARE (_cairo_xlib_display_mutex)
- #endif
-
- #if CAIRO_HAS_XCB_SURFACE
- CAIRO_MUTEX_DECLARE (_cairo_xcb_connections_mutex)
- #endif
-
-diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
---- a/gfx/cairo/cairo/src/cairo-win32-font.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
-@@ -42,16 +42,18 @@
- # define _WIN32_WINNT 0x0500
- #endif
-
- #include "cairoint.h"
-
- #include "cairo-win32-private.h"
- #include "cairo-error-private.h"
-
-+#include <wchar.h>
-+
- #ifndef SPI_GETFONTSMOOTHINGTYPE
- #define SPI_GETFONTSMOOTHINGTYPE 0x200a
- #endif
- #ifndef FE_FONTSMOOTHINGCLEARTYPE
- #define FE_FONTSMOOTHINGCLEARTYPE 2
- #endif
- #ifndef CLEARTYPE_QUALITY
- #define CLEARTYPE_QUALITY 5
-@@ -1887,19 +1889,17 @@ struct _cairo_win32_font_face {
- cairo_font_face_t base;
- LOGFONTW logfont;
- HFONT hfont;
- };
-
- /* implement the platform-specific interface */
-
- static void
--_cairo_win32_font_face_destroy (void *abstract_face)
--{
--}
-+_cairo_win32_font_face_destroy (void *abstract_face);
-
- static cairo_bool_t
- _is_scale (const cairo_matrix_t *matrix, double scale)
- {
- return matrix->xx == scale && matrix->yy == scale &&
- matrix->xy == 0. && matrix->yx == 0. &&
- matrix->x0 == 0. && matrix->y0 == 0.;
- }
-@@ -1932,16 +1932,128 @@ static cairo_status_t
-
- const cairo_font_face_backend_t _cairo_win32_font_face_backend = {
- CAIRO_FONT_TYPE_WIN32,
- _cairo_win32_font_face_create_for_toy,
- _cairo_win32_font_face_destroy,
- _cairo_win32_font_face_scaled_font_create
- };
-
-+/* We maintain a hash table from LOGFONT,HFONT => #cairo_font_face_t.
-+ * The primary purpose of this mapping is to provide unique
-+ * #cairo_font_face_t values so that our cache and mapping from
-+ * #cairo_font_face_t => #cairo_scaled_font_t works. Once the
-+ * corresponding #cairo_font_face_t objects fall out of downstream
-+ * caches, we don't need them in this hash table anymore.
-+ *
-+ * Modifications to this hash table are protected by
-+ * _cairo_win32_font_face_mutex.
-+ */
-+
-+static cairo_hash_table_t *cairo_win32_font_face_hash_table = NULL;
-+
-+static int
-+_cairo_win32_font_face_keys_equal (const void *key_a,
-+ const void *key_b);
-+
-+static void
-+_cairo_win32_font_face_hash_table_destroy (void)
-+{
-+ cairo_hash_table_t *hash_table;
-+
-+ /* We manually acquire the lock rather than calling
-+ * _cairo_win32_font_face_hash_table_lock simply to avoid creating
-+ * the table only to destroy it again. */
-+ CAIRO_MUTEX_LOCK (_cairo_win32_font_face_mutex);
-+ hash_table = cairo_win32_font_face_hash_table;
-+ cairo_win32_font_face_hash_table = NULL;
-+ CAIRO_MUTEX_UNLOCK (_cairo_win32_font_face_mutex);
-+
-+ if (hash_table != NULL)
-+ _cairo_hash_table_destroy (hash_table);
-+}
-+
-+static cairo_hash_table_t *
-+_cairo_win32_font_face_hash_table_lock (void)
-+{
-+ CAIRO_MUTEX_LOCK (_cairo_win32_font_face_mutex);
-+
-+ if (unlikely (cairo_win32_font_face_hash_table == NULL))
-+ {
-+ cairo_win32_font_face_hash_table =
-+ _cairo_hash_table_create (_cairo_win32_font_face_keys_equal);
-+
-+ if (unlikely (cairo_win32_font_face_hash_table == NULL)) {
-+ CAIRO_MUTEX_UNLOCK (_cairo_win32_font_face_mutex);
-+ _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
-+ return NULL;
-+ }
-+ }
-+
-+ return cairo_win32_font_face_hash_table;
-+}
-+
-+static void
-+_cairo_win32_font_face_hash_table_unlock (void)
-+{
-+ CAIRO_MUTEX_UNLOCK (_cairo_win32_font_face_mutex);
-+}
-+
-+static void
-+_cairo_win32_font_face_init_key (cairo_win32_font_face_t *key,
-+ LOGFONTW *logfont,
-+ HFONT font)
-+{
-+ unsigned long hash = _CAIRO_HASH_INIT_VALUE;
-+
-+ key->logfont = *logfont;
-+ key->hfont = font;
-+
-+ hash = _cairo_hash_bytes (0, logfont->lfFaceName, 2*wcslen(logfont->lfFaceName));
-+ hash = _cairo_hash_bytes (hash, &logfont->lfWeight, sizeof(logfont->lfWeight));
-+ hash = _cairo_hash_bytes (hash, &logfont->lfItalic, sizeof(logfont->lfItalic));
-+
-+ key->base.hash_entry.hash = hash;
-+}
-+
-+static int
-+_cairo_win32_font_face_keys_equal (const void *key_a,
-+ const void *key_b)
-+{
-+ const cairo_win32_font_face_t *face_a = key_a;
-+ const cairo_win32_font_face_t *face_b = key_b;
-+
-+ if (face_a->logfont.lfWeight == face_b->logfont.lfWeight &&
-+ face_a->logfont.lfItalic == face_b->logfont.lfItalic &&
-+ face_a->logfont.lfUnderline == face_b->logfont.lfUnderline &&
-+ face_a->logfont.lfStrikeOut == face_b->logfont.lfStrikeOut &&
-+ face_a->logfont.lfCharSet == face_b->logfont.lfCharSet &&
-+ face_a->logfont.lfOutPrecision == face_b->logfont.lfOutPrecision &&
-+ face_a->logfont.lfClipPrecision == face_b->logfont.lfClipPrecision &&
-+ face_a->logfont.lfPitchAndFamily == face_b->logfont.lfPitchAndFamily &&
-+ (wcscmp (face_a->logfont.lfFaceName, face_b->logfont.lfFaceName) == 0))
-+ return TRUE;
-+ else
-+ return FALSE;
-+}
-+
-+static void
-+_cairo_win32_font_face_destroy (void *abstract_face)
-+{
-+ cairo_hash_table_t *hash_table;
-+ cairo_win32_font_face_t *font_face = abstract_face;
-+
-+ hash_table = _cairo_win32_font_face_hash_table_lock ();
-+ if (unlikely (hash_table == NULL)) {
-+ return;
-+ }
-+ _cairo_hash_table_remove (hash_table, &font_face->base.hash_entry);
-+ _cairo_win32_font_face_hash_table_unlock ();
-+}
-+
- /**
- * cairo_win32_font_face_create_for_logfontw_hfont:
- * @logfont: A #LOGFONTW structure specifying the font to use.
- * If @font is %NULL then the lfHeight, lfWidth, lfOrientation and lfEscapement
- * fields of this structure are ignored. Otherwise lfWidth, lfOrientation and
- * lfEscapement must be zero.
- * @font: An #HFONT that can be used when the font matrix is a scale by
- * -lfHeight and the CTM is identity.
-@@ -1954,30 +2066,61 @@ const cairo_font_face_backend_t _cairo_w
- * and can be used with functions such as cairo_win32_scaled_font_select_font().
- *
- * Return value: a newly created #cairo_font_face_t. Free with
- * cairo_font_face_destroy() when you are done using it.
- **/
- cairo_font_face_t *
- cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont, HFONT font)
- {
-- cairo_win32_font_face_t *font_face;
-+ cairo_win32_font_face_t *font_face, key;
-+ cairo_hash_table_t *hash_table;
-+ cairo_status_t status;
-
-+ hash_table = _cairo_win32_font_face_hash_table_lock ();
-+ if (unlikely (hash_table == NULL)) {
-+ _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
-+ return (cairo_font_face_t *)&_cairo_font_face_nil;
-+ }
-+
-+ _cairo_win32_font_face_init_key (&key, logfont, font);
-+
-+ /* Return existing unscaled font if it exists in the hash table. */
-+ font_face = _cairo_hash_table_lookup (hash_table,
-+ &key.base.hash_entry);
-+ if (font_face != NULL) {
-+ cairo_font_face_reference (&font_face->base);
-+ goto DONE;
-+ }
-+
-+ /* Otherwise create it and insert into hash table. */
- font_face = malloc (sizeof (cairo_win32_font_face_t));
- if (!font_face) {
- _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
-- return (cairo_font_face_t *)&_cairo_font_face_nil;
-+ goto FAIL;
- }
-
-- font_face->logfont = *logfont;
-- font_face->hfont = font;
--
-+ _cairo_win32_font_face_init_key (font_face, logfont, font);
- _cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
-
-+ assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
-+ status = _cairo_hash_table_insert (hash_table,
-+ &font_face->base.hash_entry);
-+ if (unlikely (status))
-+ goto FAIL;
-+
-+DONE:
-+ _cairo_win32_font_face_hash_table_unlock ();
-+
- return &font_face->base;
-+
-+FAIL:
-+ _cairo_win32_font_face_hash_table_unlock ();
-+
-+ return (cairo_font_face_t *)&_cairo_font_face_nil;
- }
-
- /**
- * cairo_win32_font_face_create_for_logfontw:
- * @logfont: A #LOGFONTW structure specifying the font to use.
- * The lfHeight, lfWidth, lfOrientation and lfEscapement
- * fields of this structure are ignored.
- *
-@@ -2176,8 +2319,14 @@ cairo_win32_scaled_font_get_device_to_lo
- cairo_win32_scaled_font_t *win_font = (cairo_win32_scaled_font_t *)scaled_font;
- if (! _cairo_scaled_font_is_win32 (scaled_font)) {
- _cairo_error_throw (CAIRO_STATUS_FONT_TYPE_MISMATCH);
- cairo_matrix_init_identity (device_to_logical);
- return;
- }
- *device_to_logical = win_font->device_to_logical;
- }
-+
-+void
-+_cairo_win32_font_reset_static_data (void)
-+{
-+ _cairo_win32_font_face_hash_table_destroy ();
-+}
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -403,16 +403,19 @@ cairo_private void
- _cairo_reset_static_data (void);
-
- cairo_private void
- _cairo_toy_font_face_reset_static_data (void);
-
- cairo_private void
- _cairo_ft_font_reset_static_data (void);
-
-+cairo_private void
-+_cairo_win32_font_reset_static_data (void);
-+
- /* the font backend interface */
-
- struct _cairo_unscaled_font_backend {
- void (*destroy) (void *unscaled_font);
- };
-
- /* #cairo_toy_font_face_t - simple family/slant/weight font faces used for
- * the built-in font API
diff --git a/gfx/cairo/win32-inline-cpp-keyword.patch b/gfx/cairo/win32-inline-cpp-keyword.patch
deleted file mode 100644
index 4b6f542d7..000000000
--- a/gfx/cairo/win32-inline-cpp-keyword.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-compiler-private.h b/gfx/cairo/cairo/src/cairo-compiler-private.h
---- a/gfx/cairo/cairo/src/cairo-compiler-private.h
-+++ b/gfx/cairo/cairo/src/cairo-compiler-private.h
-@@ -205,18 +205,20 @@
- #if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
- #define snprintf _snprintf
- #define popen _popen
- #define pclose _pclose
- #define hypot _hypot
- #endif
-
- #ifdef _MSC_VER
-+#ifndef __cplusplus
- #undef inline
- #define inline __inline
-+#endif
-
- /* there are currently linkage problems that arise when trying to include intrin.h in c++:
- * D:\sdks\v7.0\include\winnt.h(3674) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
- * so avoid defining ffs in c++ code for now */
- #ifndef __cplusplus
- /* Add a definition of ffs */
- #include <intrin.h>
- #pragma intrinsic(_BitScanForward)
diff --git a/gfx/cairo/win32-logical-font-scale.patch b/gfx/cairo/win32-logical-font-scale.patch
deleted file mode 100644
index 02d812be3..000000000
--- a/gfx/cairo/win32-logical-font-scale.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -r e10a8066a62c gfx/cairo/cairo/src/cairo-win32-private.h
---- a/gfx/cairo/cairo/src/cairo-win32-private.h Fri Jun 08 17:39:38 2007 -0700
-+++ b/gfx/cairo/cairo/src/cairo-win32-private.h Fri Jun 29 09:14:35 2007 +0200
-@@ -46,7 +46,7 @@
- #define SB_NONE 0
- #endif
-
--#define WIN32_FONT_LOGICAL_SCALE 32
-+#define WIN32_FONT_LOGICAL_SCALE 1
-
- typedef struct _cairo_win32_surface {
- cairo_surface_t base;
diff --git a/gfx/cairo/win32-printing-axis-swap.patch b/gfx/cairo/win32-printing-axis-swap.patch
deleted file mode 100644
index 87a1a91e4..000000000
--- a/gfx/cairo/win32-printing-axis-swap.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-# HG changeset patch
-# User Lee Salzman <lsalzman@mozilla.com>
-# Date 1445463645 14400
-# Wed Oct 21 17:40:45 2015 -0400
-# Node ID 9e84563cbd73c5b0993dfd018ca25b660b667e94
-# Parent 2d3fd51c4182c253a2f102655e8e9e466032853f
-workaround for Windows printer drivers that can't handle swapped X and Y axes
-
-diff --git a/gfx/cairo/cairo/src/cairo-matrix.c b/gfx/cairo/cairo/src/cairo-matrix.c
---- a/gfx/cairo/cairo/src/cairo-matrix.c
-+++ b/gfx/cairo/cairo/src/cairo-matrix.c
-@@ -873,42 +873,56 @@ cairo_bool_t
- (Note that the minor axis length is at the minimum of the above solution,
- which is just sqrt ( f - sqrt(g² + h²) ) given the symmetry of (D)).
-
-
- For another derivation of the same result, using Singular Value Decomposition,
- see doc/tutorial/src/singular.c.
- */
-
--/* determine the length of the major axis of a circle of the given radius
-- after applying the transformation matrix. */
--double
--_cairo_matrix_transformed_circle_major_axis (const cairo_matrix_t *matrix,
-- double radius)
-+/* determine the length of the major and minor axes of a circle of the given
-+ radius after applying the transformation matrix. */
-+void
-+_cairo_matrix_transformed_circle_axes (const cairo_matrix_t *matrix,
-+ double radius,
-+ double *major,
-+ double *minor)
- {
-- double a, b, c, d, f, g, h, i, j;
-+ double a, b, c, d, f, g, h, i, j, k;
-
- _cairo_matrix_get_affine (matrix,
- &a, &b,
- &c, &d,
- NULL, NULL);
-
- i = a*a + b*b;
- j = c*c + d*d;
-+ k = a*c + b*d;
-
- f = 0.5 * (i + j);
- g = 0.5 * (i - j);
-- h = a*c + b*d;
-+ h = hypot (g, k);
-
-- return radius * sqrt (f + hypot (g, h));
-+ if (major)
-+ *major = radius * sqrt (f + h);
-+ if (minor)
-+ *minor = radius * sqrt (f - h);
-+}
-
-- /*
-- * we don't need the minor axis length, which is
-- * double min = radius * sqrt (f - sqrt (g*g+h*h));
-- */
-+/* determine the length of the major axis of a circle of the given radius
-+ after applying the transformation matrix. */
-+double
-+_cairo_matrix_transformed_circle_major_axis (const cairo_matrix_t *matrix,
-+ double radius)
-+{
-+ double major;
-+
-+ _cairo_matrix_transformed_circle_axes (matrix, radius, &major, NULL);
-+
-+ return major;
- }
-
- void
- _cairo_matrix_to_pixman_matrix (const cairo_matrix_t *matrix,
- pixman_transform_t *pixman_transform,
- double xc,
- double yc)
- {
-diff --git a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
-@@ -610,16 +610,17 @@ static cairo_status_t
- int x_tile, y_tile, left, right, top, bottom;
- RECT clip;
- const cairo_color_t *background_color;
- const unsigned char *mime_data;
- unsigned long mime_size;
- cairo_image_info_t mime_info;
- cairo_bool_t use_mime;
- DWORD mime_type;
-+ cairo_bool_t axis_swap;
-
- /* If we can't use StretchDIBits with this surface, we can't do anything
- * here.
- */
- if (!(surface->flags & CAIRO_WIN32_SURFACE_CAN_STRETCHDIB))
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- if (surface->content == CAIRO_CONTENT_COLOR_ALPHA)
-@@ -658,39 +659,65 @@ static cairo_status_t
- &mime_size,
- &mime_info);
- }
- if (_cairo_status_is_error (status))
- return status;
-
- use_mime = (status == CAIRO_STATUS_SUCCESS);
-
-- if (!use_mime && image->format != CAIRO_FORMAT_RGB24) {
-+ m = pattern->base.matrix;
-+ status = cairo_matrix_invert (&m);
-+ /* _cairo_pattern_set_matrix guarantees invertibility */
-+ assert (status == CAIRO_STATUS_SUCCESS);
-+ cairo_matrix_multiply (&m, &m, &surface->ctm);
-+ cairo_matrix_multiply (&m, &m, &surface->gdi_ctm);
-+ /* Check if the matrix swaps the X and Y axes by checking if the diagonal
-+ * is effectively zero. This can happen, for example, if it was composed
-+ * with a rotation such as a landscape transform. Some printing devices
-+ * don't support such transforms in StretchDIBits.
-+ */
-+ axis_swap = fabs (m.xx*image->width) < 1 && fabs (m.yy*image->height) < 1;
-+
-+ if (!use_mime && (image->format != CAIRO_FORMAT_RGB24 || axis_swap)) {
- cairo_surface_t *opaque_surface;
- cairo_surface_pattern_t image_pattern;
- cairo_solid_pattern_t background_pattern;
-+ int width = image->width, height = image->height;
-
-+ if (axis_swap) {
-+ width = image->height;
-+ height = image->width;
-+ }
- opaque_surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
-- image->width,
-- image->height);
-+ width,
-+ height);
- if (opaque_surface->status) {
- status = opaque_surface->status;
- goto CLEANUP_OPAQUE_IMAGE;
- }
-
-- _cairo_pattern_init_solid (&background_pattern,
-- background_color);
-- status = _cairo_surface_paint (opaque_surface,
-- CAIRO_OPERATOR_SOURCE,
-- &background_pattern.base,
-- NULL);
-- if (status)
-- goto CLEANUP_OPAQUE_IMAGE;
-+ if (image->format != CAIRO_FORMAT_RGB24) {
-+ _cairo_pattern_init_solid (&background_pattern,
-+ background_color);
-+ status = _cairo_surface_paint (opaque_surface,
-+ CAIRO_OPERATOR_SOURCE,
-+ &background_pattern.base,
-+ NULL);
-+ if (status)
-+ goto CLEANUP_OPAQUE_IMAGE;
-+ }
-
- _cairo_pattern_init_for_surface (&image_pattern, &image->base);
-+ if (axis_swap) {
-+ /* swap the X and Y axes to undo the axis swap in the matrix */
-+ cairo_matrix_t swap_xy = { 0, 1, 1, 0, 0, 0 };
-+ cairo_pattern_set_matrix (&image_pattern.base, &swap_xy);
-+ cairo_matrix_multiply (&m, &swap_xy, &m);
-+ }
- status = _cairo_surface_paint (opaque_surface,
- CAIRO_OPERATOR_OVER,
- &image_pattern.base,
- NULL);
- _cairo_pattern_fini (&image_pattern.base);
- if (status)
- goto CLEANUP_OPAQUE_IMAGE;
-
-@@ -706,23 +733,16 @@ static cairo_status_t
- bi.bmiHeader.biXPelsPerMeter = PELS_72DPI;
- bi.bmiHeader.biYPelsPerMeter = PELS_72DPI;
- bi.bmiHeader.biPlanes = 1;
- bi.bmiHeader.biBitCount = 32;
- bi.bmiHeader.biCompression = use_mime ? mime_type : BI_RGB;
- bi.bmiHeader.biClrUsed = 0;
- bi.bmiHeader.biClrImportant = 0;
-
-- m = pattern->base.matrix;
-- status = cairo_matrix_invert (&m);
-- /* _cairo_pattern_set_matrix guarantees invertibility */
-- assert (status == CAIRO_STATUS_SUCCESS);
--
-- cairo_matrix_multiply (&m, &m, &surface->gdi_ctm);
-- cairo_matrix_multiply(&m, &m, &surface->ctm);
- SaveDC (surface->dc);
- _cairo_matrix_to_win32_xform (&m, &xform);
-
- if (! SetWorldTransform (surface->dc, &xform)) {
- status = _cairo_win32_print_gdi_error ("_cairo_win32_printing_surface_paint_image_pattern");
- goto CLEANUP_OPAQUE_IMAGE;
- }
-
-@@ -1260,16 +1280,17 @@ static cairo_int_status_t
- DWORD pen_width;
- DWORD *dash_array;
- HGDIOBJ obj;
- unsigned int i;
- cairo_solid_pattern_t clear;
- cairo_matrix_t mat;
- double scale;
- double scaled_width;
-+ double major, minor;
-
- status = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
- if (status)
- return status;
-
- if (op == CAIRO_OPERATOR_CLEAR) {
- _cairo_win32_printing_surface_init_clear_color (surface, &clear);
- source = (cairo_pattern_t*) &clear;
-@@ -1350,22 +1371,40 @@ static cairo_int_status_t
- if (status)
- return status;
-
- /*
- * Switch to user space to set line parameters
- */
- SaveDC (surface->dc);
-
-- _cairo_matrix_to_win32_xform (&mat, &xform);
-- xform.eDx = 0.0f;
-- xform.eDy = 0.0f;
-+ /* Some printers don't handle transformed strokes. Avoid the transform
-+ * if not required for the pen shape. Use the SVD here to find the major
-+ * and minor scales then check if they differ by more than 1 device unit.
-+ * If the difference is smaller, then just treat the scaling as uniform.
-+ * This check ignores rotations as the pen shape is symmetric before
-+ * transformation.
-+ */
-+ _cairo_matrix_transformed_circle_axes (&mat, scale, &major, &minor);
-+ if (fabs (major - minor) > 1) {
-+ /* Check if the matrix swaps the X and Y axes such that the diagonal
-+ * is nearly zero. This was observed to cause problems with XPS export.
-+ */
-+ if (fabs (mat.xx) < 1e-6 && fabs (mat.yy) < 1e-6) {
-+ /* swap the X and Y axes to undo the axis swap in the matrix */
-+ cairo_matrix_t swap_xy = { 0, 1, 1, 0, 0, 0 };
-+ cairo_matrix_multiply (&mat, &swap_xy, &mat);
-+ }
-+ _cairo_matrix_to_win32_xform (&mat, &xform);
-+ xform.eDx = 0.0f;
-+ xform.eDy = 0.0f;
-
-- if (!ModifyWorldTransform (surface->dc, &xform, MWT_LEFTMULTIPLY))
-- return _cairo_win32_print_gdi_error ("_win32_surface_stroke:SetWorldTransform");
-+ if (!ModifyWorldTransform (surface->dc, &xform, MWT_LEFTMULTIPLY))
-+ return _cairo_win32_print_gdi_error ("_win32_surface_stroke:SetWorldTransform");
-+ }
-
- if (source->type == CAIRO_PATTERN_TYPE_SOLID) {
- StrokePath (surface->dc);
- } else {
- if (!WidenPath (surface->dc))
- return _cairo_win32_print_gdi_error ("_win32_surface_stroke:WidenPath");
- if (!SelectClipPath (surface->dc, RGN_AND))
- return _cairo_win32_print_gdi_error ("_win32_surface_stroke:SelectClipPath");
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -2115,16 +2115,22 @@ cairo_private cairo_bool_t
- int *itx, int *ity);
-
- cairo_private cairo_bool_t
- _cairo_matrix_has_unity_scale (const cairo_matrix_t *matrix);
-
- cairo_private cairo_bool_t
- _cairo_matrix_is_pixel_exact (const cairo_matrix_t *matrix) cairo_pure;
-
-+cairo_private void
-+_cairo_matrix_transformed_circle_axes (const cairo_matrix_t *matrix,
-+ double radius,
-+ double *major,
-+ double *minor);
-+
- cairo_private double
- _cairo_matrix_transformed_circle_major_axis (const cairo_matrix_t *matrix,
- double radius) cairo_pure;
-
- cairo_private void
- _cairo_matrix_to_pixman_matrix (const cairo_matrix_t *matrix,
- pixman_transform_t *pixman_transform,
- double xc,
diff --git a/gfx/cairo/win32-raster.patch b/gfx/cairo/win32-raster.patch
deleted file mode 100644
index 080873121..000000000
--- a/gfx/cairo/win32-raster.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-changeset: 29338:f2a10f325734
-tag: qtip
-tag: tip
-tag: win32-raster-mask2.patch
-tag: qbase
-user: Jeff Muizelaar <jmuizelaar@mozilla.com>
-date: Mon Jun 22 14:26:07 2009 -0400
-summary: imported patch win32-raster-mask2.patch
-
-diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
---- a/gfx/cairo/cairo/src/cairo-image-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
-@@ -1232,27 +1232,27 @@ typedef struct _cairo_image_surface_span
- cairo_composite_rectangles_t composite_rectangles;
- } cairo_image_surface_span_renderer_t;
-
--static cairo_status_t
--_cairo_image_surface_span_renderer_render_row (
-- void *abstract_renderer,
-+void
-+_cairo_image_surface_span_render_row (
- int y,
- const cairo_half_open_span_t *spans,
-- unsigned num_spans)
-+ unsigned num_spans,
-+ cairo_image_surface_t *mask,
-+ const cairo_composite_rectangles_t *rects)
- {
-- cairo_image_surface_span_renderer_t *renderer = abstract_renderer;
-- int xmin = renderer->composite_rectangles.mask.x;
-- int xmax = xmin + renderer->composite_rectangles.width;
-+ int xmin = rects->mask.x;
-+ int xmax = xmin + rects->width;
- uint8_t *row;
- int prev_x = xmin;
- int prev_alpha = 0;
- unsigned i;
-
- /* Make sure we're within y-range. */
-- y -= renderer->composite_rectangles.mask.y;
-- if (y < 0 || y >= renderer->composite_rectangles.height)
-+ y -= rects->mask.y;
-+ if (y < 0 || y >= rects->height)
- return CAIRO_STATUS_SUCCESS;
-
-- row = (uint8_t*)(renderer->mask->data) + y*(size_t)renderer->mask->stride - xmin;
-+ row = (uint8_t*)(mask->data) + y*(size_t)mask->stride - xmin;
-
- /* Find the first span within x-range. */
- for (i=0; i < num_spans && spans[i].x < xmin; i++) {}
-@@ -1286,7 +1286,17 @@ _cairo_image_surface_span_renderer_rende
- if (prev_alpha != 0 && prev_x < xmax) {
- memset(row + prev_x, prev_alpha, xmax - prev_x);
- }
-+}
-
-+static cairo_status_t
-+_cairo_image_surface_span_renderer_render_row (
-+ void *abstract_renderer,
-+ int y,
-+ const cairo_half_open_span_t *spans,
-+ unsigned num_spans)
-+{
-+ cairo_image_surface_span_renderer_t *renderer = abstract_renderer;
-+ _cairo_image_surface_span_render_row (y, spans, num_spans, renderer->mask, &renderer->composite_rectangles);
- return CAIRO_STATUS_SUCCESS;
- }
-
-diff --git a/gfx/cairo/cairo/src/cairo-tor-scan-converter.c b/gfx/cairo/cairo/src/cairo-tor-scan-converter.c
---- a/gfx/cairo/cairo/src/cairo-tor-scan-converter.c
-+++ b/gfx/cairo/cairo/src/cairo-tor-scan-converter.c
-@@ -295,9 +295,9 @@ typedef int grid_area_t;
- #elif GRID_XY == 15
- # define GRID_AREA_TO_ALPHA(c) (((c) << 4) + (c))
- #elif GRID_XY == 2*256*15
--# define GRID_AREA_TO_ALPHA(c) (((c) + ((c)<<4)) >> 9)
-+# define GRID_AREA_TO_ALPHA(c) (((c) + ((c)<<4) + 256) >> 9)
- #else
--# define GRID_AREA_TO_ALPHA(c) ((c)*255 / GRID_XY) /* tweak me for rounding */
-+# define GRID_AREA_TO_ALPHA(c) (((c)*255 + GRID_XY/2) / GRID_XY)
- #endif
-
- #define UNROLL3(x) x x x
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -2048,6 +2048,148 @@ _cairo_win32_surface_reset (void *abstra
- return CAIRO_STATUS_SUCCESS;
- }
-
-+typedef struct _cairo_win32_surface_span_renderer {
-+ cairo_span_renderer_t base;
-+
-+ cairo_operator_t op;
-+ const cairo_pattern_t *pattern;
-+ cairo_antialias_t antialias;
-+
-+ cairo_image_surface_t *mask;
-+ cairo_win32_surface_t *dst;
-+
-+ cairo_composite_rectangles_t composite_rectangles;
-+} cairo_win32_surface_span_renderer_t;
-+
-+static cairo_status_t
-+_cairo_win32_surface_span_renderer_render_row (
-+ void *abstract_renderer,
-+ int y,
-+ const cairo_half_open_span_t *spans,
-+ unsigned num_spans)
-+{
-+ cairo_win32_surface_span_renderer_t *renderer = abstract_renderer;
-+ _cairo_image_surface_span_render_row (y, spans, num_spans, renderer->mask, &renderer->composite_rectangles);
-+ return CAIRO_STATUS_SUCCESS;
-+}
-+
-+static void
-+_cairo_win32_surface_span_renderer_destroy (void *abstract_renderer)
-+{
-+ cairo_win32_surface_span_renderer_t *renderer = abstract_renderer;
-+ if (!renderer) return;
-+
-+ if (renderer->mask != NULL)
-+ cairo_surface_destroy (&renderer->mask->base);
-+
-+ free (renderer);
-+}
-+
-+static cairo_status_t
-+_cairo_win32_surface_span_renderer_finish (void *abstract_renderer)
-+{
-+ cairo_win32_surface_span_renderer_t *renderer = abstract_renderer;
-+ cairo_status_t status = CAIRO_STATUS_SUCCESS;
-+
-+ if (renderer->pattern == NULL || renderer->mask == NULL)
-+ return CAIRO_STATUS_SUCCESS;
-+
-+ status = cairo_surface_status (&renderer->mask->base);
-+ if (status == CAIRO_STATUS_SUCCESS) {
-+ cairo_composite_rectangles_t *rects = &renderer->composite_rectangles;
-+ cairo_win32_surface_t *dst = renderer->dst;
-+ cairo_pattern_t *mask_pattern = cairo_pattern_create_for_surface (&renderer->mask->base);
-+ /* composite onto the image surface directly if we can */
-+ if (dst->image) {
-+ GdiFlush();
-+
-+ status = dst->image->backend->composite (renderer->op,
-+ renderer->pattern, mask_pattern, dst->image,
-+ rects->src.x,
-+ rects->src.y,
-+ 0, 0, /* mask.x, mask.y */
-+ rects->dst.x, rects->dst.y,
-+ rects->width, rects->height);
-+ } else {
-+ /* otherwise go through the fallback_composite path which
-+ * will do the appropriate surface acquisition */
-+ status = _cairo_surface_fallback_composite (
-+ renderer->op,
-+ renderer->pattern, mask_pattern, dst,
-+ rects->src.x,
-+ rects->src.y,
-+ 0, 0, /* mask.x, mask.y */
-+ rects->dst.x, rects->dst.y,
-+ rects->width, rects->height);
-+ }
-+ cairo_pattern_destroy (mask_pattern);
-+
-+ }
-+ if (status != CAIRO_STATUS_SUCCESS)
-+ return _cairo_span_renderer_set_error (abstract_renderer,
-+ status);
-+ return CAIRO_STATUS_SUCCESS;
-+}
-+
-+static cairo_bool_t
-+_cairo_win32_surface_check_span_renderer (cairo_operator_t op,
-+ const cairo_pattern_t *pattern,
-+ void *abstract_dst,
-+ cairo_antialias_t antialias,
-+ const cairo_composite_rectangles_t *rects)
-+{
-+ (void) op;
-+ (void) pattern;
-+ (void) abstract_dst;
-+ (void) antialias;
-+ (void) rects;
-+ return TRUE;
-+}
-+
-+static cairo_span_renderer_t *
-+_cairo_win32_surface_create_span_renderer (cairo_operator_t op,
-+ const cairo_pattern_t *pattern,
-+ void *abstract_dst,
-+ cairo_antialias_t antialias,
-+ const cairo_composite_rectangles_t *rects)
-+{
-+ cairo_win32_surface_t *dst = abstract_dst;
-+ cairo_win32_surface_span_renderer_t *renderer
-+ = calloc(1, sizeof(*renderer));
-+ cairo_status_t status;
-+ int width = rects->width;
-+ int height = rects->height;
-+
-+ if (renderer == NULL)
-+ return _cairo_span_renderer_create_in_error (CAIRO_STATUS_NO_MEMORY);
-+
-+ renderer->base.destroy = _cairo_win32_surface_span_renderer_destroy;
-+ renderer->base.finish = _cairo_win32_surface_span_renderer_finish;
-+ renderer->base.render_row =
-+ _cairo_win32_surface_span_renderer_render_row;
-+ renderer->op = op;
-+ renderer->pattern = pattern;
-+ renderer->antialias = antialias;
-+ renderer->dst = dst;
-+
-+ renderer->composite_rectangles = *rects;
-+
-+ /* TODO: support rendering to A1 surfaces (or: go add span
-+ * compositing to pixman.) */
-+ renderer->mask = (cairo_image_surface_t *)
-+ cairo_image_surface_create (CAIRO_FORMAT_A8,
-+ width, height);
-+
-+ status = cairo_surface_status (&renderer->mask->base);
-+
-+ if (status != CAIRO_STATUS_SUCCESS) {
-+ _cairo_win32_surface_span_renderer_destroy (renderer);
-+ return _cairo_span_renderer_create_in_error (status);
-+ }
-+ return &renderer->base;
-+}
-+
-+
- static const cairo_surface_backend_t cairo_win32_surface_backend = {
- CAIRO_SURFACE_TYPE_WIN32,
- _cairo_win32_surface_create_similar,
-@@ -2060,8 +2202,8 @@ static const cairo_surface_backend_t cai
- _cairo_win32_surface_composite,
- _cairo_win32_surface_fill_rectangles,
- NULL, /* composite_trapezoids */
-- NULL, /* create_span_renderer */
-- NULL, /* check_span_renderer */
-+ _cairo_win32_surface_create_span_renderer,
-+ _cairo_win32_surface_check_span_renderer,
- NULL, /* copy_page */
- NULL, /* show_page */
- _cairo_win32_surface_set_clip_region,
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -2193,6 +2193,12 @@ _cairo_image_surface_set_clip_region (vo
- cairo_private cairo_image_surface_t *
- _cairo_image_surface_coerce (cairo_image_surface_t *surface,
- cairo_format_t format);
-+cairo_private void
-+_cairo_image_surface_span_render_row (int y,
-+ const cairo_half_open_span_t *spans,
-+ unsigned num_spans,
-+ cairo_image_surface_t *mask,
-+ const cairo_composite_rectangles_t *rects);
-
- cairo_private cairo_image_transparency_t
- _cairo_image_analyze_transparency (cairo_image_surface_t *image);
diff --git a/gfx/cairo/win32-transparent-surface.patch b/gfx/cairo/win32-transparent-surface.patch
deleted file mode 100644
index c8765cf28..000000000
--- a/gfx/cairo/win32-transparent-surface.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -1709,40 +1709,23 @@ _cairo_win32_surface_show_glyphs (void
- }
- #else
- return CAIRO_INT_STATUS_UNSUPPORTED;
- #endif
- }
-
- #undef STACK_GLYPH_SIZE
-
--/**
-- * cairo_win32_surface_create:
-- * @hdc: the DC to create a surface for
-- *
-- * Creates a cairo surface that targets the given DC. The DC will be
-- * queried for its initial clip extents, and this will be used as the
-- * size of the cairo surface. The resulting surface will always be of
-- * format %CAIRO_FORMAT_RGB24; should you need another surface format,
-- * you will need to create one through
-- * cairo_win32_surface_create_with_dib().
-- *
-- * Return value: the newly created surface
-- **/
--cairo_surface_t *
--cairo_win32_surface_create (HDC hdc)
-+static cairo_surface_t *
-+cairo_win32_surface_create_internal (HDC hdc, cairo_format_t format)
- {
- cairo_win32_surface_t *surface;
-
-- cairo_format_t format;
- RECT rect;
-
-- /* Assume that everything coming in as a HDC is RGB24 */
-- format = CAIRO_FORMAT_RGB24;
--
- surface = malloc (sizeof (cairo_win32_surface_t));
- if (surface == NULL)
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
-
- if (_cairo_win32_save_initial_clip (hdc, surface) != CAIRO_STATUS_SUCCESS) {
- free (surface);
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
- }
-@@ -1765,17 +1748,58 @@ cairo_win32_surface_create (HDC hdc)
- surface->extents.width = rect.right - rect.left;
- surface->extents.height = rect.bottom - rect.top;
-
- surface->flags = _cairo_win32_flags_for_dc (surface->dc);
-
- _cairo_surface_init (&surface->base, &cairo_win32_surface_backend,
- _cairo_content_from_format (format));
-
-- return (cairo_surface_t *)surface;
-+ return &surface->base;
-+}
-+
-+/**
-+ * cairo_win32_surface_create:
-+ * @hdc: the DC to create a surface for
-+ *
-+ * Creates a cairo surface that targets the given DC. The DC will be
-+ * queried for its initial clip extents, and this will be used as the
-+ * size of the cairo surface. The resulting surface will always be of
-+ * format %CAIRO_FORMAT_RGB24; should you need another surface format,
-+ * you will need to create one through
-+ * cairo_win32_surface_create_with_dib() or call
-+ * cairo_win32_surface_create_with_alpha.
-+ *
-+ * Return value: the newly created surface
-+ **/
-+cairo_surface_t *
-+cairo_win32_surface_create (HDC hdc)
-+{
-+ /* Assume everything comes in as RGB24 */
-+ return cairo_win32_surface_create_internal(hdc, CAIRO_FORMAT_RGB24);
-+}
-+
-+/**
-+ * cairo_win32_surface_create_with_alpha:
-+ * @hdc: the DC to create a surface for
-+ *
-+ * Creates a cairo surface that targets the given DC. The DC will be
-+ * queried for its initial clip extents, and this will be used as the
-+ * size of the cairo surface. The resulting surface will always be of
-+ * format %CAIRO_FORMAT_ARGB32; this format is used when drawing into
-+ * transparent windows.
-+ *
-+ * Return value: the newly created surface
-+ *
-+ * Since: 1.10
-+ **/
-+cairo_surface_t *
-+cairo_win32_surface_create_with_alpha (HDC hdc)
-+{
-+ return cairo_win32_surface_create_internal(hdc, CAIRO_FORMAT_ARGB32);
- }
-
- /**
- * cairo_win32_surface_create_with_dib:
- * @format: format of pixels in the surface to create
- * @width: width of the surface, in pixels
- * @height: height of the surface, in pixels
- *
-diff --git a/gfx/cairo/cairo/src/cairo-win32.h b/gfx/cairo/cairo/src/cairo-win32.h
---- a/gfx/cairo/cairo/src/cairo-win32.h
-+++ b/gfx/cairo/cairo/src/cairo-win32.h
-@@ -44,16 +44,19 @@
- #include <windows.h>
-
- CAIRO_BEGIN_DECLS
-
- cairo_public cairo_surface_t *
- cairo_win32_surface_create (HDC hdc);
-
- cairo_public cairo_surface_t *
-+cairo_win32_surface_create_with_alpha (HDC hdc);
-+
-+cairo_public cairo_surface_t *
- cairo_win32_printing_surface_create (HDC hdc);
-
- cairo_public cairo_surface_t *
- cairo_win32_surface_create_with_ddb (HDC hdc,
- cairo_format_t format,
- int width,
- int height);
-
diff --git a/gfx/cairo/win32-vertically-offset-glyph.patch b/gfx/cairo/win32-vertically-offset-glyph.patch
deleted file mode 100644
index ffdf63b4a..000000000
--- a/gfx/cairo/win32-vertically-offset-glyph.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
---- a/gfx/cairo/cairo/src/cairo-win32-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
-@@ -1742,17 +1742,18 @@ _cairo_win32_surface_show_glyphs (void
-
- cairo_matrix_transform_point(&device_to_logical,
- &next_user_x, &next_user_y);
-
- next_logical_x = _cairo_lround (next_user_x);
- next_logical_y = _cairo_lround (next_user_y);
-
- dxy_buf[j] = _cairo_lround (next_logical_x - logical_x);
-- dxy_buf[j+1] = _cairo_lround (next_logical_y - logical_y);
-+ dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
-+ /* note that GDI coordinate system is inverted */
-
- logical_x = next_logical_x;
- logical_y = next_logical_y;
- }
- }
-
- /* Using glyph indices for a Type 1 font does not work on a
- * printer DC. The win32 printing surface will convert the the
diff --git a/gfx/cairo/wrap-source_image.patch b/gfx/cairo/wrap-source_image.patch
deleted file mode 100644
index 89da5a08d..000000000
--- a/gfx/cairo/wrap-source_image.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-diff --git a/src/cairo-surface.c b/src/cairo-surface.c
-index 8278694..12f6242 100644
---- a/src/cairo-surface.c
-+++ b/src/cairo-surface.c
-@@ -1530,6 +1530,70 @@ _cairo_recording_surface_clone_similar (cairo_surface_t *surface,
- return CAIRO_STATUS_SUCCESS;
- }
-
-+struct acquire_source_image_data
-+{
-+ cairo_surface_t *src;
-+ cairo_image_surface_t *image;
-+ void *image_extra;
-+};
-+
-+static void
-+_wrap_release_source_image (void *data)
-+{
-+ struct acquire_source_image_data *acquire_data = data;
-+ _cairo_surface_release_source_image (acquire_data->src,
-+ acquire_data->image,
-+ acquire_data->image_extra);
-+ free(data);
-+}
-+
-+static cairo_status_t
-+_wrap_image (cairo_surface_t *src,
-+ cairo_image_surface_t *image,
-+ void *image_extra,
-+ cairo_image_surface_t **out)
-+{
-+ static cairo_user_data_key_t wrap_image_key;
-+ cairo_image_surface_t *surface;
-+ cairo_status_t status;
-+
-+ struct acquire_source_image_data *data = malloc (sizeof (*data));
-+ if (unlikely (data == NULL))
-+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-+ data->src = src;
-+ data->image = image;
-+ data->image_extra = image_extra;
-+
-+ surface = (cairo_image_surface_t *)
-+ _cairo_image_surface_create_with_pixman_format (image->data,
-+ image->pixman_format,
-+ image->width,
-+ image->height,
-+ image->stride);
-+ status = surface->base.status;
-+ if (status) {
-+ free (data);
-+ return status;
-+ }
-+
-+ status = _cairo_user_data_array_set_data (&surface->base.user_data,
-+ &wrap_image_key,
-+ data,
-+ _wrap_release_source_image);
-+ if (status) {
-+ cairo_surface_destroy (&surface->base);
-+ free (data);
-+ return status;
-+ }
-+
-+ pixman_image_set_component_alpha (
-+ surface->pixman_image,
-+ pixman_image_get_component_alpha (surface->pixman_image));
-+
-+ *out = surface;
-+ return CAIRO_STATUS_SUCCESS;
-+}
-+
- /**
- * _cairo_surface_clone_similar:
- * @surface: a #cairo_surface_t
-@@ -1606,15 +1670,19 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
- /* If we failed, try again with an image surface */
- status = _cairo_surface_acquire_source_image (src, &image, &image_extra);
- if (status == CAIRO_STATUS_SUCCESS) {
-- status =
-- surface->backend->clone_similar (surface, &image->base,
-- src_x, src_y,
-- width, height,
-- clone_offset_x,
-- clone_offset_y,
-- clone_out);
--
-- _cairo_surface_release_source_image (src, image, image_extra);
-+ status = _wrap_image(src, image, image_extra, &image);
-+ if (status != CAIRO_STATUS_SUCCESS) {
-+ _cairo_surface_release_source_image (src, image, image_extra);
-+ } else {
-+ status =
-+ surface->backend->clone_similar (surface, &image->base,
-+ src_x, src_y,
-+ width, height,
-+ clone_offset_x,
-+ clone_offset_y,
-+ clone_out);
-+ cairo_surface_destroy(&image->base);
-+ }
- }
- }
- }
diff --git a/gfx/cairo/xlib-flush-glyphs.patch b/gfx/cairo/xlib-flush-glyphs.patch
deleted file mode 100644
index 78a19d0dd..000000000
--- a/gfx/cairo/xlib-flush-glyphs.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
-index f0de3c7..e24c962 100644
---- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
-@@ -50,35 +50,36 @@
- #include "cairo-xlib-private.h"
- #include "cairo-xlib-surface-private.h"
- #include "cairo-clip-private.h"
- #include "cairo-error-private.h"
- #include "cairo-scaled-font-private.h"
- #include "cairo-surface-snapshot-private.h"
- #include "cairo-surface-subsurface-private.h"
- #include "cairo-region-private.h"
-+#include "cairo-xlib-xrender-private.h"
-
- #include <X11/Xutil.h> /* for XDestroyImage */
-+#include <X11/Xlibint.h> /* for access to XDisplay's innards */
-
- #define XLIB_COORD_MAX 32767
-
- #define DEBUG 0
-
- #if DEBUG
- #define UNSUPPORTED(reason) \
- fprintf (stderr, \
- "cairo-xlib: hit unsupported operation %s(), line %d: %s\n", \
- __FUNCTION__, __LINE__, reason), \
- CAIRO_INT_STATUS_UNSUPPORTED
- #else
- #define UNSUPPORTED(reason) CAIRO_INT_STATUS_UNSUPPORTED
- #endif
-
- #if DEBUG
--#include <X11/Xlibint.h>
- static void CAIRO_PRINTF_FORMAT (2, 3)
- _x_bread_crumb (Display *dpy,
- const char *fmt,
- ...)
- {
- xReq *req;
- char buf[2048];
- unsigned int len, len_dwords;
-@@ -4313,16 +4314,23 @@ _cairo_xlib_surface_add_glyph (cairo_xlib_display_t *display,
- }
- break;
- default:
- ASSERT_NOT_REACHED;
- break;
- }
- /* XXX assume X server wants pixman padding. Xft assumes this as well */
-
-+ struct _XDisplay *dpy = (struct _XDisplay *) display->display;
-+ int req_length = sz_xRenderAddGlyphsReq + 4;
-+ if (req_length & 3)
-+ req_length += 4 - (req_length & 3);
-+ if (dpy->bufptr + req_length > dpy->bufmax)
-+ XFlush (display->display);
-+
- XRenderAddGlyphs (display->display, glyphset_info->glyphset,
- &glyph_index, &glyph_info, 1,
- (char *) data,
- glyph_surface->stride * glyph_surface->height);
-
- if (data != glyph_surface->data)
- free (data);
-
diff --git a/gfx/cairo/xlib-glyph-clip-region.patch b/gfx/cairo/xlib-glyph-clip-region.patch
deleted file mode 100644
index 50ff7f951..000000000
--- a/gfx/cairo/xlib-glyph-clip-region.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
---- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
-@@ -4806,30 +4806,30 @@ static cairo_int_status_t
- }
-
- X_DEBUG ((display->display, "show_glyphs (dst=%x)", (unsigned int) dst->drawable));
-
- if (clip_region != NULL &&
- cairo_region_num_rectangles (clip_region) == 1)
- {
- cairo_rectangle_int_t glyph_extents;
-- const cairo_rectangle_int_t *clip_extents;
-+ cairo_rectangle_int_t clip_extents;
-
- /* Can we do without the clip?
- * Around 50% of the time the clip is redundant (firefox).
- */
- _cairo_scaled_font_glyph_approximate_extents (scaled_font,
- glyphs, num_glyphs,
- &glyph_extents);
-
-- clip_extents = &clip->path->extents;
-- if (clip_extents->x <= glyph_extents.x &&
-- clip_extents->y <= glyph_extents.y &&
-- clip_extents->x + clip_extents->width >= glyph_extents.x + glyph_extents.width &&
-- clip_extents->y + clip_extents->height >= glyph_extents.y + glyph_extents.height)
-+ cairo_region_get_extents(clip_region, &clip_extents);
-+ if (clip_extents.x <= glyph_extents.x &&
-+ clip_extents.y <= glyph_extents.y &&
-+ clip_extents.x + clip_extents.width >= glyph_extents.x + glyph_extents.width &&
-+ clip_extents.y + clip_extents.height >= glyph_extents.y + glyph_extents.height)
- {
- clip_region = NULL;
- }
- }
-
- status = _cairo_xlib_surface_set_clip_region (dst, clip_region);
- if (unlikely (status))
- goto BAIL0;
diff --git a/gfx/cairo/xlib-initialize-members.patch b/gfx/cairo/xlib-initialize-members.patch
deleted file mode 100644
index 0066ceb34..000000000
--- a/gfx/cairo/xlib-initialize-members.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -r 059e9961a122 gfx/cairo/cairo/src/cairo-xlib-display.c
---- a/gfx/cairo/cairo/src/cairo-xlib-display.c Thu Feb 25 03:59:05 2010 -0800
-+++ b/gfx/cairo/cairo/src/cairo-xlib-display.c Fri Feb 26 16:15:29 2010 +0100
-@@ -259,7 +259,14 @@
- * add our hook. For now, that means Render, so we call into its
- * QueryVersion function to ensure it gets initialized.
- */
-- XRenderQueryVersion (dpy, &render_major, &render_minor);
-+ Status s = XRenderQueryVersion (dpy, &render_major, &render_minor);
-+ if (s == 0) {
-+ /* XRenderQueryVersion failed, possibly because the server
-+ * doesn't have the RENDER extension. Don't leave the version
-+ * numbers uninitialised. See #548793.
-+ */
-+ render_major = render_minor = 0;
-+ }
-
- codes = XAddExtension (dpy);
- if (unlikely (codes == NULL)) {
diff --git a/gfx/cairo/zero-sized.patch b/gfx/cairo/zero-sized.patch
deleted file mode 100644
index bdd6ca798..000000000
--- a/gfx/cairo/zero-sized.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
-index e9e544d..cde68a1 100644
---- a/src/cairo-image-surface.c
-+++ b/src/cairo-image-surface.c
-@@ -324,8 +324,8 @@ _cairo_image_surface_create_with_pixman_format (unsigned char *data,
- cairo_surface_t *surface;
- pixman_image_t *pixman_image;
-
-- pixman_image = pixman_image_create_bits (pixman_format, width, height,
-- (uint32_t *) data, stride);
-+ pixman_image = pixman_image_create_bits (pixman_format, width ? width : 1, height ? height : 1,
-+ (uint32_t *) data, stride ? stride : 4);
-
- if (unlikely (pixman_image == NULL))
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
-diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
-index f86a133..ddcb600 100644
---- a/src/cairo-xlib-surface.c
-+++ b/src/cairo-xlib-surface.c
-@@ -675,7 +675,8 @@ _get_image_surface (cairo_xlib_surface_t *surface,
-
- pixmap = XCreatePixmap (surface->dpy,
- surface->drawable,
-- extents.width, extents.height,
-+ extents.width <= 0 ? 1 : extents.width,
-+ extents.height <= 0 ? 1 : extents.height,
- surface->depth);
- if (pixmap) {
- XCopyArea (surface->dpy, surface->drawable, pixmap, surface->gc,
-@@ -686,7 +687,8 @@ _get_image_surface (cairo_xlib_surface_t *surface,
- ximage = XGetImage (surface->dpy,
- pixmap,
- 0, 0,
-- extents.width, extents.height,
-+ extents.width <= 0 ? 1 : extents.width,
-+ extents.height <= 0 ? 1 : extents.height,
- AllPlanes, ZPixmap);
-
- XFreePixmap (surface->dpy, pixmap);
diff --git a/gfx/cairo/zombie-face.patch b/gfx/cairo/zombie-face.patch
deleted file mode 100644
index a4175fecc..000000000
--- a/gfx/cairo/zombie-face.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 0238fe2cafea2e1ed19bb222117bd73ee6898d4d Mon Sep 17 00:00:00 2001
-From: Karl Tomlinson <karlt+@karlt.net>
-Date: Thu, 14 May 2009 10:46:29 +0000
-Subject: [ft] Resolve mutual referencing problems with zombie faces
-
-Bug 21706 -- zombie ft_font_face / ft_unscaled_font mutual
- referencing problems
-[http://bugs.freedesktop.org/show_bug.cgi?id=21706]
-
-There can be more than one zombie font_face belonging to an unscaled_font,
-but only the first is destroyed. This leaks the client's FT_Face
-(and associated font data) as release of the FT_Face depends on release
-of the font_face.
-
-(The reason why Firefox ends up with two different font_faces for one
-unscaled_font is that load_flags for faces with artificial oblique have
-FT_LOAD_NO_BITMAP set.
-https://bugzilla.mozilla.org/show_bug.cgi?id=486974)
-
-Also it's possible for _cairo_ft_font_face_create to pull out a zombie
-font_face from the unscaled_font, which would crash
-_cairo_ft_font_face_scaled_font_create, as that expects non-null
-font_face->unscaled (if !font-face->pattern).
----
-diff --git a/AUTHORS b/AUTHORS
-index 289fecb..8c06174 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -86,7 +86,7 @@ Travis Spencer <tspencer@cs.pdx.edu> XCB backend fix
- Bill Spitzak <spitzak@d2.com> Build fix to find Xrender.h without xrender.pc
- Zhe Su <james.su@gmail.com> Add support for fontconfig's embeddedbitmap option
- Owen Taylor <otaylor@redhat.com> Font rewrite, documentation, win32 backend
--Karl Tomlinson <karlt+@karlt.net>
-+Karl Tomlinson <karlt+@karlt.net> Optimisation and obscure bug fixes (mozilla)
- Alp Toker <alp@atoker.com> Fix several code/comment typos
- Malcolm Tredinnick <malcolm@commsecure.com.au> Documentation fixes
- David Turner <david@freetype.org> Optimize gradient calculations
-diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
-index 1e2a18e..f9ff0b1 100644
---- a/src/cairo-ft-font.c
-+++ b/src/cairo-ft-font.c
-@@ -543,8 +543,10 @@ _cairo_ft_unscaled_font_destroy (void *abstract_font)
- /* See comments in _ft_font_face_destroy about the "zombie" state
- * for a _ft_font_face.
- */
-- if (unscaled->faces && !unscaled->faces->unscaled)
-+ if (unscaled->faces && unscaled->faces->unscaled == NULL) {
-+ assert (unscaled->faces->next == NULL);
- cairo_font_face_destroy (&unscaled->faces->base);
-+ }
- } else {
- _font_map_release_face_lock_held (font_map, unscaled);
- }
-@@ -2233,9 +2235,10 @@ _cairo_ft_font_face_destroy (void *abstract_face)
- if (font_face == NULL)
- return;
-
-- /* When destroying the face created by cairo_ft_font_face_create_for_ft_face,
-+ /* When destroying a face created by cairo_ft_font_face_create_for_ft_face,
- * we have a special "zombie" state for the face when the unscaled font
-- * is still alive but there are no public references to the font face.
-+ * is still alive but there are no other references to a font face with
-+ * the same FT_Face.
- *
- * We go from:
- *
-@@ -2249,6 +2252,8 @@ _cairo_ft_font_face_destroy (void *abstract_face)
-
- if (font_face->unscaled &&
- font_face->unscaled->from_face &&
-+ font_face->next == NULL &&
-+ 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);
-@@ -2394,12 +2399,21 @@ _cairo_ft_font_face_create (cairo_ft_unscaled_font_t *unscaled,
- font_face->ft_options.extra_flags == ft_options->extra_flags &&
- cairo_font_options_equal (&font_face->ft_options.base, &ft_options->base))
- {
-- if (font_face->base.status == CAIRO_STATUS_SUCCESS)
-- return cairo_font_face_reference (&font_face->base);
-+ if (font_face->base.status) {
-+ /* The font_face has been left in an error state, abandon it. */
-+ *prev_font_face = font_face->next;
-+ break;
-+ }
-
-- /* The font_face has been left in an error state, abandon it. */
-- *prev_font_face = font_face->next;
-- break;
-+ if (font_face->unscaled == NULL) {
-+ /* Resurrect this "zombie" font_face (from
-+ * _cairo_ft_font_face_destroy), switching its unscaled_font
-+ * from owner to ownee. */
-+ font_face->unscaled = unscaled;
-+ _cairo_unscaled_font_reference (&unscaled->base);
-+ return &font_face->base;
-+ } else
-+ return cairo_font_face_reference (&font_face->base);
- }
- }
-
-@@ -2415,6 +2429,14 @@ _cairo_ft_font_face_create (cairo_ft_unscaled_font_t *unscaled,
-
- font_face->ft_options = *ft_options;
-
-+ if (unscaled->faces && unscaled->faces->unscaled == NULL) {
-+ /* This "zombie" font_face (from _cairo_ft_font_face_destroy)
-+ * is no longer needed. */
-+ assert (unscaled->from_face && unscaled->faces->next == NULL);
-+ cairo_font_face_destroy (&unscaled->faces->base);
-+ unscaled->faces = NULL;
-+ }
-+
- font_face->next = unscaled->faces;
- unscaled->faces = font_face;
-
---
-cgit v0.8.2