Remove trailing whitespace.

Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/src/gpu/GrShaderVar.h b/src/gpu/GrShaderVar.h
index 5a379b9..29e056c 100644
--- a/src/gpu/GrShaderVar.h
+++ b/src/gpu/GrShaderVar.h
@@ -29,7 +29,7 @@
     };
 
     /**
-     * Values for array count that have special meaning. We allow 1-sized arrays.git 
+     * Values for array count that have special meaning. We allow 1-sized arrays.git
      */
     enum {
         kNonArray     =  0, // not an array
diff --git a/src/gpu/GrSurfaceContextPriv.h b/src/gpu/GrSurfaceContextPriv.h
index bd3d2de..4a45f8f 100644
--- a/src/gpu/GrSurfaceContextPriv.h
+++ b/src/gpu/GrSurfaceContextPriv.h
@@ -18,7 +18,7 @@
     GrContext* getContext() { return fSurfaceContext->fContext; }
 
 private:
-    explicit GrSurfaceContextPriv(GrSurfaceContext* surfaceContext) 
+    explicit GrSurfaceContextPriv(GrSurfaceContext* surfaceContext)
         : fSurfaceContext(surfaceContext) {
     }
 
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 580031f..1b39363 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -454,7 +454,7 @@
     if (fProxy->fTarget) {
         // The kApprox but already instantiated case. Setting the proxy's width & height to
         // the instantiated width & height could have side-effects going forward, since we're
-        // obliterating the area of interest information. This call (exactify) only used 
+        // obliterating the area of interest information. This call (exactify) only used
         // when converting an SkSpecialImage to an SkImage so the proxy shouldn't be
         // used for additional draws.
         fProxy->fWidth = fProxy->fTarget->width();
diff --git a/src/gpu/GrTessellator.h b/src/gpu/GrTessellator.h
index a09b7c2..4f82ea8 100644
--- a/src/gpu/GrTessellator.h
+++ b/src/gpu/GrTessellator.h
@@ -46,7 +46,7 @@
 int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds,
                    WindingVertex** verts);
 
-int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds, 
+int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds,
                     VertexAllocator*, bool antialias, const GrColor& color,
                     bool canTweakAlphaForCoverage, bool *isLinear);
 }
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 94c5f2e..63fe074 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -585,7 +585,7 @@
 
     // See crbug.com/755871. This could probably be narrowed to just partial clears as the driver
     // bugs seems to involve clearing too much and not skipping the clear.
-    // See crbug.com/768134. This is also needed for full clears and was seen on an nVidia K620 
+    // See crbug.com/768134. This is also needed for full clears and was seen on an nVidia K620
     // but only for D3D11 ANGLE.
     if (GrGLANGLEBackend::kD3D11 == ctxInfo.angleBackend()) {
         fUseDrawInsteadOfClear = true;
diff --git a/src/gpu/gl/GrGLContext.h b/src/gpu/gl/GrGLContext.h
index 977d360..4e37125 100644
--- a/src/gpu/gl/GrGLContext.h
+++ b/src/gpu/gl/GrGLContext.h
@@ -95,7 +95,7 @@
     ~GrGLContext() override;
 
 private:
-    GrGLContext(const ConstructorArgs& args) 
+    GrGLContext(const ConstructorArgs& args)
     : INHERITED(args)
     , fCompiler(nullptr) {}
 
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 10dabe4..159cec7 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -3304,7 +3304,7 @@
         if (dstRT && dstRT->numColorSamples() > 0) {
             return false;
         }
-    }    
+    }
     if (GrGLCaps::kNoFormatConversion_BlitFramebufferFlag & blitFramebufferFlags) {
         if (dst->config() != src->config()) {
             return false;
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
index d5b1a8d..6de545b 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
@@ -226,7 +226,7 @@
         fCustomColorOutputIndex = fOutputs.count();
         fOutputs.push_back().set(kHalf4_GrSLType, DeclaredColorOutputName(),
                                  GrShaderVar::kOut_TypeModifier);
-        fProgramBuilder->finalizeFragmentOutputColor(fOutputs.back()); 
+        fProgramBuilder->finalizeFragmentOutputColor(fOutputs.back());
     }
 }
 
diff --git a/src/gpu/instanced/InstancedRendering.h b/src/gpu/instanced/InstancedRendering.h
index e349f63..93e3d58 100644
--- a/src/gpu/instanced/InstancedRendering.h
+++ b/src/gpu/instanced/InstancedRendering.h
@@ -35,7 +35,7 @@
  * There is only one OpAllocator which encapsulates the creation of InstancedOps and the pool
  * of memory used for their Draw objects.
  *
