Commit Graph

1174 Commits

Author SHA1 Message Date
Makoto Kato
ac82b42c8f Bug 1852200 - Turn on Pixman's NEON on Darwin platforms. r=gfx-reviewers,lsalzman
After landing bug 1820720, we can turn on Pixman's NEON on all Darwin
platforms.

Differential Revision: https://phabricator.services.mozilla.com/D187747
2023-09-08 10:00:42 +00:00
Jonathan Kew
81562e72c2 Bug 1846181 - Cherry-pick https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/266 to correctly escape parens in link targets. r=gfx-reviewers,jrmuizel
(Also includes a trivial change from MR 427, to fix a build warning in cairo-pdf-surface.c.)

Differential Revision: https://phabricator.services.mozilla.com/D185658
2023-08-08 16:32:44 +00:00
Makoto Kato
cb9f3de86f Bug 1846183 - Part 2. Update patch file. r=gfx-reviewers,lsalzman
Depends on D184915

Differential Revision: https://phabricator.services.mozilla.com/D184916
2023-08-01 06:59:10 +00:00
Makoto Kato
7dc4f58fef Bug 1846183 - Part 1. Use pixman_end_asm_function macro instead of __clang__. r=gfx-reviewers,lsalzman
Gecko still supports gcc build on *NIX platform. I should use
`pixman_end_asm_function` instead of `__clang__` to support gcc build.

Differential Revision: https://phabricator.services.mozilla.com/D184915
2023-08-01 06:59:09 +00:00
Makoto Kato
f1663f9dfa Bug 1820720 - Part 4. Don't use -no-integrated-as to build assembler files. r=gfx-reviewers,lsalzman
It is unnecessary to use `-no-integrated-as` to build assembler files.
So let's remove it.

Depends on D183971

Differential Revision: https://phabricator.services.mozilla.com/D183972
2023-07-24 08:06:37 +00:00
Makoto Kato
50df34b0e9 Bug 1820720 - Part 3. Add patch files. r=gfx-reviewers,lsalzman
Depends on D183970

Differential Revision: https://phabricator.services.mozilla.com/D183971
2023-07-24 08:06:36 +00:00
Makoto Kato
47a779e282 Bug 1820720 - Part 2. Import https://gitlab.freedesktop.org/pixman/pixman/-/issues/74. r=gfx-reviewers,lsalzman.
This is arm32 issue to build clang only.

Depends on D183969

Differential Revision: https://phabricator.services.mozilla.com/D183970
2023-07-24 08:06:36 +00:00
Makoto Kato
97981b55e8 Bug 1820720 - Part 1. Import https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/71. r=gfx-reviewers,lsalzman
Actually, we need GNU AS to build the assembler files in pixman. This fix
removes GNU AS dependency for aarch64 assembler files.

Differential Revision: https://phabricator.services.mozilla.com/D183969
2023-07-24 08:06:35 +00:00
Jonathan Kew
fa1ad68423 Bug 1840890 - Reorder code in _cairo_tag_stack_pop. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D182469
2023-06-29 16:19:58 +00:00
Mike Hommey
67aa6acd4f Bug 1834933 - Apply patch from https://gitlab.freedesktop.org/cairo/cairo/-/issues/293. r=gfx-reviewers,jrmuizel
With some minor change to remove the unused Carbon include.

Differential Revision: https://phabricator.services.mozilla.com/D179518
2023-06-21 21:41:02 +00:00
Mike Hommey
5827731854 Bug 1835978 - Update cairo version in gfx/cairo/README. r=gfx-reviewers,lsalzman
The last update was in bug 739096.

Differential Revision: https://phabricator.services.mozilla.com/D179516
2023-05-31 19:55:00 +00:00
Jeff Muizelaar
ae8629b27d Bug 1833782. Enable CXX11 atomics on clang-cl. r=mstange
The old Win32 specific atomics support was accidentally removed in bug 739096.
However, we can just use the existing CXX11 atomic support because we build with
clang-cl.

Differential Revision: https://phabricator.services.mozilla.com/D179267
2023-05-26 19:42:16 +00:00
Chris Peterson
03f125ade5 Bug 1832219 - Define _USE_MATH_DEFINES and M_PI on both regular and mingw Windows builds. r=firefox-build-system-reviewers,cubeb-reviewers,glandium,padenot
Without _USE_MATH_DEFINES, Windows' math.h doesn't define M_PI. Since _USE_MATH_DEFINES is defined globally, redundant definitions of _USE_MATH_DEFINES in moz.build files can be removed.

