aboutsummaryrefslogtreecommitdiffstats
path: root/components/malloc_size_of/lib.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-07-10 15:54:39 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-07-10 17:35:50 +0200
commit3230162fd0ac96dea77c683b2067ae65ec7ed0b4 (patch)
treea514617f5d3b72eb5e00cf60b86d8478de9b0e02 /components/malloc_size_of/lib.rs
parent1543912589e67734f0b684e1db900f41a4c04a1a (diff)
downloadservo-3230162fd0ac96dea77c683b2067ae65ec7ed0b4.tar.gz
servo-3230162fd0ac96dea77c683b2067ae65ec7ed0b4.zip
Try to `use` WebRender types more
The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
Diffstat (limited to 'components/malloc_size_of/lib.rs')
-rw-r--r--components/malloc_size_of/lib.rs48
1 files changed, 27 insertions, 21 deletions
diff --git a/components/malloc_size_of/lib.rs b/components/malloc_size_of/lib.rs
index 2a684ac73d1..8a2b0f19fd8 100644
--- a/components/malloc_size_of/lib.rs
+++ b/components/malloc_size_of/lib.rs
@@ -58,6 +58,12 @@ use std::os::raw::c_void;
#[cfg(feature = "servo")]
use uuid::Uuid;
use void::Void;
+use webrender_api::{
+ BorderRadius, BorderStyle, BoxShadowClipMode, ColorF, ComplexClipRegion, ExtendMode,
+ ExternalScrollId, FilterOp, FontInstanceKey, GlyphInstance, GradientStop, ImageKey,
+ ImageRendering, LineStyle, MixBlendMode, NinePatchBorder, NormalBorder, RepeatMode,
+ ScrollSensitivity, StickyOffsetBounds, TransformStyle,
+};
/// A C function that takes a pointer to a heap allocation and returns its size.
type VoidPtrToSizeFn = unsafe extern "C" fn(ptr: *const c_void) -> usize;
@@ -800,47 +806,47 @@ impl MallocSizeOf for url::Host {
}
}
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::BorderRadius);
+malloc_size_of_is_0!(BorderRadius);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::BorderStyle);
+malloc_size_of_is_0!(BorderStyle);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::BoxShadowClipMode);
+malloc_size_of_is_0!(BoxShadowClipMode);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::ColorF);
+malloc_size_of_is_0!(ColorF);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::ComplexClipRegion);
+malloc_size_of_is_0!(ComplexClipRegion);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::ExtendMode);
+malloc_size_of_is_0!(ExtendMode);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::FilterOp);
+malloc_size_of_is_0!(FilterOp);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::ExternalScrollId);
+malloc_size_of_is_0!(ExternalScrollId);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::FontInstanceKey);
+malloc_size_of_is_0!(FontInstanceKey);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::GradientStop);
+malloc_size_of_is_0!(GradientStop);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::GlyphInstance);
+malloc_size_of_is_0!(GlyphInstance);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::NinePatchBorder);
+malloc_size_of_is_0!(NinePatchBorder);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::ImageKey);
+malloc_size_of_is_0!(ImageKey);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::ImageRendering);
+malloc_size_of_is_0!(ImageRendering);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::LineStyle);
+malloc_size_of_is_0!(LineStyle);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::MixBlendMode);
+malloc_size_of_is_0!(MixBlendMode);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::NormalBorder);
+malloc_size_of_is_0!(NormalBorder);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::RepeatMode);
+malloc_size_of_is_0!(RepeatMode);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::ScrollSensitivity);
+malloc_size_of_is_0!(ScrollSensitivity);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::StickyOffsetBounds);
+malloc_size_of_is_0!(StickyOffsetBounds);
#[cfg(feature = "webrender_api")]
-malloc_size_of_is_0!(webrender_api::TransformStyle);
+malloc_size_of_is_0!(TransformStyle);
#[cfg(feature = "servo")]
impl MallocSizeOf for keyboard_types::Key {