Bug 1274589 - Rename RegionBuilder::Or to RegionBuilder::OrWith for consistency with the region classes. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Sat, 21 May 2016 00:06:51 -0400
changeset 339347 6a6cf1f4f7c22fd4e8d68c5a7966e06f15a26a4c
parent 339346 2bc3ee78d5d3e7c0f89bb6d3bea7978757b02476
child 339348 7aea47a3405e404c0c7b6ad9218d5f482d558477
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1274589
milestone49.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 1274589 - Rename RegionBuilder::Or to RegionBuilder::OrWith for consistency with the region classes. r=jrmuizel MozReview-Commit-ID: CIzTVKXUVSs
gfx/ipc/GfxMessageUtils.h
gfx/src/RegionBuilder.h
gfx/tests/gtest/TestRegion.cpp
layout/base/nsLayoutUtils.cpp
--- a/gfx/ipc/GfxMessageUtils.h
+++ b/gfx/ipc/GfxMessageUtils.h
@@ -382,17 +382,17 @@ struct RegionParamTraits
   {
     RegionBuilder<Region> builder;
     Rect rect;
     while (ReadParam(msg, iter, &rect)) {
       if (rect.IsEmpty()) {
         *result = builder.ToRegion();
         return true;
       }
-      builder.Or(rect);
+      builder.OrWith(rect);
     }
 
     return false;
   }
 };
 
 template<class Units>
 struct ParamTraits<mozilla::gfx::IntRegionTyped<Units>>
--- a/gfx/src/RegionBuilder.h
+++ b/gfx/src/RegionBuilder.h
@@ -11,17 +11,17 @@ template <typename RegionType>
 class RegionBuilder
 {
 public:
   typedef typename RegionType::RectType RectType;
 
   RegionBuilder()
   {}
 
-  void Or(const RectType& aRect) {
+  void OrWith(const RectType& aRect) {
     pixman_box32_t box = { aRect.x, aRect.y, aRect.XMost(), aRect.YMost() };
     mRects.AppendElement(box);
   }
 
   RegionType ToRegion() const {
     return RegionType(mRects);
   }
 
--- a/gfx/tests/gtest/TestRegion.cpp
+++ b/gfx/tests/gtest/TestRegion.cpp
@@ -714,23 +714,23 @@ MOZ_GTEST_BENCH(GfxBench, RegionAnd, []{
   }
 });
 
 void BenchRegionBuilderOr() {
   const int size = 5000;
 
   RegionBuilder<nsRegion> r;
   for (int i = 0; i < size; i++) {
-    r.Or(nsRect(i, i, i + 10, i + 10));
+    r.OrWith(nsRect(i, i, i + 10, i + 10));
   }
   r.ToRegion();
 
   RegionBuilder<nsIntRegion> rInt;
   for (int i = 0; i < size; i++) {
-    rInt.Or(nsIntRect(i, i, i + 10, i + 10));
+    rInt.OrWith(nsIntRect(i, i, i + 10, i + 10));
   }
   rInt.ToRegion();
 }
 
 MOZ_GTEST_BENCH(GfxBench, RegionBuilderOr, []{
   BenchRegionBuilderOr();
 });
 
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -9063,17 +9063,17 @@ nsLayoutUtils::TransformToAncestorAndCom
   if (aRegion.IsEmpty()) {
     return;
   }
   bool isPrecise;
   RegionBuilder<nsRegion> transformedRegion;
   for (nsRegion::RectIterator it = aRegion.RectIter(); !it.Done(); it.Next()) {
     nsRect transformed = TransformFrameRectToAncestor(
       aFrame, it.Get(), aAncestorFrame, &isPrecise, aMatrixCache);
-    transformedRegion.Or(transformed);
+    transformedRegion.OrWith(transformed);
   }
   nsRegion* dest = isPrecise ? aPreciseTargetDest : aImpreciseTargetDest;
   dest->OrWith(transformedRegion.ToRegion());
 }
 
 /* static */ bool
 nsLayoutUtils::ShouldUseNoScriptSheet(nsIDocument* aDocument)
 {