- * The InstancedRendering class tracks a list of InstancedOps that will all be drawn during 
+ * The InstancedRendering class tracks a list of InstancedOps that will all be drawn during
  * the same flush. There is currently one per opList. The nature of instanced
  * rendering allows these ops to combine well and render efficiently.
  * During a flush, it assembles the accumulated draw data into a single vertex and texel
diff --git a/src/gpu/mtl/GrMtlCaps.h b/src/gpu/mtl/GrMtlCaps.h
index b793159..75bb2e7 100644
--- a/src/gpu/mtl/GrMtlCaps.h
+++ b/src/gpu/mtl/GrMtlCaps.h
@@ -60,7 +60,7 @@
 
 private:
     void initFeatureSet(MTLFeatureSet featureSet);
- 
+
     void initGrCaps(const id<MTLDevice> device);
     void initShaderCaps();
     void initSampleCount();
diff --git a/src/gpu/ops/GrAAConvexTessellator.cpp b/src/gpu/ops/GrAAConvexTessellator.cpp
index aea7ce7..6c0125a 100644
--- a/src/gpu/ops/GrAAConvexTessellator.cpp
+++ b/src/gpu/ops/GrAAConvexTessellator.cpp
@@ -584,7 +584,7 @@
                         // For very shallow angles all the corner points could fuse
                         if (!duplicate_pt(miter, this->point(perp1Idx))) {
                             int miterIdx;
-                            miterIdx = this->addPt(miter, -outset, coverage, false, 
+                            miterIdx = this->addPt(miter, -outset, coverage, false,
                                                    kSharp_CurveState);
                             nextRing->addIdx(miterIdx, originalIdx);
                             // The two triangles for the corner
diff --git a/src/gpu/ops/GrAAConvexTessellator.h b/src/gpu/ops/GrAAConvexTessellator.h
index 2fdde10..ee91128 100644
--- a/src/gpu/ops/GrAAConvexTessellator.h
+++ b/src/gpu/ops/GrAAConvexTessellator.h
@@ -143,7 +143,7 @@
         void makeOriginalRing() {
             for (int i = 0; i < fPts.count(); ++i) {
                 fPts[i].fOrigEdgeId = fPts[i].fIndex;
-            }            
+            }
         }
 
         // init should be called after all the indices have been added (via addIdx)
diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h
index 7ae3166..0738ce7 100644
--- a/src/gpu/ops/GrAtlasTextOp.h
+++ b/src/gpu/ops/GrAtlasTextOp.h
@@ -172,7 +172,7 @@
     bool onCombineIfPossible(GrOp* t, const GrCaps& caps) override;
 
     static constexpr auto kMaxTextures = 4;
-    
+
     // TODO just use class params
     sk_sp<GrGeometryProcessor> setupDfProcessor(const SkMatrix& viewMatrix, SkColor luminanceColor,
                                                 GrColor color,
diff --git a/src/gpu/vk/GrVkDescriptorPool.h b/src/gpu/vk/GrVkDescriptorPool.h
index 5327a7d..97c27e1 100644
--- a/src/gpu/vk/GrVkDescriptorPool.h
+++ b/src/gpu/vk/GrVkDescriptorPool.h
@@ -33,7 +33,7 @@
 
 #ifdef SK_TRACE_VK_RESOURCES
     void dumpInfo() const override {
-        SkDebugf("GrVkDescriptorPool: %d, type %d (%d refs)\n", fDescPool, fType, 
+        SkDebugf("GrVkDescriptorPool: %d, type %d (%d refs)\n", fDescPool, fType,
                  this->getRefCnt());
     }
 #endif
diff --git a/src/gpu/vk/GrVkMemory.cpp b/src/gpu/vk/GrVkMemory.cpp
index 0496a54..a90533e 100644
--- a/src/gpu/vk/GrVkMemory.cpp
+++ b/src/gpu/vk/GrVkMemory.cpp
@@ -483,7 +483,7 @@
                                                                  &fAlloc));
     if (VK_SUCCESS != err) {
         this->reset();
-    } 
+    }
 #ifdef SK_DEBUG
     else {
         gHeapUsage[heapIndex] += size;
diff --git a/src/gpu/vk/GrVkMemory.h b/src/gpu/vk/GrVkMemory.h
index 77267ab..a8f3771 100644
--- a/src/gpu/vk/GrVkMemory.h
+++ b/src/gpu/vk/GrVkMemory.h
@@ -107,7 +107,7 @@
     const GrVkGpu* fGpu;
 #ifdef SK_DEBUG
     uint32_t       fHeapIndex;
-#endif    
+#endif
     uint32_t       fMemoryTypeIndex;
     VkDeviceMemory fAlloc;