Bug 1345975 - Rename WrLayoutSize to WrSize r=kats
authorRyan Hunt <rhunt@eqrion.net>
Thu, 09 Mar 2017 16:58:33 -0500
changeset 347292 5de79be2222a9fc5d133a24ebaa7752517defc08
parent 347291 2479f38345d68aec87af5405a9a599bf5d645a3f
child 347293 70a8e7b62e183540e173a4fda60a69be85299363
push id31493
push userkwierso@gmail.com
push dateMon, 13 Mar 2017 20:10:14 +0000
treeherdermozilla-central@7781e4e0a332 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1345975
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1345975 - Rename WrLayoutSize to WrSize r=kats MozReview-Commit-ID: JY9YyoypFym
gfx/layers/ipc/WebRenderMessages.ipdlh
gfx/layers/wr/WebRenderMessageUtils.h
gfx/webrender_bindings/WebRenderTypes.h
gfx/webrender_bindings/src/bindings.rs
gfx/webrender_bindings/webrender_ffi.h
--- a/gfx/layers/ipc/WebRenderMessages.ipdlh
+++ b/gfx/layers/ipc/WebRenderMessages.ipdlh
@@ -7,17 +7,17 @@
 
 include LayersSurfaces;
 include LayersMessages;
 include protocol PTexture;
 
 using WrBorderRadius from "mozilla/webrender/webrender_ffi.h";
 using WrBorderSide from "mozilla/webrender/webrender_ffi.h";
 using WrColor from "mozilla/webrender/webrender_ffi.h";
-using WrLayoutSize from "mozilla/webrender/webrender_ffi.h";
+using WrSize from "mozilla/webrender/webrender_ffi.h";
 using WrRect from "mozilla/webrender/webrender_ffi.h";
 using WrPoint from "mozilla/webrender/webrender_ffi.h";
 using WrGradientStop from "mozilla/webrender/webrender_ffi.h";
 using WrGradientExtendMode from "mozilla/webrender/webrender_ffi.h";
 using WrGlyphArray from "mozilla/webrender/webrender_ffi.h";
 using WrMixBlendMode from "mozilla/webrender/webrender_ffi.h";
 using WrBoxShadowClipMode from "mozilla/webrender/webrender_ffi.h";
 using MaybeImageMask from "mozilla/webrender/WebRenderTypes.h";
--- a/gfx/layers/wr/WebRenderMessageUtils.h
+++ b/gfx/layers/wr/WebRenderMessageUtils.h
@@ -94,27 +94,27 @@ struct ParamTraits<WrImageFormat>
   : public ContiguousEnumSerializer<
         WrImageFormat,
         WrImageFormat::Invalid,
         WrImageFormat::Sentinel>
 {
 };
 
 template<>
-struct ParamTraits<WrLayoutSize>
+struct ParamTraits<WrSize>
 {
   static void
-  Write(Message* aMsg, const WrLayoutSize& aParam)
+  Write(Message* aMsg, const WrSize& aParam)
   {
     WriteParam(aMsg, aParam.width);
     WriteParam(aMsg, aParam.height);
   }
 
   static bool
-  Read(const Message* aMsg, PickleIterator* aIter, WrLayoutSize* aResult)
+  Read(const Message* aMsg, PickleIterator* aIter, WrSize* aResult)
   {
     return ReadParam(aMsg, aIter, &aResult->width)
         && ReadParam(aMsg, aIter, &aResult->height);
   }
 };
 
 template<>
 struct ParamTraits<WrRect>
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -189,32 +189,32 @@ static inline WrBorderSide ToWrBorderSid
 static inline WrPoint ToWrPoint(const LayerPoint point)
 {
   WrPoint lp;
   lp.x = point.x;
   lp.y = point.y;
   return lp;
 }
 
