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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/arithmode.cpp b/gm/arithmode.cpp
index 8212acb..6f10dd6 100644
--- a/gm/arithmode.cpp
+++ b/gm/arithmode.cpp
@@ -94,7 +94,7 @@
     virtual void onDraw(SkCanvas* canvas) {
         SkBitmap src = make_src();
         SkBitmap dst = make_dst();
-        
+
         const SkScalar one = SK_Scalar1;
         static const SkScalar K[] = {
             0, 0, 0, 0,
@@ -109,7 +109,7 @@
             one/4, one/2, one/2, 0,
             -one/4, one/2, one/2, 0,
         };
-        
+
         const SkScalar* k = K;
         const SkScalar* stop = k + SK_ARRAY_COUNT(K);
         SkScalar y = 0;
diff --git a/gm/blend.cpp b/gm/blend.cpp
index d766a18..f1f47b3 100644
--- a/gm/blend.cpp
+++ b/gm/blend.cpp
@@ -16,7 +16,7 @@
     ImageBlendGM() : fInitialized(false) {
         this->setBGColor(0xFF000000);
     }
-    
+
 protected:
     virtual SkString onShortName() {
         return SkString("blend");
@@ -83,7 +83,7 @@
         paint.setImageFilter(SkNEW_ARGS(SkBlendImageFilter, (SkBlendImageFilter::kLighten_Mode, background)))->unref();
         canvas->drawSprite(fBitmap, 400, 0, &paint);
     }
-    
+
 private:
     typedef GM INHERITED;
     SkBitmap fBitmap, fCheckerboard;
diff --git a/gm/complexclip2.cpp b/gm/complexclip2.cpp
index e72227a..ce1f0e0 100644
--- a/gm/complexclip2.cpp
+++ b/gm/complexclip2.cpp
@@ -19,7 +19,7 @@
     : fDoPaths(doPaths)
     , fAntiAlias(antiAlias) {
         this->setBGColor(SkColorSetRGB(0xDD,0xA0,0xDD));
-        
+
         // offset the rects a bit so we get antialiasing even in the rect case
         SkScalar xA = SkFloatToScalar(0.65f);
         SkScalar xB = SkFloatToScalar(10.65f);
@@ -93,7 +93,7 @@
         }
 
         SkString str;
-        str.printf("complexclip2_%s_%s", 
+        str.printf("complexclip2_%s_%s",
                     fDoPaths ? "path" : "rect",
                     fAntiAlias ? "aa" : "bw");
         return str;
@@ -119,7 +119,7 @@
                 canvas->translate(kPadX * SK_Scalar1 + (fWidth + kPadX * SK_Scalar1)*j,
                                   kPadY * SK_Scalar1 + (fHeight + kPadY * SK_Scalar1)*i);
 
-                // draw the original shapes first so we can see the 
+                // draw the original shapes first so we can see the
                 // antialiasing on the clipped draw
                 for (int k = 0; k < 5; ++k) {
                     rectPaint.setColor(fRectColors[k]);
@@ -132,12 +132,12 @@
 
                 for (int k = 0; k < 5; ++k) {
                     if (fDoPaths) {
-                        canvas->clipPath(fPaths[k], 
-                                         fOps[j*kRows+i][k], 
+                        canvas->clipPath(fPaths[k],
+                                         fOps[j*kRows+i][k],
                                          fAntiAlias);
                     } else {
-                        canvas->clipRect(fRects[k], 
-                                         fOps[j*kRows+i][k], 
+                        canvas->clipRect(fRects[k],
+                                         fOps[j*kRows+i][k],
                                          fAntiAlias);
                     }
                 }
diff --git a/gm/dashcubics.cpp b/gm/dashcubics.cpp
index d245070..bbce9be 100644
--- a/gm/dashcubics.cpp
+++ b/gm/dashcubics.cpp
@@ -41,7 +41,7 @@
         "C 283,231 344,195 338,98";
 
         SkParsePath::FromSVGString(d, &path);
-        
+
         SkScalar intervals[] = { 5, 10 };
         SkPathEffect* pe = new SkDashPathEffect(intervals, 2, 0);
 
diff --git a/gm/dashing.cpp b/gm/dashing.cpp
index 196b401..2f1f026 100644
--- a/gm/dashing.cpp
+++ b/gm/dashing.cpp
@@ -51,7 +51,7 @@
             { 1, 1 },
             { 4, 1 },
         };
-        
+
         SkPaint paint;
         paint.setStyle(SkPaint::kStroke_Style);
 
@@ -64,7 +64,7 @@
                     int w = width * width * width;
                     paint.setAntiAlias(SkToBool(aa));
                     paint.setStrokeWidth(SkIntToScalar(w));
-                    
+
                     int scale = w ? w : 1;
 
                     drawline(canvas, gData[data].fOnInterval * scale,
@@ -74,7 +74,7 @@
                 }
             }
         }
-        
+
         show_giant_dash(canvas);
     }
 };
@@ -84,7 +84,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;
@@ -117,14 +117,14 @@
 class Dashing2GM : public skiagm::GM {
 public:
     Dashing2GM() {}
-    
+
 protected:
     SkString onShortName() {
         return SkString("dashing2");
     }
-    
+
     SkISize onISize() { return skiagm::make_isize(640, 480); }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         static const int gIntervals[] = {
             3,  // 3 dashes: each count [0] followed by intervals [1..count]
@@ -136,12 +136,12 @@
         void (*gProc[])(SkPath*, const SkRect&) = {
             make_path_line, make_path_rect, make_path_oval, make_path_star,
         };
-    
+
         SkPaint paint;
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkIntToScalar(6));
-        
+
         SkRect bounds = SkRect::MakeWH(SkIntToScalar(120), SkIntToScalar(120));
         bounds.offset(SkIntToScalar(20), SkIntToScalar(20));
         SkScalar dx = bounds.width() * 4 / 3;
@@ -156,13 +156,13 @@
             }
             SkScalar phase = vals[0] / 2;
             paint.setPathEffect(new SkDashPathEffect(vals, count, phase))->unref();
