diff options
author | Mukilan Thiyagarajan <mukilan@igalia.com> | 2024-05-20 16:05:18 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 10:35:18 +0000 |
commit | 2af6fe0b30a275e5fd8a43eca4126d82639fbaa9 (patch) | |
tree | 2687a12c392b30cba7cdcd849133d0d382b79cbe /components/shared/script_layout | |
parent | c2076580f352f3c61f90969e03d78ada609935eb (diff) | |
download | servo-2af6fe0b30a275e5fd8a43eca4126d82639fbaa9.tar.gz servo-2af6fe0b30a275e5fd8a43eca4126d82639fbaa9.zip |
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>
Diffstat (limited to 'components/shared/script_layout')
-rw-r--r-- | components/shared/script_layout/Cargo.toml | 2 | ||||
-rw-r--r-- | components/shared/script_layout/lib.rs | 5 | ||||
-rw-r--r-- | components/shared/script_layout/wrapper_traits.rs | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/components/shared/script_layout/Cargo.toml b/components/shared/script_layout/Cargo.toml index 57c4059b859..803a247bc2d 100644 --- a/components/shared/script_layout/Cargo.toml +++ b/components/shared/script_layout/Cargo.toml @@ -26,6 +26,7 @@ malloc_size_of = { workspace = true } malloc_size_of_derive = { workspace = true } metrics = { path = "../../metrics" } net_traits = { workspace = true } +pixels = { path = "../../pixels" } profile_traits = { workspace = true } range = { path = "../../range" } script_traits = { workspace = true } @@ -37,3 +38,4 @@ servo_url = { path = "../../url" } style = { workspace = true } style_traits = { workspace = true } webrender_api = { workspace = true } +webrender_traits = { workspace = true } diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs index 7c1f4ee2162..d07a009af0e 100644 --- a/components/shared/script_layout/lib.rs +++ b/components/shared/script_layout/lib.rs @@ -33,7 +33,7 @@ use profile_traits::mem::Report; use profile_traits::time; use script_traits::{ ConstellationControlMsg, InitialScriptState, LayoutControlMsg, LayoutMsg, LoadData, Painter, - ScrollState, UntrustedNodeAddress, WebrenderIpcSender, WindowSizeData, + ScrollState, UntrustedNodeAddress, WindowSizeData, }; use serde::{Deserialize, Serialize}; use servo_arc::Arc as ServoArc; @@ -51,6 +51,7 @@ use style::stylesheets::Stylesheet; use style::Atom; use style_traits::CSSPixel; use webrender_api::ImageKey; +use webrender_traits::WebRenderScriptApi; pub type GenericLayoutData = dyn Any + Send + Sync; @@ -165,7 +166,7 @@ pub struct LayoutConfig { pub image_cache: Arc<dyn ImageCache>, pub font_cache_thread: FontCacheThread, pub time_profiler_chan: time::ProfilerChan, - pub webrender_api_sender: WebrenderIpcSender, + pub webrender_api_sender: WebRenderScriptApi, pub paint_time_metrics: PaintTimeMetrics, pub window_size: WindowSizeData, } diff --git a/components/shared/script_layout/wrapper_traits.rs b/components/shared/script_layout/wrapper_traits.rs index 0adb51be244..399c8bd3362 100644 --- a/components/shared/script_layout/wrapper_traits.rs +++ b/components/shared/script_layout/wrapper_traits.rs @@ -12,7 +12,7 @@ use atomic_refcell::AtomicRef; use base::id::{BrowsingContextId, PipelineId}; use gfx_traits::ByteIndex; use html5ever::{local_name, namespace_url, ns, LocalName, Namespace}; -use net_traits::image::base::{Image, ImageMetadata}; +use pixels::{Image, ImageMetadata}; use range::Range; use servo_arc::Arc; use servo_url::ServoUrl; |