Bug 1022624 - Rename numStops to stopCount. a=lmandel
authorMarkus Stange <mstange@themasta.com>
Tue, 10 Jun 2014 22:29:03 +0200
changeset 207124 f0a87ca6c29dac1c39c0b024cfc45a2da22bceef
parent 207123 f5dc2ae02b195567eedc10630425f9b06d691214
child 207125 0b7a5bba0115ea18d68f19619f6e238082e16e16
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslmandel
bugs1022624
milestone32.0a2
Bug 1022624 - Rename numStops to stopCount. a=lmandel
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)
 {