Behdad Esfahbod and Claude Opus 4.8
5aeb5ec60d
[ft] Reselect the COLR palette instead of copying it per paint ( #6617 )
...
* [ft] Reselect the COLR palette instead of copying it per paint
#6490 lets paint callbacks run with the FT face unlocked, so a
callback can paint another glyph that selects a different palette on
the same FT_Face, changing the colors FreeType's palette buffer holds.
It guarded against that by heap-copying the whole palette on every
COLRv1 glyph paint.
Instead, remember on the hb_ft_font_t which palette hb-ft last
selected, and when a palette color is about to be read (with the lock
held) and another palette has been selected since, select ours again.
The common case costs one compare and no allocation.
Testing: meson test -C build passes. test-paint's
ft_reentrant_paint, which paints with palette 1 from inside the
custom-palette callback, fails with the reselect disabled and passes
with it.
Follow-up to #6490
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
* [ft] Drop palette bookkeeping; rely on FT_Palette_Select's no-op
FT_Palette_Select already skips its work when the requested palette is
the one already selected on the face, and returns the palette pointer
either way (freetype src/base/ftcolor.c). So the selected_palette
member added to track it, and the guard around the re-select, are
unnecessary: _hb_ft_get_solid_color re-selects our palette
unconditionally after a callback may have changed it, and FreeType
no-ops the common case where it is already current.
Removes hb_ft_font_t::selected_palette and both of its assignments.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
2026-11-10 11:22:15 -06:00
..
2026-11-02 11:48:40 -06:00
2026-09-06 12:55:21 -06:00
2026-11-09 17:54:20 -06:00
2026-10-22 06:51:49 -06:00
2026-08-12 18:27:23 -06:00
2025-03-07 18:19:29 -07:00
2026-10-27 12:15:17 -06:00
2026-10-27 12:15:17 -06:00
2026-11-07 13:26:37 -06:00
2025-05-06 13:17:13 +03:00
2025-05-06 13:17:13 +03:00
2025-05-06 13:17:13 +03:00
2025-05-06 13:17:13 +03:00
2026-11-07 13:26:37 -06:00
2025-07-30 01:19:29 +03:00
2026-11-07 12:51:23 -06:00
2026-11-07 12:51:23 -06:00
2024-03-30 02:20:21 +02:00
2026-11-01 19:14:23 -07:00
2026-11-01 19:14:23 -07:00
2026-07-30 11:12:48 -06:00
2026-11-01 19:14:23 -07:00
2026-04-28 13:59:28 -06:00
2026-03-28 02:57:56 -06:00
2025-11-14 14:39:52 +02:00
2026-11-01 19:14:23 -07:00
2026-03-27 23:37:52 -06:00
2026-09-30 15:59:36 -06:00
2026-11-01 19:14:23 -07:00
2026-11-01 19:14:23 -07:00
2026-11-01 19:14:23 -07:00
2023-11-30 16:31:44 +08:00
2026-06-11 13:48:12 +02:00
2026-03-28 16:08:37 -06:00
2026-03-13 01:21:13 +02:00
2026-07-31 04:31:26 +03:00
2026-03-13 01:21:13 +02:00
2026-08-25 15:17:00 -06:00
2026-04-28 15:52:29 +03:00
2026-07-31 04:31:26 +03:00
2023-11-04 15:21:47 -06:00
2026-07-27 19:20:18 -06:00
2026-11-09 20:26:42 -06:00
2026-07-08 00:28:35 -06:00
2024-09-23 08:02:25 -06:00
2026-11-09 20:26:42 -06:00
2026-11-09 20:26:42 -06:00
2024-09-23 08:02:25 -06:00
2026-10-27 14:44:18 -06:00
2026-07-08 01:12:27 -06:00
2025-03-27 15:37:01 -06:00
2025-03-27 14:44:52 -06:00
2026-11-09 20:30:13 -06:00
2026-11-02 10:52:07 -06:00
2026-11-02 10:52:07 -06:00
2026-11-09 20:30:13 -06:00
2025-10-17 15:23:05 -06:00
2026-05-02 11:45:28 -06:00
2026-11-01 21:19:20 -07:00
2026-03-26 15:15:56 -06:00
2026-11-08 12:16:33 -06:00
2026-10-18 14:58:48 -06:00
2026-11-08 12:16:33 -06:00
2025-03-12 23:56:52 -06:00
2026-06-17 02:04:23 -06:00
2023-02-21 18:07:53 +02:00
2026-11-08 12:16:33 -06:00
2026-03-27 19:59:03 -06:00
2025-04-04 16:17:32 -06:00
2026-03-27 19:59:03 -06:00
2025-04-04 16:17:32 -06:00
2026-03-27 19:59:03 -06:00
2025-03-10 16:20:16 -06:00
2026-11-04 23:03:36 +02:00
2026-07-26 17:05:29 -06:00
2026-11-09 20:25:53 -06:00
2026-11-04 12:05:35 -06:00
2026-09-03 22:30:40 -06:00
2026-10-19 19:16:51 -06:00
2026-07-26 11:19:11 -06:00
2026-11-09 13:00:15 -06:00
2026-11-09 13:00:15 -06:00
2026-02-22 00:20:31 -03:00
2026-10-27 18:05:47 -06:00
2026-10-22 13:04:52 -06:00
2026-11-07 16:29:39 -06:00
2026-08-27 16:34:19 -06:00
2026-10-31 10:48:18 -06:00
2026-11-08 12:16:33 -06:00
2026-02-17 13:42:08 -07:00
2026-11-09 20:30:13 -06:00
2026-09-21 00:41:07 +03:00
2026-10-22 19:31:32 +03:00
2026-09-10 14:54:07 -06:00
2026-11-01 09:48:25 -07:00
2026-09-10 14:54:07 -06:00
2025-03-11 11:56:00 -06:00
2026-09-10 14:54:07 -06:00
2026-04-13 00:38:40 -06:00
2026-06-05 15:09:11 -07:00
2025-02-28 01:13:25 -07:00
2026-09-10 12:11:13 -06:00
2026-11-04 17:05:57 -06:00
2026-06-05 15:09:13 -07:00
2026-10-16 00:19:21 +03:00
2026-08-17 15:13:59 -06:00
2026-10-30 17:15:02 -06:00
2026-08-13 19:32:24 -06:00
2025-03-22 16:02:39 -06:00
2026-08-13 19:55:11 -06:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-08-26 17:11:21 -06:00
2026-11-09 20:28:45 -06:00
2026-11-04 12:02:49 -06:00
2026-07-08 01:12:27 -06:00
2026-11-09 18:36:35 -06:00
2026-03-28 03:02:07 -06:00
2026-11-03 15:18:24 -06:00
2026-10-16 00:19:21 +03:00
2026-11-09 11:47:15 -06:00
2025-03-24 00:33:53 +02:00
2025-09-15 23:56:25 -06:00
2026-11-10 11:22:15 -06:00
2026-11-09 18:28:24 -06:00
2025-03-11 11:56:00 -06:00
2026-04-12 20:09:44 -06:00
2026-11-01 19:26:02 -07:00
2025-07-02 20:14:51 +03:00
2025-07-02 20:14:51 +03:00
2026-07-10 01:59:59 -06:00
2025-07-02 20:14:51 +03:00
2023-01-11 13:41:44 -07:00
2026-10-30 16:55:11 -06:00
2026-04-13 23:41:26 -06:00
2026-04-13 23:41:26 -06:00
2026-04-13 23:41:26 -06:00
2026-04-13 23:41:26 -06:00
2026-04-13 23:41:26 -06:00
2026-04-13 23:41:26 -06:00
2026-04-13 23:41:26 -06:00
2026-04-13 23:41:26 -06:00
2026-08-27 17:00:41 -06:00
2026-08-27 17:00:41 -06:00
2026-08-04 23:08:39 -06:00
2026-08-04 23:08:39 -06:00
2026-08-04 23:08:39 -06:00
2026-08-04 23:08:39 -06:00
2026-08-04 23:08:39 -06:00
2026-08-04 23:08:39 -06:00
2026-08-04 23:08:39 -06:00
2026-08-04 23:08:39 -06:00
2026-04-17 14:09:34 -06:00
2026-04-23 03:18:15 -06:00
2026-04-17 14:09:34 -06:00
2026-04-17 14:09:34 -06:00
2026-04-17 14:09:34 -06:00
2026-04-23 03:18:15 -06:00
2026-04-17 14:09:34 -06:00
2026-04-17 14:09:34 -06:00
2026-11-09 20:27:12 -06:00
2026-10-30 16:55:57 -06:00
2026-04-13 12:10:23 -06:00
2026-04-13 12:10:23 -06:00
2026-04-13 12:10:23 -06:00
2026-04-13 12:10:23 -06:00
2026-04-13 12:10:23 -06:00
2026-04-13 12:10:23 -06:00
2026-04-13 12:10:23 -06:00
2026-04-13 12:10:23 -06:00
2026-04-20 05:10:48 +02:00
2026-04-20 05:10:48 +02:00
2026-10-30 16:59:32 -06:00
2026-11-01 19:14:38 -07:00
2024-10-27 16:14:53 -07:00
2026-11-08 14:17:24 -06:00
2026-10-22 17:05:31 +03:00
2026-08-12 17:29:53 -06:00
2026-11-09 17:54:20 -06:00
2026-10-30 17:00:07 -06:00
2023-08-25 07:51:05 -06:00
2023-06-03 14:56:47 -06:00
2026-11-08 12:16:33 -06:00
2026-11-08 14:17:24 -06:00
2026-03-26 15:15:56 -06:00
2023-06-25 18:14:56 -06:00
2025-04-08 01:58:10 -06:00
2026-11-08 14:17:24 -06:00
2026-11-07 17:03:05 -06:00
2026-10-31 10:48:18 -06:00
2026-03-10 01:04:11 -03:00
2026-07-29 17:48:41 +00:00
2026-11-01 14:22:23 -07:00
2025-08-07 22:38:58 -06:00
2026-10-30 16:10:52 -06:00
2026-11-01 14:14:09 -07:00
2026-08-26 16:34:38 -06:00
2026-11-09 13:18:05 -06:00
2026-11-09 13:18:05 -06:00
2026-11-08 14:36:19 -06:00
2026-03-10 00:19:39 -06:00
2026-02-24 16:39:39 -03:00
2026-06-05 12:49:01 +02:00
2026-06-05 12:34:52 +02:00
2025-03-03 02:17:13 -07:00
2026-06-05 12:34:52 +02:00
2026-07-31 17:49:40 +03:00
2026-07-31 17:49:40 +03:00
2026-10-02 11:20:28 -06:00
2026-05-18 15:11:34 -06:00
2026-07-31 04:31:26 +03:00
2026-06-05 12:49:01 +02:00
2026-10-14 10:51:09 -06:00
2026-07-30 15:59:54 -06:00
2026-10-01 12:59:54 -06:00
2026-11-09 13:17:50 -06:00
2023-01-28 12:09:45 -07:00
2025-08-20 00:06:00 -06:00
2026-10-01 19:14:01 -06:00
2026-11-08 12:16:33 -06:00
2026-06-05 13:44:29 +02:00
2026-11-04 17:05:57 -06:00
2025-09-30 13:31:04 -06:00
2026-10-30 15:28:14 -06:00
2026-10-14 20:33:52 -06:00
2026-10-01 19:08:11 -06:00
2026-10-11 00:41:07 -06:00
2026-07-08 01:12:27 -06:00
2026-07-03 18:57:00 -06:00
2026-11-04 17:05:57 -06:00
2026-07-08 01:12:27 -06:00
2026-10-30 16:35:27 -06:00
2026-10-30 16:35:27 -06:00
2023-01-28 12:09:45 -07:00
2023-04-24 13:04:05 -06:00
2023-02-11 23:52:58 +02:00
2026-10-20 18:13:50 -06:00
2023-01-12 18:37:07 -07:00
2025-08-07 22:38:58 -06:00
2024-08-21 12:06:02 -06:00
2026-11-04 17:05:57 -06:00
2026-08-12 18:48:32 -06:00
2026-03-18 23:36:54 +02:00
2025-08-07 22:04:20 -06:00
2026-09-03 22:31:42 -06:00
2026-03-19 00:45:24 +02:00
2026-10-14 20:33:52 -06:00
2026-11-02 10:15:49 -07:00
2026-09-17 00:37:58 +03:00
2026-10-27 12:15:17 -06:00
2026-09-17 00:37:58 +03:00
2026-10-21 11:13:54 -06:00
2026-06-16 13:55:17 +02:00
2024-06-06 13:52:44 -06:00
2026-03-27 19:59:03 -06:00
2025-01-03 05:19:13 -07:00
2026-11-01 19:14:23 -07:00
2026-10-30 15:28:14 -06:00
2026-03-27 19:59:03 -06:00
2023-01-12 17:04:24 -07:00
2025-11-12 14:04:34 -05:00
2026-03-27 19:59:03 -06:00
2025-01-03 05:19:13 -07:00
2023-06-22 11:02:22 -06:00
2026-02-20 11:25:24 -07:00
2026-03-27 19:59:03 -06:00
2025-01-03 05:19:13 -07:00
2026-09-17 00:37:58 +03:00
2023-06-22 20:56:08 -04:00
2026-09-17 00:37:58 +03:00
2026-09-17 00:37:58 +03:00
2026-10-20 18:13:50 -06:00
2026-09-30 15:59:36 -06:00
2026-10-21 16:34:19 -06:00
2026-10-20 18:13:50 -06:00
2026-11-02 09:13:37 -07:00
2026-07-18 07:25:19 -06:00
2026-10-20 18:13:50 -06:00
2026-11-04 12:04:23 -06:00
2026-10-02 11:21:17 -06:00
2026-11-08 14:33:10 -06:00
2024-04-16 17:10:09 -06:00
2026-07-08 01:12:27 -06:00
2026-06-05 13:46:50 +02:00
2026-07-31 04:31:26 +03:00
2026-08-26 17:42:23 -06:00
2026-08-26 17:42:23 -06:00
2025-04-20 04:02:05 -06:00
2025-04-20 04:53:33 -06:00
2026-08-26 18:34:31 -06:00
2026-08-26 18:34:31 -06:00
2026-10-30 16:15:07 -06:00
2026-09-21 00:41:07 +03:00
2026-09-30 18:22:41 -06:00
2026-03-26 15:15:56 -06:00
2026-11-09 20:29:35 -06:00
2026-10-30 22:52:47 -06:00
2026-10-30 22:52:47 -06:00
2026-10-30 22:52:47 -06:00
2026-10-29 17:04:03 -06:00
2026-04-18 10:58:44 -06:00
2026-10-30 22:52:47 -06:00
2026-10-30 15:37:38 -06:00
2026-11-08 14:17:24 -06:00
2026-10-30 14:55:14 -06:00
2026-09-21 00:41:07 +03:00
2026-10-30 15:37:38 -06:00
2026-11-01 09:48:25 -07:00
2026-08-26 22:27:05 +03:00
2026-08-19 16:00:05 -06:00
2026-08-20 04:04:54 -06:00
2026-11-09 18:36:35 -06:00
2026-10-01 19:08:11 -06:00
2026-10-30 16:49:35 -06:00
2025-01-07 11:29:35 -07:00
2025-07-23 21:39:23 +03:00
2026-11-01 09:48:25 -07:00
2026-10-30 17:00:07 -06:00
2026-06-05 12:34:52 +02:00
2026-11-01 09:48:25 -07:00
2024-08-23 08:58:50 -06:00
2023-06-25 18:14:56 -06:00
2026-11-09 13:18:05 -06:00
2026-10-27 15:42:35 -06:00
2026-02-17 13:42:08 -07:00
2026-11-09 13:18:05 -06:00
2026-11-09 13:18:05 -06:00
2026-11-09 13:18:05 -06:00
2026-07-31 17:49:40 +03:00
2026-10-30 15:26:52 -06:00
2023-05-12 11:09:04 -06:00
2026-10-10 00:36:51 -06:00
2025-09-16 23:51:19 -04:00
2026-10-20 18:13:50 -06:00
2026-10-20 18:13:50 -06:00
2026-11-08 14:34:15 -06:00
2026-10-10 04:12:54 -06:00
2026-11-08 14:34:15 -06:00
2026-11-09 13:06:22 -06:00
2026-11-08 14:34:15 -06:00
2025-01-11 18:13:18 +02:00
2026-07-30 12:00:47 -06:00
2026-04-13 03:13:37 -06:00
2025-07-25 00:05:46 -06:00
2025-07-25 00:05:46 -06:00
2026-10-01 16:27:20 -06:00
2026-10-01 12:59:54 -06:00
2026-11-04 17:05:57 -06:00
2026-11-09 13:52:51 -06:00
2026-11-09 13:04:53 -06:00
2026-10-31 22:00:12 -06:00
2026-09-17 00:37:58 +03:00
2026-09-17 00:37:58 +03:00
2026-04-12 20:09:44 -06:00
2023-04-27 00:48:00 +02:00
2026-09-03 16:26:30 -06:00
2026-10-30 17:15:02 -06:00
2026-11-08 12:16:33 -06:00
2026-11-07 17:03:05 -06:00
2026-10-29 19:30:02 -06:00
2026-08-27 17:59:50 -06:00
2026-10-30 15:03:23 -06:00
2026-10-30 14:57:14 -06:00
2026-10-30 14:57:14 -06:00
2026-10-30 14:55:57 -06:00
2026-10-30 14:55:57 -06:00
2026-08-27 17:59:50 -06:00
2026-08-27 17:59:50 -06:00
2026-10-30 15:03:23 -06:00
2026-04-20 01:29:49 +02:00
2026-11-09 18:32:12 -06:00
2026-11-04 23:03:36 +02:00
2023-03-31 17:38:23 -06:00
2026-10-19 15:40:59 -06:00
2023-03-31 17:33:44 -06:00
2026-10-19 15:40:59 -06:00
2026-10-19 15:40:59 -06:00
2026-10-19 15:40:59 -06:00
2026-08-04 13:56:18 -06:00
2023-03-31 17:33:44 -06:00
2026-10-19 15:40:59 -06:00
2026-10-19 15:40:59 -06:00
2026-09-29 17:16:31 -06:00
2026-04-12 19:59:19 -06:00
2026-03-12 02:41:44 -03:00
2026-06-05 15:09:13 -07:00
2026-10-31 20:10:00 -06:00
2025-03-07 18:19:29 -07:00
2026-08-12 18:33:09 -06:00
2026-11-07 16:37:48 -06:00
2023-10-18 07:40:40 -06:00
2026-11-09 18:32:43 -06:00
2026-11-02 10:15:49 -07:00
2025-07-25 03:00:38 -06:00
2025-07-25 03:00:38 -06:00
2025-07-25 03:00:38 -06:00
2026-10-19 19:16:51 -06:00
2026-10-30 15:01:41 -06:00
2026-11-09 13:18:05 -06:00
2026-11-01 14:22:23 -07:00
2025-07-25 03:00:38 -06:00
2026-04-09 23:21:05 -06:00
2025-07-25 03:00:38 -06:00
2026-11-09 20:25:53 -06:00
2023-06-07 16:25:11 -06:00
2025-07-25 03:00:38 -06:00
2026-11-09 13:17:50 -06:00
2026-08-19 11:29:37 -06:00
2026-06-05 13:44:29 +02:00
2026-10-30 16:35:27 -06:00
2025-07-25 03:00:38 -06:00
2026-11-02 13:06:07 -06:00
2025-07-25 03:00:38 -06:00
2025-07-25 03:00:38 -06:00
2025-07-25 03:00:38 -06:00
2026-08-26 18:34:31 -06:00
2025-07-25 03:00:38 -06:00
2026-10-29 16:15:21 -07:00
2026-10-30 15:46:23 -06:00
2026-09-21 11:02:29 -06:00
2026-11-04 13:09:53 -06:00
2026-10-30 14:46:10 -06:00
2026-10-20 18:13:50 -06:00
2026-11-01 19:29:45 -07:00
2023-01-12 17:04:24 -07:00
2026-10-30 17:15:02 -06:00
2026-10-31 20:10:00 -06:00
2023-01-12 17:04:24 -07:00
2026-08-24 19:00:33 -06:00