obj-build/dist/include/mozilla/ServoStyleConstsInlines.h:396:32: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/StaticPrefList_apz.h:133:22: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/gfx/PathHelpers.h:139:33: error: use of undeclared identifier 'M_PI'

Differential Revision: https://phabricator.services.mozilla.com/D177590
2023-05-11 02:45:40 +00:00
Jonathan Kew
64df3d06dc Bug 1803059 - Remove obsolete patch files from gfx/cairo, and create patch files to record locally-applied fixes. r=gfx-reviewers,lsalzman DONTBUILD
When we did the major cairo update in bug 739096, most of our old patch files were superseded
and no longer relevant, but I failed to clean them up at the time. So here, we remove all the
old patch files, and create new ones just for the fixes we've applied on top of the new code
from upstream.

I've omitted patch files for fixes that I am aware have already landed upstream, as those will
automatically be included in any future update we take. (It's possible more of the new patch
files will also be obsolete by the time we try pulling a new version, but at least they should
provide a starting point.)

Differential Revision: https://phabricator.services.mozilla.com/D164680
2022-12-14 16:18:01 +00:00
Tom Ritter
8e1c983ccd Bug 1800927: Fix the Updatebot linter and offending moz.yaml files r=ahal,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D162223
2022-11-21 19:35:16 +00:00
Ryan VanderMeulen
eec3bcd3cd Bug 1800187 - Part 2: Refactor libpixman moz.build file. r=jfkthame
* Remove workaround for a long-fixed LLVM bug
* Remove extra flags on pixman-mmx.c
* Remove unneeded -Winline flags
* Drop SIMD exceptions for macOS
* Use correct MMX define
* Enable all SIMD optimizations for Intel builds
* Clean up platform-specific logic
* Enable aarch64 optimizations on Android & Linux

Besides removing a lot of old cruft and improving general readability, this
also re-enables MMX optimizations (the define changed upstream and wasn't
updated in moz.build to reflect that) along with unconditionally compiling
with all available Intel SIMD optimization levels. Pixman does runtime CPU
feature detection, so this should be safe. It also enables AArch64
optimizations on Android and Linux.

Depends on D161868

Differential Revision: https://phabricator.services.mozilla.com/D161869
2022-11-14 15:46:34 +00:00
Ryan VanderMeulen
ef9215bccb Bug 1800187 - Part 1: Update libpixman to version 0.42.2. r=jfkthame
Depends on D161867

Differential Revision: https://phabricator.services.mozilla.com/D161868
2022-11-14 15:46:33 +00:00
Ryan VanderMeulen
67a586f153 Bug 1800187 - Part 0: Clean up pixman patches. r=jfkthame
Removes patches which are no longer being applied to our import and
updates the patches that are applied to the current upstream.

Differential Revision: https://phabricator.services.mozilla.com/D161867
2022-11-14 15:46:32 +00:00
Ryan VanderMeulen
2bbf869c32 Bug 1799748 - Backport fix for libpixman CVE-2022-44638. r=jfkthame
Backport of upstream commit:
a1f88e842e

Differential Revision: https://phabricator.services.mozilla.com/D161624
2022-11-09 18:42:13 +00:00
Jonathan Kew
1734947769 Bug 1797103 - Avoid potential null-deref crash in active_edges. r=gfx-reviewers,lsalzman
With this, which should not change behavior unless we were about to crash,
the testcase completes successfully (although slowly, as it's generating
an 8000-plus page PDF document).

Differential Revision: https://phabricator.services.mozilla.com/D160675
2022-11-01 14:44:35 +00:00
Jonathan Kew
0f2ff6fa4b Bug 1789482 - Let cairo-quartz-surface use DO_IMAGE for the EXTEND_PAD case as well as EXTEND_NONE, and re-enable the use of CGLayer-backed cairo-quartz surfaces for better pdf.js print quality. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D159623
2022-10-20 18:36:28 +00:00
Jonathan Kew
520c17080c Bug 1795919 - Remove unused gfxQuartzSurface constructor from a data buffer, and the (locally-added) cairo_quartz_surface function it depends on. r=gfx-reviewers,lsalzman
As there are no callers, this shouldn't change anything!

Differential Revision: https://phabricator.services.mozilla.com/D159611
2022-10-18 21:05:21 +00:00
Tom Ritter
f71c987669 Bug 332006: Remove an old cairo patch r=jrmuizel
This patch hasn't been touched in ten years and the code it affects does not
appear in the file, so I think it is old an unused.

