mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
compositor: Move WebRender-ish messages and types to webrender_traits
(#32315)
* Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
c2076580f3
commit
2af6fe0b30
53 changed files with 666 additions and 617 deletions
|
@ -10,23 +10,20 @@ use std::fmt::{Debug, Error, Formatter};
|
|||
|
||||
use base::id::{PipelineId, TopLevelBrowsingContextId};
|
||||
use base::Epoch;
|
||||
use canvas::canvas_paint_thread::ImageUpdate;
|
||||
pub use constellation_msg::ConstellationMsg;
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use embedder_traits::EventLoopWaker;
|
||||
use euclid::Rect;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use log::warn;
|
||||
use net_traits::image::base::Image;
|
||||
use net_traits::NetToCompositorMsg;
|
||||
use pixels::Image;
|
||||
use script_traits::{
|
||||
AnimationState, ConstellationControlMsg, EventResult, MouseButton, MouseEventType,
|
||||
ScriptToCompositorMsg,
|
||||
};
|
||||
use style_traits::CSSPixel;
|
||||
use webrender_api::units::{DeviceIntPoint, DeviceIntSize, DeviceRect};
|
||||
use webrender_api::{
|
||||
self, FontInstanceFlags, FontInstanceKey, FontKey, ImageKey, NativeFontHandle,
|
||||
use webrender_traits::{
|
||||
CanvasToCompositorMsg, FontToCompositorMsg, NetToCompositorMsg, ScriptToCompositorMsg,
|
||||
};
|
||||
|
||||
/// Sends messages to the compositor.
|
||||
|
@ -140,17 +137,6 @@ pub struct CompositionPipeline {
|
|||
pub script_chan: IpcSender<ConstellationControlMsg>,
|
||||
}
|
||||
|
||||
pub enum FontToCompositorMsg {
|
||||
AddFontInstance(FontKey, f32, FontInstanceFlags, Sender<FontInstanceKey>),
|
||||
AddFont(Sender<FontKey>, u32, ipc_channel::ipc::IpcBytesReceiver),
|
||||
AddSystemFont(Sender<FontKey>, NativeFontHandle),
|
||||
}
|
||||
|
||||
pub enum CanvasToCompositorMsg {
|
||||
GenerateKey(Sender<ImageKey>),
|
||||
UpdateImages(Vec<ImageUpdate>),
|
||||
}
|
||||
|
||||
/// Messages forwarded by the Constellation to the Compositor.
|
||||
pub enum ForwardedToCompositorMsg {
|
||||
Layout(ScriptToCompositorMsg),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue