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/samplecode/GMSampleView.h b/samplecode/GMSampleView.h
index 7decfcb..0b224a5 100644
--- a/samplecode/GMSampleView.h
+++ b/samplecode/GMSampleView.h
@@ -20,11 +20,11 @@
 public:
     GMSampleView(GM* gm)
     : fGM(gm) {}
-    
+
     virtual ~GMSampleView() {
         delete fGM;
     }
-    
+
 protected:
     virtual bool onQuery(SkEvent* evt) {
         if (SampleCode::TitleQ(*evt)) {
@@ -35,7 +35,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         fGM->drawContent(canvas);
     }
diff --git a/samplecode/Sample2PtRadial.cpp b/samplecode/Sample2PtRadial.cpp
index 0c44fd6..073fd82 100644
--- a/samplecode/Sample2PtRadial.cpp
+++ b/samplecode/Sample2PtRadial.cpp
@@ -36,7 +36,7 @@
         SkShader* s = SkGradientShader::CreateTwoPointRadial(c0, r0, c1, r1, colors,
                                                              NULL, 2,
                                                              SkShader::kClamp_TileMode);
-        
+
         SkPaint paint;
         paint.setShader(s)->unref();
         canvas->drawPaint(paint);
diff --git a/samplecode/SampleAAClip.cpp b/samplecode/SampleAAClip.cpp
index d2931fa..196641e 100644
--- a/samplecode/SampleAAClip.cpp
+++ b/samplecode/SampleAAClip.cpp
@@ -17,7 +17,7 @@
     c0.setRect(r0);
     c1.setRect(r1);
     c2.op(c0, c1, op);
-    
+
     SkIRect r2 = c2.getBounds();
     SkASSERT(r2 == expectedR);
 }
@@ -42,7 +42,7 @@
 static void drawClip(SkCanvas* canvas, const SkAAClip& clip) {
     SkMask mask;
     SkBitmap bm;
-    
+
     clip.copyToMask(&mask);
     SkAutoMaskFreeImage amfi(mask.fImage);
 
@@ -78,7 +78,7 @@
         SkAAClip aaclip;
         SkPath path;
         SkRect bounds;
-        
+
         bounds.set(0, 0, 20, 20);
         bounds.inset(SK_ScalarHalf, SK_ScalarHalf);
 
@@ -99,15 +99,15 @@
         aaclip3.op(aaclip, aaclip2, SkRegion::kIntersect_Op);
         canvas->translate(30, 0);
         drawClip(canvas, aaclip3);
-        
+
 #endif
-        
+
 #if 0
         SkRect r;
         r.set(0, 0, this->width(), this->height());
         r.inset(20, 20);
         canvas->clipRect(r);
-        
+
         SkPath path;
         path.addRect(r);
         SkPaint paint;
diff --git a/samplecode/SampleAARectModes.cpp b/samplecode/SampleAARectModes.cpp
index a1004a3..00edfba 100644
--- a/samplecode/SampleAARectModes.cpp
+++ b/samplecode/SampleAARectModes.cpp
@@ -57,7 +57,7 @@
                                    H / 4 + offset,
                                    W / 2, H / 2);
     canvas->drawRect(rect, paint);
-    
+
     return H;
 }
 
@@ -72,7 +72,7 @@
     SkShader* s = SkShader::CreateBitmapShader(bm,
                                                SkShader::kRepeat_TileMode,
                                                SkShader::kRepeat_TileMode);
-    
+
     SkMatrix m;
     m.setScale(SkIntToScalar(6), SkIntToScalar(6));
     s->setLocalMatrix(m);
@@ -112,7 +112,7 @@
                     canvas->save();
                 }
                 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode);
-                
+
                 canvas->drawRect(bounds, fBGPaint);
                 canvas->saveLayer(&bounds, NULL);
                 SkScalar dy = drawCell(canvas, mode,
@@ -128,7 +128,7 @@
             canvas->translate(W * 5 / 4, 0);
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleAARects.cpp b/samplecode/SampleAARects.cpp
index 0490552..e66f8df 100644
--- a/samplecode/SampleAARects.cpp
+++ b/samplecode/SampleAARects.cpp
@@ -17,13 +17,13 @@
     bitmap.setConfig(SkBitmap::kARGB_8888_Config, n, n);
     bitmap.allocPixels();
     bitmap.eraseColor(SK_ColorGREEN);
-    
+
     SkCanvas canvas(bitmap);
     SkRect r;
     r.set(0, 0, SkIntToScalar(n), SkIntToScalar(n));
     SkPaint paint;
     paint.setAntiAlias(true);
-    
+
     paint.setColor(SK_ColorRED);
     canvas.drawOval(r, paint);
     paint.setColor(SK_ColorBLUE);
@@ -31,7 +31,7 @@
     paint.setStyle(SkPaint::kStroke_Style);
     canvas.drawLine(0, 0, r.fRight, r.fBottom, paint);
     canvas.drawLine(0, r.fBottom, r.fRight, 0, paint);
-    
+
     return bitmap;
 }
 
@@ -43,10 +43,10 @@
 public:
     AARectView() {
         fBitmap = createBitmap(N);
-        
+
         fWidth = N;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -184,7 +184,7 @@
             }
         }
     }
-    
+
 private:
     int fWidth;
 
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index 9644e79..b850642 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -38,14 +38,14 @@
 #include "SkXfermode.h"
 
 #include <math.h>
-    
+
 static inline SkPMColor rgb2gray(SkPMColor c) {
     unsigned r = SkGetPackedR32(c);
     unsigned g = SkGetPackedG32(c);
     unsigned b = SkGetPackedB32(c);
-    
+
     unsigned x = (r * 5 + g * 7 + b * 4) >> 4;
-    
+
     return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT));
 }
 
@@ -69,7 +69,7 @@
             result[i] = src[i] & mask;
         }
     }
-    
+
 private:
     SkPMColor   fMask;
 };
@@ -101,7 +101,7 @@
     p.setStrokeWidth(SK_Scalar1*2);
     rast->addLayer(p);
 }
-    
+
 static void r2(SkLayerRasterizer* rast, SkPaint& p) {
     p.setStyle(SkPaint::kStrokeAndFill_Style);
     p.setStrokeWidth(SK_Scalar1*4);
@@ -146,7 +146,7 @@
 
 static void r6(SkLayerRasterizer* rast, SkPaint& p) {
     rast->addLayer(p);
-    
+
     p.setAntiAlias(false);
     SkLayerRasterizer* rast2 = new SkLayerRasterizer;
     r5(rast2, p);
@@ -163,10 +163,10 @@
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect)
 
 protected:
-	virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) {
+    virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) {
         dst->addCircle(loc.fX, loc.fY, fRadius);
     }
-    
+
     Dot2DPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
         fRadius = buffer.readScalar();
     }
@@ -191,7 +191,7 @@
 
 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);
@@ -211,32 +211,32 @@
     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();
     }
@@ -255,7 +255,7 @@
 
 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);
@@ -286,7 +286,7 @@
     { 0xFFFFFF, 0x000000 }  // identity case
 };
 
-static void apply_shader(SkPaint* paint, int index) {    
+static void apply_shader(SkPaint* paint, int index) {
     raster_proc proc = gRastProcs[index];
     if (proc) {
         SkPaint p;
@@ -299,7 +299,7 @@
 
 #if 1
     SkScalar dir[] = { SK_Scalar1, SK_Scalar1, SK_Scalar1 };
-    paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, SK_Scalar1/4, SkIntToScalar(4), SkIntToScalar(3)))->unref();    
+    paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, SK_Scalar1/4, SkIntToScalar(4), SkIntToScalar(3)))->unref();
     paint->setColor(SK_ColorBLUE);
 #endif
 }
@@ -307,7 +307,7 @@
 class DemoView : public SampleView {
 public:
     DemoView() {}
-	
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -317,11 +317,11 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual bool onClick(Click* click) {
         return this->INHERITED::onClick(click);
     }
-    
+
     void makePath(SkPath& path) {
         path.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(20),
             SkPath::kCCW_Direction);
@@ -339,7 +339,7 @@
         }
         path.close();
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         canvas->save();
         drawPicture(canvas, 0);
@@ -367,36 +367,36 @@
             } while (true);
         }
     }