-            
+
             for (size_t x = 0; x < SK_ARRAY_COUNT(gProc); ++x) {
                 SkPath path;
                 SkRect r = bounds;
                 r.offset(x * dx, y * dy);
                 gProc[x](&path, r);
-                
+
                 canvas->drawPath(path, paint);
             }
         }
diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp
index fdd0726..f9b348f 100644
--- a/gm/drawbitmaprect.cpp
+++ b/gm/drawbitmaprect.cpp
@@ -87,9 +87,9 @@
     SkString onShortName() {
         return SkString("drawbitmaprect");
     }
-    
+
     SkISize onISize() { return make_isize(gSize, gSize); }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         static const int kBmpSize = 2048;
         if (fLargeBitmap.isNull()) {
diff --git a/gm/emptypath.cpp b/gm/emptypath.cpp
index c52932e..df314a3 100644
--- a/gm/emptypath.cpp
+++ b/gm/emptypath.cpp
@@ -20,7 +20,7 @@
     SkString onShortName() {
         return SkString("emptypath");
     }
-        
+
     SkISize onISize() { return make_isize(600, 280); }
 
     void drawEmpty(SkCanvas* canvas,
@@ -38,7 +38,7 @@
         canvas->drawPath(path, paint);
         canvas->restore();
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         struct FillAndName {
             SkPath::FillType fFill;
@@ -120,7 +120,7 @@
         canvas->restore();
         canvas->restore();
     }
-    
+
 private:
     typedef GM INHERITED;
 };
diff --git a/gm/extractbitmap.cpp b/gm/extractbitmap.cpp
index 68f6d44..59f8a93 100644
--- a/gm/extractbitmap.cpp
+++ b/gm/extractbitmap.cpp
@@ -29,7 +29,7 @@
 class ExtractBitmapGM : public GM {
 public:
     ExtractBitmapGM() {}
-    
+
 protected:
     // overrides from SkEventSink
     virtual SkString onShortName() SK_OVERRIDE {
@@ -75,14 +75,14 @@
 
         // Now do the same but with a device bitmap as source image
         SkAutoTUnref<SkDevice> secondDevice(canvas->createCompatibleDevice(
-            SkBitmap::kARGB_8888_Config, bitmap.width(), 
+            SkBitmap::kARGB_8888_Config, bitmap.width(),
             bitmap.height(), true));
         SkCanvas secondCanvas(secondDevice.get());
         secondCanvas.writePixels(bitmap, 0, 0);
 
         SkBitmap deviceBitmap = secondDevice->accessBitmap(false);
         SkBitmap deviceSubset;
-        deviceBitmap.extractSubset(&deviceSubset, 
+        deviceBitmap.extractSubset(&deviceSubset,
              SkIRect::MakeXYWH(x, y, x, y));
 
         canvas->translate(SkIntToScalar(120), SkIntToScalar(0));
@@ -91,7 +91,7 @@
         canvas->drawBitmap(deviceSubset, 0, 0);
 
     }
-    
+
 private:
     typedef GM INHERITED;
 };
diff --git a/gm/giantbitmap.cpp b/gm/giantbitmap.cpp
index 2ac7727..16c01d7 100644
--- a/gm/giantbitmap.cpp
+++ b/gm/giantbitmap.cpp
@@ -23,7 +23,7 @@
     SkShader::TileMode fMode;
     bool fDoFilter;
     bool fDoRotate;
-    
+
     const SkBitmap& getBitmap() {
         if (NULL == fBM) {
             fBM = new SkBitmap;
@@ -39,7 +39,7 @@
             SkPaint paint;
             paint.setAntiAlias(true);
             paint.setStrokeWidth(SkIntToScalar(20));
-            
+
 #if 0
             for (int y = -H*2; y < H; y += 50) {
                 SkScalar yy = SkIntToScalar(y);
@@ -108,12 +108,12 @@
             m.setScale(scale, scale);
         }
         s->setLocalMatrix(m);
-        
+
         paint.setShader(s)->unref();
         paint.setFilterBitmap(fDoFilter);
 
         canvas->translate(SkIntToScalar(50), SkIntToScalar(50));
-        
+
         SkRect r = SkRect::MakeXYWH(-50, -50, 32, 16);
 //        canvas->drawRect(r, paint); return;
         canvas->drawPaint(paint);
diff --git a/gm/gradtext.cpp b/gm/gradtext.cpp
index c155cb7..f26222a 100644
--- a/gm/gradtext.cpp
+++ b/gm/gradtext.cpp
@@ -36,7 +36,7 @@
 }
 
 namespace skiagm {
-    
+
 // Replicate chrome layout test - clipped pathed gradient-shaded text
 class ChromeGradTextGM1 : public GM {
 public:
@@ -149,7 +149,7 @@
 
             paint.setShader(make_grad2(SkIntToScalar(80)))->unref();
             draw_text3(canvas, paint);
-            
+
             canvas->translate(0, paint.getTextSize() * 2);
         }
     }
diff --git a/gm/hairmodes.cpp b/gm/hairmodes.cpp
index 8ede95c..67f1fa3 100644
--- a/gm/hairmodes.cpp
+++ b/gm/hairmodes.cpp
@@ -54,7 +54,7 @@
         paint.setStrokeWidth(SK_Scalar1 * angle * 2 / 24);
         canvas->drawLine(W/2, H/2, W/2 + x, H/2 + y, paint);
     }
-    
+
     return H;
 }
 
@@ -68,7 +68,7 @@
     SkShader* s = SkShader::CreateBitmapShader(bm,
                                                SkShader::kRepeat_TileMode,
                                                SkShader::kRepeat_TileMode);
-    
+
     SkMatrix m;
     m.setScale(SkIntToScalar(6), SkIntToScalar(6));
     s->setLocalMatrix(m);
@@ -76,28 +76,28 @@
 }
 
 namespace skiagm {
-    
+
     class HairModesGM : public GM {
         SkPaint fBGPaint;
     public:
         HairModesGM() {
             fBGPaint.setShader(make_bg_shader())->unref();
         }
-        
+
     protected:
-        
+
         virtual SkString onShortName() {
             return SkString("hairmodes");
         }
-        
+
         virtual SkISize onISize() { return make_isize(640, 480); }
-        
+
         virtual void onDraw(SkCanvas* canvas) {
             const SkRect bounds = SkRect::MakeWH(W, H);
             static const SkAlpha gAlphaValue[] = { 0xFF, 0x88, 0x88 };
-            
+
             canvas->translate(SkIntToScalar(4), SkIntToScalar(4));
-            
+
             for (int alpha = 0; alpha < 4; ++alpha) {
                 canvas->save();
                 canvas->save();
@@ -108,14 +108,14 @@
                         canvas->save();
                     }
                     SkXfermode* mode = SkXfermode::Create(gModes[i].fMode);
-                    
+
                     canvas->drawRect(bounds, fBGPaint);
                     canvas->saveLayer(&bounds, NULL);
                     SkScalar dy = drawCell(canvas, mode,
                                            gAlphaValue[alpha & 1],
                                            gAlphaValue[alpha & 2]);
                     canvas->restore();
-                    
+
                     canvas->translate(0, dy * 5 / 4);
                     SkSafeUnref(mode);
                 }
@@ -131,10 +131,10 @@
     private:
         typedef GM INHERITED;
     };
-    
+
     //////////////////////////////////////////////////////////////////////////////
-    
+
     static GM* MyFactory(void*) { return new HairModesGM; }
     static GMRegistry reg(MyFactory);
-    
+
 }