Differential Revision: https://phabricator.services.mozilla.com/D159514
2022-10-17 20:03:53 +00:00
Jeff Muizelaar
d9dcf5b2b6 Bug 1778158 - quartz: Avoid reading beyond the end of image surfaces. r=jfkthame
The last row of data may have less than stride bytes so make sure we
only copy what we need.

This corresponds to cairo:cccc81ccba99600483621e02ae9438a4a5a3d024

Differential Revision: https://phabricator.services.mozilla.com/D151053
2022-07-06 12:25:10 +00:00
Jonathan Kew
782d6c08e7 Bug 1772225 - Implement a CGLayer-backed version of cairo_quartz_surface, to improve print/PDF output quality for pdf.js documents. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150128
2022-06-27 17:14:21 +00:00
Jonathan Kew
4d877eb687 Bug 1774631 - Fix typo in cairo-pdf-surface.c that causes us to get spuriously-rasterized PDF output. r=jrmuizel
There's a typo in the condition here, which results in returning CAIRO_INT_STATUS_UNSUPPORTED
in cases where that shouldn't be necessary. Fixing this gets me nice vector PDF output.

The bug is still present in upstream cairo trunk, so I'll report it there as well.

Differential Revision: https://phabricator.services.mozilla.com/D150381
2022-06-27 15:11:27 +00:00
ganguin
f01acfd647 Bug 1661450 - 2/8 Add wayland required code getting opt-out by disabling MOZ_X11 r=stransky,rmader
Ensure shared code with MOZ_X11 and MOZ_WAYLAND remains when MOZ_X11 is
undefined

Depends on D139526

Differential Revision: https://phabricator.services.mozilla.com/D139528
2022-04-20 09:32:07 +00:00
criss
8d62d22b30 Backed out 10 changesets (bug 1661450) for causing build bustages on nsWindow.cpp. CLOSED TREE
Backed out changeset 2c41d82de0c5 (bug 1661450)
Backed out changeset 5f58fcd7ac0b (bug 1661450)
Backed out changeset 62e56a6dcd22 (bug 1661450)
Backed out changeset 4b422ffa729f (bug 1661450)
Backed out changeset 6ca4705772da (bug 1661450)
Backed out changeset 031a6313459f (bug 1661450)
Backed out changeset 06ddf05e97d6 (bug 1661450)
Backed out changeset 4388b1b9aafd (bug 1661450)
Backed out changeset 600f9fd09fa6 (bug 1661450)
Backed out changeset cc5e8efe3ebf (bug 1661450)
2022-04-19 12:25:14 +03:00
ganguin
255b4632d9 Bug 1661450 - 2/8 Add wayland required code getting opt-out by disabling MOZ_X11 r=stransky,rmader
Ensure shared code with MOZ_X11 and MOZ_WAYLAND remains when MOZ_X11 is
undefined

Depends on D139526

Differential Revision: https://phabricator.services.mozilla.com/D139528
2022-04-19 08:35:26 +00:00
Jonathan Watt
c719ee9505 Bug 1322756 - Remove PostScript printing code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D134782
2021-12-30 11:41:28 +00:00
Mike Hommey
5245f8491f Bug 1733545 - Remove REQUIRES_UNIFIED_BUILD from third-party directories that don't need it. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D127229
2021-10-01 09:01:27 +00:00
Robert Mader
ea68cb4546 Bug 1732443 - Remove remaining XRender leftovers,r=emilio,stransky
The few cases where we still use Xlib most likely benefit little
from Xrender. Lets drop the support for it.

Differential Revision: https://phabricator.services.mozilla.com/D126970
2021-09-30 14:14:13 +00:00
Andi-Bogdan Postelnicu
2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Jonathan Kew
1f7af5607b Bug 1724795 - Fix leak in cairo-cff-subset (patch from https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/192, already merged upstream). r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D122201
2021-08-10 13:41:34 +00:00
Jonathan Kew
55e3fc6f6e Bug 1723787 - Apply cairo quartz font/surface changes from Andrea Canciani's quartz-colored-glyphs branch at https://gitlab.freedesktop.org/ranma42/cairo/-/commits/quartz-colored-glyphs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D121909
2021-08-09 14:28:42 +00:00
Jonathan Kew
0ca7fbff51 Bug 1721127 - Apply win32 printing surface fix from https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/228. r=jrmuizel
(Updated patch following discussion with @psychon/@ajohnson in the upstream cairo MR.)

Differential Revision: https://phabricator.services.mozilla.com/D121602
2021-08-04 12:56:48 +00:00
Jonathan Kew
aec1a8ca85 Bug 1722300 - patch 3 - Add basic support for internal named destinations when generating PDF output via cairo-quartz-surface. r=jrmuizel
Like the earlier support for the Link tag, this is a minimal version
that just implements the features we actually use.

