servo/components/shared/canvas/lib.rs
Martin Robinson 578c52fe2b
constellation: Wait for canvas thread to shut down before shutting down system font service (#37182)
The canvas thread might need access to the system font service before it
shuts down. Ensure that it finishes shutting down before triggering the
shutdown of the system font service. This should avoid issues where
canvas tries to access fonts right before shutting down.

Fixes: #36849.
Testing: Since this fixes a flaky crash on shutdown, there isn't a good
way to write a test for it.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-05-30 11:44:16 +00:00

25 lines
603 B
Rust

/* 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 https://mozilla.org/MPL/2.0/. */
#![crate_name = "canvas_traits"]
#![crate_type = "rlib"]
#![deny(unsafe_code)]
use crossbeam_channel::Sender;
use euclid::default::Size2D;
use webrender_api::ImageKey;
use crate::canvas::CanvasId;
pub mod canvas;
#[macro_use]
pub mod webgl;
pub enum ConstellationCanvasMsg {
Create {
sender: Sender<(CanvasId, ImageKey)>,
size: Size2D<u64>,
},
Exit(Sender<()>),
}