Bug 1333397 - Rename WRGlyphInstance to WrGlyphInstance for naming consistency. r=gfx?
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 24 Jan 2017 08:44:23 -0500
changeset 465622 7b33131fed2074be7897b277335f3aa8fa198ca5
parent 465621 b86ff4066687c7f880598820360b3c564b4f60d6
child 465727 6ec880339dd40e91bf5ea204afbb73887bce1f3c
push id42649
push userkgupta@mozilla.com
push dateTue, 24 Jan 2017 13:58:14 +0000
reviewersgfx
bugs1333397
milestone54.0a1
Bug 1333397 - Rename WRGlyphInstance to WrGlyphInstance for naming consistency. r=gfx? MozReview-Commit-ID: K6Y5H7WOe87
gfx/layers/wr/WebRenderBridgeParent.cpp
gfx/layers/wr/WebRenderMessageUtils.h
gfx/layers/wr/WebRenderTextLayer.cpp
gfx/webrender_bindings/WebRenderAPI.cpp
gfx/webrender_bindings/WebRenderAPI.h
gfx/webrender_bindings/webrender_ffi.h
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -408,33 +408,33 @@ WebRenderBridgeParent::ProcessWebrenderC
         }
         break;
       }
       case WebRenderCommand::TOpDPPushText: {
         const OpDPPushText& op = cmd.get_OpDPPushText();
         const nsTArray<WrGlyphArray>& glyph_array = op.glyph_array();
 
         for (size_t i = 0; i < glyph_array.Length(); i++) {
-          const nsTArray<WRGlyphInstance>& glyphs = glyph_array[i].glyphs;
+          const nsTArray<WrGlyphInstance>& glyphs = glyph_array[i].glyphs;
 
           // TODO: We are leaking the key
           wr::FontKey fontKey;
           if (MOZ_USE_RENDER_THREAD) {
             auto slice = Range<uint8_t>(op.font_buffer().mData, op.font_buffer_length());
             fontKey = mApi->AddRawFont(slice);
           } else {
             fontKey = wr::FontKey(wr_window_add_raw_font(mWRWindowState,
                                                          op.font_buffer().mData,
                                                          op.font_buffer_length()));
           }
           builder.PushText(op.bounds(),
                            op.clip(),
                            glyph_array[i].color,
                            fontKey,
-                           Range<const WRGlyphInstance>(glyphs.Elements(), glyphs.Length()),
+                           Range<const WrGlyphInstance>(glyphs.Elements(), glyphs.Length()),
                            op.glyph_size());
         }
 
         break;
       }
       default:
         NS_RUNTIMEABORT("not reached");
     }
--- a/gfx/layers/wr/WebRenderMessageUtils.h
+++ b/gfx/layers/wr/WebRenderMessageUtils.h
@@ -119,28 +119,28 @@ struct ParamTraits<WrColor>
     return ReadParam(aMsg, aIter, &aResult->r)
         && ReadParam(aMsg, aIter, &aResult->g)
         && ReadParam(aMsg, aIter, &aResult->b)
         && ReadParam(aMsg, aIter, &aResult->a);
   }
 };
 
 template<>
-struct ParamTraits<WRGlyphInstance>
+struct ParamTraits<WrGlyphInstance>
 {
   static void
-  Write(Message* aMsg, const WRGlyphInstance& aParam)
+  Write(Message* aMsg, const WrGlyphInstance& aParam)
   {
     WriteParam(aMsg, aParam.index);
     WriteParam(aMsg, aParam.x);
     WriteParam(aMsg, aParam.y);
   }
 
   static bool
-  Read(const Message* aMsg, PickleIterator* aIter, WRGlyphInstance* aResult)
+  Read(const Message* aMsg, PickleIterator* aIter, WrGlyphInstance* aResult)
   {
     return ReadParam(aMsg, aIter, &aResult->index)
         && ReadParam(aMsg, aIter, &aResult->x)
         && ReadParam(aMsg, aIter, &aResult->y);
   }
 };
 
 template<>