diff --git a/gm/image.cpp b/gm/image.cpp
index 3b83c02..4ee90a4 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -42,11 +42,11 @@
     SkScalar radius = (size.fWidth - stroke) / 2;
 
     SkPaint paint;
-    
+
     paint.setAntiAlias(true);
     paint.setColor(fillC);
     canvas->drawCircle(size.fWidth/2, size.fHeight/2, radius, paint);
-    
+
     paint.setStyle(SkPaint::kStroke_Style);
     paint.setStrokeWidth(stroke);
     paint.setColor(SK_ColorBLACK);
@@ -89,21 +89,21 @@
         fBuffer = sk_malloc_throw(fBufferSize);
         fSize.set(SkIntToScalar(W), SkIntToScalar(H));
     }
-    
+
     virtual ~ImageGM() {
         sk_free(fBuffer);
     }
-        
-    
+
+
 protected:
     virtual SkString onShortName() {
         return SkString("image");
     }
-    
+
     virtual SkISize onISize() {
         return SkISize::Make(640, 480);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         drawJpeg(canvas, this->getISize());
 
@@ -129,13 +129,13 @@
         canvas->translate(80, 0);
         test_surface(canvas, surf2);
     }
-    
+
 private:
     typedef skiagm::GM INHERITED;
 };
-    
+
 //////////////////////////////////////////////////////////////////////////////
 
 static skiagm::GM* MyFactory(void*) { return new ImageGM; }
 static skiagm::GMRegistry reg(MyFactory);
-    
+
diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp
index a10e3a4..f805b44 100644
--- a/gm/imagefiltersgraph.cpp
+++ b/gm/imagefiltersgraph.cpp
@@ -55,7 +55,7 @@
             fInitialized = true;
         }
         canvas->clear(0x00000000);
-        
+
         SkAutoTUnref<SkImageFilter> bitmapSource(new SkBitmapSource(fBitmap));
 
         SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(SK_ColorRED,
diff --git a/gm/lighting.cpp b/gm/lighting.cpp
index 2b41528..46474ab 100644
--- a/gm/lighting.cpp
+++ b/gm/lighting.cpp
@@ -18,7 +18,7 @@
     ImageLightingGM() : fInitialized(false) {
         this->setBGColor(0xFF000000);
     }
-    
+
 protected:
     virtual SkString onShortName() {
         return SkString("lighting");
@@ -76,7 +76,7 @@
         paint.setImageFilter(SkLightingImageFilter::CreateSpotLitSpecular(spotLocation, spotTarget, spotExponent, cutoffAngle, white, surfaceScale, ks, shininess))->unref();
         canvas->drawSprite(fBitmap, 220, 110, &paint);
     }
-    
+
 private:
     typedef GM INHERITED;
     SkBitmap fBitmap;
diff --git a/gm/morphology.cpp b/gm/morphology.cpp
index 29d29d0..83de758 100644
--- a/gm/morphology.cpp
+++ b/gm/morphology.cpp
@@ -19,7 +19,7 @@
         this->setBGColor(0xFF000000);
         fOnce = false;
     }
-    
+
 protected:
     virtual SkString onShortName() {
         return SkString("morphology");
@@ -83,7 +83,7 @@
             }
         }
     }
