Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@7939 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h
index a1367ec..8b31415 100644
--- a/src/core/SkPictureFlat.h
+++ b/src/core/SkPictureFlat.h
@@ -501,7 +501,7 @@
     T* unflatten(int index) const {
         // fData is sorted so it is necessary to search through it to find the
         // SkFlatData with the specified index
-        // TODO: findAndReplace makes it a bit difficult but there must be 
+        // TODO: findAndReplace makes it a bit difficult but there must be
         // a better way to perform this mapping
         for (int i = 0; i < fData.count(); ++i) {
             const SkFlatData* element = fData[i];
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index b72f2d1..c840834 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -67,7 +67,7 @@
 // this method)
 static inline uint32_t getPaintOffset(DrawType op, uint32_t opSize) {
     // These offsets are where the paint would be if the op size doesn't overflow
-    static const uint8_t gPaintOffsets[LAST_DRAWTYPE_ENUM + 1] = {	  
+    static const uint8_t gPaintOffsets[LAST_DRAWTYPE_ENUM + 1] = {
         0,  // UNUSED - no paint
         0,  // CLIP_PATH - no paint
         0,  // CLIP_REGION - no paint
@@ -99,13 +99,13 @@
         0,  // RESTORE - no paint
         0,  // ROTATE - no paint
         0,  // SAVE - no paint
-        0,  // SAVE_LAYER - see below - this paint's location varies 
+        0,  // SAVE_LAYER - see below - this paint's location varies
         0,  // SCALE - no paint
         0,  // SET_MATRIX - no paint
         0,  // SKEW - no paint
         0,  // TRANSLATE - no paint
         0,  // NOOP - no paint
-    };	
+    };
 
     SkASSERT(sizeof(gPaintOffsets) == LAST_DRAWTYPE_ENUM + 1);
     SkASSERT((unsigned)op <= (unsigned)LAST_DRAWTYPE_ENUM);
@@ -215,7 +215,7 @@
 
 // Is the supplied paint simply a color?
 static bool is_simple(const SkPaint& p) {
-    intptr_t orAccum = (intptr_t)p.getPathEffect()  | 
+    intptr_t orAccum = (intptr_t)p.getPathEffect()  |
                        (intptr_t)p.getShader()      |
                        (intptr_t)p.getXfermode()    |
                        (intptr_t)p.getMaskFilter()  |
@@ -227,14 +227,14 @@
 }
 
 /*
- * Restore has just been called (but not recorded), look back at the 
+ * Restore has just been called (but not recorded), look back at the
  * matching save* and see if we are in the configuration:
  *   SAVE_LAYER
  *       DRAW_BITMAP|DRAW_BITMAP_MATRIX|DRAW_BITMAP_NINE|DRAW_BITMAP_RECT_TO_RECT
  *   RESTORE
  * where the saveLayer's color can be moved into the drawBitmap*'s paint
  */
-static bool remove_save_layer1(SkWriter32* writer, int32_t offset, 
+static bool remove_save_layer1(SkWriter32* writer, int32_t offset,
                                SkPaintDictionary* paintDict) {
 
     int32_t restoreOffset = (int32_t)writer->size();
@@ -292,8 +292,8 @@
         uint32_t* ptr = writer->peek32(saveLayerOffset);
         *ptr = (*ptr & MASK_24) | (NOOP << 24);
         return true;
-    } 
-    
+    }
+
     if (0 == dbmPaintId) {
         // In this case just make the DBM* use the saveLayer's paint, kill the saveLayer
         // and signal the caller (by returning true) to not add the RESTORE op
@@ -303,7 +303,7 @@
         SkASSERT(0 == *ptr);
         *ptr = saveLayerPaintId;
         return true;
-    } 
+    }
 
     SkAutoTDelete<SkPaint> saveLayerPaint(paintDict->unflatten(saveLayerPaintId));
     if (NULL == saveLayerPaint.get() || !is_simple(*saveLayerPaint)) {
@@ -322,7 +322,7 @@
     if (NULL == dbmPaint.get() || dbmPaint->getColor() != layerColor) {
         return false;
     }
-    
+
     SkColor newColor = SkColorSetA(dbmPaint->getColor(),
                                    SkColorGetA(saveLayerPaint->getColor()));
     dbmPaint->setColor(newColor);
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index c39aaf8..b4f02ba 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -13,7 +13,7 @@
 
 namespace {
 
-static void aa_rect_attributes(bool useCoverage, GrAttribBindings* bindings, 
+static void aa_rect_attributes(bool useCoverage, GrAttribBindings* bindings,
                                GrDrawState::AttribIndex* index) {
     if (useCoverage) {
         *bindings = GrDrawState::kCoverage_AttribBindingsBit;
@@ -211,7 +211,7 @@
         this->fillAARect(gpu, target, r, useVertexCoverage);
         return;
     }
-    
+
     // position + color/coverage
     static const GrVertexAttrib kVertexAttribs[] = {
         {kVec2f_GrVertexAttribType, 0},
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 6a793bc..e797546 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -72,7 +72,7 @@
     sizeof(float),          // kFloat_GrVertexAttribType
     2*sizeof(float),        // kVec2_GrVertexAttribType
     3*sizeof(float),        // kVec3_GrVertexAttribType
-    4*sizeof(float),        // kVec4_GrVertexAttribType 
+    4*sizeof(float),        // kVec4_GrVertexAttribType
     4*sizeof(char)          // kCVec4_GrVertexAttribType
 };
 
@@ -125,7 +125,7 @@
     static const GrVertexAttrib kPositionAttrib = {kVec2f_GrVertexAttribType, 0};
     fVertexAttribs.reset();
     fVertexAttribs.push_back(kPositionAttrib);
-    
+
     fCommon.fAttribBindings = kDefault_AttribBindings;
 
     fAttribIndices[kPosition_AttribIndex] = 0;
@@ -152,7 +152,7 @@
 
         GrVertexAttribArray<6> attribs;
         GrAssert(0 == vertex_size(attribs.begin(), attribs.count()));
- 
+
         GrVertexAttrib currAttrib = {kFloat_GrVertexAttribType, 0};
         attribs.push_back(currAttrib);
         GrAssert(sizeof(float) == vertex_size(attribs.begin(), attribs.count()));
@@ -170,15 +170,15 @@
         GrAssert(4*sizeof(char) + 2*sizeof(float) == vertex_size(attribs.begin(), attribs.count()));
         currAttrib.set(kVec3f_GrVertexAttribType, attribs[1].fOffset + 2*sizeof(float));
         attribs.push_back(currAttrib);
-        GrAssert(4*sizeof(char) + 2*sizeof(float) + 3*sizeof(float) == 
+        GrAssert(4*sizeof(char) + 2*sizeof(float) + 3*sizeof(float) ==
                  vertex_size(attribs.begin(), attribs.count()));
         currAttrib.set(kFloat_GrVertexAttribType, attribs[2].fOffset + 3*sizeof(float));
         attribs.push_back(currAttrib);
-        GrAssert(4*sizeof(char) + 2*sizeof(float) + 3*sizeof(float) + sizeof(float) == 
+        GrAssert(4*sizeof(char) + 2*sizeof(float) + 3*sizeof(float) + sizeof(float) ==
                  vertex_size(attribs.begin(), attribs.count()));
         currAttrib.set(kVec4f_GrVertexAttribType, attribs[3].fOffset + sizeof(float));
         attribs.push_back(currAttrib);
-        GrAssert(4*sizeof(char) + 2*sizeof(float) + 3*sizeof(float) + sizeof(float) + 4*sizeof(float) == 
+        GrAssert(4*sizeof(char) + 2*sizeof(float) + 3*sizeof(float) + sizeof(float) + 4*sizeof(float) ==
                  vertex_size(attribs.begin(), attribs.count()));
 
         GrAttribBindings tcMask = 0;
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index fd11d21..4ae2c47 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -38,7 +38,7 @@
 static const int kGrVertexAttribTypeCount = kLast_GrVertexAttribType + 1;
 
 struct GrVertexAttrib {
-    inline void set(GrVertexAttribType type, size_t offset) { 
+    inline void set(GrVertexAttribType type, size_t offset) {
         fType = type; fOffset = offset;
     }
     bool operator==(const GrVertexAttrib& other) const {
@@ -151,21 +151,21 @@
     };
 
    /**
-     * The format of vertices is represented as an array of vertex attribute 
-     * pair, with each pair representing the type of the attribute and the 
-     * offset in the vertex structure (see GrVertexAttrib, above). 
+     * The format of vertices is represented as an array of vertex attribute
+     * pair, with each pair representing the type of the attribute and the
+     * offset in the vertex structure (see GrVertexAttrib, above).
      *
      * This will only set up the vertex geometry. To bind the attributes in
-     * the shaders, attribute indices and attribute bindings need to be set 
+     * the shaders, attribute indices and attribute bindings need to be set
      * as well.
      */
 
     /**
-     *  Sets vertex attributes for next draw. 
+     *  Sets vertex attributes for next draw.
      *
-     *  @param attribs    the array of vertex attributes to set. 
+     *  @param attribs    the array of vertex attributes to set.
      *  @param count      the number of attributes being set.
-     *                    limited to a count of kVertexAttribCnt. 
+     *                    limited to a count of kVertexAttribCnt.
      */
     void setVertexAttribs(const GrVertexAttrib attribs[], int count);
 
@@ -175,7 +175,7 @@
     size_t getVertexSize() const;
 
     /**
-     *  Sets default vertex attributes for next draw. 
+     *  Sets default vertex attributes for next draw.
      *
      *  This will also set default vertex attribute indices and bindings
      */
@@ -253,10 +253,10 @@
     ////
 
     /**
-     * The vertex data used by the current program is represented as a bitfield 
-     * of flags. Programs always use positions and may also use texture 
-     * coordinates, per-vertex colors, per-vertex coverage and edge data. Each 
-     * stage can use the explicit texture coordinates as its input texture 
+     * The vertex data used by the current program is represented as a bitfield
+     * of flags. Programs always use positions and may also use texture
+     * coordinates, per-vertex colors, per-vertex coverage and edge data. Each
+     * stage can use the explicit texture coordinates as its input texture
      * coordinates or it may use the positions as texture coordinates.
      */
 
@@ -342,10 +342,10 @@
     /**
      * Vertex attribute indices map the data set in the vertex attribute array
      * to the bindings specified in the attribute bindings. Each binding type
-     * has an associated index in the attribute array. This index is used to 
-     * look up the vertex attribute data from the array, and potentially as the 
+     * has an associated index in the attribute array. This index is used to
+     * look up the vertex attribute data from the array, and potentially as the
      * attribute index if we're binding attributes in GL.
-     * 
+     *
      * Indices which do not have active attribute bindings will be ignored.
      */
 
@@ -367,11 +367,11 @@
     };
 
     ////////////////////////////////////////////////////////////////////////////
-    // Helpers to set attribute indices. These should match the index in the 
-    // current attribute index array. 
+    // Helpers to set attribute indices. These should match the index in the
+    // current attribute index array.
 
     /**
-     *  Sets index for next draw. This is used to look up the offset 
+     *  Sets index for next draw. This is used to look up the offset
      *  from the current vertex attribute array and to bind the attributes.
      *
      *  @param index      the attribute index we're setting
@@ -1198,7 +1198,7 @@
             }
         }
         for (int i = 0; i < kAttribIndexCount; ++i) {
-            if ((i == kPosition_AttribIndex || 
+            if ((i == kPosition_AttribIndex ||
                     s.fCommon.fAttribBindings & kAttribIndexMasks[i]) &&
                 fAttribIndices[i] != s.fAttribIndices[i]) {
                 return false;
@@ -1329,7 +1329,7 @@
                 return false;
             }
             for (int i = 0; i < kAttribIndexCount; ++i) {
-                if ((i == kPosition_AttribIndex || 
+                if ((i == kPosition_AttribIndex ||
                      state.fCommon.fAttribBindings & kAttribIndexMasks[i]) &&
                     fAttribIndices[i] != state.fAttribIndices[i]) {
                     return false;
@@ -1338,7 +1338,7 @@
             if (fVertexAttribs.count() != state.fVertexAttribs.count()) {
                 return false;
             }
-            for (int i = 0; i < fVertexAttribs.count(); ++i) 
+            for (int i = 0; i < fVertexAttribs.count(); ++i)
                 if (fVertexAttribs[i] != state.fVertexAttribs[i]) {
                     return false;
             }
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 781e15f..60bae63 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -196,7 +196,7 @@
         desc->fColorAttributeIndex = drawState.getAttribIndex(GrDrawState::kColor_AttribIndex);
     } else {
         desc->fColorAttributeIndex = GrDrawState::kColorOverrideAttribIndexValue;
-    } 
+    }
     if (requiresAttributeCoverage) {
         desc->fCoverageAttributeIndex = drawState.getAttribIndex(GrDrawState::kCoverage_AttribIndex);
     } else {
@@ -1015,14 +1015,14 @@
                                builder.positionAttribute().c_str()));
     GL_CALL(BindAttribLocation(fProgramID, fDesc.fColorAttributeIndex, COL_ATTR_NAME));
     GL_CALL(BindAttribLocation(fProgramID, fDesc.fCoverageAttributeIndex, COV_ATTR_NAME));
- 
+
     if (fDesc.fAttribBindings & GrDrawState::kEdge_AttribBindingsBit) {
         GL_CALL(BindAttribLocation(fProgramID, fDesc.fEdgeAttributeIndex, EDGE_ATTR_NAME));
     }
     if (GrDrawState::AttributesBindExplicitTexCoords(fDesc.fAttribBindings)) {
         GL_CALL(BindAttribLocation(fProgramID, fDesc.fTexCoordAttributeIndex, TEX_ATTR_NAME));
     }
-    
+
     GL_CALL(LinkProgram(fProgramID));
 
     GrGLint linked = GR_GL_INIT_ZERO;
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index e5a7183..c65f0b6 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -224,7 +224,7 @@
     uint32_t usedAttribArraysMask = 0;
     const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttribs();
     int vertexAttribCount = this->getDrawState().getVertexAttribCount();
-    for (int vertexAttribIndex = 0; vertexAttribIndex < vertexAttribCount; 
+    for (int vertexAttribIndex = 0; vertexAttribIndex < vertexAttribCount;
          ++vertexAttribIndex, ++vertexAttrib) {
 
         usedAttribArraysMask |= (1 << vertexAttribIndex);