servo/components
Martin Robinson efa0d45757
Remove FontContextHandle (#32038)
The `FontContextHandle` was really only used on FreeType platforms to
store the `FT_Library` handle to use for creating faces. Each
`FontContext` and `FontCacheThread` would create its own
`FontContextHandle`. This change removes this data structure in favor of
a mutex-protected shared `FontContextHandle` for an entire Servo
process. The handle is initialized using a `OnceLock` to ensure that it
only happens once and also that it stays alive for the entire process
lifetime.

In addition to greatly simplifying the code, this will make it possible
for different threads to share platform-specific `FontHandle`s, avoiding
multiple allocations for a single font.

The only downside to all of this is that memory usage of FreeType fonts
isn't measured (though the mechanism is still there). This is because
the `FontCacheThread` currently doesn't do any memory measurement.
Eventually this *will* happen though, during the font system redesign.
In exchange, this should reduce the memory usage since there is only a
single FreeType library loaded into memory now.

This is part of #32033.
2024-04-12 10:39:32 +00:00
..
allocator rustdoc: Add some basic Safety sections to unsafe functions (#31639) 2024-03-13 10:44:59 +00:00
background_hang_monitor fix: missing thread name when spawning (#31656) 2024-03-14 10:40:58 +00:00
bluetooth clippy: fix warnings in components/bluetooth (#31566) 2024-03-07 23:32:35 +00:00
canvas Update Stylo to 2023-10-16 (#31932) 2024-03-30 13:30:13 +00:00
compositing chore: Clean up use of gfx and constellation types (#31981) 2024-04-09 06:43:48 +00:00
config compositor: Remove the is_running_problem_test setting (#31589) 2024-03-09 02:29:43 +00:00
config_plugins clippy: fix warnings in components/config* (#31562) 2024-03-08 07:15:56 +00:00
constellation Initial internal support for multiple webviews (#31417) 2024-04-03 11:06:28 +00:00
deny_public_fields Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
devtools clippy: Allow too_many_arguments for existing functions (#31974) 2024-04-02 12:50:45 +00:00
dom_struct clippy: fix warnings in various modules in components (#31568) 2024-03-08 14:28:04 +00:00
domobject_derive clippy: fix warnings in various modules in components (#31568) 2024-03-08 14:28:04 +00:00
geometry dependencies: Upgrade to WebRender 0.64 (#31486) 2024-03-14 17:40:54 +00:00
gfx Remove FontContextHandle (#32038) 2024-04-12 10:39:32 +00:00
hyper_serde clippy: fix warnings in various modules in components (#31568) 2024-03-08 14:28:04 +00:00
jstraceable_derive Update to syn 2 where possible (#30387) 2023-09-19 15:57:37 +00:00
layout Upgrade Stylo to 2023-12-01 (#32032) 2024-04-10 13:03:56 +00:00
layout_2020 Obey min-height and max-height on floated elements (#32057) 2024-04-12 10:21:02 +00:00
layout_thread chore: Clean up use of gfx and constellation types (#31981) 2024-04-09 06:43:48 +00:00
layout_thread_2020 chore: Clean up use of gfx and constellation types (#31981) 2024-04-09 06:43:48 +00:00
media clippy: fix result_unit_err warnings (#31791) 2024-03-21 12:51:45 +00:00
metrics clippy: Fix assorted warnings in components/ (#31628) 2024-03-13 08:31:58 +00:00
net Fixes for HTTP header compliance. (#32024) 2024-04-11 21:51:23 +00:00
pixels clippy: fix warnings in various modules in components (#31568) 2024-03-08 14:28:04 +00:00
profile clippy: fix warnings in various modules in components (#31568) 2024-03-08 14:28:04 +00:00
rand Fix clippy warnings in components/rand (#31549) 2024-03-07 23:16:42 +00:00
range clippy: fix warnings in various modules in components (#31568) 2024-03-08 14:28:04 +00:00
script clippy: Fix comparison_* warnings (#32058) 2024-04-12 08:08:38 +00:00
servo Initial internal support for multiple webviews (#31417) 2024-04-03 11:06:28 +00:00
shared Fixes for HTTP header compliance. (#32024) 2024-04-11 21:51:23 +00:00
url clippy: Map to an error type instead of using allowing result_unit_err in components/url (#31834) 2024-03-26 12:23:07 +00:00
webdriver_server clippy: Allow too_many_arguments for existing functions (#31974) 2024-04-02 12:50:45 +00:00
webgpu webgpu: Implement onSubmittedWorkDone (#31772) 2024-04-04 08:12:40 +00:00