-    
+
 private:
     typedef GM INHERITED;
     SkBitmap fBitmap;
diff --git a/gm/patheffects.cpp b/gm/patheffects.cpp
index bf89e0d..a1fb675 100644
--- a/gm/patheffects.cpp
+++ b/gm/patheffects.cpp
@@ -68,7 +68,7 @@
     path.close();
     path.offset(SkIntToScalar(-6), 0);
     scale(&path, 1.5f);
-    
+
     paint->setPathEffect(new SkPath1DPathEffect(path, SkIntToScalar(21), 0,
                                 SkPath1DPathEffect::kRotate_Style))->unref();
     compose_pe(paint);
@@ -92,7 +92,7 @@
 
     SkPath path;
     path.addCircle(0, 0, SkIntToScalar(5));
-    
+
     return new SkPath2DPathEffect(m, path);
 }
 
diff --git a/gm/points.cpp b/gm/points.cpp
index e4f3c2e..0646d61 100644
--- a/gm/points.cpp
+++ b/gm/points.cpp
@@ -12,14 +12,14 @@
 
 class PointsGM : public GM {
 public:
-	PointsGM() {}
+    PointsGM() {}
 
 protected:
     virtual SkString onShortName() {
         return SkString("points");
     }
 
-	virtual SkISize onISize() {
+    virtual SkISize onISize() {
         return make_isize(640, 490);
     }
 
diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp
index 4329f12..93a26dd 100644
--- a/gm/samplerstress.cpp
+++ b/gm/samplerstress.cpp
@@ -12,13 +12,13 @@
 
 namespace skiagm {
 
-/** 
+/**
  * Stress test the samplers by rendering a textured glyph with a mask and
  * an AA clip
  */
 class SamplerStressGM : public GM {
 public:
-    SamplerStressGM() 
+    SamplerStressGM()
     : fTextureCreated(false)
     , fShader(NULL)
     , fMaskFilter(NULL) {
@@ -47,7 +47,7 @@
         static const int xSize = 16;
         static const int ySize = 16;
 
-        fTexture.setConfig(SkBitmap::kARGB_8888_Config, 
+        fTexture.setConfig(SkBitmap::kARGB_8888_Config,
                            xSize,
                            ySize,
                            xSize*sizeof(SkColor));
diff --git a/gm/shadertext.cpp b/gm/shadertext.cpp
index 0eb7b34..d8641db 100644
--- a/gm/shadertext.cpp
+++ b/gm/shadertext.cpp
@@ -109,7 +109,7 @@
 
 class ShaderTextGM : public GM {
 public:
-	ShaderTextGM() {
+    ShaderTextGM() {
         this->setBGColor(0xFFDDDDDD);
     }
 
@@ -119,7 +119,7 @@
         return SkString("shadertext");
     }
 
-	SkISize onISize() { return make_isize(1450, 500); }
+    SkISize onISize() { return make_isize(1450, 500); }
 
     virtual void onDraw(SkCanvas* canvas) {
         const char text[] = "Shaded Text";
@@ -174,8 +174,8 @@
 
         SkPath path;
         path.arcTo(SkRect::MakeXYWH(SkIntToScalar(-40), SkIntToScalar(15),
-                                    SkIntToScalar(300), SkIntToScalar(90)), 
-                                    SkIntToScalar(225), SkIntToScalar(90), 
+                                    SkIntToScalar(300), SkIntToScalar(90)),
+                                    SkIntToScalar(225), SkIntToScalar(90),
                                     false);
         path.close();
 
diff --git a/gm/strokefill.cpp b/gm/strokefill.cpp
index e1a07eb..445de81 100644
--- a/gm/strokefill.cpp
+++ b/gm/strokefill.cpp
@@ -43,7 +43,7 @@
         paint.setAntiAlias(true);
         paint.setTextSize(SkIntToScalar(100));
         paint.setStrokeWidth(SkIntToScalar(5));
-        
+
         SkTypeface* face = SkTypeface::CreateFromName("Papyrus", SkTypeface::kNormal);
         SkSafeUnref(paint.setTypeface(face));
         show_bold(canvas, "Hello", 5, x, y, paint);
@@ -60,18 +60,18 @@
         path.addCircle(x, y + SkIntToScalar(200), SkIntToScalar(50), SkPath::kCW_Direction);
         path.addCircle(x, y + SkIntToScalar(200), SkIntToScalar(40), SkPath::kCCW_Direction);
         canvas->drawPath(path, paint);
-        
+
         SkPath path2;
         path2.setFillType(SkPath::kWinding_FillType);
         path2.addCircle(x + SkIntToScalar(120), y + SkIntToScalar(200), SkIntToScalar(50), SkPath::kCCW_Direction);
         path2.addCircle(x + SkIntToScalar(120), y + SkIntToScalar(200), SkIntToScalar(40), SkPath::kCW_Direction);
         canvas->drawPath(path2, paint);
-        
+
         path2.reset();
         path2.addCircle(x + SkIntToScalar(240), y + SkIntToScalar(200), SkIntToScalar(50), SkPath::kCCW_Direction);
         canvas->drawPath(path2, paint);
         SkASSERT(path2.cheapIsDirection(SkPath::kCCW_Direction));
-        
+
         path2.reset();
         SkASSERT(!path2.cheapComputeDirection(NULL));
         path2.addCircle(x + SkIntToScalar(360), y + SkIntToScalar(200), SkIntToScalar(50), SkPath::kCW_Direction);
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index d4532f3..c479d69 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -25,33 +25,33 @@
     SkScalar h = rand.nextUScalar1() * (H >> 2);
     SkScalar hoffset = rand.nextSScalar1();
     SkScalar woffset = rand.nextSScalar1();
-    
+
     r->set(x, y, x + w, y + h);
     r->offset(-w/2 + woffset, -h/2 + hoffset);
-    
+
     paint->setColor(rand.nextU());
     paint->setAlpha(0xFF);
 }
 
-    
+
 class StrokesGM : public skiagm::GM {
 public:
     StrokesGM() {}
-    
+
 protected:
     virtual SkString onShortName() {
         return SkString("strokes_round");
     }
-    
+
     virtual SkISize onISize() {
         return SkISize::Make(W, H*2);
     }
-    
-    virtual void onDraw(SkCanvas* canvas) {        
+
+    virtual void onDraw(SkCanvas* canvas) {
         SkPaint paint;
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkIntToScalar(9)/2);
-        
+
         for (int y = 0; y < 2; y++) {
             paint.setAntiAlias(!!y);
             SkAutoCanvasRestore acr(canvas, true);
@@ -60,7 +60,7 @@
                                               SkIntToScalar(2), SkIntToScalar(2)
                                               , SW - SkIntToScalar(2), SH - SkIntToScalar(2)
                                               ));
-            
+
             SkRandom rand;
             for (int i = 0; i < N; i++) {
                 SkRect r;
@@ -72,7 +72,7 @@
             }
         }
     }
-    
+
 private:
     typedef skiagm::GM INHERITED;
 };
@@ -89,16 +89,16 @@
             fPath.lineTo(x, y);
         }
     }
-    
+
 protected:
     virtual SkString onShortName() {
         return SkString("strokes_poly");
     }
-    
+
     virtual SkISize onISize() {
         return SkISize::Make(W, H*2);
     }
-    
+
     static void rotate(SkScalar angle, SkScalar px, SkScalar py, SkCanvas* canvas) {
         SkMatrix matrix;
         matrix.setRotate(angle, px, py);
@@ -107,11 +107,11 @@
 
     virtual void onDraw(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorWHITE);
-        
+
         SkPaint paint;
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkIntToScalar(9)/2);
-        
+
         for (int y = 0; y < 2; y++) {
             paint.setAntiAlias(!!y);
             SkAutoCanvasRestore acr(canvas, true);
@@ -120,7 +120,7 @@
                                               SkIntToScalar(2),
                                               SW - SkIntToScalar(2),
                                               SH - SkIntToScalar(2)));
-            
+
             SkRandom rand;
             for (int i = 0; i < N/2; i++) {
                 SkRect r;
@@ -130,7 +130,7 @@
             }
         }
     }
