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/layout_thread/lib.rs | |
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/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index e279f10221d..8cb612bd1de 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -69,7 +69,7 @@ use script_layout_interface::{ use script_traits::{ ConstellationControlMsg, DrawAPaintImageResult, IFrameSizeMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg, PaintWorkletError, Painter, ScrollState, UntrustedNodeAddress, - WebrenderIpcSender, WindowSizeData, WindowSizeType, + WindowSizeData, WindowSizeType, }; use servo_arc::Arc as ServoArc; use servo_atoms::Atom; @@ -102,6 +102,7 @@ use style::traversal_flags::TraversalFlags; use style_traits::{CSSPixel, DevicePixel, SpeculativePainter}; use url::Url; use webrender_api::{units, ColorF, HitTestFlags}; +use webrender_traits::WebRenderScriptApi; /// Information needed by layout. pub struct LayoutThread { @@ -176,7 +177,7 @@ pub struct LayoutThread { registered_painters: RegisteredPaintersImpl, /// Webrender interface. - webrender_api: WebrenderIpcSender, + webrender_api: WebRenderScriptApi, /// Paint time metrics. paint_time_metrics: PaintTimeMetrics, @@ -365,7 +366,7 @@ impl Layout for LayoutThread { .webrender_api .hit_test(Some(self.id.into()), client_point, flags); - results.iter().map(|result| result.node).collect() + results.iter().map(|result| result.node.into()).collect() } fn query_offset_parent(&self, node: OpaqueNode) -> OffsetParentResponse { @@ -567,7 +568,7 @@ impl LayoutThread { image_cache: Arc<dyn ImageCache>, font_cache_thread: FontCacheThread, time_profiler_chan: profile_time::ProfilerChan, - webrender_api: WebrenderIpcSender, + webrender_api: WebRenderScriptApi, paint_time_metrics: PaintTimeMetrics, window_size: WindowSizeData, ) -> LayoutThread { |