Commit graph

13100 commits

Author SHA1 Message Date
Luca Bacci
457ab827c9 Add definition for IDWriteFactory8 2025-07-14 16:34:06 +02:00
Luca Bacci
2a306f8e5f Always include dwrite-extra.hpp 2025-07-14 16:34:05 +02:00
Luca Bacci
53c3702686 dwrite-extra.hpp: Fix check for mingw-w64 workaround 2025-07-14 16:34:04 +02:00
Luca Bacci
02763155e8 dwrite-extra.hpp: Rework a bit 2025-07-14 16:34:03 +02:00
Luca Bacci
27411659d8 Rename dwrite / d2d1 polyfill headers to .hpp extension
They are only usable from C++ now
2025-07-14 16:34:02 +02:00
Luca Bacci
6ec91df76e Check which ID2D1DeviceContext subclasses are defined in d2d1_3.h
...and make d2d1-extra.h provide the missing definitions
2025-07-14 16:34:01 +02:00
Luca Bacci
6c75de11ab Meson: Simplify check for D2D, DWrite, WIC a bit 2025-07-14 16:34:00 +02:00
Luca Bacci
bd930bc98d Meson: Do not check for d2d1.h, dwrite.h, wincodec.h
If the import libraries are found, we can assume that headers are present
as well. All three headers were introduced many years ago in the Windows
SDK and mingw-w64 headers.
2025-07-14 16:34:00 +02:00
Luca Bacci
306396ff53 Add definitions for ID2D1DeviceContext7 in d2d1-extra.h
We're going to make use of ID2D1DeviceContext7::DrawPaintGlyphRun()
for COLRv1 fonts.
2025-07-14 16:33:59 +02:00
Luca Bacci
b1bc5a73f6 DWrite: don't set component-alpha for A8 mask
It was just a copy-paste leftover. Component-alpha makes sense
only for color images.
2025-07-14 16:33:59 +02:00
Luca Bacci
7f82b13fbf Fix typo 2025-07-14 16:33:58 +02:00
Luca Bacci
c7a3e6c519 Check if _MSC_VER macro is defined
Original patch from MSYS2:
https://github.com/msys2/MINGW-packages/blob/36dd8e0bdf/mingw-w64-cairo/0030-ucrt-clang-fixes.patch
2025-07-14 15:53:52 +02:00
Luca Bacci
b9bab3defb Readme: Remove leftover mention of Windows 2000
We support Windows Vista or newer
2025-07-14 15:52:40 +02:00
Uli Schlachter
2f21b3874c Merge branch 'fix-clipping-crash' into 'master'
Fix a crash in the clipping code

See merge request cairo/cairo!622
2025-07-14 13:01:46 +00:00
Uli Schlachter
55cb75c4df Merge branch 'winsdk_26100_fix' into 'master'
Add check for clang to cairo attribute handling code

See merge request cairo/cairo!612
2025-07-05 09:02:29 +00:00
Tim-Philipp Müller
217501df9c Merge branch 'fix-init-once-complete-check' into 'master'
Fix check for InitOnceComplete failure

See merge request cairo/cairo!631
2025-07-02 16:13:29 +00:00
Luca Bacci
76a0978d7b Fix check for InitOnceComplete failure
...also include <windows.h>

Fixes ff4f2f43
2025-07-02 13:26:00 +02:00
Ryan VanderMeulen
ef42ed0ec8 Add check for clang to cairo attribute handling code 2025-07-01 12:14:08 -04:00
Tim-Philipp Müller
0bf0265009 Merge branch 'compiler-features' into 'master'
Rework compiler features detection

See merge request cairo/cairo!627
2025-07-01 12:32:05 +00:00
Tim-Philipp Müller
b09fe42db5 Merge branch 'ci-update-for-removal-of-old-intel-mac-runners' into 'master'
ci: remove macos job that used ancient intel mac mini runners

See merge request cairo/cairo!630
2025-06-25 11:00:33 +00:00
Tim-Philipp Müller
1fa0aebad1 ci: remove macos job that used ancient intel mac mini runners
The old intel mac mini runners are being retired and are no
longer available.

A job that uses the new arm64 mac runners will be added in !498.
2025-06-25 11:14:17 +01:00
Tim-Philipp Müller
abb37e2d02 Merge branch 'fixes' into 'master'
Win32: Fix init once condition

See merge request cairo/cairo!628
2025-06-19 09:03:09 +00:00
Luca Bacci
d4f1ba74d0 Win32: Fix init once condition
Fixes !626
2025-06-19 10:15:37 +02:00
Tim-Philipp Müller
3ffb6d5c07 Merge branch 'win32-fixes' into 'master'
Win32 Fixes

Closes #897

See merge request cairo/cairo!626
2025-06-16 17:15:07 +00:00
Luca Bacci
51be2591fe Meson: Define _CRT_SECURE_NO_WARNINGS when compiling with MSVC 2025-06-16 19:10:07 +02:00
Luca Bacci
481c6c78bd Meson: Suppress warning C5286 on MSVC
This happens when converting _cairo_status to _cairo_int_status:

  warning C5286: implicit conversion from enum type '_cairo_int_status' to
  enum type '_cairo_status'; use an explicit cast to silence this warning