-    
+
 private:
     typedef skiagm::GM INHERITED;
 };
@@ -149,25 +149,25 @@
         path->addRect(inset(bounds), SkPath::kCW_Direction);
         title->set("CW CW");
     }
-    
+
     static void make1(SkPath* path, const SkRect& bounds, SkString* title) {
         path->addRect(bounds, SkPath::kCW_Direction);
         path->addRect(inset(bounds), SkPath::kCCW_Direction);
         title->set("CW CCW");
     }
-    
+
     static void make2(SkPath* path, const SkRect& bounds, SkString* title) {
         path->addOval(bounds, SkPath::kCW_Direction);
         path->addOval(inset(bounds), SkPath::kCW_Direction);
         title->set("CW CW");
     }
-    
+
     static void make3(SkPath* path, const SkRect& bounds, SkString* title) {
         path->addOval(bounds, SkPath::kCW_Direction);
         path->addOval(inset(bounds), SkPath::kCCW_Direction);
         title->set("CW CCW");
     }
-    
+
     static void make4(SkPath* path, const SkRect& bounds, SkString* title) {
         path->addRect(bounds, SkPath::kCW_Direction);
         SkRect r = bounds;
@@ -175,7 +175,7 @@
         path->addOval(r, SkPath::kCW_Direction);
         title->set("CW CW");
     }
-    
+
     static void make5(SkPath* path, const SkRect& bounds, SkString* title) {
         path->addRect(bounds, SkPath::kCW_Direction);
         SkRect r = bounds;
@@ -186,16 +186,16 @@
 
 public:
     Strokes3GM() {}
-    
+
 protected:
     virtual SkString onShortName() {
         return SkString("strokes3");
     }
-    
+
     virtual SkISize onISize() {
         return SkISize::Make(W, H*2);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         SkPaint origPaint;
         origPaint.setAntiAlias(true);
@@ -219,7 +219,7 @@
             SkPath orig;
             SkString str;
             procs[i](&orig, bounds, &str);
-            
+
             canvas->save();
             for (int j = 0; j < 13; ++j) {
                 strokePaint.setStrokeWidth(SK_Scalar1 * j * j);
@@ -234,7 +234,7 @@
             canvas->translate(0, dy);
         }
     }
-    
+
 private:
     typedef skiagm::GM INHERITED;
 };
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp
index fddfadf..18cae70 100644
--- a/gm/texteffects.cpp
+++ b/gm/texteffects.cpp
@@ -14,12 +14,12 @@
     p.setMaskFilter(SkBlurMaskFilter::Create(SkIntToScalar(3),
                                              SkBlurMaskFilter::kNormal_BlurStyle))->unref();
     rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
-    
+
     p.setMaskFilter(NULL);
     p.setStyle(SkPaint::kStroke_Style);
     p.setStrokeWidth(SK_Scalar1);
     rast->addLayer(p);
-    
+
     p.setAlpha(0x11);
     p.setStyle(SkPaint::kFill_Style);
     p.setXfermodeMode(SkXfermode::kSrc_Mode);
