/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/paint/lib.rs
53 строки
2 KB
Narfinger
servo: Allow registering the `WebXrRegistry` after `Servo` handle creation (#46494)
17 июл 2026, 07:38
Не верифицирован
17 июл 2026, 07:38
e55e157
Код
Авторство
О чём код?
/* 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/. */ #![deny(unsafe_code)] use std::cell::Cell; use std::rc::Rc; use crossbeam_channel::Sender; use embedder_traits::{EventLoopWaker, ShutdownState}; use paint_api::{PaintMessage, PaintProxy}; use profile_traits::{mem, time}; use servo_base::generic_channel::RoutedReceiver; use servo_constellation_traits::EmbedderToConstellationMessage; pub use crate::paint::{Paint, WebRenderDebugOption}; #[macro_use] mod tracing; mod largest_contentful_paint_calculator; mod paint; mod painter; mod pinch_zoom; mod pipeline_details; mod refresh_driver; mod render_notifier; mod screenshot; mod touch; mod web_content_animation; mod webrender_external_images; mod webview_renderer; /// Data used to initialize the `Paint` subsystem. pub struct InitialPaintState { /// A channel to `Paint`. pub paint_proxy: PaintProxy, /// A port on which messages inbound to `Paint` can be received. pub receiver: RoutedReceiver<PaintMessage>, /// A channel to the constellation. pub embedder_to_constellation_sender: Sender<EmbedderToConstellationMessage>, /// A channel to the time profiler thread. pub time_profiler_chan: time::ProfilerChan, /// A channel to the memory profiler thread. pub mem_profiler_chan: mem::ProfilerChan, /// A shared state which tracks whether Servo has started or has finished /// shutting down. pub shutdown_state: Rc<Cell<ShutdownState>>, /// An [`EventLoopWaker`] used in order to wake up the embedder when it is /// time to paint. pub event_loop_waker: Box<dyn EventLoopWaker>, }