Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)

This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/AAClipBench.cpp b/bench/AAClipBench.cpp
index ce91b2c..f85af68 100644
--- a/bench/AAClipBench.cpp
+++ b/bench/AAClipBench.cpp
@@ -28,7 +28,7 @@
     };
 
 public:
-    AAClipBench(void* param, bool doPath, bool doAA) 
+    AAClipBench(void* param, bool doPath, bool doAA)
         : INHERITED(param)
         , fDoPath(doPath)
         , fDoAA(doAA) {
@@ -37,7 +37,7 @@
                      doPath ? "path" : "rect",
                      doAA ? "AA" : "BW");
 
-        fClipRect.set(SkFloatToScalar(10.5f), SkFloatToScalar(10.5f), 
+        fClipRect.set(SkFloatToScalar(10.5f), SkFloatToScalar(10.5f),
                       SkFloatToScalar(50.5f), SkFloatToScalar(50.5f));
         fClipPath.addRoundRect(fClipRect, SkIntToScalar(10), SkIntToScalar(10));
         fDrawRect.set(SkIntToScalar(0), SkIntToScalar(0),
@@ -57,7 +57,7 @@
             // jostle the clip regions each time to prevent caching
             fClipRect.offset((i % 2) == 0 ? SkIntToScalar(10) : SkIntToScalar(-10), 0);
             fClipPath.reset();
-            fClipPath.addRoundRect(fClipRect, 
+            fClipPath.addRoundRect(fClipRect,
                                    SkIntToScalar(5), SkIntToScalar(5));
             SkASSERT(fClipPath.isConvex());
 
@@ -103,14 +103,14 @@
     SkPoint fSizes[kNestingDepth+1];
 
 public:
-    NestedAAClipBench(void* param, bool doAA) 
+    NestedAAClipBench(void* param, bool doAA)
         : INHERITED(param)
         , fDoAA(doAA) {
 
         fName.printf("nested_aaclip_%s", doAA ? "AA" : "BW");
 
-        fDrawRect = SkRect::MakeLTRB(0, 0, 
-                                     SkIntToScalar(kImageSize), 
+        fDrawRect = SkRect::MakeLTRB(0, 0,
+                                     SkIntToScalar(kImageSize),
                                      SkIntToScalar(kImageSize));
 
         fSizes[0].set(SkIntToScalar(kImageSize), SkIntToScalar(kImageSize));
@@ -124,13 +124,13 @@
     virtual const char* onGetName() { return fName.c_str(); }
 
 
-    void recurse(SkCanvas* canvas, 
+    void recurse(SkCanvas* canvas,
                  int depth,
                  const SkPoint& offset) {
 
             canvas->save();
 
-            SkRect temp = SkRect::MakeLTRB(0, 0, 
+            SkRect temp = SkRect::MakeLTRB(0, 0,
                                            fSizes[depth].fX, fSizes[depth].fY);
             temp.offset(offset);
 
@@ -138,8 +138,8 @@
             path.addRoundRect(temp, SkIntToScalar(3), SkIntToScalar(3));
             SkASSERT(path.isConvex());
 
-            canvas->clipPath(path, 
-                             0 == depth ? SkRegion::kReplace_Op : 
+            canvas->clipPath(path,
+                             0 == depth ? SkRegion::kReplace_Op :
                                           SkRegion::kIntersect_Op,
                              fDoAA);
 
diff --git a/bench/BenchGpuTimer_gl.cpp b/bench/BenchGpuTimer_gl.cpp
index 3290983..699f5e5 100644
--- a/bench/BenchGpuTimer_gl.cpp
+++ b/bench/BenchGpuTimer_gl.cpp
@@ -17,7 +17,7 @@
     fSupported = GrGLGetVersion(glctx->gl()) > GR_GL_VER(3,3) ||
                  GrGLHasExtension(glctx->gl(), "GL_ARB_timer_query") ||
                  GrGLHasExtension(glctx->gl(), "GL_EXT_timer_query");
-    
+
     if (fSupported) {
         SK_GL(*glctx, GenQueries(1, &fQuery));
     }
@@ -48,7 +48,7 @@
         fStarted = false;
         fContext->makeCurrent();
         SK_GL(*fContext, EndQuery(GR_GL_TIME_ELAPSED));
-        
+
         GrGLint available = 0;
         while (!available) {
             SK_GL(*fContext, GetQueryObjectiv(fQuery,
@@ -59,7 +59,7 @@
         SK_GL(*fContext, GetQueryObjectui64v(fQuery,
                                              GR_GL_QUERY_RESULT,
                                              &totalGPUTimeElapsed));
-        
+
         return totalGPUTimeElapsed / 1000000.0;
     } else {
         return 0;
diff --git a/bench/BenchSysTimer_mach.cpp b/bench/BenchSysTimer_mach.cpp
index c837ca3..cf3f1c1 100644
--- a/bench/BenchSysTimer_mach.cpp
+++ b/bench/BenchSysTimer_mach.cpp
@@ -17,7 +17,7 @@
         time_value_t none = {0, 0};
         return none;
     }
-    
+
     task_thread_times_info thread_info_data;
     mach_msg_type_number_t thread_info_count = TASK_THREAD_TIMES_INFO_COUNT;
     if (KERN_SUCCESS != task_info(task,
@@ -28,7 +28,7 @@
         time_value_t none = {0, 0};
         return none;
     }
-    
+
     time_value_add(&thread_info_data.user_time, &thread_info_data.system_time)
     return thread_info_data.user_time;
 }
@@ -63,7 +63,7 @@
 }
 double BenchSysTimer::endWall() {
     uint64_t end_wall = mach_absolute_time();
-    
+
     uint64_t elapsed = end_wall - this->fStartWall;
     mach_timebase_info_data_t sTimebaseInfo;
     if (KERN_SUCCESS != mach_timebase_info(&sTimebaseInfo)) {
diff --git a/bench/BenchSysTimer_windows.cpp b/bench/BenchSysTimer_windows.cpp
index 3635ec5..1c4e404 100644
--- a/bench/BenchSysTimer_windows.cpp
+++ b/bench/BenchSysTimer_windows.cpp
@@ -49,10 +49,10 @@
     if (0 == ::QueryPerformanceCounter(&end_wall)) {
         end_wall.QuadPart = 0;
     }
-    
+
     LARGE_INTEGER ticks_elapsed;
     ticks_elapsed.QuadPart = end_wall.QuadPart - this->fStartWall.QuadPart;
-    
+
     LARGE_INTEGER frequency;
     if (0 == ::QueryPerformanceFrequency(&frequency)) {
         return 0.0L;
diff --git a/bench/BenchTimer.h b/bench/BenchTimer.h
index a00707c..70675ad 100644
--- a/bench/BenchTimer.h
+++ b/bench/BenchTimer.h
@@ -30,7 +30,7 @@
     double fCpu;
     double fWall;
     double fGpu;
-    
+
 private:
     BenchSysTimer *fSysTimer;
 #if SK_SUPPORT_GPU
diff --git a/bench/BitmapBench.cpp b/bench/BitmapBench.cpp
index 40a733d..5f06f88 100644
--- a/bench/BitmapBench.cpp
+++ b/bench/BitmapBench.cpp
@@ -31,7 +31,7 @@
     p.setColor(SK_ColorRED);
     canvas.drawCircle(SkIntToScalar(w)/2, SkIntToScalar(h)/2,
                       SkIntToScalar(SkMin32(w, h))*3/8, p);
-    
+
     SkRect r;
     r.set(0, 0, SkIntToScalar(w), SkIntToScalar(h));
     p.setStyle(SkPaint::kStroke_Style);
@@ -52,7 +52,7 @@
     int r = SkGetPackedR32(c);
     int g = SkGetPackedG32(c);
     int b = SkGetPackedB32(c);
-    
+
     return convByteTo6(r) * 36 + convByteTo6(g) * 6 + convByteTo6(b);
 }
 
@@ -74,7 +74,7 @@
     dst->setConfig(SkBitmap::kIndex8_Config, src.width(), src.height());
     dst->allocPixels(ctable);
     ctable->unref();
-    
+
     SkAutoLockPixels alps(src);
     SkAutoLockPixels alpd(*dst);
 
@@ -88,12 +88,12 @@
 }
 
 /*  Variants for bitmaps
- 
+
     - src depth (32 w+w/o alpha), 565, 4444, index, a8
     - paint options: filtering, dither, alpha
     - matrix options: translate, scale, rotate, persp
     - tiling: none, repeat, mirror, clamp
-    
+
  */
 
 class BitmapBench : public SkBenchmark {
@@ -106,7 +106,7 @@
     enum { N = SkBENCHLOOP(300) };
 public:
     BitmapBench(void* param, bool isOpaque, SkBitmap::Config c,
-                bool forceUpdate = false, bool bitmapVolatile = false, 
+                bool forceUpdate = false, bool bitmapVolatile = false,
                 int tx = -1, int ty = -1)
         : INHERITED(param), fIsOpaque(isOpaque), fForceUpdate(forceUpdate), fTileX(tx), fTileY(ty) {
         const int w = 128;
@@ -120,7 +120,7 @@
         }
         bm.allocPixels();
         bm.eraseColor(isOpaque ? SK_ColorBLACK : 0);
-        
+
         drawIntoBitmap(bm);
 
         if (SkBitmap::kIndex8_Config == c) {
@@ -147,7 +147,7 @@
         }
         fName.appendf("_%s%s", gConfigName[fBitmap.config()],
                       fIsOpaque ? "" : "_A");
-        if (fForceUpdate) 
+        if (fForceUpdate)
             fName.append("_update");
         if (fBitmap.isVolatile())
             fName.append("_volatile");
@@ -165,7 +165,7 @@
         const SkBitmap& bitmap = fBitmap;
         const SkScalar x0 = SkIntToScalar(-bitmap.width() / 2);
         const SkScalar y0 = SkIntToScalar(-bitmap.height() / 2);
-        
+
         for (int i = 0; i < N; i++) {
             SkScalar x = x0 + rand.nextUScalar1() * dim.fX;
             SkScalar y = y0 + rand.nextUScalar1() * dim.fY;
@@ -192,7 +192,7 @@
     enum { N = SkBENCHLOOP(300) };
 public:
     FilterBitmapBench(void* param, bool isOpaque, SkBitmap::Config c,
-                bool forceUpdate = false, bool bitmapVolatile = false, 
+                bool forceUpdate = false, bool bitmapVolatile = false,
                 int tx = -1, int ty = -1, bool addScale = false,
                 bool addRotate = false, bool addFilter = false)
         : INHERITED(param, isOpaque, c, forceUpdate, bitmapVolatile, tx, ty)
@@ -203,11 +203,11 @@
 protected:
     virtual const char* onGetName() {
         fFullName.set(INHERITED::onGetName());
-        if (fScale) 
+        if (fScale)
             fFullName.append("_scale");
-        if (fRotate) 
+        if (fRotate)
             fFullName.append("_rotate");
-        if (fFilter) 
+        if (fFilter)
             fFullName.append("_filter");
 
         return fFullName.c_str();
@@ -218,7 +218,7 @@
         if (fScale) {
             const SkScalar x = SkIntToScalar(dim.fWidth) / 2;
             const SkScalar y = SkIntToScalar(dim.fHeight) / 2;
-    
+
             canvas->translate(x, y);
             // just enough so we can't take the sprite case
             canvas->scale(SK_Scalar1 * 99/100, SK_Scalar1 * 99/100);
@@ -227,7 +227,7 @@
         if (fRotate) {
             const SkScalar x = SkIntToScalar(dim.fWidth) / 2;
             const SkScalar y = SkIntToScalar(dim.fHeight) / 2;
-    
+
             canvas->translate(x, y);
             canvas->rotate(SkIntToScalar(35));
             canvas->translate(-x, -y);
@@ -251,7 +251,7 @@
 static SkBenchmark* Fact7(void* p) { return new BitmapBench(p, true, SkBitmap::kARGB_8888_Config, true, true); }
 static SkBenchmark* Fact8(void* p) { return new BitmapBench(p, true, SkBitmap::kARGB_8888_Config, true, false); }
 
-// scale filter -> S32_opaque_D32_filter_DX_{SSE2,SSSE3} and Fact9 is also for S32_D16_filter_DX_SSE2 
+// scale filter -> S32_opaque_D32_filter_DX_{SSE2,SSSE3} and Fact9 is also for S32_D16_filter_DX_SSE2
 static SkBenchmark* Fact9(void* p) { return new FilterBitmapBench(p, false, SkBitmap::kARGB_8888_Config, false, false, -1, -1, true, false, true); }
 static SkBenchmark* Fact10(void* p) { return new FilterBitmapBench(p, true, SkBitmap::kARGB_8888_Config, false, false, -1, -1, true, false, true); }
 static SkBenchmark* Fact11(void* p) { return new FilterBitmapBench(p, true, SkBitmap::kARGB_8888_Config, true, true, -1, -1, true, false, true); }
diff --git a/bench/BlurBench.cpp b/bench/BlurBench.cpp
index de78fe1..371e26d 100644
--- a/bench/BlurBench.cpp
+++ b/bench/BlurBench.cpp
@@ -40,12 +40,12 @@
             fName.printf("blur_%d_%s", SkScalarRound(rad), name);
         }
     }
-    
+
 protected:
     virtual const char* onGetName() {
         return fName.c_str();
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         SkPaint paint;
         this->setupPaint(&paint);
@@ -65,7 +65,7 @@
             canvas->drawOval(r, paint);
         }
     }
-    
+
 private:
     typedef SkBenchmark INHERITED;
 };
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index 2155816..a47aa71 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -50,7 +50,7 @@
         fWidth = width;
         fName.printf("dash_%d_%s", width, doClip ? "clipped" : "noclip");
         fDoClip = doClip;
-        
+
         fPts[0].set(SkIntToScalar(10), SkIntToScalar(10));
         fPts[1].set(SkIntToScalar(600), SkIntToScalar(10));
     }
@@ -106,7 +106,7 @@
     : INHERITED(param, intervals, count, width) {
         fName.append("_rect");
     }
-    
+
 protected:
     virtual void handlePath(SkCanvas* canvas, const SkPath& path,
                             const SkPaint& paint, int N) SK_OVERRIDE {
@@ -119,14 +119,14 @@
             rect.fTop = pts[0].fY - paint.getStrokeWidth() / 2;
             rect.fRight = rect.fLeft + SkIntToScalar(fWidth);
             rect.fBottom = rect.fTop + paint.getStrokeWidth();
-            
+
             SkPaint p(paint);
             p.setStyle(SkPaint::kFill_Style);
             p.setPathEffect(NULL);
-            
+
             int count = SkScalarRoundToInt((pts[1].fX - pts[0].fX) / (2*fWidth));
             SkScalar dx = SkIntToScalar(2 * fWidth);
-            
+
             for (int i = 0; i < N*10; ++i) {
                 SkRect r = rect;
                 for (int j = 0; j < count; ++j) {
@@ -136,7 +136,7 @@
             }
         }
     }
-    
+
 private:
     typedef DashBench INHERITED;
 };
@@ -144,7 +144,7 @@
 static void make_unit_star(SkPath* path, int n) {
     SkScalar rad = -SK_ScalarPI / 2;
     const SkScalar drad = (n >> 1) * SK_ScalarPI * 2 / n;
-    
+
     path->moveTo(0, -SK_Scalar1);
     for (int i = 1; i < n; i++) {
         rad += drad;
@@ -191,7 +191,7 @@
     MakeDashBench(void* param, void (*proc)(SkPath*), const char name[]) : INHERITED(param) {
         fName.printf("makedash_%s", name);
         proc(&fPath);
-        
+
         SkScalar vals[] = { SkIntToScalar(4), SkIntToScalar(4) };
         fPE.reset(new SkDashPathEffect(vals, 2, 0));
     }
@@ -200,17 +200,17 @@
     virtual const char* onGetName() SK_OVERRIDE {
         return fName.c_str();
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
         SkPath dst;
         for (int i = 0; i < N; ++i) {
             SkStrokeRec rec(SkStrokeRec::kHairline_InitStyle);
-            
+
             fPE->filterPath(&dst, fPath, &rec);
             dst.rewind();
         }
     }
-    
+
 private:
     typedef SkBenchmark INHERITED;
 };
diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp
index 6761690..c85b715 100644
--- a/bench/DecodeBench.cpp
+++ b/bench/DecodeBench.cpp
@@ -23,7 +23,7 @@
     DecodeBench(void* param, SkBitmap::Config c) : SkBenchmark(param) {
         fFilename = this->findDefine("decode-filename");
         fPrefConfig = c;
-        
+
         const char* fname = NULL;
         if (fFilename) {
             fname = strrchr(fFilename, '/');
diff --git a/bench/DeferredCanvasBench.cpp b/bench/DeferredCanvasBench.cpp
index 99c07bf..15902b9 100644
--- a/bench/DeferredCanvasBench.cpp
+++ b/bench/DeferredCanvasBench.cpp
@@ -95,7 +95,7 @@
         canvas.clear(0x0);
         canvas.setNotificationClient(NULL);
     }
-   
+
 private:
     typedef DeferredCanvasBench INHERITED;
     SimpleNotificationClient fNotificationClient;
diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp
index 98fd6e5..861a43e 100644
--- a/bench/GrMemoryPoolBench.cpp
+++ b/bench/GrMemoryPoolBench.cpp
@@ -67,7 +67,7 @@
                 s = 0;
             }
             SkFixed del = r.nextSFixed1();
-            if (count && 
+            if (count &&
                 (kMaxObjects == count || del < delThresh)) {
                 delete objects[count-1];
                 --count;
diff --git a/bench/GradientBench.cpp b/bench/GradientBench.cpp
index ac5bbc7..d7ce74d 100644
--- a/bench/GradientBench.cpp
+++ b/bench/GradientBench.cpp
@@ -180,7 +180,7 @@
             { 0, 0 },
             { SkIntToScalar(W), SkIntToScalar(H) }
         };
-        
+
         fCount = SkBENCHLOOP(N * gGrads[gradType].fRepeat);
         fShader = gGrads[gradType].fMaker(pts, gGradData[0], tm, NULL, scale);
         fGeomType = geomType;
@@ -223,16 +223,16 @@
 class Gradient2Bench : public SkBenchmark {
 public:
     Gradient2Bench(void* param) : INHERITED(param) {}
-    
+
 protected:
     virtual const char* onGetName() {
         return "gradient_create";
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         SkPaint paint;
         this->setupPaint(&paint);
-        
+
         const SkRect r = { 0, 0, SkIntToScalar(4), SkIntToScalar(4) };
         const SkPoint pts[] = {
             { 0, 0 },
@@ -252,7 +252,7 @@
             canvas->drawRect(r, paint);
         }
     }
-    
+
 private:
     typedef SkBenchmark INHERITED;
 };
diff --git a/bench/InterpBench.cpp b/bench/InterpBench.cpp
index 85fada3..f8f463b 100644
--- a/bench/InterpBench.cpp
+++ b/bench/InterpBench.cpp
@@ -45,7 +45,7 @@
 class Fixed16D16Interp : public InterpBench {
 public:
     Fixed16D16Interp(void* param) : INHERITED(param, "16.16") {}
-    
+
 protected:
     virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
         SkFixed curr = SkFloatToFixed(fx);
@@ -64,27 +64,27 @@
 class Fixed32D32Interp : public InterpBench {
 public:
     Fixed32D32Interp(void* param) : INHERITED(param, "32.32") {}
-    
+
 protected:
     virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
         int64_t curr = (int64_t)(fx * 65536 * 655536);
         int64_t step = (int64_t)(dx * 65536 * 655536);
         SkFixed tmp;
         for (int i = 0; i < count; i += 4) {
-            tmp = (SkFixed)(curr >> 16); 
-            dst[i + 0] = TILE(tmp, count); 
+            tmp = (SkFixed)(curr >> 16);
+            dst[i + 0] = TILE(tmp, count);
             curr += step;
 
-            tmp = (SkFixed)(curr >> 16); 
-            dst[i + 1] = TILE(tmp, count); 
+            tmp = (SkFixed)(curr >> 16);
+            dst[i + 1] = TILE(tmp, count);
             curr += step;
 
-            tmp = (SkFixed)(curr >> 16); 
-            dst[i + 2] = TILE(tmp, count); 
+            tmp = (SkFixed)(curr >> 16);
+            dst[i + 2] = TILE(tmp, count);
             curr += step;
 
-            tmp = (SkFixed)(curr >> 16); 
-            dst[i + 3] = TILE(tmp, count); 
+            tmp = (SkFixed)(curr >> 16);
+            dst[i + 3] = TILE(tmp, count);
             curr += step;
         }
     }
@@ -95,7 +95,7 @@
 class Fixed16D48Interp : public InterpBench {
 public:
     Fixed16D48Interp(void* param) : INHERITED(param, "16.48") {}
-    
+
 protected:
     virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
         int64_t curr = (int64_t)(fx * 65536 * 655536 * 65536);
@@ -115,7 +115,7 @@
 class FloatInterp : public InterpBench {
 public:
     FloatInterp(void* param) : INHERITED(param, "float") {}
-    
+
 protected:
     virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
         SkFixed tmp;
@@ -133,7 +133,7 @@
 class DoubleInterp : public InterpBench {
 public:
     DoubleInterp(void* param) : INHERITED(param, "double") {}
-    
+
 protected:
     virtual void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
         double ffx = fx;
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp
index 21c113c..414036b 100644
--- a/bench/MathBench.cpp
+++ b/bench/MathBench.cpp
@@ -32,8 +32,8 @@
         }
     }
 
-    virtual void performTest(float* SK_RESTRICT dst, 
-                              const float* SK_RESTRICT src, 
+    virtual void performTest(float* SK_RESTRICT dst,
+                              const float* SK_RESTRICT src,
                               int count) = 0;
 
 protected:
@@ -59,11 +59,11 @@
     MathBenchU32(void* param, const char name[]) : INHERITED(param, name) {}
 
 protected:
-    virtual void performITest(uint32_t* SK_RESTRICT dst, 
-                              const uint32_t* SK_RESTRICT src, 
+    virtual void performITest(uint32_t* SK_RESTRICT dst,
+                              const uint32_t* SK_RESTRICT src,
                               int count) = 0;
-    
-    virtual void performTest(float* SK_RESTRICT dst, 
+
+    virtual void performTest(float* SK_RESTRICT dst,
                               const float* SK_RESTRICT src,
                               int count) SK_OVERRIDE {
         uint32_t* d = SkTCast<uint32_t*>(dst);
@@ -80,8 +80,8 @@
 public:
     NoOpMathBench(void* param) : INHERITED(param, "noOp") {}
 protected:
-    virtual void performTest(float* SK_RESTRICT dst, 
-                              const float* SK_RESTRICT src, 
+    virtual void performTest(float* SK_RESTRICT dst,
+                              const float* SK_RESTRICT src,
                               int count) {
         for (int i = 0; i < count; ++i) {
             dst[i] = src[i] + 1;
@@ -95,8 +95,8 @@
 public:
     SlowISqrtMathBench(void* param) : INHERITED(param, "slowIsqrt") {}
 protected:
-    virtual void performTest(float* SK_RESTRICT dst, 
-                              const float* SK_RESTRICT src, 
+    virtual void performTest(float* SK_RESTRICT dst,
+                              const float* SK_RESTRICT src,
                               int count) {
         for (int i = 0; i < count; ++i) {
             dst[i] = 1.0f / sk_float_sqrt(src[i]);
@@ -120,8 +120,8 @@
 public:
     FastISqrtMathBench(void* param) : INHERITED(param, "fastIsqrt") {}
 protected:
-    virtual void performTest(float* SK_RESTRICT dst, 
-                              const float* SK_RESTRICT src, 
+    virtual void performTest(float* SK_RESTRICT dst,
+                              const float* SK_RESTRICT src,
                               int count) {
         for (int i = 0; i < count; ++i) {
             dst[i] = SkFastInvSqrt(src[i]);
@@ -237,7 +237,7 @@
     // x * 0 will be NaN iff x is infinity or NaN.
     // a + b will be NaN iff either a or b is NaN.
     float value = r.fLeft * 0 + r.fTop * 0 + r.fRight * 0 + r.fBottom * 0;
-    
+
     // value is either NaN or it is finite (zero).
     // value==value will be true iff value is not NaN
     return value == value;
@@ -291,7 +291,7 @@
                 }
             }
         }
-        
+
         SkPaint paint;
         if (paint.getAlpha() == 0) {
             SkDebugf("%d\n", counter);
@@ -301,7 +301,7 @@
     virtual const char* onGetName() {
         return fName;
     }
-        
+
 private:
     IsFiniteProc    fProc;
     const char*     fName;
@@ -317,21 +317,21 @@
     float fData[ARRAY];
     bool fFast;
 public:
-    
+
     FloorBench(void* param, bool fast) : INHERITED(param), fFast(fast) {
         SkRandom rand;
-        
+
         for (int i = 0; i < ARRAY; ++i) {
             fData[i] = rand.nextSScalar1();
         }
-        
+
         if (fast) {
             fName = "floor_fast";
         } else {
             fName = "floor_std";
         }
     }
-    
+
     virtual void process(float) {}
 
 protected:
@@ -339,7 +339,7 @@
         SkRandom rand;
         float accum = 0;
         const float* data = fData;
-    
+
         if (fFast) {
             for (int j = 0; j < LOOP; ++j) {
                 for (int i = 0; i < ARRAY; ++i) {
@@ -356,14 +356,14 @@
             }
         }
     }
-    
+
     virtual const char* onGetName() {
         return fName;
     }
-    
+
 private:
     const char*     fName;
-    
+
     typedef SkBenchmark INHERITED;
 };
 
diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp
index b82d7fe..d8e2137 100644
--- a/bench/MatrixBench.cpp
+++ b/bench/MatrixBench.cpp
@@ -344,7 +344,7 @@
 
 class InvertMapRectMatrixBench : public MatrixBench {
 public:
-    InvertMapRectMatrixBench(void* param, const char* name, int flags) 
+    InvertMapRectMatrixBench(void* param, const char* name, int flags)
         : INHERITED(param, name)
         , fFlags(flags) {
         fMatrix.reset();
@@ -381,7 +381,7 @@
             fMatrix.setPerspX(fMatrix.getPerspX());
         }
         SkMatrix inv;
-        bool invertible = 
+        bool invertible =
         fMatrix.invert(&inv);
         SkASSERT(invertible);
         SkRect transformedRect;
@@ -406,37 +406,37 @@
 static SkBenchmark* M3(void* p) { return new FloatDoubleConcatMatrixBench(p); }
 static SkBenchmark* M4(void* p) { return new DoubleConcatMatrixBench(p); }
 static SkBenchmark* M5(void* p) { return new GetTypeMatrixBench(p); }
-static SkBenchmark* M6(void* p) { 
-    return new InvertMapRectMatrixBench(p, 
+static SkBenchmark* M6(void* p) {
+    return new InvertMapRectMatrixBench(p,
         "invert_maprect_identity", 0);
 }
-static SkBenchmark* M7(void* p) { 
-    return new InvertMapRectMatrixBench(p, 
-        "invert_maprect_rectstaysrect", 
+static SkBenchmark* M7(void* p) {
+    return new InvertMapRectMatrixBench(p,
+        "invert_maprect_rectstaysrect",
         InvertMapRectMatrixBench::kScale_Flag |
         InvertMapRectMatrixBench::kTranslate_Flag);
 }
 static SkBenchmark* M8(void* p) {
-    return new InvertMapRectMatrixBench(p, 
-        "invert_maprect_nonpersp", 
+    return new InvertMapRectMatrixBench(p,
+        "invert_maprect_nonpersp",
         InvertMapRectMatrixBench::kScale_Flag |
         InvertMapRectMatrixBench::kRotate_Flag |
         InvertMapRectMatrixBench::kTranslate_Flag);
 }
-static SkBenchmark* M9(void* p) { 
-    return new InvertMapRectMatrixBench(p, 
-        "invert_maprect_persp", 
+static SkBenchmark* M9(void* p) {
+    return new InvertMapRectMatrixBench(p,
+        "invert_maprect_persp",
         InvertMapRectMatrixBench::kPerspective_Flag);
 }
 static SkBenchmark* M10(void* p) {
-    return new InvertMapRectMatrixBench(p, 
+    return new InvertMapRectMatrixBench(p,
         "invert_maprect_typemask_rectstaysrect",
         InvertMapRectMatrixBench::kUncachedTypeMask_Flag |
         InvertMapRectMatrixBench::kScale_Flag |
         InvertMapRectMatrixBench::kTranslate_Flag);
 }
 static SkBenchmark* M11(void* p) {
-    return new InvertMapRectMatrixBench(p, 
+    return new InvertMapRectMatrixBench(p,
         "invert_maprect_typemask_nonpersp",
         InvertMapRectMatrixBench::kUncachedTypeMask_Flag |
         InvertMapRectMatrixBench::kScale_Flag |
diff --git a/bench/MemoryBench.cpp b/bench/MemoryBench.cpp
index 5fdb7f1..d8d6052 100644
--- a/bench/MemoryBench.cpp
+++ b/bench/MemoryBench.cpp
@@ -15,7 +15,7 @@
 class ChunkAllocBench : public SkBenchmark {
     SkString    fName;
     size_t      fMinSize;
-    
+
     enum {
         N = SkBENCHLOOP(1000)
     };
@@ -24,12 +24,12 @@
         fMinSize = minSize;
         fName.printf("chunkalloc_" SK_SIZE_T_SPECIFIER, minSize);
     }
-    
+
 protected:
     virtual const char* onGetName() SK_OVERRIDE {
         return fName.c_str();
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
         size_t inc = fMinSize >> 4;
         SkASSERT(inc > 0);
@@ -48,7 +48,7 @@
             alloc.reset();
         }
     }
-    
+
 private:
     typedef SkBenchmark INHERITED;
 };
diff --git a/bench/MorphologyBench.cpp b/bench/MorphologyBench.cpp
index f41e79c..b6e9c92 100644
--- a/bench/MorphologyBench.cpp
+++ b/bench/MorphologyBench.cpp
@@ -47,12 +47,12 @@
             fName.printf("morph_%d_%s", SkScalarRound(rad), name);
         }
     }
-    
+
 protected:
     virtual const char* onGetName() {
         return fName.c_str();
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         SkPaint paint;
         this->setupPaint(&paint);
@@ -69,11 +69,11 @@
                 SkMorphologyImageFilter* mf = NULL;
                 switch (fStyle) {
                 case kDilate_MT:
-                    mf = new SkDilateImageFilter(SkScalarFloorToInt(fRadius), 
+                    mf = new SkDilateImageFilter(SkScalarFloorToInt(fRadius),
                                                  SkScalarFloorToInt(fRadius));
                     break;
                 case kErode_MT:
-                    mf = new SkErodeImageFilter(SkScalarFloorToInt(fRadius), 
+                    mf = new SkErodeImageFilter(SkScalarFloorToInt(fRadius),
                                                 SkScalarFloorToInt(fRadius));
                     break;
                 }
@@ -82,7 +82,7 @@
             canvas->drawOval(r, paint);
         }
     }
-    
+
 private:
     typedef SkBenchmark INHERITED;
 };
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp
index 61014e8..2e07f67 100644
--- a/bench/PathBench.cpp
+++ b/bench/PathBench.cpp
@@ -82,7 +82,7 @@
 class TrianglePathBench : public PathBench {
 public:
     TrianglePathBench(void* param, Flags flags) : INHERITED(param, flags) {}
-    
+
     virtual void appendName(SkString* name) SK_OVERRIDE {
         name->append("triangle");
     }
@@ -102,7 +102,7 @@
 class RectPathBench : public PathBench {
 public:
     RectPathBench(void* param, Flags flags) : INHERITED(param, flags) {}
-    
+
     virtual void appendName(SkString* name) SK_OVERRIDE {
         name->append("rect");
     }
@@ -117,7 +117,7 @@
 class OvalPathBench : public PathBench {
 public:
     OvalPathBench(void* param, Flags flags) : INHERITED(param, flags) {}
-    
+
     virtual void appendName(SkString* name) SK_OVERRIDE {
         name->append("oval");
     }
@@ -147,7 +147,7 @@
 class SawToothPathBench : public PathBench {
 public:
     SawToothPathBench(void* param, Flags flags) : INHERITED(param, flags) {}
-    
+
     virtual void appendName(SkString* name) SK_OVERRIDE {
         name->append("sawtooth");
     }
@@ -659,7 +659,7 @@
             temp.addOval(r, SkPath::kCCW_Direction);
             temp.arcTo(r, 360, 0, true);
             temp.close();
-        
+
             canvas->drawPath(temp, paint);
         }
     }
diff --git a/bench/PathIterBench.cpp b/bench/PathIterBench.cpp
index 8e4308e..189d1b5 100644
--- a/bench/PathIterBench.cpp
+++ b/bench/PathIterBench.cpp
@@ -69,7 +69,7 @@
                 SkPath::RawIter iter(fPath);
                 SkPath::Verb verb;
                 SkPoint      pts[4];
-                
+
                 while ((verb = iter.next(pts)) != SkPath::kDone_Verb);
             }
         } else {
@@ -77,7 +77,7 @@
                 SkPath::Iter iter(fPath, false);
                 SkPath::Verb verb;
                 SkPoint      pts[4];
-                
+
                 while ((verb = iter.next(pts)) != SkPath::kDone_Verb);
             }
         }
diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp
index cef2e22..992b8f9 100644
--- a/bench/RectBench.cpp
+++ b/bench/RectBench.cpp
@@ -143,7 +143,7 @@
     SkCanvas::PointMode fMode;
     const char* fName;
 
-    BlitMaskBench(void* param, SkCanvas::PointMode mode, 
+    BlitMaskBench(void* param, SkCanvas::PointMode mode,
                   BlitMaskBench::kMaskType type, const char* name) :
                   RectBench(param, 2), fMode(mode), _type(type) {
         fName = name;
@@ -177,17 +177,17 @@
             paint.setShader(s)->unref();
         }
         for (size_t i = 0; i < sizes; i++) {
-            switch (_type) {	
-                case kMaskOpaque: 
-                    color = fColors[i]; 
-                    alpha = 0xFF; 
+            switch (_type) {
+                case kMaskOpaque:
+                    color = fColors[i];
+                    alpha = 0xFF;
                     break;
-                case kMaskBlack: 
+                case kMaskBlack:
                     alpha = 0xFF;
                     color = 0xFF000000;
                     break;
                 case kMaskColor:
-                    color = fColors[i]; 
+                    color = fColors[i];
                     alpha = rand.nextU() & 255;
                     break;
                 case KMaskShader:
@@ -202,8 +202,8 @@
     }
     virtual const char* onGetName() { return fName; }
 private:
-	typedef RectBench INHERITED;
-	kMaskType _type;
+    typedef RectBench INHERITED;
+    kMaskType _type;
 };
 
 
diff --git a/bench/RegionBench.cpp b/bench/RegionBench.cpp
index 5541a5c..7b9e2d4 100644
--- a/bench/RegionBench.cpp
+++ b/bench/RegionBench.cpp
@@ -75,7 +75,7 @@
     Proc     fProc;
     SkString fName;
     int      fLoopMul;
-    
+
     enum {
         W = 1024,
         H = 768,
diff --git a/bench/RepeatTileBench.cpp b/bench/RepeatTileBench.cpp
index 8470bed..da36205 100644
--- a/bench/RepeatTileBench.cpp
+++ b/bench/RepeatTileBench.cpp
@@ -27,7 +27,7 @@
     p.setColor(SK_ColorRED);
     canvas.drawCircle(SkIntToScalar(w)/2, SkIntToScalar(h)/2,
                       SkIntToScalar(SkMin32(w, h))*3/8, p);
-    
+
     SkRect r;
     r.set(0, 0, SkIntToScalar(w), SkIntToScalar(h));
     p.setStyle(SkPaint::kStroke_Style);
@@ -48,7 +48,7 @@
     int r = SkGetPackedR32(c);
     int g = SkGetPackedG32(c);
     int b = SkGetPackedB32(c);
-    
+
     return convByteTo6(r) * 36 + convByteTo6(g) * 6 + convByteTo6(b);
 }
 
@@ -70,7 +70,7 @@
     dst->setConfig(SkBitmap::kIndex8_Config, src.width(), src.height());
     dst->allocPixels(ctable);
     ctable->unref();
-    
+
     SkAutoLockPixels alps(src);
     SkAutoLockPixels alpd(*dst);
 
@@ -100,7 +100,7 @@
         }
         bm.allocPixels();
         bm.eraseColor(0);
-        
+
         drawIntoBitmap(bm);
 
         if (SkBitmap::kIndex8_Config == c) {
diff --git a/bench/ShaderMaskBench.cpp b/bench/ShaderMaskBench.cpp
index 0a68b44..ad27fcb 100644
--- a/bench/ShaderMaskBench.cpp
+++ b/bench/ShaderMaskBench.cpp
@@ -70,14 +70,14 @@
 
         const SkScalar x0 = SkIntToScalar(-10);
         const SkScalar y0 = SkIntToScalar(-10);
-        
+
         paint.setTextSize(SkIntToScalar(12));
         for (int i = 0; i < N; i++) {
             SkScalar x = x0 + rand.nextUScalar1() * dim.fX;
             SkScalar y = y0 + rand.nextUScalar1() * dim.fY;
             canvas->drawText(fText.c_str(), fText.size(), x, y, paint);
         }
-        
+
         paint.setTextSize(SkIntToScalar(48));
         for (int i = 0; i < N/4; i++) {
             SkScalar x = x0 + rand.nextUScalar1() * dim.fX;
diff --git a/bench/SkBenchmark.h b/bench/SkBenchmark.h
index 28314ea..a77cb83 100644
--- a/bench/SkBenchmark.h
+++ b/bench/SkBenchmark.h
@@ -55,15 +55,15 @@
     void setForceAlpha(int alpha) {
         fForceAlpha = alpha;
     }
-    
+
     void setForceAA(bool aa) {
         fForceAA = aa;
     }
-    
+
     void setForceFilter(bool filter) {
         fForceFilter = filter;
     }
-    
+
     void setDither(SkTriState::State state) {
         fDither = state;
     }
diff --git a/bench/VertBench.cpp b/bench/VertBench.cpp
index 98df449..e5053d9 100644
--- a/bench/VertBench.cpp
+++ b/bench/VertBench.cpp
@@ -39,7 +39,7 @@
         idx[0] = n; idx[1] = n + 1; idx[2] = rb + n + 1;
         idx[3] = n; idx[4] = rb + n + 1; idx[5] = n + rb;
     }
-    
+
 public:
     VertBench(void* param) : INHERITED(param) {
         const SkScalar dx = SkIntToScalar(W) / COL;
@@ -55,7 +55,7 @@
                 pts->set(xx, yy);
                 pts += 1;
                 xx += dx;
-                
+
                 if (x < COL && y < ROW) {
                     load_2_tris(idx, x, y, COL + 1);
                     for (int i = 0; i < 6; i++) {
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 5865eca..dfd39fd 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -105,7 +105,7 @@
         bm1.config() != bm2.config()) {
         return false;
     }
-    
+
     size_t pixelBytes = bm1.width() * bm1.bytesPerPixel();
     for (int y = 0; y < bm1.height(); y++) {
         if (memcmp(bm1.getAddr(0, y), bm2.getAddr(0, y), pixelBytes)) {
@@ -122,7 +122,7 @@
         fBench = BenchRegistry::Head();
         fParam = param;
     }
-    
+
     SkBenchmark* next() {
         if (fBench) {
             BenchRegistry::Factory f = fBench->factory();
@@ -171,7 +171,7 @@
     if (!bm.copyTo(&copy, SkBitmap::kARGB_8888_Config)) {
         return;
     }
-    
+
     if (bm.config() == SkBitmap::kA8_Config) {
         // turn alpha into gray-scale
         size_t size = copy.getSize() >> 2;
@@ -183,7 +183,7 @@
             *p++ = c | (SK_A32_MASK << SK_A32_SHIFT);
         }
     }
-    
+
     SkString str;
     make_filename(name, &str);
     str.appendf("_%s.png", config);
@@ -195,11 +195,11 @@
 
 static void performClip(SkCanvas* canvas, int w, int h) {
     SkRect r;
-    
+
     r.set(SkIntToScalar(10), SkIntToScalar(10),
           SkIntToScalar(w*2/3), SkIntToScalar(h*2/3));
     canvas->clipRect(r, SkRegion::kIntersect_Op);
-    
+
     r.set(SkIntToScalar(w/3), SkIntToScalar(h/3),
           SkIntToScalar(w-10), SkIntToScalar(h-10));
     canvas->clipRect(r, SkRegion::kXOR_Op);
@@ -208,7 +208,7 @@
 static void performRotate(SkCanvas* canvas, int w, int h) {
     const SkScalar x = SkIntToScalar(w) / 2;
     const SkScalar y = SkIntToScalar(h) / 2;
-    
+
     canvas->translate(x, y);
     canvas->rotate(SkIntToScalar(35));
     canvas->translate(-x, -y);
@@ -217,7 +217,7 @@
 static void performScale(SkCanvas* canvas, int w, int h) {
     const SkScalar x = SkIntToScalar(w) / 2;
     const SkScalar y = SkIntToScalar(h) / 2;
-    
+
     canvas->translate(x, y);
     // just enough so we can't take the sprite case
     canvas->scale(SK_Scalar1 * 99/100, SK_Scalar1 * 99/100);
@@ -314,7 +314,7 @@
     SkDevice* device = NULL;
     SkBitmap bitmap;
     bitmap.setConfig(config, size.fX, size.fY);
-    
+
     switch (backend) {
         case kRaster_Backend:
             bitmap.allocPixels();
@@ -475,7 +475,7 @@
     Backend backend = kRaster_Backend;  // for warning
     SkTDArray<int> configs;
     bool userConfig = false;
-    
+
     char* const* stop = argv + argc;
     for (++argv; argv < stop; ++argv) {
         if (strcmp(*argv, "-o") == 0) {
@@ -692,7 +692,7 @@
             default: ditherName = "<invalid>"; break;
         }
         str.appendf(" dither=%s", ditherName);
-        
+
         if (hasStrokeWidth) {
             str.appendf(" strokeWidth=%f", strokeWidth);
         } else {
@@ -753,7 +753,7 @@
         if (dim.fX <= 0 || dim.fY <= 0) {
             continue;
         }
-        
+
         bench->setForceAlpha(forceAlpha);
         bench->setForceAA(forceAA);
         bench->setForceFilter(forceFilter);
@@ -761,19 +761,19 @@
         if (hasStrokeWidth) {
             bench->setStrokeWidth(strokeWidth);
         }
-        
+
         // only run benchmarks if their name contains matchStr
         if (skip_name(fMatches, bench->getName())) {
             continue;
         }
-        
+
         {
             SkString str;
             str.printf("running bench [%d %d] %28s", dim.fX, dim.fY,
                        bench->getName());
             logger.logProgress(str);
         }
-        
+
         AutoPrePostDraw appd(bench);
 
         for (int x = 0; x < configs.count(); ++x) {