--- a/gfx/layers/wr/WebRenderTextLayer.cpp
+++ b/gfx/layers/wr/WebRenderTextLayer.cpp
@@ -51,17 +51,17 @@ WebRenderTextLayer::RenderLayer()
 
     nsTArray<WrGlyphArray> wr_glyphs;
     wr_glyphs.SetLength(mGlyphs.Length());
 
     for (size_t i = 0; i < mGlyphs.Length(); i++) {
         GlyphArray glyph_array = mGlyphs[i];
         nsTArray<Glyph>& glyphs = glyph_array.glyphs();
 
-        nsTArray<WRGlyphInstance>& wr_glyph_instances = wr_glyphs[i].glyphs;
+        nsTArray<WrGlyphInstance>& wr_glyph_instances = wr_glyphs[i].glyphs;
         wr_glyph_instances.SetLength(glyphs.Length());
         wr_glyphs[i].color = glyph_array.color().value();
 
         for (size_t j = 0; j < glyphs.Length(); j++) {
             wr_glyph_instances[j].index = glyphs[j].mIndex;
             wr_glyph_instances[j].x = glyphs[j].mPosition.x;
             wr_glyph_instances[j].y = glyphs[j].mPosition.y;
         }
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -346,17 +346,17 @@ DisplayListBuilder::PushBorder(const WrR
                     aBottomLeftRadius, aBottomRightRadius);
 }
 
 void
 DisplayListBuilder::PushText(const WrRect& aBounds,
                              const WrRect& aClip,
                              const gfx::Color& aColor,
                              wr::FontKey aFontKey,
-                             Range<const WRGlyphInstance> aGlyphBuffer,
+                             Range<const WrGlyphInstance> aGlyphBuffer,
                              float aGlyphSize)
 {
   wr_dp_push_text(mWrState, aBounds, aClip,
                   ToWrColor(aColor),
                   aFontKey.mHandle,
                   &aGlyphBuffer[0], aGlyphBuffer.length(),
                   aGlyphSize);
 }
--- a/gfx/webrender_bindings/WebRenderAPI.h
+++ b/gfx/webrender_bindings/WebRenderAPI.h
@@ -137,26 +137,26 @@ public:
                   const WrLayoutSize& top_right_radius,
                   const WrLayoutSize& bottom_left_radius,
                   const WrLayoutSize& bottom_right_radius);
 
   void PushText(const WrRect& aBounds,
                 const WrRect& aClip,
                 const gfx::Color& aColor,
                 wr::FontKey aFontKey,
-                Range<const WRGlyphInstance> aGlyphBuffer,
+                Range<const WrGlyphInstance> aGlyphBuffer,
                 float aGlyphSize);
 
   // Try to avoid using this when possible.
   WrState* Raw() { return mWrState; }
 protected:
   WrState* mWrState;
 
   friend class WebRenderAPI;
 };
 
 Maybe<WrImageFormat>
 SurfaceFormatToWrImageFormat(gfx::SurfaceFormat aFormat);
 
 } // namespace
 } // namespace
 
-#endif
\ No newline at end of file
+#endif
--- a/gfx/webrender_bindings/webrender_ffi.h
+++ b/gfx/webrender_bindings/webrender_ffi.h
@@ -134,38 +134,38 @@ struct WrColor
 
   bool operator==(const WrColor& aRhs) const
   {
     return r == aRhs.r && g == aRhs.g &&
            b == aRhs.b && a == aRhs.a;
   }
 };
 
-struct WRGlyphInstance
+struct WrGlyphInstance
 {
   uint32_t index;
   float x;
   float y;
 
-  bool operator==(const WRGlyphInstance& other) const
+  bool operator==(const WrGlyphInstance& other) const
   {
     return index == other.index &&
            x == other.x &&
            y == other.y;
   }
 };
 
 // Note that the type is slightly different than
-// the definition in bindings.rs. WRGlyphInstance
+// the definition in bindings.rs. WrGlyphInstance
 // versus GlyphInstance, but their layout is the same.
 // So we're really overlapping the types for the same memory.
 struct WrGlyphArray
 {
   mozilla::gfx::Color color;
-  nsTArray<WRGlyphInstance> glyphs;
+  nsTArray<WrGlyphInstance> glyphs;
 
   bool operator==(const WrGlyphArray& other) const
   {
     if (!(color == other.color) ||
        (glyphs.Length() != other.glyphs.Length())) {
       return false;
     }
 
@@ -449,17 +449,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,
-                WrFontKey font_Key, const WRGlyphInstance* glyphs,
+                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,
                   WrLayoutSize bottom_left_radius, WrLayoutSize bottom_right_radius)