Differential Revision: https://phabricator.services.mozilla.com/D121240
2021-08-04 12:52:37 +00:00
Jonathan Kew
c8767e7306 Bug 1722300 - patch 2 - Pull in cairo MR "pdf links: fix forward references to dest names with 'internal' flag". r=jrmuizel
This is https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/220, required so that
we can use the 'internal' attribute when generating link destinations.

Differential Revision: https://phabricator.services.mozilla.com/D121239
2021-08-04 12:52:37 +00:00
Jonathan Kew
c0b0f4fc91 Bug 1722300 - patch 1 - Pull recent PDF fixes/enhancements from upstream cairo (master branch). r=jrmuizel
In particular this includes the changes from cairo MRs

  https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/197 (pdf-object-streams)
  https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/213 (floating-point glyph widths)

The object-stream support gives us significantly more compact PDF output.

Differential Revision: https://phabricator.services.mozilla.com/D121238
2021-08-04 12:52:36 +00:00
Mike Hommey
221139493a Bug 1721962 - Switch to pkg-config for X11 libraries. r=firefox-build-system-reviewers,jgilbert,andi
Differential Revision: https://phabricator.services.mozilla.com/D121309
2021-07-30 11:39:39 +00:00
Mike Hommey
d772552af8 Bug 1722653 - Stop preprocessing cairo-features.h. r=gfx-reviewers,firefox-build-system-reviewers,jrmuizel,andi
Some of the defines are outdated and never actually set, and the
remaining ones can be easily set through existing or easily added
ifdefs.

Differential Revision: https://phabricator.services.mozilla.com/D121064
2021-07-29 23:38:31 +00:00
Mike Hommey
25c71f548b Bug 1722653 - Remove --enable-system-cairo. r=firefox-build-system-reviewers,jrmuizel,andi
It hasn't been supported since bug 1432751, > 3 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D121063
2021-07-29 23:38:30 +00:00
Jonathan Kew
aeecb02ab6 Bug 1722232 - Revert changeset 5689add84fe2 (bug 1717685) and take the upstream version of the fix from https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/195 instead. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D120801
2021-07-25 17:30:00 +00:00
Jonathan Kew
e4f80082a0 Bug 1717685 - Silently handle NOTHING_TO_DO as SUCCESS when replaying a recording, rather than asserting on it. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D119398
2021-07-20 17:43:31 +00:00
Jonathan Kew
90ced4b1e3 Bug 1721424 - Fix _cairo_strtod to accept a leading sign, avoiding infinite loop in parse_array. r=jrmuizel
This has been submitted upstream at https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/203.

Differential Revision: https://phabricator.services.mozilla.com/D120365
2021-07-20 17:42:20 +00:00
Jonathan Kew
9d936ed1da Bug 1715771 - Cherry-pick changes from https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/196 to avoid breakage when tagging PDF output. r=jrmuizel
Depends on D120214

Differential Revision: https://phabricator.services.mozilla.com/D120215
2021-07-19 13:17:46 +00:00
Jonathan Kew
b5d1e2eb0b Bug 1486386 - Cherry-pick cairo commit 30a0ae56d8eaf7735d6f4a8a889e9c54bc0debc1 to fix isxdigit issue. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D120214
2021-07-19 13:17:46 +00:00
Jonathan Kew
0e98585b83 Bug 1711064 - Cherry-pick fix from upstream cairo to resolve missing objects in generated PDF's xref table. r=jrmuizel
See https://gitlab.freedesktop.org/cairo/cairo/-/issues/487 for details. This was merged upstream in
2edcb1ac23;

Differential Revision: https://phabricator.services.mozilla.com/D116694
2021-06-03 13:23:43 +00:00
Jonathan Kew
422033a266 Bug 454059 - Add [minimal] tag support to cairo-quartz-surface.c. r=jrmuizel
This implements a subset of the tag() function on the quartz surface backend;
just enough to support generating links in PDF output. In particular, the
only tag type supported is Link, and we require the link area to be passed
as a list of rects in the 'begin' call; we don't support accumulating all
drawing operations between 'begin' and 'end' into a link area.

Differential Revision: https://phabricator.services.mozilla.com/D114206
2021-05-11 17:00:29 +00:00
Jonathan Kew
374b002063 Bug 1709441 - Bail out early from _cairo_image_compute_color if image is zero-sized. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D114354
2021-05-05 16:50:23 +00:00