Bug 1331515 - Rename WRColor into WrColor. r=gfx?
authorNicolas Silva <nsilva@mozilla.com>
Tue, 17 Jan 2017 09:44:07 -0500
changeset 342120 a8594012ee72a81a763e60247c33a1028fd73369
parent 342119 e39c9991dc4f89b800ac85666001dffbd748d182
child 342121 6321610b189b8f22dafc4deac56fcc8c8a34b9e5
push id31345
push userkwierso@gmail.com
push dateFri, 10 Feb 2017 20:35:09 +0000
treeherdermozilla-central@a288fe35e494 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfx
bugs1331515
milestone53.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 1331515 - Rename WRColor into WrColor. r=gfx?
gfx/layers/ipc/WebRenderMessages.ipdlh
gfx/layers/wr/WebRenderMessageUtils.h
gfx/webrender_bindings/WebRenderAPI.cpp
gfx/webrender_bindings/WebRenderTypes.h
gfx/webrender_bindings/webrender_ffi.h
--- a/gfx/layers/ipc/WebRenderMessages.ipdlh
+++ b/gfx/layers/ipc/WebRenderMessages.ipdlh
@@ -6,17 +6,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include LayersSurfaces;
 include LayersMessages;
 include protocol PCompositable;
 include protocol PTexture;
 
 using WRBorderSide from "mozilla/webrender/webrender_ffi.h";
-using WRColor from "mozilla/webrender/webrender_ffi.h";
 using WRImageKey from "mozilla/webrender/webrender_ffi.h";
 using WRTextureFilter from "mozilla/webrender/webrender_ffi.h";
 using WrLayoutSize from "mozilla/webrender/webrender_ffi.h";
 using WrRect from "mozilla/webrender/webrender_ffi.h";
 using WRGlyphArray from "mozilla/webrender/webrender_ffi.h";
 using MaybeImageMask from "mozilla/webrender/WebRenderTypes.h";
 using mozilla::gfx::Matrix4x4 from "mozilla/gfx/Matrix.h";
 using mozilla::wr::ByteBuffer from "mozilla/webrender/WebRenderTypes.h";
--- a/gfx/layers/wr/WebRenderMessageUtils.h
+++ b/gfx/layers/wr/WebRenderMessageUtils.h
@@ -49,29 +49,29 @@ struct ParamTraits<WRBorderStyle>
   : public ContiguousEnumSerializer<
         WRBorderStyle,
         WRBorderStyle::None,
         WRBorderStyle::Outset>
 {
 };
 
 template<>
-struct ParamTraits<WRColor>
+struct ParamTraits<WrColor>
 {
   static void
-  Write(Message* aMsg, const WRColor& aParam)
+  Write(Message* aMsg, const WrColor& aParam)
   {
     WriteParam(aMsg, aParam.r);
     WriteParam(aMsg, aParam.g);
     WriteParam(aMsg, aParam.b);
     WriteParam(aMsg, aParam.a);
   }
 
   static bool
-  Read(const Message* aMsg, PickleIterator* aIter, WRColor* aResult)
+  Read(const Message* aMsg, PickleIterator* aIter, WrColor* aResult)
   {
     return ReadParam(aMsg, aIter, &aResult->r)
         && ReadParam(aMsg, aIter, &aResult->g)
         && ReadParam(aMsg, aIter, &aResult->b)
         && ReadParam(aMsg, aIter, &aResult->a);
   }
 };
 
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -350,16 +350,16 @@ void
 DisplayListBuilder::PushText(const WrRect& aBounds,
                              const WrRect& aClip,
                              const gfx::Color& aColor,
                              wr::FontKey aFontKey,
                              Range<const WRGlyphInstance> aGlyphBuffer,
                              float aGlyphSize)
 {
   wr_dp_push_text(mWrState, aBounds, aClip,
-                  ToWRColor(aColor),
+                  ToWrColor(aColor),
                   aFontKey.mHandle,
                   &aGlyphBuffer[0], aGlyphBuffer.length(),
                   aGlyphSize);
 }
 
 } // namespace
 } // namespace
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -9,31 +9,31 @@
 #include "mozilla/webrender/webrender_ffi.h"
 #include "mozilla/Maybe.h"
 
 typedef mozilla::Maybe<WRImageMask> MaybeImageMask;
 
 namespace mozilla {
 namespace wr {
 
-static inline WRColor ToWRColor(const gfx::Color& color)
+static inline WrColor ToWrColor(const gfx::Color& color)
 {
-  WRColor c;
+  WrColor c;
   c.r = color.r;
   c.g = color.g;
   c.b = color.b;
   c.a = color.a;
   return c;
 }
 
 static inline WRBorderSide ToWRBorderSide(const LayerCoord width, const gfx::Color& color)
 {
   WRBorderSide bs;
   bs.width = width;
-  bs.color = ToWRColor(color);
+  bs.color = ToWrColor(color);
   bs.style = WRBorderStyle::Solid;
   return bs;
 }
 
 static inline WrLayoutSize ToWrLayoutSize(const LayerSize size)
 {
   WrLayoutSize ls;
   ls.width = size.width;
--- a/gfx/webrender_bindings/webrender_ffi.h
+++ b/gfx/webrender_bindings/webrender_ffi.h
@@ -24,23 +24,23 @@ enum WRImageFormat {
 };
 
 typedef uint64_t WRWindowId;
 typedef uint64_t WRImageKey;
 typedef uint64_t WRFontKey;
 typedef uint64_t WRPipelineId;
 typedef uint32_t WREpoch;
 
-struct WRColor {
+struct WrColor {
   float r;
   float g;
   float b;
   float a;
 
-  bool operator==(const WRColor& aRhs) const {
+  bool operator==(const WrColor& aRhs) const {
     return r == aRhs.r && g == aRhs.g &&
            b == aRhs.b && a == aRhs.a;
   }
 };
 
 struct WRGlyphInstance {
   uint32_t index;
   float x;
@@ -87,17 +87,17 @@ enum WRBorderStyle {
   Groove,
   Ridge,
   Inset,
   Outset
 };
 
 struct WRBorderSide {
   float width;
-  WRColor color;
+  WrColor color;
   WRBorderStyle style;
 
   bool operator==(const WRBorderSide& aRhs) const {
     return width == aRhs.width && color == aRhs.color &&
            style == aRhs.style;
   }
 };
 
@@ -330,17 +330,17 @@ WR_FUNC;
 WR_INLINE void
 wr_dp_push_rect(WrState* wrState, WrRect bounds, WrRect clip,
                 float r, float g, float b, float a)
 WR_FUNC;
 
 WR_INLINE void
 wr_dp_push_text(WrState* wrState,
                 WrRect bounds, WrRect clip,
-                WRColor color,
+                WrColor color,
                 WRFontKey font_Key,
                 const WRGlyphInstance* glyphs,
                 uint32_t glyph_count, float glyph_size) WR_FUNC;
 
 WR_INLINE void
 wr_dp_push_border(WrState* wrState, WrRect bounds, WrRect clip,
                   WRBorderSide top, WRBorderSide right, WRBorderSide bottom, WRBorderSide left,
                   WrLayoutSize top_left_radius, WrLayoutSize top_right_radius,