@@ -28,7 +28,7 @@
 
 static void r1(SkLayerRasterizer* rast, SkPaint& p) {
     rast->addLayer(p);
-    
+
     p.setAlpha(0x40);
     p.setXfermodeMode(SkXfermode::kSrc_Mode);
     p.setStyle(SkPaint::kStroke_Style);
@@ -40,7 +40,7 @@
     p.setStyle(SkPaint::kStrokeAndFill_Style);
     p.setStrokeWidth(SK_Scalar1*4);
     rast->addLayer(p);
-    
+
     p.setStyle(SkPaint::kStroke_Style);
     p.setStrokeWidth(SK_Scalar1*3/2);
     p.setXfermodeMode(SkXfermode::kClear_Mode);
@@ -51,7 +51,7 @@
     p.setStyle(SkPaint::kStroke_Style);
     p.setStrokeWidth(SK_Scalar1*3);
     rast->addLayer(p);
-    
+
     p.setAlpha(0x20);
     p.setStyle(SkPaint::kFill_Style);
     p.setXfermodeMode(SkXfermode::kSrc_Mode);
@@ -61,11 +61,11 @@
 static void r4(SkLayerRasterizer* rast, SkPaint& p) {
     p.setAlpha(0x60);
     rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
-    
+
     p.setAlpha(0xFF);
     p.setXfermodeMode(SkXfermode::kClear_Mode);
     rast->addLayer(p, SK_Scalar1*3/2, SK_Scalar1*3/2);
-    
+
     p.setXfermode(NULL);
     rast->addLayer(p);
 }
@@ -74,7 +74,7 @@
 
 static void r5(SkLayerRasterizer* rast, SkPaint& p) {
     rast->addLayer(p);
-    
+
     p.setPathEffect(new SkDiscretePathEffect(SK_Scalar1*4, SK_Scalar1*3))->unref();
     p.setXfermodeMode(SkXfermode::kSrcOut_Mode);
     rast->addLayer(p);
@@ -82,7 +82,7 @@
 
 static void r6(SkLayerRasterizer* rast, SkPaint& p) {
     rast->addLayer(p);
-    
+
     p.setAntiAlias(false);
     SkLayerRasterizer* rast2 = new SkLayerRasterizer;
     r5(rast2, p);
@@ -109,14 +109,14 @@
 
 static void r8(SkLayerRasterizer* rast, SkPaint& p) {
     rast->addLayer(p);
-    
+
     SkMatrix    lattice;
     lattice.setScale(SK_Scalar1*6, SK_Scalar1*6, 0, 0);
     lattice.postSkew(SK_Scalar1/3, 0, 0, 0);
     p.setPathEffect(MakeDotEffect(SK_Scalar1*2, lattice))->unref();
     p.setXfermodeMode(SkXfermode::kClear_Mode);
     rast->addLayer(p);
-    
+
     p.setPathEffect(NULL);
     p.setXfermode(NULL);
     p.setStyle(SkPaint::kStroke_Style);
@@ -128,33 +128,33 @@
 public:
     Line2DPathEffect(SkScalar width, const SkMatrix& matrix)
     : Sk2DPathEffect(matrix), fWidth(width) {}
-    
-	virtual bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec* rec) SK_OVERRIDE {
+
+    virtual bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec* rec) SK_OVERRIDE {
         if (this->INHERITED::filterPath(dst, src, rec)) {
             rec->setStrokeStyle(fWidth);
             return true;
         }
         return false;
     }
-    
+
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Line2DPathEffect)
-    
+
 protected:
-	virtual void nextSpan(int u, int v, int ucount, SkPath* dst) {
+    virtual void nextSpan(int u, int v, int ucount, SkPath* dst) {
         if (ucount > 1) {
-            SkPoint	src[2], dstP[2];
-            
+            SkPoint    src[2], dstP[2];
+
             src[0].set(SkIntToScalar(u) + SK_ScalarHalf,
                        SkIntToScalar(v) + SK_ScalarHalf);
             src[1].set(SkIntToScalar(u+ucount) + SK_ScalarHalf,
                        SkIntToScalar(v) + SK_ScalarHalf);
             this->getMatrix().mapPoints(dstP, src, 2);
-            
+
             dst->moveTo(dstP[0]);
             dst->lineTo(dstP[1]);
         }
     }
-    
+
     Line2DPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
         fWidth = buffer.readScalar();
     }
@@ -162,23 +162,23 @@
         this->INHERITED::flatten(buffer);
         buffer.writeScalar(fWidth);
     }
-    
+
 private:
     SkScalar fWidth;
-    
+
     typedef Sk2DPathEffect INHERITED;
 };
 
 static void r9(SkLayerRasterizer* rast, SkPaint& p) {
     rast->addLayer(p);
-    
+
     SkMatrix    lattice;
     lattice.setScale(SK_Scalar1, SK_Scalar1*6, 0, 0);
     lattice.postRotate(SkIntToScalar(30), 0, 0);
     p.setPathEffect(new Line2DPathEffect(SK_Scalar1*2, lattice))->unref();
     p.setXfermodeMode(SkXfermode::kClear_Mode);
     rast->addLayer(p);
-    
+
     p.setPathEffect(NULL);
     p.setXfermode(NULL);
     p.setStyle(SkPaint::kStroke_Style);
@@ -210,12 +210,12 @@
     {
         SkPaint p;
         SkLayerRasterizer*  rast = new SkLayerRasterizer;
-        
+
         p.setAntiAlias(true);
         proc(rast, p);
         paint->setRasterizer(rast)->unref();
     }
-    
+
 #if 0
     SkScalar dir[] = { SK_Scalar1, SK_Scalar1, SK_Scalar1 };
     paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, SK_Scalar1/4, SkIntToScalar(4), SkIntToScalar(3)))->unref();
