Fix cases of variable shadowing in /gm/.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: I905459bf0bbaa205da7dc59e1910e345bed2af51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438538
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp
index e7f4f21..d160274 100644
--- a/gm/drawbitmaprect.cpp
+++ b/gm/drawbitmaprect.cpp
@@ -184,9 +184,10 @@
 
         const int kPadX = 30;
         const int kPadY = 40;
-        SkPaint paint;
-        paint.setAlphaf(0.125f);
-        canvas->drawImageRect(fImage, SkRect::MakeIWH(gSize, gSize), SkSamplingOptions(), &paint);
+        SkPaint alphaPaint;
+        alphaPaint.setAlphaf(0.125f);
+        canvas->drawImageRect(fImage, SkRect::MakeIWH(gSize, gSize), SkSamplingOptions(),
+                              &alphaPaint);
         canvas->translate(SK_Scalar1 * kPadX / 2,
                           SK_Scalar1 * kPadY / 2);
         SkPaint blackPaint;
@@ -237,16 +238,16 @@
             // test the following code path:
             // SkGpuDevice::drawPath() -> SkGpuDevice::drawWithMaskFilter()
             SkIRect srcRect;
-            SkPaint paint;
+            SkPaint maskPaint;
             SkBitmap bm = make_chessbm(5, 5);
 
             srcRect.setXYWH(1, 1, 3, 3);
-            paint.setMaskFilter(SkMaskFilter::MakeBlur(
+            maskPaint.setMaskFilter(SkMaskFilter::MakeBlur(
                 kNormal_SkBlurStyle,
                 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5))));
 
             fProc(canvas, bm.asImage().get(), bm, srcRect, dstRect,
-                  SkSamplingOptions(SkFilterMode::kLinear), &paint);
+                  SkSamplingOptions(SkFilterMode::kLinear), &maskPaint);
         }
     }