-static inline WrLayoutSize ToWrLayoutSize(const LayerSize size)
+static inline WrSize ToWrSize(const LayerSize size)
 {
-  WrLayoutSize ls;
+  WrSize ls;
   ls.width = size.width;
   ls.height = size.height;
   return ls;
 }
 
 static inline WrBorderRadius ToWrBorderRadius(const LayerSize& topLeft, const LayerSize& topRight,
                                               const LayerSize& bottomLeft, const LayerSize& bottomRight)
 {
   WrBorderRadius br;
-  br.top_left = ToWrLayoutSize(topLeft);
-  br.top_right = ToWrLayoutSize(topRight);
-  br.bottom_left = ToWrLayoutSize(bottomLeft);
-  br.bottom_right = ToWrLayoutSize(bottomRight);
+  br.top_left = ToWrSize(topLeft);
+  br.top_right = ToWrSize(topRight);
+  br.bottom_left = ToWrSize(bottomLeft);
+  br.bottom_right = ToWrSize(bottomRight);
   return br;
 }
 
 template<class T>
 static inline WrRect ToWrRect(const gfx::RectTyped<T>& rect)
 {
   WrRect r;
   r.x = rect.x;
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -939,30 +939,30 @@ impl WrColor
     pub fn to_color(&self) -> ColorF
     {
         ColorF::new(self.r, self.g, self.b, self.a)
     }
 }
 
 #[repr(C)]
 pub struct WrBorderRadius {
-    pub top_left: WrLayoutSize,
-    pub top_right: WrLayoutSize,
-    pub bottom_left: WrLayoutSize,
-    pub bottom_right: WrLayoutSize,
+    pub top_left: WrSize,
+    pub top_right: WrSize,
+    pub bottom_left: WrSize,
+    pub bottom_right: WrSize,
 }
 
 impl WrBorderRadius
 {
     pub fn to_border_radius(&self) -> BorderRadius
     {
-        BorderRadius { top_left: self.top_left.to_layout_size(),
-                       top_right: self.top_right.to_layout_size(),
-                       bottom_left: self.bottom_left.to_layout_size(),
-                       bottom_right: self.bottom_right.to_layout_size() }
+        BorderRadius { top_left: self.top_left.to_size(),
+                       top_right: self.top_right.to_size(),
+                       bottom_left: self.bottom_left.to_size(),
+                       bottom_right: self.bottom_right.to_size() }
     }
 }
 
 #[repr(C)]
 pub struct WrBorderSide
 {
     width: f32,
     color: WrColor,
@@ -995,25 +995,25 @@ impl WrGradientStop
     }
     pub fn to_gradient_stops(stops: &[WrGradientStop]) -> Vec<GradientStop>
     {
         stops.iter().map(|x| x.to_gradient_stop()).collect()
     }
 }
 
 #[repr(C)]
-pub struct WrLayoutSize
+pub struct WrSize
 {
     width: f32,
     height: f32
 }
 
-impl WrLayoutSize
+impl WrSize
 {
-    pub fn to_layout_size(&self) -> LayoutSize
+    pub fn to_size(&self) -> LayoutSize
     {
         LayoutSize::new(self.width, self.height)
     }
 }
 
 #[repr(C)]
 #[derive(Debug)]
 pub struct WrRect
--- a/gfx/webrender_bindings/webrender_ffi.h
+++ b/gfx/webrender_bindings/webrender_ffi.h
@@ -254,32 +254,32 @@ struct WrBorderSide {
 
   bool operator==(const WrBorderSide& aRhs) const
   {
     return width == aRhs.width && color == aRhs.color &&
            style == aRhs.style;
   }
 };
 
-struct WrLayoutSize
+struct WrSize
 {
   float width;
   float height;
 
-  bool operator==(const WrLayoutSize& aRhs) const
+  bool operator==(const WrSize& aRhs) const
   {
     return width == aRhs.width && height == aRhs.height;
   }
 };
 
 struct WrBorderRadius {
-  WrLayoutSize top_left;
-  WrLayoutSize top_right;
-  WrLayoutSize bottom_left;
-  WrLayoutSize bottom_right;
+  WrSize top_left;
+  WrSize top_right;
+  WrSize bottom_left;
+  WrSize bottom_right;
 
   bool operator==(const WrBorderRadius& aRhs) const
   {
     return top_left == aRhs.top_left && top_right == aRhs.top_right &&
            bottom_left == aRhs.bottom_left && bottom_right == aRhs.bottom_right;
   }
 };