@@ -225,40 +225,40 @@
 
 class TextEffectsGM : public skiagm::GM {
 public:
-	TextEffectsGM() {}
-    
+    TextEffectsGM() {}
+
 protected:
     virtual SkString onShortName() SK_OVERRIDE {
         return SkString("texteffects");
     }
-    
+
     virtual SkISize onISize() SK_OVERRIDE {
         return SkISize::Make(460, 680);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
         canvas->save();
-        
+
         SkPaint     paint;
         paint.setAntiAlias(true);
         paint.setTextSize(SkIntToScalar(56));
-        
+
         SkScalar    x = SkIntToScalar(20);
         SkScalar    y = paint.getTextSize();
-        
+
         SkString str("Hamburgefons");
-        
+
         for (size_t i = 0; i < SK_ARRAY_COUNT(gRastProcs); i++) {
             apply_shader(&paint, i);
-            
+
             //  paint.setMaskFilter(NULL);
             //  paint.setColor(SK_ColorBLACK);
-            
+
             canvas->drawText(str.c_str(), str.size(), x, y, paint);
-            
+
             y += paint.getFontSpacing();
         }
-        
+
         canvas->restore();
     }
 
@@ -270,9 +270,9 @@
 private:
     typedef skiagm::GM INHERITED;
 };
-    
+
 //////////////////////////////////////////////////////////////////////////////
 
 static skiagm::GM* MyFactory(void*) { return new TextEffectsGM; }
 static skiagm::GMRegistry reg(MyFactory);
-    
+
diff --git a/gm/tilemodes.cpp b/gm/tilemodes.cpp
index 289caae..08bcb79 100644
--- a/gm/tilemodes.cpp
+++ b/gm/tilemodes.cpp
@@ -25,14 +25,14 @@
     bm->setConfig(config, w, h);
     bm->allocPixels();
     bm->eraseColor(0);
-    
+
     SkCanvas    canvas(*bm);
     SkPoint     pts[] = { { 0, 0 }, { SkIntToScalar(w), SkIntToScalar(h)} };
     SkColor     colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
     SkScalar    pos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
     SkPaint     paint;
-    
-    SkUnitMapper*   um = NULL;    
+
+    SkUnitMapper*   um = NULL;
 
     um = new SkCosineMapper;
 //    um = new SkDiscreteMapper(12);
@@ -63,7 +63,7 @@
 class TilingGM : public GM {
     SkBlurDrawLooper    fLooper;
 public:
-	TilingGM()
+    TilingGM()
             : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2),
                       0x88000000) {
         for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
@@ -72,23 +72,23 @@
     }
 
     SkBitmap    fTexture[SK_ARRAY_COUNT(gConfigs)];
-	
+
 protected:
     SkString onShortName() {
         return SkString("tilemodes");
     }
-    
-	SkISize onISize() { return make_isize(880, 560); }
-    
+
+    SkISize onISize() { return make_isize(880, 560); }
+
     virtual void onDraw(SkCanvas* canvas) {
-        
+
         SkRect r = { 0, 0, SkIntToScalar(gWidth*2), SkIntToScalar(gHeight*2) };
 
         static const char* gConfigNames[] = { "8888", "565", "4444" };
-    
+
         static const bool           gFilters[] = { false, true };
         static const char*          gFilterNames[] = {     "point",                     "bilinear" };
-    
+
         static const SkShader::TileMode gModes[] = { SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode };
         static const char*          gModeNames[] = {    "C",                    "R",                   "M" };
 
@@ -106,11 +106,11 @@
 
                 p.setTextAlign(SkPaint::kCenter_Align);
                 canvas->drawText(str.c_str(), str.size(), x + r.width()/2, y, p);
-                
+
                 x += r.width() * 4 / 3;
             }
         }
-        
+
         y += SkIntToScalar(16);
 
         for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
@@ -121,12 +121,12 @@
                         SkPaint paint;
                         setup(&paint, fTexture[i], gFilters[j], gModes[kx], gModes[ky]);
                         paint.setDither(true);
-                        
+
                         canvas->save();
                         canvas->translate(x, y);
                         canvas->drawRect(r, paint);
                         canvas->restore();
-                        
+
                         x += r.width() * 4 / 3;
                     }
                 }
@@ -143,7 +143,7 @@
             }
         }
     }
-    
+
 private:
     typedef GM INHERITED;
 };
diff --git a/gm/tinybitmap.cpp b/gm/tinybitmap.cpp
index d532b5b..3b1006c 100644
--- a/gm/tinybitmap.cpp
+++ b/gm/tinybitmap.cpp
@@ -38,7 +38,7 @@
         this->setBGColor(0xFFDDDDDD);
         fBM = make_bitmap();
     }
-    
+
 protected:
     SkString onShortName() {
         return SkString("tinybitmap");
@@ -47,7 +47,7 @@
     virtual SkISize onISize() { return make_isize(100, 100); }
 
     virtual void onDraw(SkCanvas* canvas) {
-        SkShader* s = 
+        SkShader* s =
             SkShader::CreateBitmapShader(fBM, SkShader::kRepeat_TileMode,
                                          SkShader::kMirror_TileMode);
         SkPaint paint;
@@ -55,7 +55,7 @@
         paint.setShader(s)->unref();
         canvas->drawPaint(paint);
     }
-    
+
 private:
     typedef GM INHERITED;
 };
