Style bikeshed - remove extraneous whitespace
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002
Review URL: https://codereview.chromium.org/1842753002
diff --git a/bench/BigPathBench.cpp b/bench/BigPathBench.cpp
index f39fd73..a2f3ae0 100644
--- a/bench/BigPathBench.cpp
+++ b/bench/BigPathBench.cpp
@@ -84,4 +84,3 @@
DEF_BENCH( return new BigPathBench(kLeft_Align, true); )
DEF_BENCH( return new BigPathBench(kMiddle_Align, true); )
DEF_BENCH( return new BigPathBench(kRight_Align, true); )
-
diff --git a/bench/BitmapRectBench.cpp b/bench/BitmapRectBench.cpp
index 7211ae2..789a725 100644
--- a/bench/BitmapRectBench.cpp
+++ b/bench/BitmapRectBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/BlurBench.cpp b/bench/BlurBench.cpp
index 29f0dfd..58f9e89 100644
--- a/bench/BlurBench.cpp
+++ b/bench/BlurBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/BlurImageFilterBench.cpp b/bench/BlurImageFilterBench.cpp
index f0a7a8e..2407a44 100644
--- a/bench/BlurImageFilterBench.cpp
+++ b/bench/BlurImageFilterBench.cpp
@@ -23,7 +23,7 @@
#define BLUR_SIGMA_LARGE 10.0f
#define BLUR_SIGMA_HUGE 80.0f
-
+
// When 'cropped' is set we apply a cropRect to the blurImageFilter. The crop rect is an inset of
// the source's natural dimensions. This is intended to exercise blurring a larger source bitmap
// to a smaller destination bitmap.
diff --git a/bench/BlurRectBench.cpp b/bench/BlurRectBench.cpp
index 53cf2da..774bafa 100644
--- a/bench/BlurRectBench.cpp
+++ b/bench/BlurRectBench.cpp
@@ -92,7 +92,7 @@
SkMask mask;
if (!SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radius()),
&mask, r, kNormal_SkBlurStyle)) {
- return;
+ return;
}
SkMask::FreeImage(mask.fImage);
}
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index 43db54c..ba1d66a 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/FSRectBench.cpp b/bench/FSRectBench.cpp
index cd9a36b..2d5abc2 100644
--- a/bench/FSRectBench.cpp
+++ b/bench/FSRectBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2013 Google Inc.
*
diff --git a/bench/GMBench.cpp b/bench/GMBench.cpp
index 57f0d3c..57b2316 100644
--- a/bench/GMBench.cpp
+++ b/bench/GMBench.cpp
@@ -34,4 +34,3 @@
SkISize size = fGM->getISize();
return SkIPoint::Make(size.fWidth, size.fHeight);
}
-
diff --git a/bench/GeometryBench.cpp b/bench/GeometryBench.cpp
index d93578e..50985de 100644
--- a/bench/GeometryBench.cpp
+++ b/bench/GeometryBench.cpp
@@ -97,7 +97,7 @@
class GeoRectBench_Intersects : public GeoRectBench {
public:
GeoRectBench_Intersects() : GeoRectBench("rect_Intersects") {}
-
+
protected:
void onDraw(int loops, SkCanvas* canvas) override {
for (int outer = 0; outer < loops; ++outer) {
@@ -113,7 +113,7 @@
class GeoRectBench_sort : public GeoRectBench {
public:
GeoRectBench_sort() : GeoRectBench("rect_sort") {}
-
+
protected:
void onDraw(int loops, SkCanvas* canvas) override {
for (int outer = 0; outer < loops; ++outer) {
@@ -243,4 +243,3 @@
}
};
DEF_BENCH( return new ChopCubicAt; )
-
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index bc38035..890bc96 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2013 Google Inc.
*
diff --git a/bench/GradientBench.cpp b/bench/GradientBench.cpp
index 21ebdce..1685c52 100644
--- a/bench/GradientBench.cpp
+++ b/bench/GradientBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp
index 5e62eac..a185fec 100644
--- a/bench/MatrixBench.cpp
+++ b/bench/MatrixBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -298,4 +297,3 @@
DEF_BENCH( return new MapPointsMatrixBench("mappoints_trans", make_trans()); )
DEF_BENCH( return new MapPointsMatrixBench("mappoints_scale", make_scale()); )
DEF_BENCH( return new MapPointsMatrixBench("mappoints_affine", make_afine()); )
-
diff --git a/bench/MemoryBench.cpp b/bench/MemoryBench.cpp
index cd9afe4..b775793 100644
--- a/bench/MemoryBench.cpp
+++ b/bench/MemoryBench.cpp
@@ -55,4 +55,3 @@
DEF_BENCH( return new ChunkAllocBench(64); )
DEF_BENCH( return new ChunkAllocBench(8*1024); )
-
diff --git a/bench/MutexBench.cpp b/bench/MutexBench.cpp
index d1d014d..27ebee5 100644
--- a/bench/MutexBench.cpp
+++ b/bench/MutexBench.cpp
@@ -65,4 +65,3 @@
DEF_BENCH( return new MutexBench<SkMutex>(SkString("SkMutex")); )
DEF_BENCH( return new MutexBench<SkSpinlock>(SkString("SkSpinlock")); )
DEF_BENCH( return new SharedBench; )
-
diff --git a/bench/PatchBench.cpp b/bench/PatchBench.cpp
index 5d7451a..80d5ce0 100644
--- a/bench/PatchBench.cpp
+++ b/bench/PatchBench.cpp
@@ -12,11 +12,11 @@
#include "SkString.h"
/**
- * This bench measures the rendering time of the call SkCanvas::drawPatch with different types of
- * input patches (regular case, with loops, a square, with a big difference between "parallel"
- * sides). This bench also tests the different combination of optional parameters for the function
+ * This bench measures the rendering time of the call SkCanvas::drawPatch with different types of
+ * input patches (regular case, with loops, a square, with a big difference between "parallel"
+ * sides). This bench also tests the different combination of optional parameters for the function
* (passing texture coordinates and colors, only textures coordinates, only colors or none).
- * Finally, it applies a scale to test if the size affects the rendering time.
+ * Finally, it applies a scale to test if the size affects the rendering time.
*/
class PatchBench : public Benchmark {
diff --git a/bench/PatchGridBench.cpp b/bench/PatchGridBench.cpp
index 83e2932..db7865b 100644
--- a/bench/PatchGridBench.cpp
+++ b/bench/PatchGridBench.cpp
@@ -13,34 +13,34 @@
#include "SkString.h"
/**
- * This bench measures the rendering time of a gridof patches.
- * This bench also tests the different combination of optional parameters for the function
+ * This bench measures the rendering time of a gridof patches.
+ * This bench also tests the different combination of optional parameters for the function
* (passing texture coordinates and colors, only textures coordinates, only colors or none).
* Finally, it also has 3 possible sizes small, medium and big to test if the size of the patches
- * in the grid affects time.
+ * in the grid affects time.
*/
class PatchGridBench : public Benchmark {
-
+
public:
-
+
enum Size {
kSmall_Size,
kMedium_Size,
kBig_Size
};
-
+
enum VertexMode {
kNone_VertexMode,
kColors_VertexMode,
kTexCoords_VertexMode,
kBoth_VertexMode
};
-
+
PatchGridBench(Size size, VertexMode vertexMode)
: fVertexMode(vertexMode)
, fSize(size) { }
-
+
void setScale(SkCanvas* canvas){
switch (fSize) {
case kSmall_Size:
@@ -54,7 +54,7 @@
break;
}
}
-
+
void setGrid() {
SkPoint vertices[4][5] = {
{{50,50}, {150,50}, {250,50},{350,50},{450,50}},
@@ -62,28 +62,28 @@
{{50,250}, {150,250}, {250,250},{350,250},{450,250}},
{{100,300}, {150,350}, {250,350},{350,350},{450,350}}
};
-
+
SkColor cornerColors[4][5] = {
{SK_ColorBLUE, SK_ColorRED, SK_ColorBLUE, SK_ColorRED, SK_ColorBLUE},
{SK_ColorRED, SK_ColorBLUE, SK_ColorRED, SK_ColorBLUE, SK_ColorRED},
{SK_ColorBLUE, SK_ColorRED, SK_ColorBLUE, SK_ColorRED, SK_ColorBLUE},
{SK_ColorRED, SK_ColorBLUE, SK_ColorRED, SK_ColorBLUE, SK_ColorRED},
};
-
+
SkPoint texCoords[4][5] = {
{{0.0f,0.0f}, {1.0f,0.0f}, {2.0f,0.0f}, {3.0f,0.0f}, {4.0f,0.0f}},
{{0.0f,1.0f}, {1.0f,1.0f}, {2.0f,1.0f}, {3.0f,1.0f}, {4.0f,1.0f}},
{{0.0f,2.0f}, {1.0f,2.0f}, {2.0f,2.0f}, {3.0f,2.0f}, {4.0f,2.0f}},
{{0.0f,3.0f}, {1.0f,3.0f}, {2.0f,3.0f}, {3.0f,3.0f}, {4.0f,3.0f}},
};
-
+
SkPoint hrzCtrl[4][8] = {
{{75,30},{125,45},{175,70},{225,20},{275,50},{325,50},{375,5},{425,90}},
{{75,150},{125,150},{175,150},{225,150},{275,150},{325,150},{375,150},{425,150}},
{{75,250},{125,250},{175,250},{225,250},{275,200},{325,150},{375,250},{425,250}},
{{75,350},{125,350},{175,350},{225,350},{275,350},{325,350},{375,350},{425,350}}
};
-
+
SkPoint vrtCtrl[6][5] = {
{{50,75},{150,75},{250,75},{350,75},{450,75}},
{{50,125},{150,125},{250,125},{350,125},{450,125}},
@@ -92,43 +92,43 @@
{{50,275},{150,275},{250,275},{350,275},{400,305}},
{{50,325},{150,325},{250,325},{350,325},{450,325}}
};
-
+
static const int kRows = 3;
static const int kCols = 4;
-
+
fGrid.reset(kRows, kCols, SkPatchGrid::kColors_VertexType, nullptr);
for (int i = 0; i < kRows; i++) {
for (int j = 0; j < kCols; j++) {
SkPoint points[12];
-
+
//set corners
points[SkPatchUtils::kTopP0_CubicCtrlPts] = vertices[i][j];
points[SkPatchUtils::kTopP3_CubicCtrlPts] = vertices[i][j + 1];
points[SkPatchUtils::kBottomP0_CubicCtrlPts] = vertices[i + 1][j];
points[SkPatchUtils::kBottomP3_CubicCtrlPts] = vertices[i + 1][j + 1];
-
+
points[SkPatchUtils::kTopP1_CubicCtrlPts] = hrzCtrl[i][j * 2];
points[SkPatchUtils::kTopP2_CubicCtrlPts] = hrzCtrl[i][j * 2 + 1];
points[SkPatchUtils::kBottomP1_CubicCtrlPts] = hrzCtrl[i + 1][j * 2];
points[SkPatchUtils::kBottomP2_CubicCtrlPts] = hrzCtrl[i + 1][j * 2 + 1];
-
+
points[SkPatchUtils::kLeftP1_CubicCtrlPts] = vrtCtrl[i * 2][j];
points[SkPatchUtils::kLeftP2_CubicCtrlPts] = vrtCtrl[i * 2 + 1][j];
points[SkPatchUtils::kRightP1_CubicCtrlPts] = vrtCtrl[i * 2][j + 1];
points[SkPatchUtils::kRightP2_CubicCtrlPts] = vrtCtrl[i * 2 + 1][j + 1];
-
+
SkColor colors[4];
colors[0] = cornerColors[i][j];
colors[1] = cornerColors[i][j + 1];
colors[3] = cornerColors[i + 1][j];
colors[2] = cornerColors[i + 1][j + 1];
-
+
SkPoint texs[4];
texs[0] = texCoords[i][j];
texs[1] = texCoords[i][j + 1];
texs[3] = texCoords[i + 1][j];
texs[2] = texCoords[i + 1][j + 1];
-
+
switch (fVertexMode) {
case kNone_VertexMode:
fGrid.setPatch(j, i, points, nullptr, nullptr);
@@ -148,7 +148,7 @@
}
}
}
-
+
// override this method to change the shader
sk_sp<SkShader> createShader() {
const SkColor colors[] = {
@@ -156,7 +156,7 @@
SK_ColorMAGENTA, SK_ColorBLUE, SK_ColorYELLOW,
};
const SkPoint pts[] = { { 200.f / 4.f, 0.f }, { 3.f * 200.f / 4, 200.f } };
-
+
return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
SkShader::kMirror_TileMode);
}
@@ -180,7 +180,7 @@
default:
break;
}
-
+
SkString size;
switch (fSize) {
case kSmall_Size:
@@ -198,7 +198,7 @@
fName.printf("patch_grid_%s_%s", vertexMode.c_str(), size.c_str());
return fName.c_str();
}
-
+
void onDelayedSetup() override {
this->setGrid();
switch (fVertexMode) {
@@ -225,7 +225,7 @@
SkPatchGrid fGrid;
VertexMode fVertexMode;
Size fSize;
-
+
typedef Benchmark INHERITED;
};
diff --git a/bench/PathIterBench.cpp b/bench/PathIterBench.cpp
index 5a8727f..cf93b5d 100644
--- a/bench/PathIterBench.cpp
+++ b/bench/PathIterBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/ReadPixBench.cpp b/bench/ReadPixBench.cpp
index 7df5260..b1061a1 100644
--- a/bench/ReadPixBench.cpp
+++ b/bench/ReadPixBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 The Android Open Source Project
*
diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp
index 5bd5640..edd5ac7 100644
--- a/bench/RectBench.cpp
+++ b/bench/RectBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/RectanizerBench.cpp b/bench/RectanizerBench.cpp
index 9b7e3ae..5bc6f11 100644
--- a/bench/RectanizerBench.cpp
+++ b/bench/RectanizerBench.cpp
@@ -41,7 +41,7 @@
kSmallPow2_RectType
};
- RectanizerBench(RectanizerType rectanizerType, RectType rectType)
+ RectanizerBench(RectanizerType rectanizerType, RectType rectType)
: fName("rectanizer_")
, fRectanizerType(rectanizerType)
, fRectType(rectType) {
diff --git a/bench/RegionBench.cpp b/bench/RegionBench.cpp
index 8554569..f73a888 100644
--- a/bench/RegionBench.cpp
+++ b/bench/RegionBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/RepeatTileBench.cpp b/bench/RepeatTileBench.cpp
index 452c2c0..33e9178 100644
--- a/bench/RepeatTileBench.cpp
+++ b/bench/RepeatTileBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/RotatedRectBench.cpp b/bench/RotatedRectBench.cpp
index 5ae0b1b..23e0443 100644
--- a/bench/RotatedRectBench.cpp
+++ b/bench/RotatedRectBench.cpp
@@ -13,7 +13,7 @@
/** This benchmark tests rendering rotated rectangles. It can optionally apply AA and/or change the
paint color between each rect in different ways using the ColorType enum. The xfermode used can
- be specified as well.
+ be specified as well.
*/
enum ColorType {
diff --git a/bench/ScalarBench.cpp b/bench/ScalarBench.cpp
index 0048c6e..9d3b0ec 100644
--- a/bench/ScalarBench.cpp
+++ b/bench/ScalarBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/ShapesBench.cpp b/bench/ShapesBench.cpp
index 2266cc3..a658c45 100644
--- a/bench/ShapesBench.cpp
+++ b/bench/ShapesBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2016 Google Inc.
*
diff --git a/bench/SkLinearBitmapPipelineBench.cpp b/bench/SkLinearBitmapPipelineBench.cpp
index 7ab29f6..f111aee 100644
--- a/bench/SkLinearBitmapPipelineBench.cpp
+++ b/bench/SkLinearBitmapPipelineBench.cpp
@@ -342,5 +342,3 @@
DEF_BENCH(return new SkBitmapFPOrigShader(
srcSize, kLinear_SkColorProfileType, mR, true,
SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
-
-
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index f2d7bd3..04f824c 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/bench/TextBlobBench.cpp b/bench/TextBlobBench.cpp
index 6d5a88f..a350e7b 100644
--- a/bench/TextBlobBench.cpp
+++ b/bench/TextBlobBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2015 Google Inc.
*
diff --git a/bench/TileBench.cpp b/bench/TileBench.cpp
index 47e79c7..3093016 100644
--- a/bench/TileBench.cpp
+++ b/bench/TileBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2013 Google Inc.
*
diff --git a/bench/TopoSortBench.cpp b/bench/TopoSortBench.cpp
index 3fa1c0f..8a8ec66 100644
--- a/bench/TopoSortBench.cpp
+++ b/bench/TopoSortBench.cpp
@@ -76,4 +76,3 @@
///////////////////////////////////////////////////////////////////////////////
DEF_BENCH( return new TopoSortBench(); )
-
diff --git a/bench/WriterBench.cpp b/bench/WriterBench.cpp
index 115ffc1..78c5d8b 100644
--- a/bench/WriterBench.cpp
+++ b/bench/WriterBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 The Android Open Source Project
*
diff --git a/bench/Xfer4fBench.cpp b/bench/Xfer4fBench.cpp
index bc234a7..ab04476 100644
--- a/bench/Xfer4fBench.cpp
+++ b/bench/Xfer4fBench.cpp
@@ -22,7 +22,7 @@
, fFlags(flags & ~USE_AA)
{
fXfer.reset(SkXfermode::Create(mode));
-
+
fProc1 = SkXfermode::GetD32Proc(fXfer, fFlags | SkXfermode::kSrcIsSingle_D32Flag);
fProcN = SkXfermode::GetD32Proc(fXfer, fFlags);
fName.printf("xfer4f_%s_%s_%c_%s_%s",
@@ -37,7 +37,7 @@
fDst[i] = 0;
fAAStorage[i] = i * 255 / (N - 1);
}
-
+
if (flags & USE_AA) {
fAA = fAAStorage;
} else {
diff --git a/bench/XferU64Bench.cpp b/bench/XferU64Bench.cpp
index a57ba60..90aa328 100644
--- a/bench/XferU64Bench.cpp
+++ b/bench/XferU64Bench.cpp
@@ -37,7 +37,7 @@
fDst[i] = 0;
fAAStorage[i] = i * 255 / (N - 1);
}
-
+
if (flags & USE_AA) {
fAA = fAAStorage;
} else {
diff --git a/bench/XfermodeBench.cpp b/bench/XfermodeBench.cpp
index f407c59..9eae7ce 100644
--- a/bench/XfermodeBench.cpp
+++ b/bench/XfermodeBench.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2013 Google Inc.
*
diff --git a/bench/nanobenchAndroid.cpp b/bench/nanobenchAndroid.cpp
index 7a166d4..cb6f09d 100644
--- a/bench/nanobenchAndroid.cpp
+++ b/bench/nanobenchAndroid.cpp
@@ -49,5 +49,3 @@
bool HWUITarget::capturePixels(SkBitmap* bmp) {
return this->renderer.capturePixels(bmp);
}
-
-