Use more WebRender types in gfx/display_list

This uses floating-point (Layout) coordinates in where possible.
Replace NormalBorder struct with WebRender equivalent.
Remove ToPointF and ToRectF traits.
Convert border RepeatKeyword with ToLayout.
Add some definitions to malloc_size_of for WebRender types.
This commit is contained in:
Pyfisch 2018-01-12 21:24:23 +01:00
parent 8612a87ed2
commit 8c7c5f6e79
10 changed files with 181 additions and 240 deletions

View file

@ -715,6 +715,10 @@ impl MallocSizeOf for url::Host {
}
}
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::BorderStyle);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::BoxShadowClipMode);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::ClipAndScrollInfo);
#[cfg(feature = "servo")]
@ -722,14 +726,22 @@ malloc_size_of_is_0!(webrender_api::ClipId);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::ColorF);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::ExtendMode);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::GradientStop);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::ImageKey);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::ImageRendering);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::LineStyle);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::LocalClip);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::MixBlendMode);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::NormalBorder);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::RepeatMode);
#[cfg(feature = "servo")]
malloc_size_of_is_0!(webrender_api::ScrollPolicy);