Bump euclid to 0.14.

This commit is contained in:
Nicolas Silva 2017-06-02 14:50:26 +02:00
parent 5dce166266
commit 8617320500
88 changed files with 349 additions and 381 deletions

View file

@ -8,7 +8,7 @@
// completely converting layout to directly generate WebRender display lists, for example.
use app_units::Au;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use euclid::{Point2D, Vector2D, Rect, SideOffsets2D, Size2D};
use gfx::display_list::{BorderDetails, BorderRadii, BoxShadowClipMode, ClippingRegion};
use gfx::display_list::{DisplayItem, DisplayList, DisplayListTraversal, StackingContextType};
use msg::constellation_msg::PipelineId;
@ -86,12 +86,22 @@ trait ToPointF {
fn to_pointf(&self) -> webrender_traits::LayoutPoint;
}
trait ToVectorF {
fn to_vectorf(&self) -> webrender_traits::LayoutVector2D;
}
impl ToPointF for Point2D<Au> {
fn to_pointf(&self) -> webrender_traits::LayoutPoint {
webrender_traits::LayoutPoint::new(self.x.to_f32_px(), self.y.to_f32_px())
}
}
impl ToVectorF for Vector2D<Au> {
fn to_vectorf(&self) -> webrender_traits::LayoutVector2D {
webrender_traits::LayoutVector2D::new(self.x.to_f32_px(), self.y.to_f32_px())
}
}
impl ToSizeF for Size2D<Au> {
fn to_sizef(&self) -> webrender_traits::LayoutSize {
webrender_traits::LayoutSize::new(self.width.to_f32_px(), self.height.to_f32_px())
@ -450,7 +460,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
builder.push_box_shadow(rect,
clip,
box_bounds,
item.offset.to_pointf(),
item.offset.to_vectorf(),
item.color,
item.blur_radius.to_f32_px(),
item.spread_radius.to_f32_px(),