diff --git a/gm/twopointradial.cpp b/gm/twopointradial.cpp
index 2d50814..40712e8 100644
--- a/gm/twopointradial.cpp
+++ b/gm/twopointradial.cpp
@@ -30,19 +30,19 @@
     SkColor colors[] = { SK_ColorGREEN, SK_ColorRED };
     SkPaint paint;
     paint.setAntiAlias(true);
-    
+
     SkString str;
     str.printf("%g,%g,%g  %g,%g,%g",
                SkScalarToFloat(c0.fX), SkScalarToFloat(c0.fY), SkScalarToFloat(r0),
                SkScalarToFloat(c1.fX), SkScalarToFloat(c1.fY), SkScalarToFloat(r1));
     canvas->drawText(str.c_str(), str.size(),
                      bounds.fLeft, bounds.fTop - paint.getTextSize()/2, paint);
-    
+
     paint.setShader(SkGradientShader::CreateTwoPointConical(c0, r0, c1, r1,
                                                             colors, NULL, 2,
                                                             SkShader::kClamp_TileMode))->unref();
     canvas->drawRect(bounds, paint);
-    
+
     paint.setShader(NULL);
     paint.setColor(0x66000000);
     paint.setStyle(SkPaint::kStroke_Style);
@@ -67,14 +67,14 @@
             SkPaint paint;
             paint.setColor(SK_ColorBLUE);
             canvas->drawRect(
-                    SkRect::MakeWH(SkIntToScalar(this->getISize().fWidth), 
-                                   SkIntToScalar(this->getISize().fHeight)), 
+                    SkRect::MakeWH(SkIntToScalar(this->getISize().fWidth),
+                                   SkIntToScalar(this->getISize().fHeight)),
                     paint);
         }
         SkPaint paint;
         const int R0 = 20;
         const int R1 = 40;
-    
+
         const SkScalar DX = SkIntToScalar(250);
         const SkScalar DY = SkIntToScalar(130);
 
@@ -88,12 +88,12 @@
             0, 0, R0,       25, 0, R0,
             0, 0, R0,       100, 0, R0,
         };
-            
+
         int count = SK_ARRAY_COUNT(gData) / 6;
         for (int i = 0; i < count; ++i) {
             SkScalar data[6];
             intToScalars(data, &gData[i * 6], 6);
-            
+
             int n = canvas->save();
             drawGrad(canvas, &data[0], &data[3]);
             canvas->translate(DX, 0);
diff --git a/gm/typeface.cpp b/gm/typeface.cpp
index 9c73630..2217863 100644
--- a/gm/typeface.cpp
+++ b/gm/typeface.cpp
@@ -71,7 +71,7 @@
     }
 
     SkTypeface** fFaces;
-    
+
     typedef GM INHERITED;
 };
 
diff --git a/gm/verttext.cpp b/gm/verttext.cpp
index 0f3cb3b..67a2da5 100644
--- a/gm/verttext.cpp
+++ b/gm/verttext.cpp
@@ -56,7 +56,7 @@
     virtual void onDraw(SkCanvas* canvas) {
         SkScalar x = SkIntToScalar(100);
         SkScalar y = SkIntToScalar(50);
-        
+
         for (int i = 0; i < 4; ++i) {
             SkPaint     paint;
             paint.setAntiAlias(true);
@@ -70,7 +70,7 @@
             paint.setVerticalText(true);
             drawBaseline(canvas, paint, x, y);
             canvas->drawText(gText, gLen, x, y, paint);
-            
+
             x += SkIntToScalar(40);
             y += SkIntToScalar(120);
 
diff --git a/gm/verttext2.cpp b/gm/verttext2.cpp
index 8491dc3..33380e0 100644
--- a/gm/verttext2.cpp
+++ b/gm/verttext2.cpp
@@ -39,7 +39,7 @@
     SkISize onISize() { return make_isize(640, 480); }
 
     virtual void onDraw(SkCanvas* canvas) {
-        
+
         for (int i = 0; i < 3; ++i) {
             SkPaint paint;
             paint.setColor(SK_ColorRED);
@@ -77,7 +77,7 @@
         paint.setTypeface(family);
         paint.setTextSize(textHeight);
 
-        canvas->drawText(string.c_str(), string.size(), y, 
+        canvas->drawText(string.c_str(), string.size(), y,
                 SkIntToScalar(alignment == SkPaint::kLeft_Align ? 10 : 240),
                 paint);
         y += textHeight;
diff --git a/gm/verylargebitmap.cpp b/gm/verylargebitmap.cpp
index b0fdf27..4704a86 100644
--- a/gm/verylargebitmap.cpp
+++ b/gm/verylargebitmap.cpp
@@ -70,7 +70,7 @@
 
         show_bm(canvas, big, small, SK_ColorBLUE);
         canvas->translate(0, SkIntToScalar(150));
-        
+
         // as of this writing, the raster code will fail to draw the scaled version
         // since it has a 64K limit on x,y coordinates... (but gpu should succeed)
         show_bm(canvas, veryBig, small, SK_ColorGREEN);
diff --git a/gm/xfermodes.cpp b/gm/xfermodes.cpp
index 42b8a6a..25100d2 100644
--- a/gm/xfermodes.cpp
+++ b/gm/xfermodes.cpp
@@ -62,7 +62,7 @@
             scratchBitmap.setPixels(localData);
             scratchBitmap.setIsOpaque(true);
             scratchBitmap.copyTo(&fBG, SkBitmap::kARGB_4444_Config);
-            
+
             make_bitmaps(W, H, &fSrcB, &fDstB);
             fOnce = true;
         }