Bug 1022624 - Rename numStops to stopCount.
authorMarkus Stange <mstange@themasta.com>
Tue, 10 Jun 2014 22:29:03 +0200
changeset 188020 48dc31fc0fc48b150b11a9141187717349fc7de0
parent 188019 2b76bb4c21c28eb93cbe590e97262c46e16a94c3
child 188021 4e8c7d93078afc21f78e3f74bc0fbb052828aa97
push id26944
push useremorley@mozilla.com
push dateWed, 11 Jun 2014 15:14:00 +0000
treeherdermozilla-central@c7391b84d9c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1022624
milestone33.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 1022624 - Rename numStops to stopCount.
gfx/2d/DrawTargetCG.cpp
--- a/gfx/2d/DrawTargetCG.cpp
+++ b/gfx/2d/DrawTargetCG.cpp
@@ -512,28 +512,28 @@ CalculateRepeatingGradientParams(CGPoint
 }
 
 static CGGradientRef
 CreateRepeatingGradient(CGContextRef cg, GradientStopsCG* aStops,
                         int aRepeatStartFactor, int aRepeatEndFactor,
                         bool aReflect)
 {
   int repeatCount = aRepeatEndFactor - aRepeatStartFactor;
-  uint32_t numStops = aStops->mStops.size();
+  uint32_t stopCount = aStops->mStops.size();
   double scale = 1./repeatCount;
 
   std::vector<CGFloat> colors;
   std::vector<CGFloat> offsets;
-  colors.reserve(numStops*repeatCount*4);
-  offsets.reserve(numStops*repeatCount);
+  colors.reserve(stopCount*repeatCount*4);
+  offsets.reserve(stopCount*repeatCount);
 
   for (int j = aRepeatStartFactor; j < aRepeatEndFactor; j++) {
     bool isReflected = aReflect && (j % 2) != 0;
-    for (uint32_t i = 0; i < numStops; i++) {
-      uint32_t stopIndex = isReflected ? numStops - i - 1 : i;
+    for (uint32_t i = 0; i < stopCount; i++) {
+      uint32_t stopIndex = isReflected ? stopCount - i - 1 : i;
       colors.push_back(aStops->mStops[stopIndex].color.r);
       colors.push_back(aStops->mStops[stopIndex].color.g);
       colors.push_back(aStops->mStops[stopIndex].color.b);
       colors.push_back(aStops->mStops[stopIndex].color.a);
 
       CGFloat offset = aStops->mStops[stopIndex].offset;
       if (isReflected) {
         offset = 1 - offset;
@@ -541,17 +541,17 @@ CreateRepeatingGradient(CGContextRef cg,
       offsets.push_back((offset + (j - aRepeatStartFactor)) * scale);
     }
   }
 
   CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
   CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace,
                                                                &colors.front(),
                                                                &offsets.front(),
-                                                               repeatCount*numStops);
+                                                               repeatCount*stopCount);
   CGColorSpaceRelease(colorSpace);
   return gradient;
 }
 
 static void
 DrawLinearRepeatingGradient(CGContextRef cg, const LinearGradientPattern &aPattern,
                             const CGRect &aExtents, bool aReflect)
 {