-    
+
     void drawPicture(SkCanvas* canvas, int spriteOffset) {
-	    SkMatrix matrix; matrix.reset();
-		SkPaint paint;
-		SkPath path;
+        SkMatrix matrix; matrix.reset();
+        SkPaint paint;
+        SkPath path;
         SkPoint start = {0, 0};
         SkPoint stop = { SkIntToScalar(40), SkIntToScalar(40) };
-		SkRect rect = {0, 0, SkIntToScalar(40), SkIntToScalar(40) };
-		SkRect rect2 = {0, 0, SkIntToScalar(65), SkIntToScalar(20) };
-		SkScalar left = 0, top = 0, x = 0, y = 0;
-		size_t index;
-		
-		char ascii[] = "ascii...";
-		size_t asciiLength = sizeof(ascii) - 1;
-		char utf8[] = "utf8" "\xe2\x80\xa6";
-		short utf16[] = {'u', 't', 'f', '1', '6', 0x2026 };
-		short utf16simple[] = {'u', 't', 'f', '1', '6', '!' };
-		
+        SkRect rect = {0, 0, SkIntToScalar(40), SkIntToScalar(40) };
+        SkRect rect2 = {0, 0, SkIntToScalar(65), SkIntToScalar(20) };
+        SkScalar left = 0, top = 0, x = 0, y = 0;
+        size_t index;
+
+        char ascii[] = "ascii...";
+        size_t asciiLength = sizeof(ascii) - 1;
+        char utf8[] = "utf8" "\xe2\x80\xa6";
+        short utf16[] = {'u', 't', 'f', '1', '6', 0x2026 };
+        short utf16simple[] = {'u', 't', 'f', '1', '6', '!' };
+
         makePath(path);
         SkTDArray<SkPoint>(pos);
-		pos.setCount(asciiLength);
-		for (index = 0;  index < asciiLength; index++)
-			pos[index].set(SkIntToScalar((unsigned int)index * 10),
+        pos.setCount(asciiLength);
+        for (index = 0;  index < asciiLength; index++)
+            pos[index].set(SkIntToScalar((unsigned int)index * 10),
                                        SkIntToScalar((unsigned int)index * 2));
         SkTDArray<SkPoint>(pos2);
-		pos2.setCount(asciiLength);
-		for (index = 0;  index < asciiLength; index++)
-			pos2[index].set(SkIntToScalar((unsigned int)index * 10),
+        pos2.setCount(asciiLength);
+        for (index = 0;  index < asciiLength; index++)
+            pos2[index].set(SkIntToScalar((unsigned int)index * 10),
                                         SkIntToScalar(20));
-		
+
         // shaders
         SkPoint linearPoints[] = { { 0, 0, }, { SkIntToScalar(40), SkIntToScalar(40) } };
         SkColor linearColors[] = { SK_ColorRED, SK_ColorBLUE };
@@ -416,116 +416,116 @@
         SkShader::TileMode radialMode = SkShader::kRepeat_TileMode;
         SkUnitMapper* radialMapper = new SkCosineMapper();
         SkAutoUnref unmapRadialMapper(radialMapper);
-        SkShader* radial = SkGradientShader::CreateRadial(radialCenter, 
+        SkShader* radial = SkGradientShader::CreateRadial(radialCenter,
             radialRadius, radialColors, radialPos, radialCount,
             radialMode, radialMapper);
-        
+
         SkTransparentShader* transparentShader = new SkTransparentShader();
         SkEmbossMaskFilter::Light light;
         light.fDirection[0] = SK_Scalar1/2;
         light.fDirection[1] = SK_Scalar1/2;
         light.fDirection[2] = SK_Scalar1/3;
-        light.fAmbient		= 0x48;
-        light.fSpecular		= 0x80;
+        light.fAmbient        = 0x48;
+        light.fSpecular        = 0x80;
         SkScalar radius = SkIntToScalar(12)/5;
-        SkEmbossMaskFilter* embossFilter = new SkEmbossMaskFilter(light, 
+        SkEmbossMaskFilter* embossFilter = new SkEmbossMaskFilter(light,
             radius);
-            
+
         SkXfermode* xfermode = SkXfermode::Create(SkXfermode::kXor_Mode);
         SkColorFilter* lightingFilter = SkColorFilter::CreateLightingFilter(
             0xff89bc45, 0xff112233);
-        
+
         canvas->save();
-		canvas->translate(SkIntToScalar(0), SkIntToScalar(5));
-		paint.setFlags(SkPaint::kAntiAlias_Flag | SkPaint::kFilterBitmap_Flag);
-		// !!! draw through a clip
-		paint.setColor(SK_ColorLTGRAY);
-		paint.setStyle(SkPaint::kFill_Style);
+        canvas->translate(SkIntToScalar(0), SkIntToScalar(5));
+        paint.setFlags(SkPaint::kAntiAlias_Flag | SkPaint::kFilterBitmap_Flag);
+        // !!! draw through a clip
+        paint.setColor(SK_ColorLTGRAY);
+        paint.setStyle(SkPaint::kFill_Style);
         SkRect clip = {0, 0, SkIntToScalar(320), SkIntToScalar(120)};
         canvas->clipRect(clip);
-        paint.setShader(SkShader::CreateBitmapShader(fTx, 
+        paint.setShader(SkShader::CreateBitmapShader(fTx,
             SkShader::kMirror_TileMode, SkShader::kRepeat_TileMode))->unref();
-		canvas->drawPaint(paint);
-		canvas->save();
-        
+        canvas->drawPaint(paint);
+        canvas->save();
+
         // line (exercises xfermode, colorShader, colorFilter, filterShader)
-		paint.setColor(SK_ColorGREEN);
-		paint.setStrokeWidth(SkIntToScalar(10));
-		paint.setStyle(SkPaint::kStroke_Style);
+        paint.setColor(SK_ColorGREEN);
+        paint.setStrokeWidth(SkIntToScalar(10));
+        paint.setStyle(SkPaint::kStroke_Style);
         paint.setXfermode(xfermode)->unref();
         paint.setColorFilter(lightingFilter)->unref();
-		canvas->drawLine(start.fX, start.fY, stop.fX, stop.fY, paint); // should not be green
-		paint.setXfermode(NULL);
+        canvas->drawLine(start.fX, start.fY, stop.fX, stop.fY, paint); // should not be green
+        paint.setXfermode(NULL);
         paint.setColorFilter(NULL);
-        
+
         // rectangle
-		paint.setStyle(SkPaint::kFill_Style);
-		canvas->translate(SkIntToScalar(50), 0);
-		paint.setColor(SK_ColorYELLOW);
+        paint.setStyle(SkPaint::kFill_Style);
+        canvas->translate(SkIntToScalar(50), 0);
+        paint.setColor(SK_ColorYELLOW);
         paint.setShader(linear)->unref();
         paint.setPathEffect(pathEffectTest())->unref();
-		canvas->drawRect(rect, paint); 
+        canvas->drawRect(rect, paint);
         paint.setPathEffect(NULL);
-        
+
         // circle w/ emboss & transparent (exercises 3dshader)
-		canvas->translate(SkIntToScalar(50), 0);
+        canvas->translate(SkIntToScalar(50), 0);
         paint.setMaskFilter(embossFilter)->unref();
         canvas->drawOval(rect, paint);
-		canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
+        canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
         paint.setShader(transparentShader)->unref();
         canvas->drawOval(rect, paint);
-		canvas->translate(0, SkIntToScalar(-10));
-        
+        canvas->translate(0, SkIntToScalar(-10));
+
         // path
-		canvas->translate(SkIntToScalar(50), 0);
-		paint.setColor(SK_ColorRED);
-		paint.setStyle(SkPaint::kStroke_Style);
-		paint.setStrokeWidth(SkIntToScalar(5));
+        canvas->translate(SkIntToScalar(50), 0);
+        paint.setColor(SK_ColorRED);
+        paint.setStyle(SkPaint::kStroke_Style);
+        paint.setStrokeWidth(SkIntToScalar(5));
         paint.setShader(radial)->unref();
         paint.setMaskFilter(NULL);
-		canvas->drawPath(path, paint);
-		
+        canvas->drawPath(path, paint);
+
         paint.setShader(NULL);
         // bitmap, sprite
-		canvas->translate(SkIntToScalar(50), 0);
-		paint.setStyle(SkPaint::kFill_Style);
-		canvas->drawBitmap(fBug, left, top, &paint);
-		canvas->translate(SkIntToScalar(30), 0);
-		canvas->drawSprite(fTb, 
-			SkScalarRound(canvas->getTotalMatrix().getTranslateX()), 
+        canvas->translate(SkIntToScalar(50), 0);
+        paint.setStyle(SkPaint::kFill_Style);
+        canvas->drawBitmap(fBug, left, top, &paint);
+        canvas->translate(SkIntToScalar(30), 0);
+        canvas->drawSprite(fTb,
+            SkScalarRound(canvas->getTotalMatrix().getTranslateX()),
             spriteOffset + 10, &paint);
 
-		canvas->translate(-SkIntToScalar(30), SkIntToScalar(30));
+        canvas->translate(-SkIntToScalar(30), SkIntToScalar(30));
         paint.setShader(shaderTest())->unref(); // test compose shader
-		canvas->drawRect(rect2, paint); 
+        canvas->drawRect(rect2, paint);
         paint.setShader(NULL);
-		
+
         canvas->restore();
         // text
-		canvas->translate(0, SkIntToScalar(60));
-        canvas->save();
-		paint.setColor(SK_ColorGRAY);
-		canvas->drawPosText(ascii, asciiLength, pos.begin(), paint);
-		canvas->drawPosText(ascii, asciiLength, pos2.begin(), paint);
-
-		canvas->translate(SkIntToScalar(50), 0);
-		paint.setColor(SK_ColorCYAN);
-		canvas->drawText(utf8, sizeof(utf8) - 1, x, y, paint);
-       
-		canvas->translate(SkIntToScalar(30), 0);
-		paint.setColor(SK_ColorMAGENTA);
-		paint.setTextEncoding(SkPaint::kUTF16_TextEncoding);
-        matrix.setTranslate(SkIntToScalar(10), SkIntToScalar(10));
-		canvas->drawTextOnPath((void*) utf16, sizeof(utf16), path, &matrix, paint);
-		canvas->translate(0, SkIntToScalar(20));
-		canvas->drawTextOnPath((void*) utf16simple, sizeof(utf16simple), path, &matrix, paint);
-        canvas->restore();
-        
         canvas->translate(0, SkIntToScalar(60));
-		paint.setTextEncoding(SkPaint::kUTF8_TextEncoding);
+        canvas->save();
+        paint.setColor(SK_ColorGRAY);
+        canvas->drawPosText(ascii, asciiLength, pos.begin(), paint);
+        canvas->drawPosText(ascii, asciiLength, pos2.begin(), paint);
+
+        canvas->translate(SkIntToScalar(50), 0);
+        paint.setColor(SK_ColorCYAN);
+        canvas->drawText(utf8, sizeof(utf8) - 1, x, y, paint);
+
+        canvas->translate(SkIntToScalar(30), 0);
+        paint.setColor(SK_ColorMAGENTA);
+        paint.setTextEncoding(SkPaint::kUTF16_TextEncoding);
+        matrix.setTranslate(SkIntToScalar(10), SkIntToScalar(10));
+        canvas->drawTextOnPath((void*) utf16, sizeof(utf16), path, &matrix, paint);
+        canvas->translate(0, SkIntToScalar(20));
+        canvas->drawTextOnPath((void*) utf16simple, sizeof(utf16simple), path, &matrix, paint);
+        canvas->restore();
+
+        canvas->translate(0, SkIntToScalar(60));
+        paint.setTextEncoding(SkPaint::kUTF8_TextEncoding);
         canvas->restore();
     }
-    
+
     /*
 ./SkColorFilter.h:25:class SkColorFilter : public SkFlattenable { -- abstract
     static SkColorFilter* CreatXfermodeFilter() *** untested ***
@@ -560,7 +560,7 @@
     ./SkAvoidXfermode.h:28:class SkAvoidXfermode : public SkXfermode { *** not done *** chmod +w .h .cpp
     ./SkXfermode.h:54:class SkProcXfermode : public SkXfermode {
     */
-    
+
     /*
 ./SkBlurMaskFilter.h:25:class SkBlurMaskFilter {
     chmod +w SkBlurMaskFilter.cpp
@@ -574,13 +574,13 @@
 /* untested:
 SkCornerPathEffect.h:28:class SkCornerPathEffect : public SkPathEffect {
 */
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         fClickPt.set(x, y);
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     SkPathEffect* pathEffectTest() {
         static const int gXY[] = { 1, 0, 0, -1, 2, -1, 3, 0, 2, 1, 0, 1 };
         SkScalar gPhase = 0;
@@ -590,9 +590,9 @@
             path.lineTo(SkIntToScalar(gXY[i]), SkIntToScalar(gXY[i+1]));
         path.close();
         path.offset(SkIntToScalar(-6), 0);
-        SkPathEffect* outer = new SkPath1DPathEffect(path, SkIntToScalar(12), 
+        SkPathEffect* outer = new SkPath1DPathEffect(path, SkIntToScalar(12),
             gPhase, SkPath1DPathEffect::kRotate_Style);
-        SkPathEffect* inner = new SkDiscretePathEffect(SkIntToScalar(2), 
+        SkPathEffect* inner = new SkDiscretePathEffect(SkIntToScalar(2),
             SkIntToScalar(1)/10); // SkCornerPathEffect(SkIntToScalar(2));
         SkPathEffect* result = new SkComposePathEffect(outer, inner);
         outer->unref();
@@ -603,11 +603,11 @@
     SkShader* shaderTest() {
         SkPoint pts[] = { { 0, 0, }, { SkIntToScalar(100), 0 } };
         SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
-        SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, NULL, 
+        SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, NULL,
             2, SkShader::kClamp_TileMode);
         pts[1].set(0, SkIntToScalar(100));
         SkColor colors2[] = {SK_ColorBLACK,  SkColorSetARGB(0x80, 0, 0, 0)};
-        SkShader* shaderB = SkGradientShader::CreateLinear(pts, colors2, NULL, 
+        SkShader* shaderB = SkGradientShader::CreateLinear(pts, colors2, NULL,
             2, SkShader::kClamp_TileMode);
         SkXfermode* mode = SkXfermode::Create(SkXfermode::kDstIn_Mode);
         SkShader* result = new SkComposeShader(shaderA, shaderB, mode);
@@ -618,23 +618,23 @@
     }
 
     virtual void startTest() {
-		SkImageDecoder::DecodeFile("/Users/caryclark/Desktop/bugcirc.gif", &fBug);
-		SkImageDecoder::DecodeFile("/Users/caryclark/Desktop/tbcirc.gif", &fTb);
-		SkImageDecoder::DecodeFile("/Users/caryclark/Desktop/05psp04.gif", &fTx);
-	}
+        SkImageDecoder::DecodeFile("/Users/caryclark/Desktop/bugcirc.gif", &fBug);
+        SkImageDecoder::DecodeFile("/Users/caryclark/Desktop/tbcirc.gif", &fTb);
+        SkImageDecoder::DecodeFile("/Users/caryclark/Desktop/05psp04.gif", &fTx);
+    }
 
     void drawRaster(SkCanvas* canvas)  {
         for (size_t index = 0; index < SK_ARRAY_COUNT(gRastProcs); index++)
             drawOneRaster(canvas);
     }
-    
+
     void drawOneRaster(SkCanvas* canvas) {
         canvas->save();
 
         SkScalar    x = SkIntToScalar(20);
         SkScalar    y = SkIntToScalar(40);
         SkPaint     paint;
-        
+
         paint.setAntiAlias(true);
         paint.setTextSize(SkIntToScalar(48));
         paint.setTypeface(SkTypeface::CreateFromName("sans-serif",
@@ -644,7 +644,7 @@
 
         for (size_t i = 0; i < SK_ARRAY_COUNT(gRastProcs); i++) {
             apply_shader(&paint, i);
-            
+
           //  paint.setMaskFilter(NULL);
           //  paint.setColor(SK_ColorBLACK);
 
@@ -654,7 +654,7 @@
                                     gLightingColors[index].fMul,
                                     gLightingColors[index].fAdd))->unref();
 #endif
-            
+
             canvas->drawText(str.c_str(), str.size(), x, y, paint);
             SkRect  oval = { x, y - SkIntToScalar(40), x + SkIntToScalar(40), y };
             paint.setStyle(SkPaint::kStroke_Style);
@@ -665,7 +665,7 @@
         }
 
         canvas->restore();
-        
+
         if (1) {
             SkAvoidXfermode   mode(SK_ColorWHITE, 0xFF,
                                    SkAvoidXfermode::kTargetColor_Mode);
diff --git a/samplecode/SampleAnimatedGradient.cpp b/samplecode/SampleAnimatedGradient.cpp
index 1b90cc8..c4a4ec5 100644
--- a/samplecode/SampleAnimatedGradient.cpp
+++ b/samplecode/SampleAnimatedGradient.cpp
@@ -11,12 +11,12 @@
 
 class GradientView : public SampleView {
 public:
-	GradientView() {
+    GradientView() {
         this->setBGColor(0xFFDDDDDD);
-	}
-	
+    }
+
 protected:
-	struct GradData {
+    struct GradData {
         int             fCount;
         const SkColor*  fColors;
         const SkScalar* fPos;
@@ -35,11 +35,11 @@
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkScalarHalf(SkIntToScalar(3)));
         paint.setStyle(SkPaint::kFill_Style);
-        
+
         SkPoint p = SkPoint::Make(0,0);
         SkPoint q = SkPoint::Make(100,100);
         SkPoint pts[] = {p, q};
-        
+
         SkScalar t, temp, x, y;
         SkColor gColors[] = {
             SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorWHITE, SK_ColorBLACK
@@ -51,42 +51,42 @@
         x =  SkScalarSinCos(angle, &y);
         SkScalar colorPositions[] = { 0, 0.1 + x, 0.4 + y, 0.9 - x + y, 1.0};
         GradData data = { 5, gColors, colorPositions };
-        
-        
+
+
         SkRect r = { 0, 0, SkIntToScalar(200), SkIntToScalar(200) };
         SkShader* shader1 = SkGradientShader::CreateLinear(
-                           pts, data.fColors, data.fPos,data.fCount, 
+                           pts, data.fColors, data.fPos,data.fCount,
                            SkShader::kMirror_TileMode);
         paint.setShader(shader1)->unref();
-        
+
         canvas->drawRect(r, paint);
-        
-        
+
+
         SkPoint s = SkPoint::Make(100,100);
         SkShader* shader2 = SkGradientShader::CreateRadial(
-                           s, 100, data.fColors, data.fPos, data.fCount, 
+                           s, 100, data.fColors, data.fPos, data.fCount,
                            SkShader::kMirror_TileMode);
         paint.setShader(shader2)->unref();
         canvas->translate(250, 0);
         canvas->drawRect(r, paint);
-        
+
         SkShader* shader3 = SkGradientShader::CreateTwoPointRadial(
                            p, 0, q, 100, data.fColors, data.fPos, data.fCount,
                            SkShader::kMirror_TileMode);
         paint.setShader(shader3)->unref();
         canvas->translate(0, 250);
         canvas->drawRect(r, paint);
-        
+
         SkShader* shader4 = SkGradientShader::CreateSweep(
                             100, 100, data.fColors, data.fPos, data.fCount);
- 
+
         paint.setShader(shader4)->unref();
         canvas->translate(-250, 0);
         canvas->drawRect(r, paint);
-        
-        this->inval(NULL);		
+
+        this->inval(NULL);
     }
-	
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleAnimator.cpp b/samplecode/SampleAnimator.cpp
index 09742a0..7b46d47 100644
--- a/samplecode/SampleAnimator.cpp
+++ b/samplecode/SampleAnimator.cpp
@@ -23,20 +23,20 @@
     void setURIBase(const char dir[]);
 
     SkAnimator* getAnimator() const { return fAnimator; }
-    
+
     bool    decodeFile(const char path[]);
     bool    decodeMemory(const void* buffer, size_t size);
     bool    decodeStream(SkStream* stream);
-    
+
 protected:
     // overrides
     virtual void onDraw(SkCanvas*);
     virtual bool onQuery(SkEvent* evt);
-    
+
 private:
     SkString fBaseURI;
     SkAnimator* fAnimator;
-    
+
     typedef SkView INHERITED;
 };
 
@@ -63,24 +63,24 @@
 }
 
 static const SkDOMNode* find_nodeID(const SkDOM& dom,
-						const SkDOMNode* node, const char name[]) {
-	if (NULL == node) {
-		node = dom.getRootNode();
-	}
-	do {
-		const char* idval = dom.findAttr(node, "id");
-		if (idval && !strcmp(idval, name)) {
-			return node;
-		}
-		const SkDOMNode* child = dom.getFirstChild(node);
-		if (child) {
-			const SkDOMNode* found = find_nodeID(dom, child, name);
-			if (found) {
-				return found;
-			}
-		}
-	} while ((node = dom.getNextSibling(node)) != NULL);
-	return NULL;
+                        const SkDOMNode* node, const char name[]) {
+    if (NULL == node) {
+        node = dom.getRootNode();
+    }
+    do {
+        const char* idval = dom.findAttr(node, "id");
+        if (idval && !strcmp(idval, name)) {
+            return node;
+        }
+        const SkDOMNode* child = dom.getFirstChild(node);
+        if (child) {
+            const SkDOMNode* found = find_nodeID(dom, child, name);
+            if (found) {
+                return found;
+            }
+        }
+    } while ((node = dom.getNextSibling(node)) != NULL);
+    return NULL;
 }
 
 bool SkAnimatorView::decodeStream(SkStream* stream) {
@@ -94,32 +94,32 @@
         return false;
     }
 #else
-	size_t len = stream->getLength();
-	char* text = (char*)sk_malloc_throw(len);
-	stream->read(text, len);
-	SkDOM dom;
-	const SkDOM::Node* root = dom.build(text, len);
-	if (NULL == root) {
-		return false;
-	}
-	if (!fAnimator->decodeDOM(dom, root)) {
-		delete fAnimator;
-		fAnimator = NULL;
-		return false;
-	}
-	for (int i = 0; i <= 10; i++) {
-		SkString name("glyph");
-		name.appendS32(i);
-		const SkDOM::Node* node = find_nodeID(dom, NULL, name.c_str());
-		SkASSERT(node);
-		SkRect r;
-		dom.findScalar(node, "left", &r.fLeft);
-		dom.findScalar(node, "top", &r.fTop);
-		dom.findScalar(node, "width", &r.fRight); r.fRight += r.fLeft;
-		dom.findScalar(node, "height", &r.fBottom); r.fBottom += r.fTop;
-		SkDebugf("--- %s [%g %g %g %g]\n", name.c_str(),
-				 r.fLeft, r.fTop, r.fRight, r.fBottom);
-	}
+    size_t len = stream->getLength();
+    char* text = (char*)sk_malloc_throw(len);
+    stream->read(text, len);
+    SkDOM dom;
+    const SkDOM::Node* root = dom.build(text, len);
+    if (NULL == root) {
+        return false;
+    }
+    if (!fAnimator->decodeDOM(dom, root)) {
+        delete fAnimator;
+        fAnimator = NULL;
+        return false;
+    }
+    for (int i = 0; i <= 10; i++) {
+        SkString name("glyph");
+        name.appendS32(i);
+        const SkDOM::Node* node = find_nodeID(dom, NULL, name.c_str());
+        SkASSERT(node);
+        SkRect r;
+        dom.findScalar(node, "left", &r.fLeft);
+        dom.findScalar(node, "top", &r.fTop);
+        dom.findScalar(node, "width", &r.fRight); r.fRight += r.fLeft;
+        dom.findScalar(node, "height", &r.fBottom); r.fBottom += r.fTop;
+        SkDebugf("--- %s [%g %g %g %g]\n", name.c_str(),
+                 r.fLeft, r.fTop, r.fRight, r.fBottom);
+    }
 #endif
     return true;
 }
@@ -136,13 +136,13 @@
         canvas->scale(0.5, 0.5);
         fAnimator->draw(canvas, 0);
         canvas->restore();
-        
+
         canvas->save();
         canvas->translate(190, 40);
         canvas->scale(0.25, 0.25);
         fAnimator->draw(canvas, 0);
         canvas->restore();
-        
+
         this->inval(NULL);
 #endif
     }
@@ -165,8 +165,8 @@
     av->setURIBase("/skia/trunk/animations/");
     av->decodeFile("/skia/trunk/animations/checkbox.xml");
 #else
-	av->setURIBase("/");
-	av->decodeFile("/testanim.txt");
+    av->setURIBase("/");
+    av->decodeFile("/testanim.txt");
 #endif
     return av;
 }
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 25a0e87..97a252c 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1093,7 +1093,7 @@
     } else {
         const SkScalar cw = SkScalarDiv(this->width(), SkIntToScalar(fTileCount.width()));
         const SkScalar ch = SkScalarDiv(this->height(), SkIntToScalar(fTileCount.height()));
-        
+
         for (int y = 0; y < fTileCount.height(); ++y) {
             for (int x = 0; x < fTileCount.width(); ++x) {
                 SkAutoCanvasRestore acr(canvas, true);
@@ -1101,7 +1101,7 @@
                 this->INHERITED::draw(canvas);
             }
         }
-        
+
         if (!fTileCount.equals(1, 1)) {
             SkPaint paint;
             paint.setColor(0x60FF00FF);
diff --git a/samplecode/SampleArc.cpp b/samplecode/SampleArc.cpp
index 43660a3..a87d280 100644
--- a/samplecode/SampleArc.cpp
+++ b/samplecode/SampleArc.cpp
@@ -37,7 +37,7 @@
 
 class ArcsView : public SampleView {
 public:
-	ArcsView() {
+    ArcsView() {
         testparse();
         fSweep = SkIntToScalar(100);
         this->setBGColor(0xFFDDDDDD);
@@ -52,7 +52,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     static void drawRectWithLines(SkCanvas* canvas, const SkRect& r, const SkPaint& p) {
         canvas->drawRect(r, p);
         canvas->drawLine(r.fLeft, r.fTop, r.fRight, r.fBottom, p);
@@ -60,23 +60,23 @@
         canvas->drawLine(r.fLeft, r.centerY(), r.fRight, r.centerY(), p);
         canvas->drawLine(r.centerX(), r.fTop, r.centerX(), r.fBottom, p);
     }
-    
+
     static void draw_label(SkCanvas* canvas, const SkRect& rect,
                             int start, int sweep) {
         SkPaint paint;
-        
+
         paint.setAntiAlias(true);
         paint.setTextAlign(SkPaint::kCenter_Align);
-        
+
         SkString    str;
-        
+
         str.appendS32(start);
         str.append(", ");
         str.appendS32(sweep);
         canvas->drawText(str.c_str(), str.size(), rect.centerX(),
                          rect.fBottom + paint.getTextSize() * 5/4, paint);
     }
-    
+
     static void drawArcs(SkCanvas* canvas) {
         SkPaint paint;
         SkRect  r;
@@ -86,12 +86,12 @@
         r.set(0, 0, w, h);
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
-        
+
         canvas->save();
         canvas->translate(SkIntToScalar(10), SkIntToScalar(300));
-        
+
         paint.setStrokeWidth(SkIntToScalar(1));
-        
+
         static const int gAngles[] = {
             0, 360,
             0, 45,
@@ -103,7 +103,7 @@
             -180, -270,
             225, 90
         };
-        
+
         for (size_t i = 0; i < SK_ARRAY_COUNT(gAngles); i += 2) {
             paint.setColor(SK_ColorBLACK);
             drawRectWithLines(canvas, r, paint);
@@ -111,15 +111,15 @@
             paint.setColor(SK_ColorRED);
             canvas->drawArc(r, SkIntToScalar(gAngles[i]),
                             SkIntToScalar(gAngles[i+1]), false, paint);
-            
+
             draw_label(canvas, r, gAngles[i], gAngles[i+1]);
 
             canvas->translate(w * 8 / 7, 0);
         }
-        
+
         canvas->restore();
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         fSweep = SampleCode::GetAnimScalar(SkIntToScalar(360)/24,
                                            SkIntToScalar(360));
@@ -127,14 +127,14 @@
 
         SkRect  r;
         SkPaint paint;
-        
+
         paint.setAntiAlias(true);
         paint.setStrokeWidth(SkIntToScalar(2));
         paint.setStyle(SkPaint::kStroke_Style);
-        
+
         r.set(0, 0, SkIntToScalar(200), SkIntToScalar(200));
         r.offset(SkIntToScalar(20), SkIntToScalar(20));
-        
+
         if (false) {
             const SkScalar d = SkIntToScalar(3);
             const SkScalar rad[] = { d, d, d, d, d, d, d, d };
@@ -145,10 +145,10 @@
         }
 
         drawRectWithLines(canvas, r, paint);
-        
+
    //     printf("----- sweep %g %X\n", SkScalarToFloat(fSweep), SkDegreesToRadians(fSweep));
-        
-        
+
+
         paint.setStyle(SkPaint::kFill_Style);
         paint.setColor(0x800000FF);
         canvas->drawArc(r, 0, fSweep, true, paint);
@@ -159,25 +159,25 @@
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setColor(SK_ColorRED);
         canvas->drawArc(r, 0, fSweep, true, paint);
-        
+
         paint.setStrokeWidth(0);
         paint.setColor(SK_ColorBLUE);
         canvas->drawArc(r, 0, fSweep, false, paint);
-        
+
         drawArcs(canvas);
         this->inval(NULL);
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
      //   fSweep += SK_Scalar1;
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     virtual bool onClick(Click* click) {
         return this->INHERITED::onClick(click);
     }
-    
+
 private:
     SkScalar fSweep;
 
diff --git a/samplecode/SampleAvoid.cpp b/samplecode/SampleAvoid.cpp
index 81050a3..b8bac0d 100644
--- a/samplecode/SampleAvoid.cpp
+++ b/samplecode/SampleAvoid.cpp
@@ -37,7 +37,7 @@
                                                  SkShader::kMirror_TileMode);
 #endif
     }
-    
+
     virtual ~AvoidView() {
         fShader->unref();
     }
@@ -54,7 +54,7 @@
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         SkRect r = { 0, 0, SkIntToScalar(W), SkIntToScalar(H) };
-        
+
         canvas->translate(r.width() / 6, r.height() / 6);
 
         paint.setShader(fShader);
@@ -73,7 +73,7 @@
 
         paint.setShader(NULL);
         paint.setColor(SK_ColorMAGENTA);
-        
+
         SkPaint frameP;
         frameP.setStyle(SkPaint::kStroke_Style);
 
@@ -91,7 +91,7 @@
             canvas->drawRect(rr, frameP);
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleBigGradient.cpp b/samplecode/SampleBigGradient.cpp
index 8e08e15..6a68fa0 100644
--- a/samplecode/SampleBigGradient.cpp
+++ b/samplecode/SampleBigGradient.cpp
@@ -19,7 +19,7 @@
 
 class BigGradientView : public SampleView {
 public:
-	BigGradientView() {}
+    BigGradientView() {}
 
 protected:
     // overrides from SkEventSink
diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp
index 684c976..ba7efbf 100644
--- a/samplecode/SampleBitmapRect.cpp
+++ b/samplecode/SampleBitmapRect.cpp
@@ -39,7 +39,7 @@
         SkDevice* dev = new SkGpuDevice(ctx, SkBitmap::kARGB_8888_Config, 64, 64);
         canvas.setDevice(dev)->unref();
         *bitmap = dev->accessBitmap(false);
-    } else 
+    } else
 #endif
     {
         bitmap->setConfig(SkBitmap::kARGB_8888_Config, 64, 64);
@@ -59,10 +59,10 @@
 
 class BitmapRectView : public SampleView {
 public:
-	BitmapRectView() {
+    BitmapRectView() {
         this->setBGColor(SK_ColorGRAY);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -72,7 +72,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         GrContext* ctx = SampleCode::GetGr();
 
@@ -102,11 +102,11 @@
 
             canvas->drawRect(dstR, paint);
             canvas->drawRect(srcR, paint);
-            
+
             canvas->translate(160, 0);
         }
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
diff --git a/samplecode/SampleBlur.cpp b/samplecode/SampleBlur.cpp
index f49d96e..1444949 100644
--- a/samplecode/SampleBlur.cpp
+++ b/samplecode/SampleBlur.cpp
@@ -51,7 +51,7 @@
 class BlurView : public SampleView {
     SkBitmap    fBM;
 public:
-	BlurView() {
+    BlurView() {
         if (false) { // avoid bit rot, suppress warning
             fBM = make_bitmap();
         }
diff --git a/samplecode/SampleBox.cpp b/samplecode/SampleBox.cpp
index 2301a91..19ff6ca 100644
--- a/samplecode/SampleBox.cpp
+++ b/samplecode/SampleBox.cpp
@@ -11,10 +11,10 @@
 
 class SimpleView : public SampleView {
 public:
-	SimpleView() {
+    SimpleView() {
         this->setBGColor(0xFFDDDDDD);
-	}
-	
+    }
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt)  {
@@ -24,14 +24,14 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-	
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkScalarHalf(SkIntToScalar(3)));
         paint.setStyle(SkPaint::kFill_Style);
-        
+
         SkRect  r;
         SkScalar x,y;
         x = 10;
@@ -44,7 +44,7 @@
             canvas->drawRect(r, paint);
         }
     }
-	
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleCamera.cpp b/samplecode/SampleCamera.cpp
index a4af2de..12e7e04 100644
--- a/samplecode/SampleCamera.cpp
+++ b/samplecode/SampleCamera.cpp
@@ -23,7 +23,7 @@
     int     fShaderIndex;
     bool    fFrontFace;
 public:
-	CameraView() {
+    CameraView() {
         fRX = fRY = fRZ = 0;
         fShaderIndex = 0;
         fFrontFace = false;
@@ -36,7 +36,7 @@
                 SkShader* s = SkShader::CreateBitmapShader(bm,
                                                            SkShader::kClamp_TileMode,
                                                            SkShader::kClamp_TileMode);
-                
+
                 SkRect src = { 0, 0, SkIntToScalar(bm.width()), SkIntToScalar(bm.height()) };
                 SkRect dst = { -150, -150, 150, 150 };
                 SkMatrix matrix;
@@ -49,7 +49,7 @@
         }
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
     virtual ~CameraView() {
         fShaders.unrefAll();
     }
@@ -72,7 +72,7 @@
         view.rotateX(fRX);
         view.rotateY(fRY);
         view.applyToCanvas(canvas);
-        
+
         SkPaint paint;
         if (fShaders.count() > 0) {
             bool frontFace = view.dotWithNormal(0, 0, SK_Scalar1) < 0;
@@ -80,13 +80,13 @@
                 fFrontFace = frontFace;
                 fShaderIndex = (fShaderIndex + 1) % fShaders.count();
             }
-        
+
             paint.setAntiAlias(true);
             paint.setShader(fShaders[fShaderIndex]);
             SkRect r = { -150, -150, 150, 150 };
             canvas->drawRoundRect(r, 30, 30, paint);
         }
-        
+
         fRY += SampleCode::GetAnimSecondsDelta() * 90;
         if (fRY >= SkIntToScalar(360)) {
             fRY = 0;
diff --git a/samplecode/SampleCircle.cpp b/samplecode/SampleCircle.cpp
index def90ad..1444e1b 100644
--- a/samplecode/SampleCircle.cpp
+++ b/samplecode/SampleCircle.cpp
@@ -35,7 +35,7 @@
         fDX = fDY = fRAD = 0;
         fN = 3;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -45,10 +45,10 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void circle(SkCanvas* canvas, int width, bool aa) {
         SkPaint paint;
-        
+
         paint.setAntiAlias(aa);
         if (width < 0) {
             paint.setStyle(SkPaint::kFill_Style);
@@ -61,7 +61,7 @@
             test_circlebounds(canvas);
         }
     }
-    
+
     void drawSix(SkCanvas* canvas, SkScalar dx, SkScalar dy) {
         for (int width = -1; width <= 1; width++) {
             canvas->save();
@@ -72,13 +72,13 @@
             canvas->translate(dx, 0);
         }
     }
-    
+
     static void blowup(SkCanvas* canvas, const SkIRect& src, const SkRect& dst) {
         SkDevice* device = canvas->getDevice();
         const SkBitmap& bm = device->accessBitmap(false);
         canvas->drawBitmapRect(bm, &src, dst, NULL);
     }
-    
+
     static void make_poly(SkPath* path, int n) {
         if (n <= 0) {
             return;
@@ -94,7 +94,7 @@
         }
         path->close();
     }
-    
+
     static void rotate(SkCanvas* canvas, SkScalar angle, SkScalar px, SkScalar py) {
         canvas->translate(-px, -py);
         canvas->rotate(angle);
@@ -119,7 +119,7 @@
             canvas->drawPath(path, paint);
         }
     }
-    
+
 private:
     int fN;
     typedef SampleView INHERITED;
diff --git a/samplecode/SampleClip.cpp b/samplecode/SampleClip.cpp
index 6695c62..ce3736e 100644
--- a/samplecode/SampleClip.cpp
+++ b/samplecode/SampleClip.cpp
@@ -22,7 +22,7 @@
     paint.setAntiAlias(doAA);
     paint.setLCDRenderText(true);
     paint.setTextSize(SkIntToScalar(20));
-    
+
     for (int i = 0; i < 200; ++i) {
         paint.setColor((SK_A32_MASK << SK_A32_SHIFT) | rand.nextU());
         canvas->drawText("Hamburgefons", 12,
@@ -35,16 +35,16 @@
     SkRandom rand;
     SkPaint paint;
     paint.setAntiAlias(doAA);
-    
+
     for (int i = 0; i < 50; ++i) {
         SkRect r;
         SkPath p;
-        
+
         r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H,
                   rand.nextUScalar1() * W, rand.nextUScalar1() * H);
         paint.setColor(rand.nextU());
         canvas->drawRect(r, paint);
-        
+
         r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H,
                   rand.nextUScalar1() * W, rand.nextUScalar1() * H);
         paint.setColor(rand.nextU());
@@ -64,16 +64,16 @@
     paint.setAntiAlias(doAA);
     paint.setStyle(SkPaint::kStroke_Style);
     paint.setStrokeWidth(strokeWidth);
-    
+
     for (int i = 0; i < n; ++i) {
         SkRect r;
         SkPath p;
-        
+
         r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H,
                   rand.nextUScalar1() * W, rand.nextUScalar1() * H);
         paint.setColor(rand.nextU());
         canvas->drawRect(r, paint);
-        
+
         r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H,
                   rand.nextUScalar1() * W, rand.nextUScalar1() * H);
         paint.setColor(rand.nextU());
@@ -131,7 +131,7 @@
         static const CanvasProc gProc[] = {
             show_text, show_thick, show_hair, show_fill
         };
-        
+
         SkRect r = { 0, 0, SkIntToScalar(W), SkIntToScalar(H) };
         SkPath clipPath;
         r.inset(SK_Scalar1 / 4, SK_Scalar1 / 4);
@@ -153,7 +153,7 @@
             canvas->translate(0, H * SK_Scalar1 * 8 / 7);
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h
index e86ddd6..8bd5fbd 100644
--- a/samplecode/SampleCode.h
+++ b/samplecode/SampleCode.h
@@ -25,7 +25,7 @@
     static bool TitleQ(const SkEvent&);
     static void TitleR(SkEvent*, const char title[]);
     static bool RequestTitle(SkView* view, SkString* title);
-    
+
     static bool PrefSizeQ(const SkEvent&);
     static void PrefSizeR(SkEvent*, SkScalar width, SkScalar height);
 
@@ -47,7 +47,7 @@
 
 // interface that constructs SkViews
 class SkViewFactory : public SkRefCnt {
-public:    
+public:
     virtual SkView* operator() () const = 0;
 };
 
@@ -58,7 +58,7 @@
 public:
     SkFuncViewFactory(SkViewCreateFunc func);
     virtual SkView* operator() () const SK_OVERRIDE;
-    
+
 private:
     SkViewCreateFunc fCreateFunc;
 };
@@ -70,7 +70,7 @@
 // factory function that creates a skiagm::GM
 typedef skiagm::GM* (*GMFactoryFunc)(void*);
 
-// Takes a GM factory function and implements the SkViewFactory interface 
+// Takes a GM factory function and implements the SkViewFactory interface
 // by making the GM and wrapping it in a GMSampleView. GMSampleView bridges
 // the SampleView interface to skiagm::GM.
 class SkGMSampleViewFactory : public SkViewFactory {
@@ -90,16 +90,16 @@
     ~SkViewRegister() {
         fFact->unref();
     }
-    
+
     static const SkViewRegister* Head() { return gHead; }
-    
+
     SkViewRegister* next() const { return fChain; }
     const SkViewFactory*   factory() const { return fFact; }
-    
+
 private:
     SkViewFactory*  fFact;
     SkViewRegister* fChain;
-    
+
     static SkViewRegister* gHead;
 };
 
@@ -107,7 +107,7 @@
 
 class SampleView : public SkView {
 public:
-    SampleView() : fPipeState(SkOSMenu::kOffState), 
+    SampleView() : fPipeState(SkOSMenu::kOffState),
             fBGColor(SK_ColorWHITE), fRepeatCount(1) {
     }
 
@@ -116,20 +116,20 @@
     static bool IsSampleView(SkView*);
     static bool SetRepeatDraw(SkView*, int count);
     static bool SetUsePipe(SkView*, SkOSMenu::TriState);
-    
+
     /**
      *  Call this to request menu items from a SampleView.
-     *  Subclassing notes: A subclass of SampleView can overwrite this method 
+     *  Subclassing notes: A subclass of SampleView can overwrite this method
      *  to add new items of various types to the menu and change its title.
      *  The events attached to any new menu items must be handled in its onEvent
-     *  method. See SkOSMenu.h for helper functions.   
+     *  method. See SkOSMenu.h for helper functions.
      */
     virtual void requestMenu(SkOSMenu* menu) {}
 
 protected:
     virtual void onDrawBackground(SkCanvas*);
     virtual void onDrawContent(SkCanvas*) = 0;
-    
+
     // overrides
     virtual bool onEvent(const SkEvent& evt);
     virtual bool onQuery(SkEvent* evt);
@@ -138,7 +138,7 @@
 
     SkOSMenu::TriState fPipeState;
     SkColor fBGColor;
-    
+
 private:
     int fRepeatCount;
 
diff --git a/samplecode/SampleColorFilter.cpp b/samplecode/SampleColorFilter.cpp
index 3e1dbb1..bbabea2 100644
--- a/samplecode/SampleColorFilter.cpp
+++ b/samplecode/SampleColorFilter.cpp
@@ -23,7 +23,7 @@
 
 #define SK_R16_BITS 5
 
-static int round5_slow(int x) {    
+static int round5_slow(int x) {
     int orig = x & 7;
     int fake = x >> 5;
     int trunc = x >> 3;
@@ -69,7 +69,7 @@
         int err2 = i - v2;
         SkDebugf("--- %3d : trunc=%3d (%2d) round:%3d (%2d) \n"/*new:%d (%2d)\n"*/, i,
                  v0, err0, v1, err1, v2, err2);
-        
+
 
         e0 += err0;
         e1 += err1;
@@ -102,7 +102,7 @@
     bitmap.setConfig(SkBitmap::kARGB_8888_Config, n, n);
     bitmap.allocPixels();
     bitmap.eraseColor(0);
-    
+
     SkCanvas canvas(bitmap);
     SkRect r;
     r.set(0, 0, SkIntToScalar(n), SkIntToScalar(n));
@@ -110,7 +110,7 @@
 
     SkPaint paint;
     paint.setAntiAlias(true);
-    
+
     paint.setColor(SK_ColorRED);
     canvas.drawOval(r, paint);
 
@@ -118,7 +118,7 @@
     paint.setXfermodeMode(SkXfermode::kSrc_Mode);
     paint.setColor(0x800000FF);
     canvas.drawOval(r, paint);
-    
+
     return bitmap;
 }
 
@@ -132,7 +132,7 @@
     ColorFilterView() {
         fBitmap = createBitmap(N);
         fShader = createChecker();
-      
+
         if (false) { // avoid bit rot, suppress warning
             test_5bits();
         }
@@ -168,7 +168,7 @@
             canvas->drawRect(r, p);
             return;
         }
-        
+
         static const SkXfermode::Mode gModes[] = {
             SkXfermode::kClear_Mode,
             SkXfermode::kSrc_Mode,
@@ -185,7 +185,7 @@
             SkXfermode::kPlus_Mode,
             SkXfermode::kMultiply_Mode,
         };
-    
+
         static const SkColor gColors[] = {
             0xFF000000,
             0x80000000,
@@ -205,9 +205,9 @@
                 canvas->drawBitmap(fBitmap, x * N * 1.25f, y * N * scale, &paint);
             }
         }
-        
+
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleComplexClip.cpp b/samplecode/SampleComplexClip.cpp
index e7f9a01..ff343dd 100644
--- a/samplecode/SampleComplexClip.cpp
+++ b/samplecode/SampleComplexClip.cpp
@@ -12,7 +12,7 @@
 
 class ComplexClipView : public SampleView {
 public:
-	ComplexClipView() {
+    ComplexClipView() {
         this->setBGColor(0xFFA0DDA0);
     }
 
diff --git a/samplecode/SampleConcavePaths.cpp b/samplecode/SampleConcavePaths.cpp
index 1659ec0..549e9e2 100644
--- a/samplecode/SampleConcavePaths.cpp
+++ b/samplecode/SampleConcavePaths.cpp
@@ -27,8 +27,8 @@
 
 class ConcavePathView : public SampleView {
 public:
-	ConcavePathView() {}
-    
+    ConcavePathView() {}
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -38,10 +38,10 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
-    virtual void onDrawContent(SkCanvas* canvas) {        
+
+    virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
-        
+
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kFill_Style);
 
@@ -136,12 +136,12 @@
             canvas->restore();
         }
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleCull.cpp b/samplecode/SampleCull.cpp
index 778d0fc..18d9bdc 100644
--- a/samplecode/SampleCull.cpp
+++ b/samplecode/SampleCull.cpp
@@ -19,7 +19,7 @@
 
 static void addbump(SkPath* path, const SkPoint pts[2], SkScalar bump) {
     SkVector    tang;
-    
+
     tang.setLength(pts[1].fX - pts[0].fX, pts[1].fY - pts[0].fY, bump);
 
     path->lineTo(SkScalarHalf(pts[0].fX + pts[1].fX) - tang.fY,
@@ -31,7 +31,7 @@
     SkPath::Iter    iter(*path, false);
     SkPoint         pts[4];
     SkPath          tmp;
-    
+
     for (;;)
         switch (iter.next(pts)) {
         case SkPath::kMove_Verb:
@@ -90,7 +90,7 @@
                 break;
             }
     }
-    
+
 FINISHED2:
     *count = n;
     return array;
@@ -102,11 +102,11 @@
 
 class CullView : public SampleView {
 public:
-	CullView() {
+    CullView() {
         fClip.set(0, 0, SkIntToScalar(160), SkIntToScalar(160));
-        
+
         SkRandom    rand;
-        
+
         for (int i = 0; i < 50; i++) {
             SkScalar x = nextScalarRange(rand, -fClip.width()*1, fClip.width()*2);
             SkScalar y = nextScalarRange(rand, -fClip.height()*1, fClip.height()*2);
@@ -115,16 +115,16 @@
             else
                 fPath.lineTo(x, y);
         }
-        
+
         SkScalar bump = fClip.width()/8;
         subdivide(&fPath, bump);
         subdivide(&fPath, bump);
         subdivide(&fPath, bump);
         fPoints = getpts(fPath, &fPtCount);
-        
+
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
     virtual ~CullView() {
         delete[] fPoints;
     }
@@ -138,7 +138,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkAutoCanvasRestore ar(canvas, true);
 
@@ -148,7 +148,7 @@
    //     canvas->scale(SK_Scalar1*3, SK_Scalar1*3, 0, 0);
 
         SkPaint paint;
-        
+
     //    paint.setAntiAliasOn(true);
         paint.setStyle(SkPaint::kStroke_Style);
 
@@ -165,21 +165,21 @@
         SkPath  tmp;
         SkIRect iclip;
         fClip.round(&iclip);
-        
+
         SkCullPointsPath    cpp(iclip, &tmp);
-        
+
         cpp.moveTo(fPoints[0].fX, fPoints[0].fY);
         for (int i = 0; i < fPtCount; i++)
             cpp.lineTo(fPoints[i].fX, fPoints[i].fY);
-        
+
         paint.setColor(SK_ColorRED);
         paint.setStrokeWidth(SkIntToScalar(3));
         paint.setStrokeJoin(SkPaint::kRound_Join);
         canvas->drawPath(tmp, paint);
-        
+
         this->inval(NULL);
     }
-    
+
 private:
     SkRect      fClip;
     SkIPoint*   fPoints;
diff --git a/samplecode/SampleDash.cpp b/samplecode/SampleDash.cpp
index fc0d678..2c16e54 100644
--- a/samplecode/SampleDash.cpp
+++ b/samplecode/SampleDash.cpp
@@ -40,7 +40,7 @@
     DashView() {
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -71,7 +71,7 @@
             for (size_t j = 0; j < len; j++) {
                 interval[j] = SkIntToScalar(gStr[i][j] - '0');
             }
-            
+
             SkDashPathEffect dash(interval, len, 0);
             paint.setPathEffect(&dash);
             canvas->drawLine(x0, y0, x1, y0, paint);
diff --git a/samplecode/SampleDecode.cpp b/samplecode/SampleDecode.cpp
index fa2b727..48759c0 100644
--- a/samplecode/SampleDecode.cpp
+++ b/samplecode/SampleDecode.cpp
@@ -40,7 +40,7 @@
             SkDELETE(codec);
         }
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -50,17 +50,17 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(0xFFDDDDDD);
 //        canvas->drawColor(SK_ColorWHITE);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
-        
+
         canvas->translate(SkIntToScalar(10), SkIntToScalar(20));
-        
+
         for (size_t i = 0; i < SK_ARRAY_COUNT(fBitmap); i++) {
             canvas->drawBitmap(fBitmap[i], 0, 0);
             canvas->translate(SkIntToScalar(fBitmap[i].width()), 0);
diff --git a/samplecode/SampleDither.cpp b/samplecode/SampleDither.cpp
index 85ac2b1..7e5fc21 100644
--- a/samplecode/SampleDither.cpp
+++ b/samplecode/SampleDither.cpp
@@ -24,20 +24,20 @@
 static void draw_sweep(SkCanvas* c, int width, int height, SkScalar angle) {
     SkRect  r;
     SkPaint p;
-    
+
     p.setAntiAlias(true);
 //    p.setDither(true);
     p.setStrokeWidth(SkIntToScalar(width/10));
     p.setStyle(SkPaint::kStroke_Style);
 
     r.set(0, 0, SkIntToScalar(width), SkIntToScalar(height));
-    
+
     //    SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN, SK_ColorCYAN };
     SkColor colors[] = { 0x4c737373, 0x4c737373, 0xffffd300 };
     SkShader* s = SkGradientShader::CreateSweep(r.centerX(), r.centerY(),
                                                 colors, NULL, SK_ARRAY_COUNT(colors));
     p.setShader(s)->unref();
-    
+
     SkAutoCanvasRestore acr(c, true);
 
     c->translate(r.centerX(), r.centerY());
@@ -57,7 +57,7 @@
         SkScalar thickness = p.getStrokeWidth();
         SkScalar sweep = SkFloatToScalar(360.0f);
         SkPath path;
-        
+
         path.moveTo(x + radius, y);
         // outer top
         path.lineTo(x + radius + thickness, y);
@@ -78,38 +78,38 @@
 #else
     bm->eraseColor(0);
 #endif
-    
-    SkCanvas c(*bm);    
+
+    SkCanvas c(*bm);
     draw_sweep(&c, bm->width(), bm->height(), 0);
 }
 
 static void pre_dither(const SkBitmap& bm) {
     SkAutoLockPixels alp(bm);
-    
+
     for (int y = 0; y < bm.height(); y++) {
         DITHER_4444_SCAN(y);
-        
+
         SkPMColor* p = bm.getAddr32(0, y);
         for (int x = 0; x < bm.width(); x++) {
             SkPMColor c = *p;
-            
+
             unsigned a = SkGetPackedA32(c);
             unsigned r = SkGetPackedR32(c);
             unsigned g = SkGetPackedG32(c);
             unsigned b = SkGetPackedB32(c);
-            
+
             unsigned d = DITHER_VALUE(x);
 
             a = SkDITHER_A32To4444(a, d);
             r = SkDITHER_R32To4444(r, d);
             g = SkDITHER_G32To4444(g, d);
             b = SkDITHER_B32To4444(b, d);
-            
+
             a = SkA4444ToA32(a);
             r = SkR4444ToR32(r);
             g = SkG4444ToG32(g);
             b = SkB4444ToB32(b);
-            
+
             *p++ = SkPackARGB32(a, r, g, b);
         }
     }
@@ -120,14 +120,14 @@
     SkBitmap    fBM, fBMPreDither, fBM16;
     SkScalar fAngle;
 
-	DitherView() {
+    DitherView() {
         make_bm(&fBM);
         make_bm(&fBMPreDither);
         pre_dither(fBMPreDither);
         fBM.copyTo(&fBM16, SkBitmap::kARGB_4444_Config);
-        
+
         fAngle = 0;
-        
+
         this->setBGColor(0xFF181818);
     }
 
@@ -140,29 +140,29 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         SkScalar x = SkIntToScalar(10);
         SkScalar y = SkIntToScalar(10);
         const SkScalar DX = SkIntToScalar(fBM.width() + 10);
-        
+
         paint.setAntiAlias(true);
-        
+
         if (true) {
             canvas->drawBitmap(fBM, x, y, &paint);
             x += DX;
             paint.setDither(true);
             canvas->drawBitmap(fBM, x, y, &paint);
-            
+
             x += DX;
             paint.setDither(false);
             canvas->drawBitmap(fBMPreDither, x, y, &paint);
-            
+
             x += DX;
             canvas->drawBitmap(fBM16, x, y, &paint);
         }
-        
+
         canvas->translate(DX, DX*2);
         draw_sweep(canvas, fBM.width(), fBM.height(), fAngle);
         canvas->translate(DX, 0);
diff --git a/samplecode/SampleDitherBitmap.cpp b/samplecode/SampleDitherBitmap.cpp
index c243782..b84d0dd 100644
--- a/samplecode/SampleDitherBitmap.cpp
+++ b/samplecode/SampleDitherBitmap.cpp
@@ -40,7 +40,7 @@
 static void test_pathregion() {
     SkPath path;
     SkRegion region;
-    path.moveTo(25071800.f, -141823808.f); 
+    path.moveTo(25071800.f, -141823808.f);
     path.lineTo(25075500.f, -141824000.f);
     path.lineTo(25075400.f, -141827712.f);
     path.lineTo(25071810.f, -141827600.f);
@@ -81,14 +81,14 @@
     SkBitmap    fBM8;
     SkBitmap    fBM32;
 public:
-	DitherBitmapView() {
+    DitherBitmapView() {
         test_pathregion();
         fBM8 = make_bitmap();
         fBM8.copyTo(&fBM32, SkBitmap::kARGB_8888_Config);
-        
+
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -98,7 +98,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) {
         SkAutoLockPixels alp(*bm);  // needed for ctable
         bm->setIsOpaque(isOpaque);
@@ -107,7 +107,7 @@
             ctable->setIsOpaque(isOpaque);
         }
     }
-    
+
     static void draw2(SkCanvas* canvas, const SkBitmap& bm) {
         SkPaint paint;
         SkBitmap bitmap(bm);
@@ -125,7 +125,7 @@
         paint.setDither(true);
         canvas->drawBitmap(bitmap, x, SkIntToScalar(bm.height() + 10), &paint);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
 
@@ -136,7 +136,7 @@
         canvas->translate(0, SkIntToScalar(fBM8.height() *3));
         draw_gradient(canvas);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleDraw.cpp b/samplecode/SampleDraw.cpp
index c418585..e1f62fe 100644
--- a/samplecode/SampleDraw.cpp
+++ b/samplecode/SampleDraw.cpp
@@ -13,19 +13,19 @@
 
 static void test_clearonlayers(SkCanvas* canvas) {
     SkCanvas& c = *canvas;
-    
+
     SkPaint paint;
     paint.setColor(SK_ColorBLUE);
     paint.setStyle(SkPaint::kStrokeAndFill_Style);
     SkRect rect = SkRect::MakeXYWH(25, 25, 50, 50);
     c.drawRect(rect, paint);
-    
+
     c.clipRect(rect);
-    
+
     c.saveLayer(NULL, NULL);
     rect = SkRect::MakeXYWH(50, 10, 40, 80);
     c.clipRect(rect, SkRegion::kUnion_Op);
-    
+
     rect = SkRect::MakeXYWH(50, 0, 50, 100);
     // You might draw something here, but it's not necessary.
     // paint.setColor(SK_ColorRED);
@@ -37,11 +37,11 @@
 
 static void test_strokerect(SkCanvas* canvas, const SkRect& r) {
     SkPaint p;
-    
+
     p.setAntiAlias(true);
     p.setStyle(SkPaint::kStroke_Style);
     p.setStrokeWidth(4);
-    
+
     canvas->drawRect(r, p);
 
     SkPath path;
@@ -61,27 +61,27 @@
     r.offset(0.25f, 0.3333f);
     test_strokerect(canvas, r);
     canvas->translate(0, 20);
-    
+
     r.set(10, 10, 14.5f, 14.5f);
     r.offset(0.25f, 0.3333f);
     test_strokerect(canvas, r);
     canvas->translate(0, 20);
-    
+
     r.set(10, 10, 14.5f, 20);
     r.offset(0.25f, 0.3333f);
     test_strokerect(canvas, r);
     canvas->translate(0, 20);
-    
+
     r.set(10, 10, 20, 14.5f);
     r.offset(0.25f, 0.3333f);
     test_strokerect(canvas, r);
     canvas->translate(0, 20);
-    
+
     r.set(10, 10, 20, 20);
     r.offset(0.25f, 0.3333f);
     test_strokerect(canvas, r);
     canvas->translate(0, 20);
-    
+
 }
 
 class Draw : public SkRefCnt {
@@ -236,7 +236,7 @@
     }
 
     virtual Draw* create(const SkPoint&, const SkPoint&) = 0;
-    
+
 private:
     SkPaint fPaint;
 };
@@ -291,7 +291,7 @@
         }
         return NULL;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp
index e04d642..15ad809 100644
--- a/samplecode/SampleEffects.cpp
+++ b/samplecode/SampleEffects.cpp
@@ -60,7 +60,7 @@
     SkPath fPath;
     SkPaint fPaint[SK_ARRAY_COUNT(gPaintProcs)];
 
-	EffectsView() {
+    EffectsView() {
         size_t i;
         const float pts[] = {
             0, 0,
@@ -75,7 +75,7 @@
         for (i = 2; i < SK_ARRAY_COUNT(pts); i += 2) {
             fPath.lineTo(pts[i], pts[i+1]);
         }
-        
+
         for (i = 0; i < SK_ARRAY_COUNT(gPaintProcs); i++) {
             fPaint[i].setAntiAlias(true);
             fPaint[i].setColor(COLOR);
@@ -85,10 +85,10 @@
         SkColorMatrix cm;
         cm.setRotate(SkColorMatrix::kG_Axis, 180);
         cm.setIdentity();
-        
+
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -98,7 +98,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         canvas->scale(3, 3);
         canvas->translate(10, 30);
@@ -107,7 +107,7 @@
             canvas->translate(32, 0);
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleEmboss.cpp b/samplecode/SampleEmboss.cpp
index bf12636..41c7455 100644
--- a/samplecode/SampleEmboss.cpp
+++ b/samplecode/SampleEmboss.cpp
@@ -29,14 +29,14 @@
 class EmbossView : public SampleView {
     SkEmbossMaskFilter::Light   fLight;
 public:
-	EmbossView() {
+    EmbossView() {
         fLight.fDirection[0] = SK_Scalar1;
         fLight.fDirection[1] = SK_Scalar1;
         fLight.fDirection[2] = SK_Scalar1;
         fLight.fAmbient = 128;
         fLight.fSpecular = 16*2;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -49,18 +49,18 @@
 
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
-        
+
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkIntToScalar(10));
         paint.setMaskFilter(new SkEmbossMaskFilter(fLight, SkIntToScalar(4)))->unref();
         paint.setShader(new SkColorShader(SK_ColorBLUE))->unref();
         paint.setDither(true);
-        
+
         canvas->drawCircle(SkIntToScalar(50), SkIntToScalar(50),
                            SkIntToScalar(30), paint);
     }
-    
+
 private:
 
     typedef SampleView INHERITED;
diff --git a/samplecode/SampleEmptyPath.cpp b/samplecode/SampleEmptyPath.cpp
index cffe6cf..49ad7c5 100644
--- a/samplecode/SampleEmptyPath.cpp
+++ b/samplecode/SampleEmptyPath.cpp
@@ -24,7 +24,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawEmpty(SkCanvas* canvas,
                    SkColor color,
                    const SkRect& clip,
@@ -40,7 +40,7 @@
         canvas->drawPath(path, paint);
         canvas->restore();
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         struct FillAndName {
             SkPath::FillType fFill;
@@ -110,7 +110,7 @@
                 labelPaint.setColor(color);
                 labelPaint.setAntiAlias(true);
                 labelPaint.setLCDRenderText(true);
-                canvas->drawText(label, strlen(label), 
+                canvas->drawText(label, strlen(label),
                                  0, rect.height() + 15 * SK_Scalar1,
                                  labelPaint);
             }
@@ -118,7 +118,7 @@
         canvas->restore();
         canvas->restore();
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp
index 6999a06..afcde03 100644
--- a/samplecode/SampleEncode.cpp
+++ b/samplecode/SampleEncode.cpp
@@ -28,13 +28,13 @@
     const int   width = 98;
     const int   height = 100;
     SkBitmap    device;
-    
+
     device.setConfig(SkBitmap::kARGB_8888_Config, width, height);
     device.allocPixels();
 
     SkCanvas    canvas(device);
     SkPaint     paint;
-    
+
     paint.setAntiAlias(true);
     canvas.drawColor(SK_ColorRED);
     paint.setColor(SK_ColorBLUE);
@@ -67,7 +67,7 @@
             SkColorTable* ctable = new SkColorTable(colors, 256);
             bm->allocPixels(ctable);
             ctable->unref();
-            
+
             for (int y = 0; y < height; y++) {
                 for (int x = 0; x < width; x++) {
                     *bm->getAddr8(x, y) = SkGetPackedR32(*device.getAddr32(x, y));
@@ -118,22 +118,22 @@
     SkBitmap*   fBitmaps;
     size_t      fBitmapCount;
 
-	EncodeView() {
+    EncodeView() {
     #if 1
         (void)mkdir(gPath, S_IRWXU | S_IRWXG | S_IRWXO);
-        
+
         fBitmapCount = SK_ARRAY_COUNT(gConfigs);
         fBitmaps = new SkBitmap[fBitmapCount];
         for (size_t i = 0; i < fBitmapCount; i++) {
             make_image(&fBitmaps[i], gConfigs[i], i);
-            
+
             for (size_t j = 0; j < SK_ARRAY_COUNT(gExt); j++) {
                 SkString path;
                 make_name(&path, i, j);
-                
+
                 // remove any previous run of this file
                 remove(path.c_str());
-                
+
                 SkImageEncoder* codec = SkImageEncoder::Create(gTypes[j]);
                 if (NULL == codec ||
                         !codec->encodeFile(path.c_str(), fBitmaps[i], 100)) {
@@ -149,11 +149,11 @@
     #endif
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
     virtual ~EncodeView() {
         delete[] fBitmaps;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -163,21 +163,21 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         if (fBitmapCount == 0) {
             return;
         }
-        
+
         SkPaint paint;
         paint.setAntiAlias(true);
         paint.setTextAlign(SkPaint::kCenter_Align);
-        
+
         canvas->translate(SkIntToScalar(10), SkIntToScalar(20));
-        
+
         SkScalar x = 0, y = 0, maxX = 0;
         const int SPACER = 10;
-        
+
         for (size_t i = 0; i < fBitmapCount; i++) {
             canvas->drawText(gConfigLabels[i], strlen(gConfigLabels[i]),
                              x + SkIntToScalar(fBitmaps[i].width()) / 2, 0,
@@ -185,20 +185,20 @@
             y = paint.getTextSize();
 
             canvas->drawBitmap(fBitmaps[i], x, y);
-            
+
             SkScalar yy = y;
             for (size_t j = 0; j < SK_ARRAY_COUNT(gExt); j++) {
                 yy += SkIntToScalar(fBitmaps[i].height() + 10);
 
                 SkBitmap bm;
                 SkString name;
-                
+
                 make_name(&name, i, j);
-                
+
                 SkImageDecoder::DecodeFile(name.c_str(), &bm);
                 canvas->drawBitmap(bm, x, yy);
             }
-            
+
             x += SkIntToScalar(fBitmaps[i].width() + SPACER);
             if (x > maxX) {
                 maxX = x;
@@ -214,12 +214,12 @@
             y += SkIntToScalar(fBitmaps[0].height() + SPACER);
         }
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleFillType.cpp b/samplecode/SampleFillType.cpp
index ae97720..b291834 100644
--- a/samplecode/SampleFillType.cpp
+++ b/samplecode/SampleFillType.cpp
@@ -19,14 +19,14 @@
 class FillTypeView : public SampleView {
     SkPath fPath;
 public:
-	FillTypeView() {
+    FillTypeView() {
         const SkScalar radius = SkIntToScalar(45);
         fPath.addCircle(SkIntToScalar(50), SkIntToScalar(50), radius);
         fPath.addCircle(SkIntToScalar(100), SkIntToScalar(100), radius);
 
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -36,7 +36,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void showPath(SkCanvas* canvas, int x, int y, SkPath::FillType ft,
                   SkScalar scale, const SkPaint& paint) {
 
@@ -53,7 +53,7 @@
         canvas->drawPath(fPath, paint);
         canvas->restore();
     }
-    
+
     void showFour(SkCanvas* canvas, SkScalar scale, const SkPaint& paint) {
         showPath(canvas,   0,   0, SkPath::kWinding_FillType,
                  scale, paint);
@@ -64,10 +64,10 @@
         showPath(canvas, 200, 200, SkPath::kInverseEvenOdd_FillType,
                  scale, paint);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
-        
+
         SkPaint paint;
         const SkScalar scale = SkIntToScalar(5)/4;
 
@@ -85,7 +85,7 @@
         canvas->translate(SkIntToScalar(450), 0);
         showFour(canvas, scale, paint);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleFilter.cpp b/samplecode/SampleFilter.cpp
index 350523d..75eb7d7 100644
--- a/samplecode/SampleFilter.cpp
+++ b/samplecode/SampleFilter.cpp
@@ -30,7 +30,7 @@
     bm->setConfig(SkBitmap::kIndex8_Config, 2, 2);
     bm->allocPixels(ctable);
     ctable->unref();
-    
+
     *bm->getAddr8(0, 0) = 0;
     *bm->getAddr8(1, 0) = 1;
     *bm->getAddr8(0, 1) = 2;
@@ -89,7 +89,7 @@
     canvas->translate(SkIntToScalar(48), 0);
 
     canvas->scale(SkIntToScalar(scale), SkIntToScalar(scale));
-    
+
     x += draw_set(canvas, bm, 0, &paint);
     paint.reset();
     paint.setAlpha(0x80);
@@ -101,12 +101,12 @@
 public:
     SkBitmap    fBM8, fBM4444, fBM16, fBM32;
 
-	FilterView() {
+    FilterView() {
         make_bm(&fBM8);
         fBM8.copyTo(&fBM4444, SkBitmap::kARGB_4444_Config);
         fBM8.copyTo(&fBM16, SkBitmap::kRGB_565_Config);
         fBM8.copyTo(&fBM32, SkBitmap::kARGB_8888_Config);
-        
+
         this->setBGColor(0xFFDDDDDD);
     }
 
@@ -119,11 +119,11 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkScalar x = SkIntToScalar(10);
         SkScalar y = SkIntToScalar(10);
-        
+
         canvas->translate(x, y);
         y = draw_row(canvas, fBM8);
         canvas->translate(0, y);
@@ -133,7 +133,7 @@
         canvas->translate(0, y);
         draw_row(canvas, fBM32);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleFilter2.cpp b/samplecode/SampleFilter2.cpp
index da4147e..8582447 100644
--- a/samplecode/SampleFilter2.cpp
+++ b/samplecode/SampleFilter2.cpp
@@ -30,10 +30,10 @@
     int         fBitmapCount;
     int         fCurrIndex;
 
-	Filter2View() {
+    Filter2View() {
         fBitmapCount = SK_ARRAY_COUNT(gNames)*2;
         fBitmaps = new SkBitmap[fBitmapCount];
-        
+
         for (int i = 0; i < fBitmapCount/2; i++) {
             SkImageDecoder::DecodeFile(gNames[i], &fBitmaps[i],
                                        SkBitmap::kARGB_8888_Config,
@@ -45,14 +45,14 @@
                                    SkImageDecoder::kDecodePixels_Mode, NULL);
         }
         fCurrIndex = 0;
-        
+
         this->setBGColor(SK_ColorGRAY);
     }
-    
+
     virtual ~Filter2View() {
         delete[] fBitmaps;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -64,14 +64,14 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         canvas->translate(SkIntToScalar(10), SkIntToScalar(50));
-        
+
         const SkScalar W = SkIntToScalar(fBitmaps[0].width() + 1);
         const SkScalar H = SkIntToScalar(fBitmaps[0].height() + 1);
         SkPaint paint;
-        
+
         const SkScalar scale = SkFloatToScalar(0.897917f);
         canvas->scale(SK_Scalar1, scale);
 
@@ -111,7 +111,7 @@
             }
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleFontCache.cpp b/samplecode/SampleFontCache.cpp
index 2546890..d5c2add 100644
--- a/samplecode/SampleFontCache.cpp
+++ b/samplecode/SampleFontCache.cpp
@@ -17,15 +17,15 @@
     SkPaint paint;
     uint16_t text[32];
     SkRandom rand;
-    
+
     paint.setAntiAlias(true);
     paint.setTextEncoding(SkPaint::kUTF16_TextEncoding);
     for (int j = 0; j < SK_ARRAY_COUNT(text); j++)
         text[j] = (uint16_t)((rand.nextU() & 0xFF) + 32);
-    
+
     for (int i = 9; i < 36; i++) {
         SkPaint::FontMetrics m;
-        
+
         paint.setTextSize(SkIntToScalar(i));
         paint.getFontMetrics(&m);
         paint.measureText(text, sizeof(text));
@@ -36,20 +36,20 @@
     SkPaint paint;
     uint16_t text[32];
     SkRandom rand;
-    
+
     paint.setAntiAlias(true);
     paint.setTextEncoding(SkPaint::kUTF16_TextEncoding);
     for (int j = 0; j < SK_ARRAY_COUNT(text); j++)
         text[j] = (uint16_t)((rand.nextU() & 0xFF) + 32);
-    
+
     SkScalar x = SkIntToScalar(10);
     SkScalar y = SkIntToScalar(20);
-    
+
     canvas->drawColor(SK_ColorWHITE);
     for (int i = 9; i < 36; i++)
     {
         SkPaint::FontMetrics m;
-        
+
         paint.setTextSize(SkIntToScalar(i));
         paint.getFontMetrics(&m);
         canvas->drawText(text, sizeof(text), x, y, paint);
@@ -79,16 +79,16 @@
 class FontCacheView : public SampleView {
 public:
     enum { N = 4 };
-    
+
     pthread_t   fMThreads[N];
     pthread_t   fDThreads[N];
     SkBitmap    fBitmaps[N];
 
-	FontCacheView() {
+    FontCacheView() {
         gDone = false;
         for (int i = 0; i < N; i++) {
             int status;
-            
+
             status = pthread_create(&fMThreads[i], NULL,  measure_proc, NULL);
             SkASSERT(0 == status);
 
@@ -99,7 +99,7 @@
         }
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
     virtual ~FontCacheView() {
         gDone = true;
         for (int i = 0; i < N; i++) {
@@ -110,7 +110,7 @@
             SkASSERT(0 == status);
         }
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -120,7 +120,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkScalar x = 0;
         SkScalar y = 0;
@@ -130,7 +130,7 @@
         }
         this->inval(NULL);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleFontScalerTest.cpp b/samplecode/SampleFontScalerTest.cpp
index e6321de..8494e75 100644
--- a/samplecode/SampleFontScalerTest.cpp
+++ b/samplecode/SampleFontScalerTest.cpp
@@ -40,7 +40,7 @@
     SkTypeface* fFaces[gFaceCount];
 
 public:
-	FontScalerTestView() {
+    FontScalerTestView() {
         for (int i = 0; i < gFaceCount; i++) {
             fFaces[i] = SkTypeface::CreateFromName(gFaces[i].fName,
                                                    gFaces[i].fStyle);
@@ -77,11 +77,11 @@
         if (false) {
             SkPoint pts[4];
             pts[0].set(1.61061274e+09f, 6291456);
-            pts[1].set(SkFloatToScalar(-7.18397061e+15f), 
+            pts[1].set(SkFloatToScalar(-7.18397061e+15f),
                        SkFloatToScalar(-1.53091184e+13f));
-            pts[2].set(SkFloatToScalar(-1.30077315e+16f), 
+            pts[2].set(SkFloatToScalar(-1.30077315e+16f),
                        SkFloatToScalar(-2.77196141e+13f));
-            pts[3].set(SkFloatToScalar(-1.30077315e+16f), 
+            pts[3].set(SkFloatToScalar(-1.30077315e+16f),
                        SkFloatToScalar(-2.77196162e+13f));
 
             SkPath path;
diff --git a/samplecode/SampleFuzz.cpp b/samplecode/SampleFuzz.cpp
index 6966d0d..c082c4d 100644
--- a/samplecode/SampleFuzz.cpp
+++ b/samplecode/SampleFuzz.cpp
@@ -65,7 +65,7 @@
   if (R(2) == 1) v = (float)R(100); else
 
   switch (sel) {
-    case 0: break; 
+    case 0: break;
     case 1: v = 0; break;
     case 2: v = 0.000001f; break;
     case 3: v = 10000; break;
@@ -89,7 +89,7 @@
   if (quick == true) sel = 0; else sel = R(6);
 
   switch (sel) {
- 
+
     case 0:
     case 1:
     case 2:
@@ -121,13 +121,13 @@
     return make_color();
 #endif
 }
-    
+
 
 static void do_fuzz(SkCanvas* canvas) {
     SkPath path;
     SkPaint paint;
     paint.setAntiAlias(true);
-    
+
   for (int i=0;i<100;i++) {
   switch (R(33)) {
 
@@ -156,35 +156,35 @@
       switch (R(2)) {
           case 0: paint.setStrokeCap(SkPaint::kRound_Cap); break;
         case 1: paint.setStrokeCap(SkPaint::kButt_Cap); break;
-      }      
+      }
       break;
 
     case 4:
       switch (R(2)) {
           case 0: paint.setStrokeJoin(SkPaint::kRound_Join); break;
         case 1: paint.setStrokeJoin(SkPaint::kMiter_Join); break;
-      }      
+      }
       break;
 
-    case 5: 
-      paint.setStrokeWidth(make_number()); 
+    case 5:
+      paint.setStrokeWidth(make_number());
       break;
 
-    case 6: 
+    case 6:
       paint.setStrokeMiter(make_number());
       break;
 
-    case 7: 
+    case 7:
       if (quick == true) break;
           SkSafeUnref(paint.setMaskFilter(SkBlurMaskFilter::Create(make_number(), SkBlurMaskFilter::kNormal_BlurStyle)));
       break;
 
-    case 8: 
+    case 8:
       if (quick == true) break;
-      //ctx.shadowColor = make_fill(); 
+      //ctx.shadowColor = make_fill();
       break;
 
-    case 9: 
+    case 9:
       if (quick == true) break;
       //ctx.shadowOffsetX = make_number();
       //ctx.shadowOffsetY = make_number();
@@ -269,7 +269,7 @@
               canvas->drawPath(path, paint);
               paint.setStyle(s);
           } break;
-          
+
           case 23: {
               SkRect r;
               r.set(make_number(),make_number(),make_number(),make_number());
@@ -278,7 +278,7 @@
               canvas->drawRect(r, paint);
               paint.setStyle(s);
           } break;
-          
+
     case 24:
       if (quick == true) break;
       //ctx.arc(make_number(),make_number(),make_number(),make_number(),make_number(),true);
@@ -326,7 +326,7 @@
       if (scale_large == true) {
 
         switch (scval) {
-          case 0: canvas->scale(-1000000000,1); 
+          case 0: canvas->scale(-1000000000,1);
                   canvas->scale(-1000000000,1);
                   scval = 1; break;
           case 1: canvas->scale(-.000000001f,1); scval = 2; break;
@@ -348,10 +348,10 @@
 
 class FuzzView : public SampleView {
 public:
-	FuzzView() {
+    FuzzView() {
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -361,16 +361,16 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(0xFFDDDDDD);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         do_fuzz(canvas);
         this->inval(NULL);
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
diff --git a/samplecode/SampleGradients.cpp b/samplecode/SampleGradients.cpp
index 661c20a..f1a2dd9 100644
--- a/samplecode/SampleGradients.cpp
+++ b/samplecode/SampleGradients.cpp
@@ -23,16 +23,16 @@
           SkIntToScalar(410), SkIntToScalar(30));
     SkPaint p, p2;
     p2.setStyle(SkPaint::kStroke_Style);
-    
+
     p.setShader(setgrad(r, 0xFF00FF00, 0x0000FF00))->unref();
     canvas->drawRect(r, p);
     canvas->drawRect(r, p2);
-    
+
     r.offset(0, r.height() + SkIntToScalar(4));
     p.setShader(setgrad(r, 0xFF00FF00, 0x00000000))->unref();
     canvas->drawRect(r, p);
     canvas->drawRect(r, p2);
-    
+
     r.offset(0, r.height() + SkIntToScalar(4));
     p.setShader(setgrad(r, 0xFF00FF00, 0x00FF0000))->unref();
     canvas->drawRect(r, p);
@@ -69,7 +69,7 @@
     return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos,
                                           data.fCount, tm, mapper);
 }
-                                          
+
 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data,
                             SkShader::TileMode tm, SkUnitMapper* mapper) {
     SkPoint center;
@@ -122,10 +122,10 @@
 
 class GradientsView : public SampleView {
 public:
-	GradientsView() {
+    GradientsView() {
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -166,14 +166,14 @@
             canvas->translate(SK_ARRAY_COUNT(gGradData)*SkIntToScalar(120), 0);
         }
         canvas->restore();
-        
+
         canvas->translate(0, SkIntToScalar(370));
         if (false) { // avoid bit rot, suppress warning
             test_alphagradients(canvas);
         }
         this->inval(NULL);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleHairCurves.cpp b/samplecode/SampleHairCurves.cpp
index 152cbeb..2bb2fa2 100644
--- a/samplecode/SampleHairCurves.cpp
+++ b/samplecode/SampleHairCurves.cpp
@@ -15,7 +15,7 @@
 public:
     HairCurvesView() {
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
diff --git a/samplecode/SampleHairModes.cpp b/samplecode/SampleHairModes.cpp
index 4780476..59cb25c 100644
--- a/samplecode/SampleHairModes.cpp
+++ b/samplecode/SampleHairModes.cpp
@@ -56,7 +56,7 @@
         paint.setStrokeWidth(SK_Scalar1 * angle * 2 / 24);
         canvas->drawLine(W/2, H/2, W/2 + x, H/2 + y, paint);
     }
-    
+
     return H;
 }
 
@@ -70,7 +70,7 @@
     SkShader* s = SkShader::CreateBitmapShader(bm,
                                                SkShader::kRepeat_TileMode,
                                                SkShader::kRepeat_TileMode);
-    
+
     SkMatrix m;
     m.setScale(SkIntToScalar(6), SkIntToScalar(6));
     s->setLocalMatrix(m);
@@ -80,7 +80,7 @@
 class HairModesView : public SampleView {
     SkPaint fBGPaint;
 public:
-	HairModesView() {
+    HairModesView() {
         fBGPaint.setShader(make_bg_shader())->unref();
     }
 
@@ -110,7 +110,7 @@
                     canvas->save();
                 }
                 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode);
-                
+
                 canvas->drawRect(bounds, fBGPaint);
                 canvas->saveLayer(&bounds, NULL);
                 SkScalar dy = drawCell(canvas, mode,
@@ -126,7 +126,7 @@
             canvas->translate(W * 5 / 4, 0);
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleHairline.cpp b/samplecode/SampleHairline.cpp
index 7302727..7aa4666 100644
--- a/samplecode/SampleHairline.cpp
+++ b/samplecode/SampleHairline.cpp
@@ -41,7 +41,7 @@
 
     SkPoint pt0 = { SkFloatToScalar(799.33374f), SkFloatToScalar(1.2360189f) };
     SkPoint pt1 = { SkFloatToScalar(808.49969f), SkFloatToScalar(-7.4338055f) };
-    
+
     SkPaint paint;
     paint.setAntiAlias(true);
     canvas.drawLine(pt0.fX, pt0.fY, pt1.fX, pt1.fY, paint);
@@ -112,7 +112,7 @@
     SkPoint pts[N];
     for (int i = 0; i < 50; i++) {
         generate_pts(pts, N, WIDTH, HEIGHT);
-        
+
         SkPath path;
         path.moveTo(pts[0]);
         for (int j = 1; j < N; j++) {
@@ -135,14 +135,14 @@
     SkPoint pts[N];
     for (int i = 0; i < 10; i++) {
         generate_pts(pts, N, WIDTH, HEIGHT);
-        
+
         SkPath path;
         path.moveTo(pts[0]);
         for (int j = 1; j < N - 2; j++) {
             path.quadTo(pts[j], ave(pts[j], pts[j+1]));
         }
         path.quadTo(pts[N - 2], pts[N - 1]);
-        
+
         canvas->drawPath(path, paint);
     }
 }
@@ -159,14 +159,14 @@
     SkPoint pts[N];
     for (int i = 0; i < 10; i++) {
         generate_pts(pts, N, WIDTH, HEIGHT);
-        
+
         SkPath path;
         path.moveTo(pts[0]);
         for (int j = 1; j < N - 2; j++) {
             add_cubic(&path, pts[j], ave(pts[j], pts[j+1]));
         }
         add_cubic(&path, pts[N - 2], pts[N - 1]);
-        
+
         canvas->drawPath(path, paint);
     }
 }
@@ -192,13 +192,13 @@
     int fProcIndex;
     bool fDoAA;
 public:
-	HairlineView() {
+    HairlineView() {
         fCounter = 0;
         fProcIndex = 0;
         fDoAA = true;
         fNow = 0;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -210,7 +210,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void show_bitmaps(SkCanvas* canvas, const SkBitmap& b0, const SkBitmap& b1,
                       const SkIRect& inset) {
         canvas->drawBitmap(b0, 0, 0, NULL);
@@ -221,11 +221,11 @@
 
     virtual void onDrawContent(SkCanvas* canvas) {
         gRand.setSeed(fNow);
-        
+
         if (false) { // avoid bit rot, suppress warning
             test_chromium_9005();
         }
-        
+
         SkBitmap bm, bm2;
         bm.setConfig(SkBitmap::kARGB_8888_Config,
                      WIDTH + MARGIN*2,
@@ -237,7 +237,7 @@
         bm2.setConfig(SkBitmap::kARGB_8888_Config, WIDTH, HEIGHT,
                       bm.rowBytes());
         bm2.setPixels(bm.getAddr32(MARGIN, MARGIN));
-        
+
         SkCanvas c2(bm2);
         SkPaint paint;
         paint.setAntiAlias(fDoAA);
@@ -266,7 +266,7 @@
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
 
 private:
     typedef SampleView INHERITED;
diff --git a/samplecode/SampleImage.cpp b/samplecode/SampleImage.cpp
index 8867baf..8fdf6b9 100644
--- a/samplecode/SampleImage.cpp
+++ b/samplecode/SampleImage.cpp
@@ -35,7 +35,7 @@
     if (SkImageDecoder::DecodeStream(stream, bitmap, pref,
                                  SkImageDecoder::kDecodeBounds_Mode, NULL)) {
         SkASSERT(bitmap->config() != SkBitmap::kNo_Config);
-    
+
         SkImageRef* ref = new SkImageRef_GlobalPool(stream, bitmap->config());
         ref->setURI(name);
         bitmap->setPixelRef(ref)->unref();
@@ -50,34 +50,34 @@
     SkBitmap*   fBitmaps;
     SkShader*   fShader;
 
-	ImageView() {
+    ImageView() {
         SkImageRef_GlobalPool::SetRAMBudget(32 * 1024);
-        
+
         int i, N = SK_ARRAY_COUNT(gNames);
         fBitmaps = new SkBitmap[N];
-        
+
         for (i = 0; i < N; i++) {
             SkString str("/skimages/");
             str.append(gNames[i]);
             SkFILEStream* stream = new SkFILEStream(str.c_str());
-            
+
             SetImageRef(&fBitmaps[i], stream, SkBitmap::kNo_Config, gNames[i]);
             if (i & 1)
                 fBitmaps[i].buildMipMap();
             stream->unref();
         }
-        
+
         fShader = SkShader::CreateBitmapShader(fBitmaps[5],
                                                SkShader::kRepeat_TileMode,
                                                SkShader::kRepeat_TileMode);
-        
+
         if (true) {
             SkMatrix m;
-            
+
             m.setRotate(SkIntToScalar(30));
             fShader->setLocalMatrix(m);
         }
-        
+
 #if 0
         SkImageRef::DumpPool();
         for (i = 0; i < N; i++) {
@@ -92,20 +92,20 @@
             success = bm.lockPixels();
             SkDebugf(" addr=%d", bm.getPixels());
             if (success)
-                bm.unlockPixels();            
+                bm.unlockPixels();
             SkDebugf("\n");
         }
         SkImageRef::DumpPool();
 #endif
     }
-    
+
     virtual ~ImageView() {
         delete[] fBitmaps;
         delete fShader;
 
         SkImageRef_GlobalPool::DumpPool();
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -115,43 +115,43 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(0xFFDDDDDD);
 //        canvas->drawColor(SK_ColorWHITE);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
-        
+
         canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
-        
+
         SkScalar x = 0, y = 0;
-        
+
         for (size_t i = 0; i < SK_ARRAY_COUNT(gNames); i++) {
             canvas->drawBitmap(fBitmaps[i], x, y);
             x += SkIntToScalar(fBitmaps[i].width() + 10);
         }
-        
+
         canvas->translate(0, SkIntToScalar(120));
 
         SkPaint paint;
         paint.setShader(fShader);
         paint.setFilterBitmap(true);
         SkRect r = { 0, 0, SkIntToScalar(300), SkIntToScalar(100) };
-        
+
         canvas->drawRect(r, paint);
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     virtual bool onClick(Click* click) {
         return this->INHERITED::onClick(click);
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
diff --git a/samplecode/SampleImageDir.cpp b/samplecode/SampleImageDir.cpp
index 8d6f5e0..c37f857 100644
--- a/samplecode/SampleImageDir.cpp
+++ b/samplecode/SampleImageDir.cpp
@@ -135,9 +135,9 @@
     SkScalar    fSaturation;
     SkScalar    fAngle;
 
-	ImageDirView() {
+    ImageDirView() {
         SkImageRef_GlobalPool::SetRAMBudget(320 * 1024);
-        
+
 #ifdef SPECIFIC_IMAGE
         fBitmaps = new SkBitmap[3];
         fStrings = new SkString[3];
@@ -171,7 +171,7 @@
             SkString path(IMAGE_DIR);
             path.append(name);
             SkStream* stream = new SkFILEStream(path.c_str());
-            
+
             SetImageRef(&fBitmaps[i], stream, SkBitmap::kNo_Config,
                         name.c_str());
             stream->unref();
@@ -181,20 +181,20 @@
 #endif
         fCurrIndex = 0;
         fDX = fDY = 0;
-        
+
         fSaturation = SK_Scalar1;
         fAngle = 0;
-        
+
         fScale = SK_Scalar1;
     }
-    
+
     virtual ~ImageDirView() {
         delete[] fBitmaps;
         delete[] fStrings;
 
         SkImageRef_GlobalPool::DumpPool();
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -210,23 +210,23 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
 //        canvas->drawColor(0xFFDDDDDD);
         canvas->drawColor(SK_ColorGRAY);
         canvas->drawColor(SK_ColorWHITE);
     }
-    
+
     SkScalar fScale;
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
-        
+
         if (true) {
             canvas->scale(SkIntToScalar(2), SkIntToScalar(2));
             drawmarshmallow(canvas);
             return;
         }
-        
+
         if (false) {
             SkPaint p;
             p.setStyle(SkPaint::kStroke_Style);
@@ -244,16 +244,16 @@
             DrawRoundRect(*canvas);
             return;
         }
-    
+
         canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
-        
+
         SkScalar x = SkIntToScalar(32), y = SkIntToScalar(32);
         SkPaint paint;
 
 #if 0
         for (int i = 0; i < fBitmapCount; i++) {
             SkPaint p;
-            
+
 #if 1
             const SkScalar cm[] = {
                 SkIntToScalar(2), 0, 0, 0, SkIntToScalar(-255),
@@ -264,7 +264,7 @@
             SkColorFilter* cf = new SkColorMatrixFilter(cm);
             p.setColorFilter(cf)->unref();
 #endif
-            
+
             canvas->drawBitmap(fBitmaps[i], x, y, &p);
             x += SkIntToScalar(fBitmaps[i].width() + 10);
         }
@@ -282,7 +282,7 @@
         }
 #endif
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         if (true) {
             fCurrIndex += 1;
@@ -292,7 +292,7 @@
         }
         return new Click(this);
     }
-    
+
     virtual bool onClick(Click* click)  {
         SkScalar center = this->width()/2;
         fSaturation = SkScalarDiv(click->fCurr.fX - center, center/2);
@@ -301,14 +301,14 @@
 
         fDX += click->fCurr.fX - click->fPrev.fX;
         fDY += click->fCurr.fY - click->fPrev.fY;
-        
+
         fScale = SkScalarDiv(click->fCurr.fX, this->width());
 
         this->inval(NULL);
         return true;
         return this->INHERITED::onClick(click);
     }
-    
+
 private:
     SkScalar fDX, fDY;
     typedef SkView INHERITED;
diff --git a/samplecode/SampleLCD.cpp b/samplecode/SampleLCD.cpp
index 5f8cb0b..7136448 100644
--- a/samplecode/SampleLCD.cpp
+++ b/samplecode/SampleLCD.cpp
@@ -15,7 +15,7 @@
 class LCDView : public SkView {
 public:
     LCDView() {}
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -25,17 +25,17 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorWHITE);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
 
         SkPaint paint;
         paint.setAntiAlias(true);
-        
+
         SkScalar textSize = SkIntToScalar(6);
         SkScalar delta = SK_Scalar1;
         const char* text = "HHHamburgefonts iii";
@@ -47,16 +47,16 @@
         for (int i = 0; i < 20; i++) {
             paint.setTextSize(textSize);
             textSize += delta;
-            
+
             paint.setLCDRenderText(false);
             canvas->drawText(text, len, x0, y, paint);
             paint.setLCDRenderText(true);
             canvas->drawText(text, len, x1, y, paint);
-            
+
             y += paint.getFontSpacing();
         }
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
diff --git a/samplecode/SampleLayerMask.cpp b/samplecode/SampleLayerMask.cpp
index 883642c..78b9800 100644
--- a/samplecode/SampleLayerMask.cpp
+++ b/samplecode/SampleLayerMask.cpp
@@ -14,10 +14,10 @@
 
 class LayerMaskView : public SampleView {
 public:
-	LayerMaskView() {
+    LayerMaskView() {
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -27,7 +27,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawMask(SkCanvas* canvas, const SkRect& r) {
         SkPaint paint;
         paint.setAntiAlias(true);
@@ -43,7 +43,7 @@
             SkRect bounds = r;
             bounds.offset(-bounds.fLeft, -bounds.fTop);
             c.drawOval(bounds, paint);
-            
+
             paint.setXfermodeMode(SkXfermode::kDstIn_Mode);
             canvas->drawBitmap(mask, r.fLeft, r.fTop, &paint);
         } else {
@@ -63,7 +63,7 @@
         drawMask(canvas, r);
         canvas->restore();
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index 06fdd3f..95061b5 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -31,7 +31,7 @@
     SkColor colors[] = { 0, SK_ColorWHITE };
     SkPoint pts[] = { { 0, 0 }, { 0, SK_Scalar1*20 } };
     SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp_TileMode);
-    
+
     paint->setShader(s)->unref();
     paint->setXfermodeMode(SkXfermode::kDstIn_Mode);
 }
@@ -57,7 +57,7 @@
     SkAutoCanvasRestore ar(canvas, true);
 
     SkRect r;
-    
+
     SkPaint p;
     p.setAlpha(0x88);
 
@@ -67,15 +67,15 @@
 
     r.set(0, 0, SkIntToScalar(100), SkIntToScalar(100));
     canvas->clipRect(r);
-    
+
     r.fBottom = SkIntToScalar(20);
     canvas->saveLayer(&r, NULL, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
 
     r.fTop = SkIntToScalar(80);
     r.fBottom = SkIntToScalar(100);
     canvas->saveLayer(&r, NULL, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
-    
-    // now draw the "content" 
+
+    // now draw the "content"
 
     if (true) {
         r.set(0, 0, SkIntToScalar(100), SkIntToScalar(100));
@@ -86,19 +86,19 @@
         p.setColor(SK_ColorRED);
         p.setAntiAlias(true);
         canvas->drawOval(r, p);
-        
+
         dump_layers("inside layer alpha", canvas);
-        
+
         canvas->restore();
     } else {
         r.set(0, 0, SkIntToScalar(100), SkIntToScalar(100));
-        
+
         SkPaint p;
         p.setColor(SK_ColorRED);
         p.setAntiAlias(true);
         canvas->drawOval(r, p);
     }
-    
+
 //    return;
 
     dump_layers("outside layer alpha", canvas);
@@ -116,7 +116,7 @@
     m.setScale(SK_Scalar1, -SK_Scalar1);
     m.postTranslate(0, SkIntToScalar(100));
     s->setLocalMatrix(m);
-    
+
     r.fTop = SkIntToScalar(80);
     r.fBottom = SkIntToScalar(100);
 //    SkDebugf("--------- draw bot grad\n");
@@ -135,14 +135,14 @@
     virtual void restore(SkCanvas*, SkPaint* p, SkDrawFilter::Type) {
         p->setColor(fColor);
     }
-    
+
 private:
     SkColor fColor;
 };
 
 class LayersView : public SkView {
 public:
-	LayersView() {}
+    LayersView() {}
 
 protected:
     // overrides from SkEventSink
@@ -153,18 +153,18 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorGRAY);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
-        
+
         if (true) {
             SkRect r;
-			r.set(SkIntToScalar(0), SkIntToScalar(0),
-				  SkIntToScalar(220), SkIntToScalar(120));
+            r.set(SkIntToScalar(0), SkIntToScalar(0),
+                  SkIntToScalar(220), SkIntToScalar(120));
             SkPaint p;
             canvas->saveLayer(&r, &p);
             canvas->drawColor(0xFFFF0000);
@@ -174,15 +174,15 @@
             canvas->restore();
             return;
         }
-        
+
         if (false) {
             SkRect r;
-			r.set(SkIntToScalar(0), SkIntToScalar(0),
-				  SkIntToScalar(220), SkIntToScalar(120));
+            r.set(SkIntToScalar(0), SkIntToScalar(0),
+                  SkIntToScalar(220), SkIntToScalar(120));
             SkPaint p;
             p.setAlpha(0x88);
             p.setAntiAlias(true);
-            
+
             if (true) {
                 canvas->saveLayer(&r, &p);
                 p.setColor(0xFFFF0000);
@@ -203,36 +203,36 @@
             canvas->translate(SkIntToScalar(300), 0);
 
             SkRect r;
-			r.set(SkIntToScalar(0), SkIntToScalar(0),
-				  SkIntToScalar(220), SkIntToScalar(60));
+            r.set(SkIntToScalar(0), SkIntToScalar(0),
+                  SkIntToScalar(220), SkIntToScalar(60));
 
             canvas->saveLayer(&r, &p, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
 //            canvas->clipRect(r, SkRegion::kDifference_Op);
 //            canvas->clipRect(r, SkRegion::kIntersect_Op);
 
-			r.set(SkIntToScalar(0), SkIntToScalar(0),
-				  SkIntToScalar(220), SkIntToScalar(120));
+            r.set(SkIntToScalar(0), SkIntToScalar(0),
+                  SkIntToScalar(220), SkIntToScalar(120));
             p.setColor(SK_ColorBLUE);
             canvas->drawOval(r, p);
             canvas->restore();
             return;
         }
-        
+
         //canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
         test_fade(canvas);
         return;
 
     //    canvas->setDrawFilter(new RedFilter)->unref();
-        
+
         SkRect  r;
         SkPaint p;
-        
+
         canvas->translate(SkIntToScalar(220), SkIntToScalar(20));
-        
+
         p.setAntiAlias(true);
         r.set(SkIntToScalar(20), SkIntToScalar(20),
               SkIntToScalar(220), SkIntToScalar(120));
-        
+
         p.setColor(SK_ColorBLUE);
      //   p.setMaskFilter(SkBlurMaskFilter::Create(SkIntToScalar(8), SkBlurMaskFilter::kNormal_BlurStyle))->unref();
         canvas->drawRect(r, p);
@@ -244,25 +244,25 @@
 
         p.setColor(SK_ColorRED);
         canvas->drawOval(r, p);
-        
+
         p.setAlpha(0x80);
         p.setXfermodeMode(SkXfermode::kDstIn_Mode);
         canvas->drawRect(bounds, p);
 
         canvas->restore();
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         this->inval(NULL);
-        
+
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     virtual bool onClick(Click* click) {
         return this->INHERITED::onClick(click);
     }
 
-	virtual bool handleKey(SkKey key) {
+    virtual bool handleKey(SkKey key) {
         this->inval(NULL);
         return true;
     }
diff --git a/samplecode/SampleLines.cpp b/samplecode/SampleLines.cpp
index 0048d39..57d7050 100644
--- a/samplecode/SampleLines.cpp
+++ b/samplecode/SampleLines.cpp
@@ -32,8 +32,8 @@
 
 class LinesView : public SampleView {
 public:
-	LinesView() {}
-    
+    LinesView() {}
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -49,12 +49,12 @@
      */
     void drawRings(SkCanvas* canvas) {
         canvas->scale(SkIntToScalar(1)/2, SkIntToScalar(1)/2);
-        
-        SkRect  r;        
+
+        SkRect  r;
         SkScalar x = SkIntToScalar(10);
         SkScalar y = SkIntToScalar(10);
         r.set(x, y, x + SkIntToScalar(100), y + SkIntToScalar(100));
-        
+
         SkPaint paint;
      //   paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
@@ -63,32 +63,32 @@
      //   paint.setColor(0xFFFFFFFF);
         canvas->drawRect(r, paint);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkBitmap bm;
         SkImageDecoder::DecodeFile("/kill.gif", &bm);
         canvas->drawBitmap(bm, 0, 0, NULL);
-        
+
         this->drawRings(canvas);
         return;
 
         SkPaint paint;
-        
+
       //  fAlpha = 0x80;
         paint.setColor(SK_ColorWHITE);
         paint.setAlpha(fAlpha & 0xFF);
         SkRect r;
-        
+
         SkScalar x = SkIntToScalar(10);
         SkScalar y = SkIntToScalar(10);
         r.set(x, y, x + SkIntToScalar(100), y + SkIntToScalar(100));
         canvas->drawRect(r, paint);
         return;
-        
+
         paint.setColor(0xffffff00);            // yellow
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkIntToScalar(2));
-        
+
 //        y += SK_Scalar1/2;
 
         canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), paint);
diff --git a/samplecode/SampleMeasure.cpp b/samplecode/SampleMeasure.cpp
index 35ad5bd..18b3720 100644
--- a/samplecode/SampleMeasure.cpp
+++ b/samplecode/SampleMeasure.cpp
@@ -56,10 +56,10 @@
         p.setLinearText(gSettings[i].fLinearText);
         p.setDevKernText(gSettings[i].fDevKernText);
         SkScalar scale = gSettings[i].fScale;
-        
+
         int n = p.getTextWidths(text, len, widths, rects);
         SkScalar w = p.measureText(text, len, &bounds, scale);
-        
+
         p.setStyle(SkPaint::kFill_Style);
         p.setColor(0x8888FF88);
         canvas->drawRect(bounds, p);
@@ -81,7 +81,7 @@
         canvas->drawLine(0, 0, w, 0, p);
         p.setStrokeWidth(SkIntToScalar(4));
         canvas->drawPoint(x, 0, p);
-        
+
         canvas->translate(0, dy);
     }
 }
@@ -90,7 +90,7 @@
 public:
     SkPaint fPaint;
 
-	MeasureView() {
+    MeasureView() {
         fPaint.setAntiAlias(true);
         fPaint.setTextSize(SkIntToScalar(64));
         this->setBGColor(0xFFDDDDDD);
@@ -105,12 +105,12 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         canvas->translate(fPaint.getTextSize(), fPaint.getTextSize());
         doMeasure(canvas, fPaint, "Hamburgefons");
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleMipMap.cpp b/samplecode/SampleMipMap.cpp
index a7e3166..e0a8e4d 100644
--- a/samplecode/SampleMipMap.cpp
+++ b/samplecode/SampleMipMap.cpp
@@ -17,13 +17,13 @@
     bitmap.setConfig(SkBitmap::kARGB_8888_Config, n, n);
     bitmap.allocPixels();
     bitmap.eraseColor(0);
-    
+
     SkCanvas canvas(bitmap);
     SkRect r;
     r.set(0, 0, SkIntToScalar(n), SkIntToScalar(n));
     SkPaint paint;
     paint.setAntiAlias(true);
-    
+
     paint.setColor(SK_ColorRED);
     canvas.drawOval(r, paint);
     paint.setColor(SK_ColorBLUE);
@@ -31,7 +31,7 @@
     paint.setStyle(SkPaint::kStroke_Style);
     canvas.drawLine(0, 0, r.fRight, r.fBottom, paint);
     canvas.drawLine(0, r.fBottom, r.fRight, 0, paint);
-    
+
     return bitmap;
 }
 
@@ -45,7 +45,7 @@
     MipMapView() {
         fOnce = false;
     }
-    
+
     void init() {
         if (fOnce) {
             return;
@@ -53,10 +53,10 @@
         fOnce = true;
 
         fBitmap = createBitmap(N);
-        
+
         fWidth = N;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -66,7 +66,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawN(SkCanvas* canvas, const SkBitmap& bitmap) {
         SkAutoCanvasRestore acr(canvas, true);
         for (int i = N; i > 1; i >>= 1) {
@@ -75,12 +75,12 @@
             canvas->scale(SK_ScalarHalf, SK_ScalarHalf);
         }
     }
-    
+
     void drawN2(SkCanvas* canvas, const SkBitmap& bitmap) {
         SkBitmap bg;
         bg.setConfig(SkBitmap::kARGB_8888_Config, N, N);
         bg.allocPixels();
-        
+
         SkAutoCanvasRestore acr(canvas, true);
         for (int i = 0; i < 6; i++) {
             bg.eraseColor(0);
@@ -95,11 +95,11 @@
             canvas->translate(SkIntToScalar(N + 8), 0);
         }
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         this->init();
         canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
-        
+
         canvas->scale(1.00000001f, 0.9999999f);
 
         drawN2(canvas, fBitmap);
@@ -131,7 +131,7 @@
         canvas->drawBitmapRect(bitmap, NULL, dst, NULL);
         canvas->translate(SkIntToScalar(N + 8), 0);
         canvas->drawBitmapRect(bitmap, NULL, dst, &paint);
-        
+
         SkShader* s = SkShader::CreateBitmapShader(bitmap,
                                                    SkShader::kRepeat_TileMode,
                                                    SkShader::kRepeat_TileMode);
@@ -144,10 +144,10 @@
         r.set(0, 0, SkIntToScalar(4*N), SkIntToScalar(5*N/2));
         r.offset(SkIntToScalar(N + 12), -SkIntToScalar(N + 4));
         canvas->drawRect(r, paint);
-        
+
         this->inval(NULL);
     }
-    
+
 private:
     int fWidth;
 
diff --git a/samplecode/SampleMovie.cpp b/samplecode/SampleMovie.cpp
index 17fbc79..c85976b 100644
--- a/samplecode/SampleMovie.cpp
+++ b/samplecode/SampleMovie.cpp
@@ -15,7 +15,7 @@
 class AnimGifView : public SkView {
     SkMovie*    fMovie;
 public:
-	AnimGifView() {
+    AnimGifView() {
         fMovie = SkMovie::DecodeFile("/skimages/dollarblk.gif");
     }
 
diff --git a/samplecode/SampleOvalTest.cpp b/samplecode/SampleOvalTest.cpp
index dab4fbc..340acf6 100644
--- a/samplecode/SampleOvalTest.cpp
+++ b/samplecode/SampleOvalTest.cpp
@@ -19,7 +19,7 @@
     SkPMColor   fOutsideColor;  // signals an exterior pixels that was set
     SkBitmap    fBitmap;
 
-	OvalTestView() {
+    OvalTestView() {
         fSize.set(SK_Scalar1, SK_Scalar1);
 
         fBitmap.setConfig(SkBitmap::kARGB_8888_Config, kILimit, kILimit);
diff --git a/samplecode/SampleOverflow.cpp b/samplecode/SampleOverflow.cpp
index e8a1196..64c36d2 100644
--- a/samplecode/SampleOverflow.cpp
+++ b/samplecode/SampleOverflow.cpp
@@ -19,37 +19,37 @@
     SkCanvas canvas;
     SkMatrix matrix;
     matrix.reset();
-    
+
     bitmap.setConfig(SkBitmap::kARGB_8888_Config, 1370, 812);
     bitmap.allocPixels();
     canvas.setBitmapDevice(bitmap);
-    
+
     // set up clipper
     SkRect skclip;
     skclip.set(SkIntToFixed(284), SkIntToFixed(40), SkIntToFixed(1370), SkIntToFixed(708));
-    
+
     ret = canvas.clipRect(skclip);
     SkASSERT(ret);
-    
+
     matrix.set(SkMatrix::kMTransX, SkFloatToFixed(-1153.28));
     matrix.set(SkMatrix::kMTransY, SkFloatToFixed(1180.50));
-    
+
     matrix.set(SkMatrix::kMScaleX, SkFloatToFixed(0.177171));
     matrix.set(SkMatrix::kMScaleY, SkFloatToFixed(0.177043));
-    
+
     matrix.set(SkMatrix::kMSkewX, SkFloatToFixed(0.126968));
     matrix.set(SkMatrix::kMSkewY, SkFloatToFixed(-0.126876));
-    
+
     matrix.set(SkMatrix::kMPersp0, SkFloatToFixed(0.0));
     matrix.set(SkMatrix::kMPersp1, SkFloatToFixed(0.0));
-    
+
     ret = canvas.concat(matrix);
-    
+
     paint.setAntiAlias(true);
     paint.setColor(0xb2202020);
     paint.setStyle(SkPaint::kStroke_Style);
     paint.setStrokeWidth(SkFloatToFixed(68.13));
-    
+
     SkRect r;
     r.set(SkFloatToFixed(-313.714417), SkFloatToFixed(-4.826389), SkFloatToFixed(18014.447266), SkFloatToFixed(1858.154541));
     canvas.drawRoundRect(r, SkFloatToFixed(91.756363), SkFloatToFixed(91.756363), paint);
@@ -59,12 +59,12 @@
 #ifdef SK_SCALAR_IS_FLOATx // FIXME: unclear when if ever this can be enabled
 static bool HitTestPath(const SkPath& path, SkScalar x, SkScalar y) {
     SkRegion    rgn, clip;
-    
+
     int ix = SkScalarFloor(x);
     int iy = SkScalarFloor(y);
 
     clip.setRect(ix, iy, ix + 1, iy + 1);
-    
+
     bool contains = rgn.setPath(path, clip);
     return contains;
 }
@@ -72,7 +72,7 @@
 
 static void TestOverflowHitTest() {
     SkPath path;
-    
+
 #ifdef SK_SCALAR_IS_FLOATx // FIXME: unclear when if ever this can be enabled
     path.addCircle(0, 0, 70000, SkPath::kCCW_Direction);
     SkASSERT(HitTestPath(path, 40000, 40000));
@@ -81,7 +81,7 @@
 
 class OverflowView : public SampleView {
 public:
-	OverflowView() {}
+    OverflowView() {}
 
 protected:
     // overrides from SkEventSink
@@ -92,12 +92,12 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         DrawRoundRect();
         TestOverflowHitTest();
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SamplePageFlip.cpp b/samplecode/SamplePageFlip.cpp
index 99670bd..7daeb1b 100644
--- a/samplecode/SamplePageFlip.cpp
+++ b/samplecode/SamplePageFlip.cpp
@@ -49,31 +49,31 @@
     SkScalar    y = 0;
 
     SkPaint paint;
-    
+
     paint.setAntiAlias(true);
     paint.setColor(SK_ColorRED);
-    
+
     SkRect oval;
     oval.setEmpty();
 
     SkRect clipR = SkRect::MakeWH(SkIntToScalar(bm->width()), SkIntToScalar(bm->height()));
     clipR.inset(SK_Scalar1/4, SK_Scalar1/4);
-                                  
+
     while (!gDone) {
         ref->inval(oval, true);
         oval.set(x, y, x + SkIntToScalar(OVALW), y + SkIntToScalar(OVALH));
         ref->inval(oval, true);
 
         SkAutoFlipUpdate    update(ref);
-        
+
         if (!update.dirty().isEmpty()) {
             // this must be local to the loop, since it needs to forget the pixels
             // its writing to after each iteration, since we do the swap
             SkCanvas    canvas(update.bitmap());
             canvas.clipRegion(update.dirty());
-            canvas.drawColor(0, SkXfermode::kClear_Mode);            
+            canvas.drawColor(0, SkXfermode::kClear_Mode);
             canvas.clipRect(clipR, SkRegion::kIntersect_Op, true);
-            
+
             canvas.drawOval(oval, paint);
         }
         bounce(&x, &dx, WIDTH-OVALW);
@@ -92,18 +92,18 @@
 class PageFlipView : public SampleView {
     bool fOnce;
 public:
-    
+
     enum { N = SK_ARRAY_COUNT(gConfigs) };
-    
+
     pthread_t   fThreads[N];
     SkBitmap    fBitmaps[N];
 
-	PageFlipView() {
+    PageFlipView() {
         gDone = false;
         fOnce = false;
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
     void init() {
         if (fOnce) {
             return;
@@ -113,20 +113,20 @@
         for (int i = 0; i < N; i++) {
             int             status;
             pthread_attr_t  attr;
-            
+
             status = pthread_attr_init(&attr);
             SkASSERT(0 == status);
-            
+
             fBitmaps[i].setConfig(gConfigs[i], WIDTH, HEIGHT);
             SkFlipPixelRef* pr = new SkFlipPixelRef(gConfigs[i], WIDTH, HEIGHT);
             fBitmaps[i].setPixelRef(pr)->unref();
             fBitmaps[i].eraseColor(0);
-            
+
             status = pthread_create(&fThreads[i], &attr,  draw_proc, &fBitmaps[i]);
             SkASSERT(0 == status);
         }
     }
-    
+
     virtual ~PageFlipView() {
         if (!fOnce) {
             return;
@@ -138,7 +138,7 @@
             SkASSERT(0 == status);
         }
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -159,16 +159,16 @@
         }
         this->inval(NULL);
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     virtual bool onClick(Click* click) {
         return this->INHERITED::onClick(click);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp
index 4c3721b..a58999a 100644
--- a/samplecode/SamplePatch.cpp
+++ b/samplecode/SamplePatch.cpp
@@ -225,7 +225,7 @@
     SkPoint     fPts[12];
 
 public:
-	PatchView() {
+    PatchView() {
         fShader0 = make_shader0(&fSize0);
         fSize1 = fSize0;
         if (fSize0.fX == 0 || fSize0.fY == 0) {
diff --git a/samplecode/SamplePath.cpp b/samplecode/SamplePath.cpp
index 69b48fa..b07307a 100644
--- a/samplecode/SamplePath.cpp
+++ b/samplecode/SamplePath.cpp
@@ -50,7 +50,7 @@
     const char* str = "M2242 -590088L-377758 9.94099e+07L-377758 9.94099e+07L2242 -590088Z";
     SkPath path;
     SkParsePath::FromSVGString(str, &path);
-    
+
     {
 #ifdef SK_BUILD_FOR_WIN
         // windows doesn't have strtof
@@ -62,7 +62,7 @@
         int fx = (int)(x * 65536);
         int ffx = SkScalarToFixed(x);
         printf("%g %x %x %x\n", x, ix, fx, ffx);
-        
+
         SkRect r = path.getBounds();
         SkIRect ir;
         r.round(&ir);
@@ -71,7 +71,7 @@
                SkScalarToDouble(r.fRight), SkScalarToDouble(r.fBottom),
                ir.fLeft, ir.fTop, ir.fRight, ir.fBottom);
     }
-    
+
     SkBitmap bitmap;
     bitmap.setConfig(SkBitmap::kARGB_8888_Config, 300, 200);
     bitmap.allocPixels();
@@ -88,11 +88,11 @@
     SkPath fPath[6];
     bool fShowHairline;
     bool fOnce;
-    
-	PathView() {
+
+    PathView() {
         fOnce = false;
     }
-    
+
     void init() {
         if (fOnce) {
             return;
@@ -103,47 +103,47 @@
         test_cubic2();
 
         fShowHairline = false;
-        
+
         fDStroke = 1;
         fStroke = 10;
         fMinStroke = 10;
         fMaxStroke = 180;
 
         const int V = 85;
-        
+
         fPath[0].moveTo(SkIntToScalar(40), SkIntToScalar(70));
         fPath[0].lineTo(SkIntToScalar(70), SkIntToScalar(70) + SK_Scalar1/1);
         fPath[0].lineTo(SkIntToScalar(110), SkIntToScalar(70));
-        
+
         fPath[1].moveTo(SkIntToScalar(40), SkIntToScalar(70));
         fPath[1].lineTo(SkIntToScalar(70), SkIntToScalar(70) - SK_Scalar1/1);
         fPath[1].lineTo(SkIntToScalar(110), SkIntToScalar(70));
-        
+
         fPath[2].moveTo(SkIntToScalar(V), SkIntToScalar(V));
         fPath[2].lineTo(SkIntToScalar(50), SkIntToScalar(V));
         fPath[2].lineTo(SkIntToScalar(50), SkIntToScalar(50));
-        
+
         fPath[3].moveTo(SkIntToScalar(50), SkIntToScalar(50));
         fPath[3].lineTo(SkIntToScalar(50), SkIntToScalar(V));
         fPath[3].lineTo(SkIntToScalar(V), SkIntToScalar(V));
-        
+
         fPath[4].moveTo(SkIntToScalar(50), SkIntToScalar(50));
         fPath[4].lineTo(SkIntToScalar(50), SkIntToScalar(V));
         fPath[4].lineTo(SkIntToScalar(52), SkIntToScalar(50));
-        
+
         fPath[5].moveTo(SkIntToScalar(52), SkIntToScalar(50));
         fPath[5].lineTo(SkIntToScalar(50), SkIntToScalar(V));
         fPath[5].lineTo(SkIntToScalar(50), SkIntToScalar(50));
-        
+
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
     void nextStroke() {
         fStroke += fDStroke;
         if (fStroke > fMaxStroke || fStroke < fMinStroke)
             fDStroke = -fDStroke;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -153,10 +153,10 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawPath(SkCanvas* canvas, const SkPath& path, SkPaint::Join j) {
         SkPaint paint;
-        
+
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeJoin(j);
@@ -164,19 +164,19 @@
 
         if (fShowHairline) {
             SkPath  fill;
-            
-            paint.getFillPath(path, &fill);            
+
+            paint.getFillPath(path, &fill);
             paint.setStrokeWidth(0);
             canvas->drawPath(fill, paint);
         } else {
             canvas->drawPath(path, paint);
         }
-        
+
         paint.setColor(SK_ColorRED);
         paint.setStrokeWidth(0);
         canvas->drawPath(path, paint);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         this->init();
         canvas->translate(SkIntToScalar(50), SkIntToScalar(50));
@@ -194,20 +194,20 @@
                 canvas->translate(SkIntToScalar(200), 0);
             }
             canvas->restore();
-            
+
             canvas->translate(0, SkIntToScalar(200));
         }
-        
+
         this->nextStroke();
         this->inval(NULL);
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         fShowHairline = !fShowHairline;
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp
index aa392da..b999c39 100644
--- a/samplecode/SamplePathClip.cpp
+++ b/samplecode/SamplePathClip.cpp
@@ -26,15 +26,15 @@
     SkRect fOval;
     SkPoint fCenter;
 
-	PathClipView() {
+    PathClipView() {
         fOval.set(0, 0, SkIntToScalar(200), SkIntToScalar(50));
         fCenter.set(SkIntToScalar(250), SkIntToScalar(250));
-        
+
 //        test_ats();
     }
-    
+
     virtual ~PathClipView() {}
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -44,14 +44,14 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkRect oval = fOval;
         oval.offset(fCenter.fX - oval.centerX(), fCenter.fY - oval.centerY());
-        
+
         SkPaint p;
         p.setAntiAlias(true);
-        
+
         p.setStyle(SkPaint::kStroke_Style);
         canvas->drawOval(oval, p);
 
@@ -59,11 +59,11 @@
         r.set(SkIntToScalar(200), SkIntToScalar(200),
               SkIntToScalar(300), SkIntToScalar(300));
         canvas->clipRect(r);
-        
+
         p.setStyle(SkPaint::kFill_Style);
         p.setColor(SK_ColorRED);
         canvas->drawRect(r, p);
-     
+
         p.setColor(0x800000FF);
         r.set(SkIntToScalar(150), SkIntToScalar(10),
               SkIntToScalar(250), SkIntToScalar(400));
@@ -73,13 +73,13 @@
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         return new Click(this);
     }
-        
+
     virtual bool onClick(Click* click) {
         fCenter.set(click->fCurr.fX, click->fCurr.fY);
         this->inval(NULL);
         return false;
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SamplePathEffects.cpp b/samplecode/SamplePathEffects.cpp
index 1317b82..35d3260 100644
--- a/samplecode/SamplePathEffects.cpp
+++ b/samplecode/SamplePathEffects.cpp
@@ -39,7 +39,7 @@
     path.offset(SkIntToScalar(-6), 0);
 
     SkPathEffect* outer = new SkPath1DPathEffect(path, SkIntToScalar(12), gPhase, SkPath1DPathEffect::kRotate_Style);
-    
+
     if (flags == 2)
         return outer;
 
@@ -79,18 +79,18 @@
         SkPaint paint;
         paint.setAntiAlias(true);
 
-#if 0        
+#if 0
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SK_Scalar1*4);
         this->addLayer(paint);
-    
+
         paint.setStrokeWidth(SK_Scalar1*1);
         paint.setXfermode(SkXfermode::kClear_Mode);
         this->addLayer(paint);
 #else
         paint.setAlpha(0x66);
         this->addLayer(paint, SkIntToScalar(4), SkIntToScalar(4));
-    
+
         paint.setAlpha(0xFF);
         this->addLayer(paint);
 #endif
@@ -101,13 +101,13 @@
     SkPath  fPath;
     SkPoint fClickPt;
 public:
-	PathEffectView() {
+    PathEffectView() {
         SkRandom    rand;
         int         steps = 20;
         SkScalar    dist = SkIntToScalar(400);
         SkScalar    x = SkIntToScalar(20);
         SkScalar    y = SkIntToScalar(50);
-        
+
         fPath.moveTo(x, y);
         for (int i = 0; i < steps; i++) {
             x += dist/steps;
@@ -126,12 +126,12 @@
             oval.offset(x, 0);
             fPath.addRoundRect(oval, SkIntToScalar(8), SkIntToScalar(8));
         }
-        
+
         fClickPt.set(SkIntToScalar(200), SkIntToScalar(200));
-        
+
         this->setBGColor(0xFFDDDDDD);
     }
-	
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -141,37 +141,37 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         gPhase -= SampleCode::GetAnimSecondsDelta() * 40;
         this->inval(NULL);
-        
+
         SkPaint paint;
-        
+
 #if 0
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkIntToScalar(5));
         canvas->drawPath(fPath, paint);
         paint.setStrokeWidth(0);
-        
+
         paint.setColor(SK_ColorWHITE);
         paint.setPathEffect(make_pe(1))->unref();
         canvas->drawPath(fPath, paint);
 #endif
-        
+
         canvas->translate(0, SkIntToScalar(50));
-        
+
         paint.setColor(SK_ColorBLUE);
         paint.setPathEffect(make_pe(2))->unref();
         canvas->drawPath(fPath, paint);
-        
+
         canvas->translate(0, SkIntToScalar(50));
-        
+
         paint.setARGB(0xFF, 0, 0xBB, 0);
         paint.setPathEffect(make_pe(3))->unref();
         canvas->drawPath(fPath, paint);
-        
+
         canvas->translate(0, SkIntToScalar(50));
 
         paint.setARGB(0xFF, 0, 0, 0);
@@ -179,7 +179,7 @@
         paint.setRasterizer(new testrast)->unref();
         canvas->drawPath(fPath, paint);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SamplePathFill.cpp b/samplecode/SamplePathFill.cpp
index bcc00d3..9c7cdc6 100644
--- a/samplecode/SamplePathFill.cpp
+++ b/samplecode/SamplePathFill.cpp
@@ -58,7 +58,7 @@
     const SkScalar x0 = x;
     const SkScalar dx = SK_Scalar1 * 5;
     const SkScalar dy = SK_Scalar1 * 10;
-    
+
     path->moveTo(x, y);
     for (int i = 0; i < 32; i++) {
         x += dx;
diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp
index b24f908..555732f 100644
--- a/samplecode/SamplePictFile.cpp
+++ b/samplecode/SamplePictFile.cpp
@@ -31,7 +31,7 @@
 class PictFileView : public SampleView {
     SkString    fFilename;
     SkPicture*  fPicture;
-    
+
     static SkPicture* LoadPicture(const char path[]) {
         SkPicture* pic = NULL;
 
@@ -55,11 +55,11 @@
     PictFileView(const char name[] = NULL) : fFilename(name) {
         fPicture = NULL;
     }
-    
+
     virtual ~PictFileView() {
         SkSafeUnref(fPicture);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -71,7 +71,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         if (!fPicture) {
             fPicture = LoadPicture(fFilename.c_str());
@@ -80,7 +80,7 @@
             canvas->drawPicture(*fPicture);
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp
index 7317fbe..17a0d75 100644
--- a/samplecode/SamplePicture.cpp
+++ b/samplecode/SamplePicture.cpp
@@ -35,7 +35,7 @@
 static SkBitmap load_bitmap() {
     SkStream* stream = new SkFILEStream("/skimages/sesame_street_ensemble-hp.jpg");
     SkAutoUnref aur(stream);
-    
+
     SkBitmap bm;
     if (SkImageDecoder::DecodeStream(stream, &bm, SkBitmap::kNo_Config,
                                      SkImageDecoder::kDecodeBounds_Mode)) {
@@ -66,7 +66,7 @@
         SkCanvas* canvas = fPicture->beginRecording(100, 100);
         SkPaint paint;
         paint.setAntiAlias(true);
-        
+
         canvas->drawBitmap(fBitmap, 0, 0, NULL);
 
         drawCircle(canvas, 50, SK_ColorBLACK);
@@ -83,11 +83,11 @@
         // the other references to fSubPicture
         fSubPicture->unref();
     }
-    
+
     virtual ~PictureView() {
         fPicture->unref();
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -110,7 +110,7 @@
         const char afterStr[] = "after circle";
 
         paint.setAntiAlias(true);
-    
+
         paint.setColor(SK_ColorRED);
         canvas->drawData(beforeStr, sizeof(beforeStr));
         canvas->drawCircle(SkIntToScalar(50), SkIntToScalar(50),
@@ -120,7 +120,7 @@
         paint.setTextSize(SkIntToScalar(40));
         canvas->drawText("Picture", 7, SkIntToScalar(50), SkIntToScalar(62),
                          paint);
-        
+
     }
 
     virtual void onDrawContent(SkCanvas* canvas) {
@@ -131,7 +131,7 @@
 
         drawSomething(pict->beginRecording(100, 100));
         pict->endRecording();
-    
+
         canvas->save();
         canvas->translate(SkIntToScalar(300), SkIntToScalar(50));
         canvas->scale(-SK_Scalar1, -SK_Scalar1);
@@ -145,7 +145,7 @@
         canvas->translate(0, -SkIntToScalar(50));
         canvas->drawPicture(*pict);
         canvas->restore();
-        
+
         canvas->save();
         canvas->translate(SkIntToScalar(100), SkIntToScalar(100));
         canvas->scale(-SK_Scalar1, SK_Scalar1);
@@ -158,9 +158,9 @@
             SkDumpCanvas dumpCanvas(&dumper);
             dumpCanvas.drawPicture(*pict);
         }
-        
+
         // test that we can re-record a subpicture, and see the results
-        
+
         SkRandom rand(SampleCode::GetAnimTime());
         canvas->translate(SkIntToScalar(10), SkIntToScalar(250));
         drawCircle(fSubPicture->beginRecording(50, 50), 25,
@@ -168,14 +168,14 @@
         canvas->drawPicture(*fPicture);
         delayInval(500);
     }
-    
+
 private:
     #define INVAL_ALL_TYPE  "inval-all"
-    
+
     void delayInval(SkMSec delay) {
         (new SkEvent(INVAL_ALL_TYPE, this->getSinkID()))->postDelay(delay);
     }
-    
+
     virtual bool onEvent(const SkEvent& evt) {
         if (evt.isType(INVAL_ALL_TYPE)) {
             this->inval(NULL);
diff --git a/samplecode/SamplePoints.cpp b/samplecode/SamplePoints.cpp
index 717cd8c..705a7b1 100644
--- a/samplecode/SamplePoints.cpp
+++ b/samplecode/SamplePoints.cpp
@@ -29,7 +29,7 @@
 
 class PointsView : public SampleView {
 public:
-	PointsView() {}
+    PointsView() {}
 
 protected:
     // overrides from SkEventSink
diff --git a/samplecode/SamplePolyToPoly.cpp b/samplecode/SamplePolyToPoly.cpp
index c12b402..da527c2 100644
--- a/samplecode/SamplePolyToPoly.cpp
+++ b/samplecode/SamplePolyToPoly.cpp
@@ -17,7 +17,7 @@
 
 class PolyToPolyView : public SampleView {
 public:
-	PolyToPolyView() {
+    PolyToPolyView() {
         // tests
         {
             SkPoint src[] = { { 0, 0 },
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp
index 0525f46..269fc6a 100644
--- a/samplecode/SampleRegion.cpp
+++ b/samplecode/SampleRegion.cpp
@@ -26,13 +26,13 @@
 
     SkScalar dx = 20;
     SkScalar dy = 20;
-    
+
     SkPath path;
-    path.addRect(0.0f, 0.0f, 
-                 SkIntToScalar(width), SkIntToScalar(height), 
+    path.addRect(0.0f, 0.0f,
+                 SkIntToScalar(width), SkIntToScalar(height),
                  SkPath::kCW_Direction);
     SkRect r = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
-    
+
     SkCanvas c(bitmap);
     c.translate(dx, dy);
 
@@ -57,7 +57,7 @@
     // Need a bounds for the text
     SkRect bounds;
     SkPaint::FontMetrics fm;
-    
+
     paint.getFontMetrics(&fm);
     bounds.set(x, y + fm.fTop, x + paint.measureText(text, len), y + fm.fBottom);
 
@@ -92,7 +92,7 @@
     SkPaint paint;
     paint.setAntiAlias(true);
     paint.setTextSize(20);
-    
+
     const char* str = "Hamburgefons";
     size_t len = strlen(str);
     SkScalar x = 20;
@@ -126,7 +126,7 @@
                      size_t count, int32_t runs[]) {
     SkIRect r;
     r.set(left, top, right, bottom);
-    
+
     rgn->debugSetRuns(runs, count);
     SkASSERT(rgn->getBounds() == r);
 }
@@ -156,7 +156,7 @@
         0x7fffffff
     };
     make_rgn(rb, 112, 182, 240, 260, SK_ARRAY_COUNT(dataB), dataB);
-    
+
     rc->op(*ra, *rb, SkRegion::kUnion_Op);
 }
 #endif
@@ -184,7 +184,7 @@
                       const SkPaint& paint) {
     SkRegion scaled;
     scale_rgn(&scaled, rgn, 0.5f);
-    
+
     SkRegion::Iterator  iter(rgn);
 
     for (; !iter.done(); iter.next())
@@ -197,7 +197,7 @@
 
 class RegionView : public SampleView {
 public:
-	RegionView() {
+    RegionView() {
         fBase.set(100, 100, 150, 150);
         fRect = fBase;
         fRect.inset(5, 5);
@@ -227,7 +227,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     static void drawstr(SkCanvas* canvas, const char text[], const SkPoint& loc,
                         bool hilite) {
         SkPaint paint;
@@ -240,7 +240,7 @@
     void drawPredicates(SkCanvas* canvas, const SkPoint pts[]) {
         SkRegion rgn;
         build_base_rgn(&rgn);
-        
+
         drawstr(canvas, "Intersects", pts[0], rgn.intersects(fRect));
         drawstr(canvas, "Contains", pts[1], rgn.contains(fRect));
     }
@@ -248,11 +248,11 @@
     void drawOrig(SkCanvas* canvas, bool bg) {
         SkRect      r;
         SkPaint     paint;
-        
+
         paint.setStyle(SkPaint::kStroke_Style);
         if (bg)
             paint.setColor(0xFFBBBBBB);
-        
+
         SkRegion rgn;
         build_base_rgn(&rgn);
         paint_rgn(canvas, rgn, paint);
@@ -260,29 +260,29 @@
         r.set(fRect);
         canvas->drawRect(r, paint);
     }
-    
+
     void drawRgnOped(SkCanvas* canvas, SkRegion::Op op, SkColor color) {
         SkRegion    rgn;
 
         this->build_rgn(&rgn, op);
-        
+
         {
             SkRegion tmp, tmp2(rgn);
-            
+
             tmp = tmp2;
             tmp.translate(5, -3);
-            
+
             {
                 char    buffer[1000];
                 size_t  size = tmp.writeToMemory(NULL);
                 SkASSERT(size <= sizeof(buffer));
                 size_t  size2 = tmp.writeToMemory(buffer);
                 SkASSERT(size == size2);
-                
+
                 SkRegion    tmp3;
                 size2 = tmp3.readFromMemory(buffer);
                 SkASSERT(size == size2);
-                
+
                 SkASSERT(tmp3 == tmp);
             }
 
@@ -302,7 +302,7 @@
         paint.setColor(color);
         paint_rgn(canvas, rgn, paint);
     }
-    
+
     void drawPathOped(SkCanvas* canvas, SkRegion::Op op, SkColor color) {
         SkRegion    rgn;
         SkPath      path;
@@ -321,7 +321,7 @@
         paint.setStyle(SkPaint::kStroke_Style);
         canvas->drawPath(path, paint);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         if (false) { // avoid bit rot, suppress warning
             test_strokerect(canvas);
@@ -335,10 +335,10 @@
         if (true) {
             SkRegion a, b, c;
             test_union_bug_1505668(&a, &b, &c);
-            
+
             if (false) {    // draw the result of the test
                 SkPaint paint;
-                
+
                 canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
                 paint.setColor(SK_ColorRED);
                 paint_rgn(canvas, a, paint);
@@ -377,7 +377,7 @@
             canvas->translate(SkIntToScalar(200), 0);
             this->drawRgnOped(canvas, SkRegion::kUnion_Op, SK_ColorBLACK);
         canvas->restore();
-        
+
         canvas->translate(0, SkIntToScalar(200));
 
         for (size_t op = 0; op < SK_ARRAY_COUNT(gOps); op++) {
@@ -389,25 +389,25 @@
             canvas->translate(0, SkIntToScalar(200));
             this->drawPathOped(canvas, gOps[op].fOp, gOps[op].fColor);
             canvas->restore();
-            
+
             canvas->translate(SkIntToScalar(200), 0);
         }
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         return fRect.contains(SkScalarRound(x), SkScalarRound(y)) ? new Click(this) : NULL;
     }
-    
+
     virtual bool onClick(Click* click) {
         fRect.offset(click->fICurr.fX - click->fIPrev.fX,
                      click->fICurr.fY - click->fIPrev.fY);
         this->inval(NULL);
         return true;
     }
-    
+
 private:
     SkIRect    fBase, fRect;
-    
+
     typedef SampleView INHERITED;
 };
 
diff --git a/samplecode/SampleRepeatTile.cpp b/samplecode/SampleRepeatTile.cpp
index 16a23ad..54c79ef 100644
--- a/samplecode/SampleRepeatTile.cpp
+++ b/samplecode/SampleRepeatTile.cpp
@@ -38,13 +38,13 @@
     SkBitmap bm;
     make_bitmap(&bm);
 
-    SkShader* shader = SkShader::CreateBitmapShader(bm, tm, tm);    
+    SkShader* shader = SkShader::CreateBitmapShader(bm, tm, tm);
     paint->setShader(shader)->unref();
 }
 
 class RepeatTileView : public SampleView {
 public:
-	RepeatTileView() {
+    RepeatTileView() {
         this->setBGColor(SK_ColorGRAY);
     }
 
@@ -57,27 +57,27 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         make_paint(&paint, SkShader::kRepeat_TileMode);
-        
+
 //        canvas->scale(SK_Scalar1*2, SK_Scalar1);
         canvas->translate(SkIntToScalar(100), SkIntToScalar(100));
         canvas->drawPaint(paint);
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         this->inval(NULL);
-        
+
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     virtual bool onClick(Click* click) {
         return this->INHERITED::onClick(click);
     }
 
-	virtual bool handleKey(SkKey key) {
+    virtual bool handleKey(SkKey key) {
         this->inval(NULL);
         return true;
     }
diff --git a/samplecode/SampleShaderText.cpp b/samplecode/SampleShaderText.cpp
index eb92efd..cada977 100644
--- a/samplecode/SampleShaderText.cpp
+++ b/samplecode/SampleShaderText.cpp
@@ -108,7 +108,7 @@
 
 class ShaderTextView : public SampleView {
 public:
-	ShaderTextView() {
+    ShaderTextView() {
         this->setBGColor(0xFFDDDDDD);
     }
 
@@ -175,8 +175,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/samplecode/SampleShaders.cpp b/samplecode/SampleShaders.cpp
index 99cd680..78b63a3 100644
--- a/samplecode/SampleShaders.cpp
+++ b/samplecode/SampleShaders.cpp
@@ -52,7 +52,7 @@
     SkShader*   fShader;
     SkBitmap    fBitmap;
 
-	ShaderView() {
+    ShaderView() {
         SkImageDecoder::DecodeFile("/skimages/logo.gif", &fBitmap);
 
         SkPoint pts[2];
diff --git a/samplecode/SampleSkLayer.cpp b/samplecode/SampleSkLayer.cpp
index bff6034..e7c0ddb 100644
--- a/samplecode/SampleSkLayer.cpp
+++ b/samplecode/SampleSkLayer.cpp
@@ -79,7 +79,7 @@
     m0.setScale(2,3,4);
     m0.preTranslate(5, 6, 7);
     test_inv("preTranslate", m0);
-    
+
     m0.setScale(2, 4, 6);
     m0.postScale(SkDoubleToMScalar(0.5));
     test_inv("scale/postscale to 1,2,3", m0);
@@ -108,7 +108,7 @@
     m0.setTranslate(3, 4, 5);
     test_33(m0, 1, 0, 3, 0, 1, 4);
 }
-    
+
 ///////////////////////////////////////////////////////////////////////////////
 
 static void dump_layers(const SkLayer* layer, int tab = 0) {
@@ -154,7 +154,7 @@
     SkLayer* fRootLayer;
     SkLayer* fLastChild;
 public:
-	SkLayerView() {
+    SkLayerView() {
         test44();
         static const int W = 600;
         static const int H = 440;
@@ -179,7 +179,7 @@
             child->setPosition(gData[i].fPosX, gData[i].fPosY);
             fRootLayer->addChild(child)->unref();
         }
-        
+
         SkLayer* child = new TestLayer(0xFFDD8844);
         child->setSize(120, 80);
         child->setPosition(fRootLayer->getWidth()/2 - child->getWidth()/2,
@@ -192,7 +192,7 @@
         }
         fLastChild = child;
         fRootLayer->addChild(child)->unref();
-        
+
         if (false) {
             SkMatrix matrix;
             matrix.setScale(0.5, 0.5);
@@ -201,11 +201,11 @@
 
 //        dump_layers(fRootLayer);
     }
-    
+
     virtual ~SkLayerView() {
         SkSafeUnref(fRootLayer);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -215,13 +215,13 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorWHITE);
-        
+
         canvas->translate(20, 20);
         fRootLayer->draw(canvas);
-        
+
         // visual test of getLocalTransform
         if (true) {
             SkMatrix matrix;
@@ -234,7 +234,7 @@
             canvas->drawRect(SkRect::MakeSize(fLastChild->getSize()), paint);
         }
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index 54a9cf9..574564f 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -77,7 +77,7 @@
     path.close();
     path.offset(SkIntToScalar(-6), 0);
     scale(&path, SkFloatToScalar(1.5f));
-    
+
     paint->setPathEffect(new SkPath1DPathEffect(path, SkIntToScalar(21), 0,
                                 SkPath1DPathEffect::kRotate_Style))->unref();
     compose_pe(paint);
@@ -101,7 +101,7 @@
 
     SkPath path;
     path.addCircle(0, 0, SkIntToScalar(5));
-    
+
     return new SkPath2DPathEffect(m, path);
 }
 
@@ -137,7 +137,7 @@
     path.addOval(r, SkPath::kCW_Direction);
     r.inset(50, 50);
     path.addRect(r, SkPath::kCCW_Direction);
-    
+
     canvas->translate(320, 20);
     for (i = 0; i < SK_ARRAY_COUNT(gPE2); i++) {
         gPE2[i](&paint);
@@ -226,7 +226,7 @@
     SkPaint paint;
     paint.setAntiAlias(true);
     paint.setDither(true);
-    
+
     canvas->translate(SkIntToScalar(20), SkIntToScalar(10));
     for (size_t i = 0; i < SK_ARRAY_COUNT(gGradData); i++) {
         canvas->save();
@@ -262,30 +262,30 @@
     SkPaint paint;
     paint.setAntiAlias(true);
     paint.setTextSize(40);
-    
+
     paint.setStyle(SkPaint::kStroke_Style);
     canvas->drawPath(path, paint);
     paint.setStyle(SkPaint::kFill_Style);
-    
+
     SkScalar x = 50;
     paint.setColor(0xFF008800);
     canvas->drawTextOnPathHV(text, len, path,
                              x, paint.getTextSize()*2/3, paint);
     paint.setColor(SK_ColorRED);
     canvas->drawTextOnPathHV(text, len, path,
-                             x + 60, 0, paint);    
+                             x + 60, 0, paint);
     paint.setColor(SK_ColorBLUE);
     canvas->drawTextOnPathHV(text, len, path,
                              x + 120, -paint.getTextSize()*2/3, paint);
 
     path.offset(0, 200);
     paint.setTextAlign(SkPaint::kRight_Align);
-    
+
     text = "Matrices";
     len = strlen(text);
     SkScalar pathLen = getpathlen(path);
     SkMatrix matrix;
-    
+
     paint.setColor(SK_ColorBLACK);
     paint.setStyle(SkPaint::kStroke_Style);
     canvas->drawPath(path, paint);
@@ -293,16 +293,16 @@
 
     paint.setTextSize(50);
     canvas->drawTextOnPath(text, len, path, NULL, paint);
-    
+
     paint.setColor(SK_ColorRED);
     matrix.setScale(-SK_Scalar1, SK_Scalar1);
     matrix.postTranslate(pathLen, 0);
     canvas->drawTextOnPath(text, len, path, &matrix, paint);
-    
+
     paint.setColor(SK_ColorBLUE);
     matrix.setScale(SK_Scalar1, -SK_Scalar1);
     canvas->drawTextOnPath(text, len, path, &matrix, paint);
-    
+
     paint.setColor(0xFF008800);
     matrix.setScale(-SK_Scalar1, -SK_Scalar1);
     matrix.postTranslate(pathLen, 0);
@@ -318,7 +318,7 @@
 
 static SkShader* make_shader0(SkIPoint* size) {
     SkBitmap    bm;
-    
+
     SkImageDecoder::DecodeFile("/skimages/logo.gif", &bm);
     size->set(bm.width(), bm.height());
     return SkShader::CreateBitmapShader(bm, SkShader::kClamp_TileMode,
@@ -339,7 +339,7 @@
     int                     fCount;
     SkPoint*                fVerts;
     SkPoint*                fTexs;
-    
+
     Rec() : fCount(0), fVerts(NULL), fTexs(NULL) {}
     ~Rec() { delete[] fVerts; delete[] fTexs; }
 };
@@ -347,11 +347,11 @@
 static void make_tris(Rec* rec) {
     int n = 10;
     SkRandom    rand;
-    
+
     rec->fMode = SkCanvas::kTriangles_VertexMode;
     rec->fCount = n * 3;
     rec->fVerts = new SkPoint[rec->fCount];
-    
+
     for (int i = 0; i < n; i++) {
         SkPoint* v = &rec->fVerts[i*3];
         for (int j = 0; j < 3; j++) {
@@ -364,15 +364,15 @@
     const SkScalar tx = SkIntToScalar(texWidth);
     const SkScalar ty = SkIntToScalar(texHeight);
     const int n = 24;
-    
+
     rec->fMode = SkCanvas::kTriangleFan_VertexMode;
     rec->fCount = n + 2;
     rec->fVerts = new SkPoint[rec->fCount];
     rec->fTexs  = new SkPoint[rec->fCount];
-    
+
     SkPoint* v = rec->fVerts;
     SkPoint* t = rec->fTexs;
-    
+
     v[0].set(0, 0);
     t[0].set(0, 0);
     for (int i = 0; i < n; i++) {
@@ -383,7 +383,7 @@
     }
     v[n+1] = v[1];
     t[n+1].set(tx, ty);
-    
+
     SkMatrix m;
     m.setScale(SkIntToScalar(100), SkIntToScalar(100));
     m.postTranslate(SkIntToScalar(110), SkIntToScalar(110));
@@ -394,30 +394,30 @@
     const SkScalar tx = SkIntToScalar(texWidth);
     const SkScalar ty = SkIntToScalar(texHeight);
     const int n = 24;
-    
+
     rec->fMode = SkCanvas::kTriangleStrip_VertexMode;
     rec->fCount = 2 * (n + 1);
     rec->fVerts = new SkPoint[rec->fCount];
     rec->fTexs  = new SkPoint[rec->fCount];
-    
+
     SkPoint* v = rec->fVerts;
     SkPoint* t = rec->fTexs;
-    
+
     for (int i = 0; i < n; i++) {
         SkScalar cos;
         SkScalar sin = SkScalarSinCos(SK_ScalarPI * 2 * i / n, &cos);
         v[i*2 + 0].set(cos/2, sin/2);
         v[i*2 + 1].set(cos, sin);
-        
+
         t[i*2 + 0].set(tx * i / n, ty);
         t[i*2 + 1].set(tx * i / n, 0);
     }
     v[2*n + 0] = v[0];
     v[2*n + 1] = v[1];
-    
+
     t[2*n + 0].set(tx, ty);
     t[2*n + 1].set(tx, 0);
-    
+
     SkMatrix m;
     m.setScale(SkIntToScalar(100), SkIntToScalar(100));
     m.postTranslate(SkIntToScalar(110), SkIntToScalar(110));
@@ -427,7 +427,7 @@
 static void mesh_slide(SkCanvas* canvas) {
     Rec fRecs[3];
     SkIPoint    size;
-    
+
     SkShader* fShader0 = make_shader0(&size);
     SkShader* fShader1 = make_shader1(size);
 
@@ -441,30 +441,30 @@
     SkPaint paint;
     paint.setDither(true);
     paint.setFilterBitmap(true);
-    
+
     for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) {
         canvas->save();
-        
+
         paint.setShader(NULL);
         canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount,
                              fRecs[i].fVerts, fRecs[i].fTexs,
                              NULL, NULL, NULL, 0, paint);
-        
+
         canvas->translate(SkIntToScalar(210), 0);
-        
+
         paint.setShader(fShader0);
         canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount,
                              fRecs[i].fVerts, fRecs[i].fTexs,
                              NULL, NULL, NULL, 0, paint);
-        
+
         canvas->translate(SkIntToScalar(210), 0);
-        
+
         paint.setShader(fShader1);
         canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount,
                              fRecs[i].fVerts, fRecs[i].fTexs,
                              NULL, NULL, NULL, 0, paint);
         canvas->restore();
-        
+
         canvas->translate(0, SkIntToScalar(250));
     }
 }
@@ -480,12 +480,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);
@@ -495,7 +495,7 @@
 static void r1(SkLayerRasterizer* rast, SkPaint& p)
 {
     rast->addLayer(p);
-    
+
     p.setAlpha(0x40);
     p.setXfermodeMode(SkXfermode::kSrc_Mode);
     p.setStyle(SkPaint::kStroke_Style);
@@ -508,7 +508,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);
@@ -520,7 +520,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);
@@ -531,11 +531,11 @@
 {
     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);
 }
@@ -545,7 +545,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);
@@ -554,7 +554,7 @@
 static void r6(SkLayerRasterizer* rast, SkPaint& p)
 {
     rast->addLayer(p);
-    
+
     p.setAntiAlias(false);
     SkLayerRasterizer* rast2 = new SkLayerRasterizer;
     r5(rast2, p);
@@ -583,14 +583,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);
@@ -602,34 +602,34 @@
 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();
@@ -639,24 +639,24 @@
         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);
@@ -670,11 +670,11 @@
     r0, r1, r2, r3, r4, r5, r6, r7, r8, r9
 };
 
-static void apply_shader(SkPaint* paint, int index) {    
+static void apply_shader(SkPaint* paint, int index) {
     raster_proc proc = gRastProcs[index];
     SkPaint p;
     SkLayerRasterizer*  rast = new SkLayerRasterizer;
-    
+
     p.setAntiAlias(true);
     proc(rast, p);
     paint->setRasterizer(rast)->unref();
@@ -723,7 +723,7 @@
     SlideView() {
         fOnce = false;
     }
-    
+
     void init() {
         if (fOnce) {
             return;
@@ -731,7 +731,7 @@
         fOnce = true;
 
         fIndex = 0;
-        
+
         SkBitmap bm;
         bm.setConfig(SkBitmap::kARGB_8888_Config, 1024, 768);
         bm.allocPixels();
@@ -749,7 +749,7 @@
         }
         this->setBGColor(BG_COLOR);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -759,7 +759,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         this->init();
         gProc[fIndex](canvas);
diff --git a/samplecode/SampleSpiral.cpp b/samplecode/SampleSpiral.cpp
index 7d14484..be6e728 100644
--- a/samplecode/SampleSpiral.cpp
+++ b/samplecode/SampleSpiral.cpp
@@ -11,10 +11,10 @@
 
 class SpiralView : public SampleView {
 public:
-	SpiralView() {
+    SpiralView() {
         this->setBGColor(0xFFDDDDDD);
-	}
-	
+    }
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt)  {
@@ -24,21 +24,21 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-	
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         paint.setAntiAlias(true);
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(SkScalarHalf(SkIntToScalar(3)));
         paint.setStyle(SkPaint::kFill_Style);
-        
+
         SkRect r;
         SkScalar l,t,x,y;
         l = SampleCode::GetAnimScalar(SkIntToScalar(10),
                                       SkIntToScalar(400));
         t = SampleCode::GetAnimScalar(SkIntToScalar(5),
                                       SkIntToScalar(200));
-        
+
         canvas->translate(320,240);
         for (int i = 0; i < 35; i++) {
             paint.setColor(0xFFF00FF0 - i * 0x04000000);
@@ -52,7 +52,7 @@
 
         this->inval(NULL);
     }
-	
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleStrokePath.cpp b/samplecode/SampleStrokePath.cpp
index 1fb5fea..ca5135d 100644
--- a/samplecode/SampleStrokePath.cpp
+++ b/samplecode/SampleStrokePath.cpp
@@ -17,14 +17,14 @@
 static void test_huge_stroke(SkCanvas* canvas) {
     SkRect srcR = { 0, 0, 72000, 54000 };
     SkRect dstR = { 0, 0, 640, 480 };
-    
+
     SkPath path;
     path.moveTo(17600, 8000);
     path.lineTo(52800, 8000);
     path.lineTo(52800, 41600);
     path.lineTo(17600, 41600);
     path.close();
-    
+
     SkPaint paint;
     paint.setAntiAlias(true);
     paint.setStrokeWidth(8000);
@@ -54,7 +54,7 @@
         for (int x = 1; x <= 3; x++) {
             src.fBounds.set(0, 0, x, y);
             src.fRowBytes = src.fBounds.width();
-            
+
             SkScalar radius = 1.f;
 
             printf("src [%d %d %d %d] radius %g\n", src.fBounds.fLeft, src.fBounds.fTop,
@@ -99,7 +99,7 @@
     SkScalar    fWidth;
     SkPath      fPath;
 public:
-	StrokePathView() {
+    StrokePathView() {
 //        test_blur();
         fWidth = SkIntToScalar(120);
 
@@ -114,14 +114,14 @@
         fPath.addCircle(0, 0, SkIntToScalar(50), SkPath::kCW_Direction);
         fPath.addCircle(0, SkIntToScalar(-50), SkIntToScalar(30), SkPath::kCW_Direction);
 #endif
-        
+
         scale_to_width(&fPath, fWidth);
         const SkRect& bounds = fPath.getBounds();
         fPath.offset(-bounds.fLeft, -bounds.fTop);
 
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -131,9 +131,9 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     SkRandom rand;
-    
+
     void drawSet(SkCanvas* canvas, SkPaint* paint) {
         SkAutoCanvasRestore acr(canvas, true);
 
@@ -152,7 +152,7 @@
 
         SkPaint paint;
         paint.setAntiAlias(true);
-        
+
         if (true) {
             canvas->drawColor(SK_ColorBLACK);
 
@@ -177,7 +177,7 @@
                     canvas->drawText("Title Bar", 9, x*SkIntToScalar(100), y*SkIntToScalar(30), paint);
                     radius *= 0.75f;
                 }
-                
+
             }
             return;
         }
@@ -200,10 +200,10 @@
         fPath = p;
         fPath.offset(100, 0);
 #endif
-        
+
         fPath.setFillType(SkPath::kWinding_FillType);
         drawSet(canvas, &paint);
-        
+
         canvas->translate(0, fPath.getBounds().height() * 5 / 4);
         fPath.setFillType(SkPath::kEvenOdd_FillType);
         drawSet(canvas, &paint);
diff --git a/samplecode/SampleStrokeRect.cpp b/samplecode/SampleStrokeRect.cpp
index e9d3c2e..edf9228 100644
--- a/samplecode/SampleStrokeRect.cpp
+++ b/samplecode/SampleStrokeRect.cpp
@@ -14,7 +14,7 @@
 class StrokeRectSample : public SampleView {
 public:
     StrokeRectSample() {}
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -24,7 +24,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         paint.setAntiAlias(true);
@@ -64,7 +64,7 @@
             canvas->translate(SkIntToScalar(150), 0);
         }
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleStrokeText.cpp b/samplecode/SampleStrokeText.cpp
index 94b227c..8245f4e 100644
--- a/samplecode/SampleStrokeText.cpp
+++ b/samplecode/SampleStrokeText.cpp
@@ -41,7 +41,7 @@
     bounds.inset(sw, sw);
     path.offset(-bounds.fLeft, -bounds.fTop);
     bounds.offset(-bounds.fLeft, -bounds.fTop);
-    
+
     int w = SkScalarRound(bounds.width());
     int h = SkScalarRound(bounds.height());
     SkPaint paint(original);
@@ -56,7 +56,7 @@
         paint.setStyle(SkPaint::kFill_Style);
         canvas.drawPath(path, paint);
     }
-    
+
     dst->setConfig(config, w, h);
     dst->allocPixels();
     dst->eraseColor(SK_ColorWHITE);
@@ -87,7 +87,7 @@
     bounds.inset(sw, sw);
     path.offset(-bounds.fLeft, -bounds.fTop);
     bounds.offset(-bounds.fLeft, -bounds.fTop);
-    
+
     int w = SkScalarRound(bounds.width());
     int h = SkScalarRound(bounds.height());
     SkPaint paint(original);
@@ -96,7 +96,7 @@
     paint.setXfermodeMode(SkXfermode::kDstATop_Mode);
     paint.setColor(original.getColor());
     paint.setStyle(SkPaint::kStroke_Style);
-    
+
     dst->setConfig(config, w, h);
     dst->allocPixels();
     dst->eraseColor(SK_ColorWHITE);
@@ -108,10 +108,10 @@
 class StrokeTextView : public SampleView {
     bool fAA;
 public:
-	StrokeTextView() : fAA(false) {
+    StrokeTextView() : fAA(false) {
         this->setBGColor(0xFFCC8844);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -121,24 +121,24 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkBitmap bm;
         SkPaint paint;
-        
+
         paint.setStrokeWidth(SkIntToScalar(6));
         paint.setTextSize(SkIntToScalar(80));
 //        paint.setTypeface(Typeface.DEFAULT_BOLD);
-        
+
         lettersToBitmap(&bm, "Test Case", paint, SkBitmap::kARGB_4444_Config);
         if (false) { // avoid bit rot, suppress warning
             lettersToBitmap2(&bm, "Test Case", paint, SkBitmap::kARGB_4444_Config);
         }
         canvas->drawBitmap(bm, 0, 0);
     }
-    
+
 private:
-    
+
     typedef SampleView INHERITED;
 };
 
diff --git a/samplecode/SampleTests.cpp b/samplecode/SampleTests.cpp
index 5542bf6..ea317e1 100644
--- a/samplecode/SampleTests.cpp
+++ b/samplecode/SampleTests.cpp
@@ -12,7 +12,7 @@
 #include "test.h"
 
 namespace skiatest {
-    
+
 class MyReporter : public Reporter {
 protected:
     virtual void onStart(Test* test) {}
@@ -28,11 +28,11 @@
         r->ref();
         fReg = TestRegistry::Head();
     }
-    
+
     ~Iter() {
         fReporter->unref();
     }
-    
+
     Test* next() {
         if (fReg) {
             TestRegistry::Factory fact = fReg->factory();
@@ -43,7 +43,7 @@
         }
         return NULL;
     }
-    
+
     static int Count() {
         const TestRegistry* reg = TestRegistry::Head();
         int count = 0;
@@ -53,7 +53,7 @@
         }
         return count;
     }
-    
+
 private:
     Reporter* fReporter;
     const TestRegistry* fReg;
@@ -62,7 +62,7 @@
 
 class TestsView : public SkView {
 public:
-	TestsView() {}
+    TestsView() {}
 
 protected:
     // overrides from SkEventSink
@@ -73,36 +73,36 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorWHITE);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
 
         skiatest::MyReporter reporter;
         skiatest::Iter iter(&reporter);
         skiatest::Test* test;
-        
+
         while ((test = iter.next()) != NULL) {
             test->run();
             SkDELETE(test);
         }
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         this->inval(NULL);
-        
+
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     virtual bool onClick(Click* click) {
         this->inval(NULL);
         return this->INHERITED::onClick(click);
     }
 
-	virtual bool handleKey(SkKey key) {
+    virtual bool handleKey(SkKey key) {
         this->inval(NULL);
         return true;
     }
diff --git a/samplecode/SampleText.cpp b/samplecode/SampleText.cpp
index 7d192f4..8ff36e4 100644
--- a/samplecode/SampleText.cpp
+++ b/samplecode/SampleText.cpp
@@ -221,7 +221,7 @@
 
 class TextSpeedView : public SampleView {
 public:
-	TextSpeedView() {
+    TextSpeedView() {
         fMF = makemf();
 
         fHints = 0;
diff --git a/samplecode/SampleTextAlpha.cpp b/samplecode/SampleTextAlpha.cpp
index de1461f..6333588 100644
--- a/samplecode/SampleTextAlpha.cpp
+++ b/samplecode/SampleTextAlpha.cpp
@@ -31,7 +31,7 @@
     if (bm.config() != SkBitmap::kRGB_565_Config) {
         return;
     }
-    
+
     for (int y = 0; y < bm.height(); y++) {
         for (int x = 0; x < bm.width(); x++) {
             uint16_t c = *bm.getAddr16(x, y);
@@ -44,11 +44,11 @@
 }
 
 class TextAlphaView : public SampleView {
-public:    
-	TextAlphaView() {
+public:
+    TextAlphaView() {
         fByte = 0xFF;
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt)  {
@@ -59,23 +59,23 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         const char* str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
         SkPaint paint;
         SkScalar    x = SkIntToScalar(10);
         SkScalar    y = SkIntToScalar(20);
-        
+
         paint.setFlags(0x105);
-        
+
         paint.setARGB(fByte, 0xFF, 0xFF, 0xFF);
-        
+
         paint.setMaskFilter(SkBlurMaskFilter::Create(SkIntToScalar(3),
                                         SkBlurMaskFilter::kNormal_BlurStyle));
         paint.getMaskFilter()->unref();
-        
+
         SkRandom rand;
-        
+
         for (int ps = 6; ps <= 35; ps++) {
             paint.setColor(rand.nextU() | (0xFF << 24));
             paint.setTextSize(SkIntToScalar(ps));
@@ -94,11 +94,11 @@
             this->inval(NULL);
         }
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         return new Click(this);
     }
-    
+
     virtual bool onClick(Click* click) {
         int y = click->fICurr.fY;
         if (y < 0) {
@@ -110,7 +110,7 @@
         this->inval(NULL);
         return true;
     }
-    
+
 private:
     int fByte;
 
diff --git a/samplecode/SampleTextBox.cpp b/samplecode/SampleTextBox.cpp
index 6a8c50e..d8612db 100644
--- a/samplecode/SampleTextBox.cpp
+++ b/samplecode/SampleTextBox.cpp
@@ -35,27 +35,27 @@
 #endif
 
 static const char gText[] =
-	"When in the Course of human events it becomes necessary for one people "
-	"to dissolve the political bands which have connected them with another "
-	"and to assume among the powers of the earth, the separate and equal "
-	"station to which the Laws of Nature and of Nature's God entitle them, "
-	"a decent respect to the opinions of mankind requires that they should "
-	"declare the causes which impel them to the separation.";
+    "When in the Course of human events it becomes necessary for one people "
+    "to dissolve the political bands which have connected them with another "
+    "and to assume among the powers of the earth, the separate and equal "
+    "station to which the Laws of Nature and of Nature's God entitle them, "
+    "a decent respect to the opinions of mankind requires that they should "
+    "declare the causes which impel them to the separation.";
 
 class TextBoxView : public SampleView {
 public:
-	TextBoxView() {
+    TextBoxView() {
 #if defined(SK_BUILD_FOR_WIN) && defined(SK_FONTHOST_WIN_GDI)
-		LOGFONT lf;
-		sk_bzero(&lf, sizeof(lf));
-		lf.lfHeight = 9;
-		SkTypeface* tf0 = SkCreateTypefaceFromLOGFONT(lf);
-		lf.lfHeight = 12;
-		SkTypeface* tf1 = SkCreateTypefaceFromLOGFONT(lf);
-		// we assert that different sizes should not affect which face we get
-		SkASSERT(tf0 == tf1);
-		tf0->unref();
-		tf1->unref();
+        LOGFONT lf;
+        sk_bzero(&lf, sizeof(lf));
+        lf.lfHeight = 9;
+        SkTypeface* tf0 = SkCreateTypefaceFromLOGFONT(lf);
+        lf.lfHeight = 12;
+        SkTypeface* tf1 = SkCreateTypefaceFromLOGFONT(lf);
+        // we assert that different sizes should not affect which face we get
+        SkASSERT(tf0 == tf1);
+        tf0->unref();
+        tf1->unref();
 #endif
     }
 
@@ -75,24 +75,24 @@
 
         canvas->clipRect(SkRect::MakeWH(w, h));
         canvas->drawColor(bg);
-		SkScalar margin = 20;
+        SkScalar margin = 20;
         SkTextBox tbox;
-		tbox.setMode(SkTextBox::kLineBreak_Mode);
-		tbox.setBox(margin, margin,
-					w - margin, h - margin);
-		tbox.setSpacing(SkIntToScalar(3)/3, 0);
+        tbox.setMode(SkTextBox::kLineBreak_Mode);
+        tbox.setBox(margin, margin,
+                    w - margin, h - margin);
+        tbox.setSpacing(SkIntToScalar(3)/3, 0);
 
-		SkPaint paint;
-		paint.setAntiAlias(true);
+        SkPaint paint;
+        paint.setAntiAlias(true);
         paint.setLCDRenderText(true);
         paint.setColor(fg);
-		tbox.setText(gText, strlen(gText), paint);
+        tbox.setText(gText, strlen(gText), paint);
 
-		for (int i = 9; i < 24; i += 2) {
-			paint.setTextSize(SkIntToScalar(i));
-			tbox.draw(canvas);
-			canvas->translate(0, tbox.getTextHeight() + paint.getFontSpacing());
-		}
+        for (int i = 9; i < 24; i += 2) {
+            paint.setTextSize(SkIntToScalar(i));
+            tbox.draw(canvas);
+            canvas->translate(0, tbox.getTextHeight() + paint.getFontSpacing());
+        }
     }
 
     virtual void onDrawContent(SkCanvas* canvas) {
diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp
index 00d9cba..976f3c8 100644
--- a/samplecode/SampleTextOnPath.cpp
+++ b/samplecode/SampleTextOnPath.cpp
@@ -51,19 +51,19 @@
     SkPaint paint;
     SkPath  path;
     SkMatrix matrix;
-    
+
     path.moveTo(SkIntToScalar(050), SkIntToScalar(200));
     path.quadTo(SkIntToScalar(250), SkIntToScalar(000),
                 SkIntToScalar(450), SkIntToScalar(200));
 
     paint.setAntiAlias(true);
-    
+
     paint.setStyle(SkPaint::kStroke_Style);
     canvas->drawPath(path, paint);
     paint.setStyle(SkPaint::kFill_Style);
     paint.setTextSize(SkIntToScalar(48));
     paint.setTextAlign(SkPaint::kRight_Align);
-    
+
     const char* text = "Reflection";
     size_t      len = strlen(text);
 
@@ -71,16 +71,16 @@
     SkScalar pathLen = meas.getLength();
 
     canvas->drawTextOnPath(text, len, path, NULL, paint);
-    
+
     paint.setColor(SK_ColorRED);
     matrix.setScale(-SK_Scalar1, SK_Scalar1);
     matrix.postTranslate(pathLen, 0);
     canvas->drawTextOnPath(text, len, path, &matrix, paint);
-    
+
     paint.setColor(SK_ColorBLUE);
     matrix.setScale(SK_Scalar1, -SK_Scalar1);
     canvas->drawTextOnPath(text, len, path, &matrix, paint);
-    
+
     paint.setColor(SK_ColorGREEN);
     matrix.setScale(-SK_Scalar1, -SK_Scalar1);
     matrix.postTranslate(pathLen, 0);
@@ -92,7 +92,7 @@
     SkPath      fPath;
     SkScalar    fHOffset;
 
-	TextOnPathView() {
+    TextOnPathView() {
         SkRect r;
         r.set(SkIntToScalar(100), SkIntToScalar(100),
               SkIntToScalar(300), SkIntToScalar(300));
@@ -111,7 +111,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         paint.setAntiAlias(true);
@@ -139,27 +139,27 @@
         paint.setColor(SK_ColorGREEN);
         paint.setStyle(SkPaint::kStroke_Style);
         canvas->drawPath(fPath, paint);
-        
+
         canvas->translate(SkIntToScalar(275), 0);
         textStrokePath(canvas);
 
         canvas->translate(SkIntToScalar(-275), SkIntToScalar(250));
         textPathMatrix(canvas);
-        
+
         if (REPEAT_COUNT > 1)
             this->inval(NULL);
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         fHints += 1;
         this->inval(NULL);
         return this->INHERITED::onFindClickHandler(x, y);
     }
-    
+
     virtual bool onClick(Click* click) {
         return this->INHERITED::onClick(click);
     }
-    
+
 private:
     int fHints;
     typedef SampleView INHERITED;
diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp
index 4291468..07dcb40 100755
--- a/samplecode/SampleTextureDomain.cpp
+++ b/samplecode/SampleTextureDomain.cpp
@@ -78,7 +78,7 @@
         canvas->drawBitmapRect(deviceBitmap, &srcRect, dstRect, &paint);
 
         // Test that bitmap blurring using a subrect
-        // renders correctly 
+        // renders correctly
         srcRect.setXYWH(1, 1, 3, 3);
         dstRect.setXYWH(5.0f, 405.0f, 305.0f, 305.0f);
         SkMaskFilter* mf = SkBlurMaskFilter::Create(
@@ -94,7 +94,7 @@
         // but it will test a code path in SkGpuDevice::drawBitmap
         // that handles blurs with rects transformed to non-
         // orthogonal rects. It also tests the NULL src rect handling
-	mf = SkBlurMaskFilter::Create(
+    mf = SkBlurMaskFilter::Create(
             5,
             SkBlurMaskFilter::kNormal_BlurStyle,
             SkBlurMaskFilter::kHighQuality_BlurFlag);
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp
index d72544b..e7b6a7f 100644
--- a/samplecode/SampleTiling.cpp
+++ b/samplecode/SampleTiling.cpp
@@ -27,14 +27,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);
@@ -66,7 +66,7 @@
     SkPicture*          fTextPicture;
     SkBlurDrawLooper    fLooper;
 public:
-	TilingView()
+    TilingView()
             : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2),
                       0x88000000) {
         fTextPicture = new SkPicture();
@@ -80,7 +80,7 @@
     }
 
     SkBitmap    fTexture[SK_ARRAY_COUNT(gConfigs)];
-	
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -90,15 +90,15 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(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" };
 
@@ -122,12 +122,12 @@
 
                     p.setTextAlign(SkPaint::kCenter_Align);
                     textCanvas->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++) {
@@ -138,12 +138,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;
                     }
                 }
@@ -162,7 +162,7 @@
 
         canvas->drawPicture(*fTextPicture);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleTinyBitmap.cpp b/samplecode/SampleTinyBitmap.cpp
index 605d829..d682317 100644
--- a/samplecode/SampleTinyBitmap.cpp
+++ b/samplecode/SampleTinyBitmap.cpp
@@ -40,11 +40,11 @@
 class TinyBitmapView : public SampleView {
     SkBitmap    fBM;
 public:
-	TinyBitmapView() {
+    TinyBitmapView() {
         fBM = make_bitmap();
         this->setBGColor(0xFFDDDDDD);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -54,7 +54,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) {
         SkAutoLockPixels alp(*bm);  // needed for ctable
         bm->setIsOpaque(isOpaque);
@@ -63,7 +63,7 @@
             ctable->setIsOpaque(isOpaque);
         }
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkShader* s = SkShader::CreateBitmapShader(fBM, SkShader::kRepeat_TileMode,
                                                    SkShader::kMirror_TileMode);
@@ -71,7 +71,7 @@
         paint.setShader(s)->unref();
         canvas->drawPaint(paint);
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
diff --git a/samplecode/SampleTriangles.cpp b/samplecode/SampleTriangles.cpp
index e2ba652..d6adc16 100644
--- a/samplecode/SampleTriangles.cpp
+++ b/samplecode/SampleTriangles.cpp
@@ -44,12 +44,12 @@
 public:
     SkPath fPaths[COUNT_PROCS];
 
-	TriangleView() {
+    TriangleView() {
         for (size_t i = 0; i < COUNT_PROCS; i++) {
             gProcs[i](&fPaths[i]);
         }
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -59,26 +59,26 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorGRAY);
     }
-    
+
     static void draw_path(SkCanvas* canvas, const SkPaint& pathPaint,
                           const SkPath& path, const SkPaint& triPaint) {
         canvas->drawPath(path, pathPaint);
-        
+
         int n = path.getPoints(NULL, 0);
         SkPoint* pts = new SkPoint[n];
         path.getPoints(pts, n);
-        
+
         SkTDArray<SkPoint> triangles;
         if (SkConcaveToTriangles(n, pts, &triangles)) {
             canvas->drawVertices(SkCanvas::kTriangles_VertexMode,
                                  triangles.count(), triangles.begin(), NULL,
                                  NULL, NULL, NULL, 0, triPaint);
         }
-        
+
         SkPaint paint;
         paint.setColor(SK_ColorGREEN);
         paint.setStrokeWidth(SkIntToScalar(4));
@@ -88,11 +88,11 @@
 
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
-        
+
         canvas->translate(SIZE/2, SIZE/2);
 
         SkPaint pathPaint, triPaint;
-        
+
         pathPaint.setColor(SK_ColorBLUE);
         pathPaint.setStrokeWidth(SIZE / 12);
 
@@ -108,12 +108,12 @@
 
             pathPaint.setStyle(SkPaint::kStroke_Style);
             draw_path(canvas, pathPaint, fPaths[i], triPaint);
-            
+
             canvas->restore();
             canvas->translate(SIZE * 6 / 5, 0);
         }
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
diff --git a/samplecode/SampleTypeface.cpp b/samplecode/SampleTypeface.cpp
index ccdb086..9bc8762 100644
--- a/samplecode/SampleTypeface.cpp
+++ b/samplecode/SampleTypeface.cpp
@@ -76,7 +76,7 @@
     SkTypeface* fFaces[gFaceCount];
 
 public:
-	TypefaceView() {
+    TypefaceView() {
         test_4444_dither();
         for (int i = 0; i < gFaceCount; i++) {
             fFaces[i] = SkTypeface::CreateFromName(gFaces[i].fName,
diff --git a/samplecode/SampleUnitMapper.cpp b/samplecode/SampleUnitMapper.cpp
index 09d0f14..8cc9afb 100644
--- a/samplecode/SampleUnitMapper.cpp
+++ b/samplecode/SampleUnitMapper.cpp
@@ -69,7 +69,7 @@
         }
         this->setViews();
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -79,14 +79,14 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         paint.setAntiAlias(true);
         paint.setColor(0xFF8888FF);
 
         SkRect r = { 0, 0, SK_Scalar1, SK_Scalar1 };
-        
+
         canvas->concat(fMatrix);
         canvas->drawRect(r, paint);
 
@@ -94,7 +94,7 @@
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(0);
         paint.setStrokeCap(SkPaint::kRound_Cap);
-        
+
         SkPath path;
         path.moveTo(fPts[0]);
         path.cubicTo(fPts[1], fPts[2], fPts[3]);
@@ -145,10 +145,10 @@
         fDragIndex = hittest(x, y);
         return fDragIndex >= 0 ? new Click(this) : NULL;
     }
-    
+
     virtual bool onClick(Click* click) {
         if (fDragIndex >= 0) {
-            if (!invertPt(click->fCurr.fX, click->fCurr.fY, 
+            if (!invertPt(click->fCurr.fX, click->fCurr.fY,
                           &fPts[fDragIndex])) {
                 return false;
             }
@@ -159,7 +159,7 @@
         }
         return false;
     }
-    
+
 private:
     int fDragIndex;
 
diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp
index b59442d..d6dd7ea 100644
--- a/samplecode/SampleVertices.cpp
+++ b/samplecode/SampleVertices.cpp
@@ -56,7 +56,7 @@
     SkShader*   fShader1;
 
 public:
-	VerticesView() {
+    VerticesView() {
         SkIPoint    size;
 
         fShader0 = make_shader0(&size);
diff --git a/samplecode/SampleWarp.cpp b/samplecode/SampleWarp.cpp
index b421c60..323df80 100644
--- a/samplecode/SampleWarp.cpp
+++ b/samplecode/SampleWarp.cpp
@@ -62,30 +62,30 @@
     canvas->drawBitmap(mask, 0, 0, &paint);
     paint.setMaskFilter(NULL);
     canvas->drawBitmap(orig, -offset.fX, -offset.fY, &paint);
-    
+
     canvas->translate(120, 0);
-    
+
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(orig, -offset.fX, -offset.fY, &paint);
-    
+
     canvas->translate(120, 0);
-    
+
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(orig, -offset.fX, -offset.fY, &paint);
-    
+
     canvas->translate(120, 0);
-    
+
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(orig, -offset.fX, -offset.fY, &paint);
-    
+
     canvas->translate(120, 0);
-    
+
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
     canvas->drawBitmap(mask, 0, 0, &paint);
@@ -116,13 +116,13 @@
 
     pts[0].set(x0, y0);
     pts[3].set(x3, y3);
-    
+
     tmp = SkPointInterp(pts[0], pts[3], SK_Scalar1/3);
     tmp2 = pts[0] - tmp;
     tmp2.rotateCW();
     tmp2.scale(scale);
     pts[1] = tmp + tmp2;
-    
+
     tmp = SkPointInterp(pts[0], pts[3], 2*SK_Scalar1/3);
     tmp2 = pts[3] - tmp;
     tmp2.rotateCW();
@@ -131,40 +131,40 @@
 }
 
 static void test_patch(SkCanvas* canvas, const SkBitmap& bm, SkScalar scale) {
-    SkCubicBoundary cubic;    
+    SkCubicBoundary cubic;
     set_cubic(cubic.fPts + 0, 0, 0, 100, 0, scale);
     set_cubic(cubic.fPts + 3, 100, 0, 100, 100, scale);
     set_cubic(cubic.fPts + 6, 100, 100,  0, 100, -scale);
     set_cubic(cubic.fPts + 9, 0, 100, 0, 0, 0);
-    
+
     SkBoundaryPatch patch;
     patch.setBoundary(&cubic);
-    
+
     const int Rows = 16;
     const int Cols = 16;
     SkPoint pts[Rows * Cols];
     patch.evalPatch(pts, Rows, Cols);
-    
+
     SkPaint paint;
     paint.setAntiAlias(true);
     paint.setFilterBitmap(true);
     paint.setStrokeWidth(1);
     paint.setStrokeCap(SkPaint::kRound_Cap);
-    
+
     canvas->translate(50, 50);
     canvas->scale(3, 3);
-    
+
     SkMeshUtils::Draw(canvas, bm, Rows, Cols, pts, NULL, paint);
 }
 
 static void test_drag(SkCanvas* canvas, const SkBitmap& bm,
                       const SkPoint& p0, const SkPoint& p1) {
-    SkCubicBoundary cubic;    
+    SkCubicBoundary cubic;
     set_cubic(cubic.fPts + 0, 0, 0, 100, 0, 0);
     set_cubic(cubic.fPts + 3, 100, 0, 100, 100, 0);
     set_cubic(cubic.fPts + 6, 100, 100,  0, 100, 0);
     set_cubic(cubic.fPts + 9, 0, 100, 0, 0, 0);
-    
+
 #if 0
     cubic.fPts[1] += p1 - p0;
     cubic.fPts[2] += p1 - p0;
@@ -182,21 +182,21 @@
 
     SkBoundaryPatch patch;
     patch.setBoundary(&cubic);
-    
+
     const int Rows = 16;
     const int Cols = 16;
     SkPoint pts[Rows * Cols];
     patch.evalPatch(pts, Rows, Cols);
-    
+
     SkPaint paint;
     paint.setAntiAlias(true);
     paint.setFilterBitmap(true);
     paint.setStrokeWidth(1);
     paint.setStrokeCap(SkPaint::kRound_Cap);
-    
+
     canvas->translate(50, 50);
     canvas->scale(3, 3);
-    
+
     SkAutoCanvasRestore acr(canvas, true);
 
     SkRect r = { 0, 0, 100, 100 };
@@ -256,7 +256,7 @@
     fPts = new SkPoint[fCount * 2];
     fTex = fPts + fCount;
     memcpy(fPts, src.fPts, fCount * 2 * sizeof(SkPoint));
-    
+
     delete[] fIndices;
     fIndexCount = src.fIndexCount;
     fIndices = new uint16_t[fIndexCount];
@@ -281,7 +281,7 @@
     delete[] fIndices;
     fIndexCount = rows * cols * 6;
     fIndices = new uint16_t[fIndexCount];
-    
+
     SkPoint* pts = fPts;
     const SkScalar dx = bounds.width() / rows;
     const SkScalar dy = bounds.height() / cols;
@@ -296,7 +296,7 @@
             pts += 1;
             tex->set(texture.fLeft + x*dtx, texture.fTop + y*dty);
             tex += 1;
-            
+
             if (y < cols && x < rows) {
                 *idx++ = index;
                 *idx++ = index + rows + 1;
@@ -305,7 +305,7 @@
                 *idx++ = index + 1;
                 *idx++ = index + rows + 1;
                 *idx++ = index + rows + 2;
-                
+
                 index += 1;
             }
         }
@@ -332,22 +332,22 @@
     SkBitmap    fBitmap;
     SkMatrix    fMatrix, fInverse;
 public:
-	WarpView() {
+    WarpView() {
         SkBitmap bm;
 //        SkImageDecoder::DecodeFile("/skimages/marker.png", &bm);
         SkImageDecoder::DecodeFile("/skimages/logo.gif", &bm);
    //     SkImageDecoder::DecodeFile("/beach_shot.JPG", &bm);
         fBitmap = bm;
-        
+
         SkRect bounds, texture;
         texture.set(0, 0, SkIntToScalar(fBitmap.width()),
                     SkIntToScalar(fBitmap.height()));
         bounds = texture;
-        
+
 //        fMesh.init(bounds, fBitmap.width() / 40, fBitmap.height() / 40, texture);
         fMesh.init(bounds, fBitmap.width()/16, fBitmap.height()/16, texture);
         fOrig = fMesh;
-        
+
         fP0.set(0, 0);
         fP1 = fP0;
 
@@ -364,7 +364,7 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     static SkPoint apply_warp(const SkVector& drag, SkScalar dragLength,
                               const SkPoint& dragStart, const SkPoint& dragCurr,
                               const SkPoint& orig) {
@@ -373,10 +373,10 @@
         if (length <= kNearlyZero) {
             return orig;
         }
-        
+
         const SkScalar period = 20;
         const SkScalar mag = dragLength / 3;
-        
+
         SkScalar d = length / (period);
         d = mag * SkScalarSin(d) / d;
         SkScalar dx = delta.fX * d;
@@ -385,7 +385,7 @@
         SkScalar py = orig.fY + dy;
         return SkPoint::Make(px, py);
     }
-    
+
     static SkPoint apply_warp2(const SkVector& drag, SkScalar dragLength,
                               const SkPoint& dragStart, const SkPoint& dragCurr,
                               const SkPoint& orig) {
@@ -394,24 +394,24 @@
         if (length <= kNearlyZero) {
             return orig;
         }
-        
+
         const SkScalar period = 10 + dragLength/4;
         const SkScalar mag = dragLength / 3;
-        
+
         SkScalar d = length / (period);
         if (d > SK_ScalarPI) {
             d = SK_ScalarPI;
         }
 
         d = -mag * SkScalarSin(d);
-        
+
         SkScalar dx = delta.fX * d;
         SkScalar dy = delta.fY * d;
         SkScalar px = orig.fX + dx;
         SkScalar py = orig.fY + dy;
         return SkPoint::Make(px, py);
     }
-    
+
     typedef SkPoint (*WarpProc)(const SkVector& drag, SkScalar dragLength,
                              const SkPoint& dragStart, const SkPoint& dragCurr,
                              const SkPoint& orig);
@@ -428,11 +428,11 @@
         fP0 = p0;
         fP1 = p1;
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorLTGRAY);
      //   test_bigblur(canvas); return;
-        
+
         canvas->concat(fMatrix);
 
         SkPaint paint;
@@ -441,18 +441,18 @@
                                                      SkShader::kClamp_TileMode,
                                                      SkShader::kClamp_TileMode))->unref();
         fMesh.draw(canvas, paint); //return;
-        
+
         paint.setShader(NULL);
         paint.setColor(SK_ColorRED);
         fMesh.draw(canvas, paint);
 
     //    test_drag(canvas, fBitmap, fP0, fP1);
     }
-    
+
     virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
         return new Click(this);
     }
-    
+
     virtual bool onClick(Click* click) {
         SkPoint pts[2] = { click->fOrig, click->fCurr };
         fInverse.mapPoints(pts, 2);
@@ -460,7 +460,7 @@
         this->inval(NULL);
         return true;
     }
-    
+
 private:
     SkIRect    fBase, fRect;
     SkPoint     fP0, fP1;
diff --git a/samplecode/SampleWritePixels.cpp b/samplecode/SampleWritePixels.cpp
index 45e9f41..f9df8f5 100644
--- a/samplecode/SampleWritePixels.cpp
+++ b/samplecode/SampleWritePixels.cpp
@@ -32,8 +32,8 @@
 class WritePixelsView : public SampleView {
     SkPath fPath;
 public:
-	WritePixelsView() {}
-    
+    WritePixelsView() {}
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -43,13 +43,13 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     virtual void onDrawContent(SkCanvas* canvas) {
         SkBitmap bitmap;
         create_bitmap(&bitmap);
         int x = bitmap.width() / 2;
         int y = bitmap.height() / 2;
-        
+
         SkBitmap subset;
         bitmap.extractSubset(&subset, SkIRect::MakeXYWH(x, y, x, y));
 
@@ -58,7 +58,7 @@
         canvas->writePixels(bitmap, 0, 0);
         canvas->writePixels(subset, 0, 0);
     }
-    
+
 private:
     typedef SampleView INHERITED;
 };
diff --git a/samplecode/SampleXfermodes.cpp b/samplecode/SampleXfermodes.cpp
index 4ad967e..531e0cd 100644
--- a/samplecode/SampleXfermodes.cpp
+++ b/samplecode/SampleXfermodes.cpp
@@ -136,10 +136,10 @@
     const static int H = 64;
     bool fOnce;
 
-	XfermodesView() {
+    XfermodesView() {
         fOnce = false;
     }
-    
+
     void init() {
         if (fOnce) {
             return;
diff --git a/samplecode/SampleXfermodesBlur.cpp b/samplecode/SampleXfermodesBlur.cpp
index feccf44..9d368a2 100644
--- a/samplecode/SampleXfermodesBlur.cpp
+++ b/samplecode/SampleXfermodesBlur.cpp
@@ -131,7 +131,7 @@
         if (false) {
             SkPaint paint;
             paint.setAntiAlias(true);
-            
+
             SkRect r0 = { 0, 0, 10.5f, 20 };
             SkRect r1 = { 10.5f, 10, 20, 30 };
             paint.setColor(SK_ColorRED);
diff --git a/samplecode/TransitionView.cpp b/samplecode/TransitionView.cpp
index 7a50f11..95938ef 100644
--- a/samplecode/TransitionView.cpp
+++ b/samplecode/TransitionView.cpp
@@ -24,15 +24,15 @@
 public:
     TransitionView(SkView* prev, SkView* next, int direction) : fInterp(4, 2){
         fAnimationDirection = (Direction)(1 << (direction % 8));
-        
+
         fPrev = prev;
         fPrev->setClipToBounds(false);
         fPrev->setVisibleP(true);
         (void)SampleView::SetUsePipe(fPrev, SkOSMenu::kOffState);
-        //Not calling unref because fPrev is assumed to have been created, so 
+        //Not calling unref because fPrev is assumed to have been created, so
         //this will result in a transfer of ownership
         this->attachChildToBack(fPrev);
-        
+
         fNext = next;
         fNext->setClipToBounds(true);
         fNext->setVisibleP(true);
@@ -40,20 +40,20 @@
         //Calling unref because next is a newly created view and TransitionView
         //is now the sole owner of fNext
         this->attachChildToFront(fNext)->unref();
-        
+
         fDone = false;
         //SkDebugf("--created transition\n");
     }
-    
+
     ~TransitionView(){
         //SkDebugf("--deleted transition\n");
     }
-    
+
     virtual void requestMenu(SkOSMenu* menu) {
         if (SampleView::IsSampleView(fNext))
             ((SampleView*)fNext)->requestMenu(menu);
     }
-    
+
 protected:
     virtual bool onQuery(SkEvent* evt) {
         if (SampleCode::TitleQ(*evt)) {
@@ -82,7 +82,7 @@
         if (evt.isType("transition-done")) {
             fNext->setLoc(0, 0);
             fNext->setClipToBounds(false);
-            SkEvent* evt = new SkEvent(gReplaceTransitionEvt, 
+            SkEvent* evt = new SkEvent(gReplaceTransitionEvt,
                                        this->getParent()->getSinkID());
             evt->setFast32(fNext->getSinkID());
             //increate ref count of fNext so it survives detachAllChildren
@@ -101,7 +101,7 @@
         if (is_overview(fNext) || is_overview(fPrev)) {
             fPipeState = SkOSMenu::kOffState;
         }
-        
+
         SkScalar values[4];
         SkInterpolator::Result result = fInterp.timeToValues(SkTime::GetMSecs(), values);
         //SkDebugf("transition %x %d pipe:%d\n", this, result, fUsePipe);
@@ -118,13 +118,13 @@
             fDone = true;
         }
     }
-    
+
     virtual void onSizeChange() {
         this->INHERITED::onSizeChange();
-        
+
         fNext->setSize(this->width(), this->height());
         fPrev->setSize(this->width(), this->height());
-        
+
         SkScalar lr = 0, ud = 0;
         if (fAnimationDirection & (kLeftDirection|kULDirection|kDLDirection))
             lr = this->width();
@@ -134,13 +134,13 @@
             ud = this->height();
         if (fAnimationDirection & (kDownDirection|kDLDirection|kDRDirection))
             ud = -this->height();
-        
+
         fBegin[kPrevX] = fBegin[kPrevY] = 0;
         fBegin[kNextX] = lr;
         fBegin[kNextY] = ud;
         fNext->setLocX(lr);
         fNext->setLocY(ud);
-        
+
         if (is_transition(fPrev))
             lr = ud = 0;
         fEnd[kPrevX] = -lr;
@@ -151,7 +151,7 @@
         fInterp.setKeyFrame(0, SkTime::GetMSecs(), fBegin, blend);
         fInterp.setKeyFrame(1, SkTime::GetMSecs()+500, fEnd, blend);
     }
-    
+
 private:
     enum {
         kPrevX = 0,
@@ -163,7 +163,7 @@
     SkView* fNext;
     bool    fDone;
     SkInterpolator fInterp;
-    
+
     enum Direction{
         kUpDirection    = 1,
         kURDirection    = 1 << 1,
@@ -174,11 +174,11 @@
         kLeftDirection  = 1 << 6,
         kULDirection    = 1 << 7
     };
-    
+
     Direction fAnimationDirection;
     SkScalar fBegin[4];
     SkScalar fEnd[4];
-    
+
     typedef SampleView INHERITED;
 };