2025-06-16 19:01:58 +02:00
Luca Bacci
cc51930a32 Meson: Add arguments for both C and C++ compilation
C++ compilation is used on Windows
2025-06-16 18:58:00 +02:00
Luca Bacci
6989158f4c Drop support for very old GCC versions
They don't support C11 anyway. Additionally, CLang defines a very
conservative __GNUC__ value (which is also configurable via the
-fgnuc-version= command-line argument)
2025-06-16 18:52:39 +02:00
Luca Bacci
ff4f2f4301 Win32: Implement init_once with InitOnceBeginInitialize / InitOnceComplete 2025-06-16 18:50:13 +02:00
Luca Bacci
ec2e879e0d Meson: Add comment about atomic ops on Windows 2025-06-16 18:49:36 +02:00
Luca Bacci
ee554c8610 DWrite: Fix switch for grid-fit mode
Ooops!
2025-06-16 17:52:15 +02:00
Luca Bacci
d9a11c3736 Win32: Use cairo_atomic_once_t to initialize TLS slot
We were using the double-checked locking pattern, which requires
memory fences to be safe on architectures with weak memory
guarantess (e.g ARM64)

Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/897
2025-06-16 17:51:53 +02:00
Matthias Clasen
1d3347a690 Fix a crash in the clipping code
When cairo_is_all_clipped return true, we must not attempt
to change any of the clip fields, since it is pointing to
the static const __cairo_clip_all.

Moving the check for ->region into the 'if' is fine, since
it will always be NULL for _cairo_clip_all.

This was causing a crash in inkscape, see
https://gitlab.com/inkscape/inkscape/-/issues/5631
2025-05-28 18:12:16 -04:00
Uli Schlachter
a3ca983ec3 Merge branch 'cm/fix-uaf-warning' into 'master'
xcb: Fix a -Wuse-after-free=3 warning with GCC

Closes #898

See merge request cairo/cairo!623
2025-05-27 16:02:14 +00:00
correctmost
a1c31f5ed5 xcb: Fix a -Wuse-after-free=3 warning with GCC
Closes #898
2025-05-26 21:20:15 -04:00
Uli Schlachter
2e2080247f Merge branch 'fix-symbol-interposition' into 'master'
Fix cairo-fdr and cairo-trace

See merge request cairo/cairo!608
2025-05-01 05:57:15 +00:00
Tim-Philipp Müller
7fd0cd0a9c Merge branch 'alatiera/android-image-test' into 'master'
ci: update the android CI image

See merge request cairo/cairo!614
2025-03-26 11:45:58 +00:00
Tim-Philipp Müller
20503ecec3 ci: drop placeholder-job tags from image jobs 2025-03-26 10:24:11 +00:00
Jordan Petridis
8dc09a1c48 ci: Update rust version 2025-03-26 10:18:13 +00:00
Jordan Petridis
0826837e4a ci: Install android toolchain into our own image
Previously we were using a prebuilt image from
gstreamer, but now we can copy what's needed and build
our own image with ci-templates.
2025-03-26 10:18:13 +00:00
Jordan Petridis
3a3771f862 ci: Update the android CI image
Switch to using the gstreamer/cerbero image that
has NDK installed, until we add the android toolchain
to our image.

Followup to 92dde935d4
2025-03-26 10:18:13 +00:00
Jordan Petridis
6dd779677e build: Update wrap files 2025-03-26 10:18:13 +00:00
Jordan Petridis
8c67cb8e2d ci: Move the android cross file into the repository
Avoid having the txt file be inline bash which is inline
in yaml in the ci config.
2025-03-26 10:18:13 +00:00
Tim-Philipp Müller
58578a2f48 Merge branch 'ci-windows-image-to-gstreamer-1.26' into 'master'
ci: update windows image

See merge request cairo/cairo!615
2025-03-12 20:09:45 +00:00
Tim-Philipp Müller
e4add32e19 ci: mark fedora image job as "placeholder job"
Which will make it start faster, and 99% of the time it
will finish in seconds.
2025-03-12 18:19:13 +01:00
Tim-Philipp Müller
1e2e54123d ci: update windows image 2025-03-12 18:06:31 +01:00
Emmanuele Bassi
c1bc9cd321 Merge branch 'release-1-18-4' into 'master'
Release Cairo 1.18.4

See merge request cairo/cairo!613
2025-03-08 14:05:21 +00:00
Emmanuele Bassi
22206ba5dd Post-release version bump to 1.18.5 2025-03-08 13:23:25 +00:00
Emmanuele Bassi
4541e0cd3a Release Cairo 1.18.4 2025-03-08 13:23:25 +00:00
Emmanuele Bassi
92dde935d4 ci: Allow failure on the Android job
The CI image we depend on is gone; until we can get something back, this
CI job should not block other work.
2025-03-08 13:23:25 +00:00