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/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
index 80debeb..a282c31 100644
--- a/samplecode/ClockFaceView.cpp
+++ b/samplecode/ClockFaceView.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/GMSampleView.cpp b/samplecode/GMSampleView.cpp
index 24c94cb..76d0c59 100644
--- a/samplecode/GMSampleView.cpp
+++ b/samplecode/GMSampleView.cpp
@@ -59,4 +59,3 @@
bool GMSampleView::onAnimate(const SkAnimTimer& timer) {
return fGM->animate(timer);
}
-
diff --git a/samplecode/OverView.cpp b/samplecode/OverView.cpp
index 8520f57..0cd129e 100644
--- a/samplecode/OverView.cpp
+++ b/samplecode/OverView.cpp
@@ -172,4 +172,3 @@
}
}
}
-
diff --git a/samplecode/PerlinPatch.cpp b/samplecode/PerlinPatch.cpp
index ad2d6be..c5a0db8 100644
--- a/samplecode/PerlinPatch.cpp
+++ b/samplecode/PerlinPatch.cpp
@@ -129,7 +129,7 @@
}
SkPaint paint;
-
+
SkScalar texWidth = fTexScale * TexWidth;
SkScalar texHeight = fTexScale * TexHeight;
const SkPoint texCoords[SkPatchUtils::kNumCorners] = {
@@ -138,7 +138,7 @@
{ fTexX + texWidth, fTexY + texHeight},
{ fTexX - texWidth, fTexY + texHeight}}
;
-
+
SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(SkXfermode::kSrc_Mode));
SkScalar scaleFreq = 2.0;
@@ -204,4 +204,3 @@
};
DEF_SAMPLE( return new PerlinPatchView(); )
-
diff --git a/samplecode/Sample2PtRadial.cpp b/samplecode/Sample2PtRadial.cpp
index c32025e..db3b24f 100644
--- a/samplecode/Sample2PtRadial.cpp
+++ b/samplecode/Sample2PtRadial.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleAAClip.cpp b/samplecode/SampleAAClip.cpp
index 78baf3d..4c79560 100644
--- a/samplecode/SampleAAClip.cpp
+++ b/samplecode/SampleAAClip.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleAARects.cpp b/samplecode/SampleAARects.cpp
index d0c1115..41507d9 100644
--- a/samplecode/SampleAARects.cpp
+++ b/samplecode/SampleAARects.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index 70ecd9f..d3be968 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleAnimatedText.cpp b/samplecode/SampleAnimatedText.cpp
index 8ca9d87..89ea692 100755
--- a/samplecode/SampleAnimatedText.cpp
+++ b/samplecode/SampleAnimatedText.cpp
@@ -133,7 +133,7 @@
}
bool onAnimate(const SkAnimTimer& timer) override {
- // We add noise to the scale and rotation animations to
+ // We add noise to the scale and rotation animations to
// keep the font atlas from falling into a steady state
fRotation += (1.0f + gRand.nextRangeF(-0.1f, 0.1f));
fScale += (fScaleInc + gRand.nextRangeF(-0.025f, 0.025f));
diff --git a/samplecode/SampleAnimator.cpp b/samplecode/SampleAnimator.cpp
index 8b7af68..d4a4cdd 100644
--- a/samplecode/SampleAnimator.cpp
+++ b/samplecode/SampleAnimator.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 3149711..e0d152d 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -852,7 +852,7 @@
fDeviceType = kGPU_DeviceType;
}
#endif
-
+
#if DEFAULT_TO_GPU
fDeviceType = kGPU_DeviceType;
#endif
@@ -1792,13 +1792,13 @@
void SampleWindow::setDeviceType(DeviceType type) {
if (type == fDeviceType)
return;
-
+
fDevManager->tearDownBackend(this);
-
+
fDeviceType = type;
-
+
fDevManager->setUpBackend(this, fMSAASampleCount);
-
+
this->updateTitle();
this->inval(nullptr);
}
@@ -1807,9 +1807,9 @@
this->setColorType(ct, pt);
fDevManager->tearDownBackend(this);
-
+
fDevManager->setUpBackend(this, fMSAASampleCount);
-
+
this->updateTitle();
this->inval(nullptr);
}
diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h
index 7ee07d8..082208c 100644
--- a/samplecode/SampleApp.h
+++ b/samplecode/SampleApp.h
@@ -72,7 +72,7 @@
*/
class DeviceManager : public SkRefCnt {
public:
-
+
virtual void setUpBackend(SampleWindow* win, int msaaSampleCount) = 0;
diff --git a/samplecode/SampleAtlas.cpp b/samplecode/SampleAtlas.cpp
index 3061b14..7cf1bb3 100644
--- a/samplecode/SampleAtlas.cpp
+++ b/samplecode/SampleAtlas.cpp
@@ -30,7 +30,7 @@
for (int i = 0; i < count; ++i) {
SkMatrix matrix;
matrix.setRSXform(xform[i]);
-
+
canvas->save();
canvas->concat(matrix);
canvas->drawImageRect(atlas, tex[i], tex[i].makeOffset(-tex[i].x(), -tex[i].y()), paint,
@@ -118,7 +118,7 @@
fDAlpha = -fDAlpha;
}
}
-
+
SkRSXform asRSXform() const {
return SkRSXform::MakeFromRadians(fScale, fRadian, fCenter.x(), fCenter.y(),
SkScalarHalf(kCellSize), SkScalarHalf(kCellSize));
@@ -151,7 +151,7 @@
const SkScalar sx = SkIntToScalar(x);
const SkScalar sy = SkIntToScalar(y);
fTex[i].setXYWH(sx, sy, cell, cell);
-
+
fRec[i].fCenter.set(sx + cell/2, sy + 3*cell/4);
fRec[i].fVelocity.fX = rand.nextSScalar1() * kMaxSpeed;
fRec[i].fVelocity.fY = rand.nextSScalar1() * kMaxSpeed;
@@ -189,7 +189,7 @@
const SkColor* colorsPtr = fUseColors ? colors : nullptr;
fProc(canvas, fAtlas.get(), xform, fTex, colorsPtr, N, &cull, &paint);
}
-
+
SkRect onGetBounds() override {
const SkScalar border = kMaxScale * kCellSize;
SkRect r = fBounds;
diff --git a/samplecode/SampleBigBlur.cpp b/samplecode/SampleBigBlur.cpp
index fcbd6ac..800ae24 100644
--- a/samplecode/SampleBigBlur.cpp
+++ b/samplecode/SampleBigBlur.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp
index 0576234..24c3eff 100644
--- a/samplecode/SampleBitmapRect.cpp
+++ b/samplecode/SampleBitmapRect.cpp
@@ -78,7 +78,7 @@
void resetBounce() {
fSrcPts[0].set(0, 0);
fSrcPts[1].set(SCALAR_SIZE, SCALAR_SIZE);
-
+
fSrcVec[0] = unit_vec(30);
fSrcVec[1] = unit_vec(107);
}
diff --git a/samplecode/SampleBlur.cpp b/samplecode/SampleBlur.cpp
index bd5ff47..b617691 100644
--- a/samplecode/SampleBlur.cpp
+++ b/samplecode/SampleBlur.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleClamp.cpp b/samplecode/SampleClamp.cpp
index 9739053..3046cde 100644
--- a/samplecode/SampleClamp.cpp
+++ b/samplecode/SampleClamp.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleClipDrawMatch.cpp b/samplecode/SampleClipDrawMatch.cpp
index 45663b5..b010ad0 100644
--- a/samplecode/SampleClipDrawMatch.cpp
+++ b/samplecode/SampleClipDrawMatch.cpp
@@ -111,7 +111,7 @@
case kRectAndConcave_Geometry:
canvas->drawPath(create_concave_path(offset), p);
break;
- }
+ }
}
class ClipDrawMatchView : public SampleView {
@@ -202,7 +202,7 @@
canvas->clipRect(r, SkRegion::kReplace_Op, true); // AA here forces shader clips
canvas->clipPath(create_concave_path(offset), SkRegion::kIntersect_Op, useAA);
} break;
- }
+ }
SkISize size = canvas->getDeviceSize();
SkRect bigR = SkRect::MakeWH(SkIntToScalar(size.width()), SkIntToScalar(size.height()));
diff --git a/samplecode/SampleColorFilter.cpp b/samplecode/SampleColorFilter.cpp
index 0b8acc3..8a8eef6 100644
--- a/samplecode/SampleColorFilter.cpp
+++ b/samplecode/SampleColorFilter.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleComplexClip.cpp b/samplecode/SampleComplexClip.cpp
index 0d613ec..aab759c 100644
--- a/samplecode/SampleComplexClip.cpp
+++ b/samplecode/SampleComplexClip.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleConcavePaths.cpp b/samplecode/SampleConcavePaths.cpp
index abdf707..d75ec4c 100644
--- a/samplecode/SampleConcavePaths.cpp
+++ b/samplecode/SampleConcavePaths.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleDash.cpp b/samplecode/SampleDash.cpp
index a01c079..f2c6b8b 100644
--- a/samplecode/SampleDash.cpp
+++ b/samplecode/SampleDash.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleDither.cpp b/samplecode/SampleDither.cpp
index a599418..99b33f0 100644
--- a/samplecode/SampleDither.cpp
+++ b/samplecode/SampleDither.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleDraw.cpp b/samplecode/SampleDraw.cpp
index 5e239c6..29ad07d 100644
--- a/samplecode/SampleDraw.cpp
+++ b/samplecode/SampleDraw.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp
index 12ea4e2..a8f793c 100644
--- a/samplecode/SampleEffects.cpp
+++ b/samplecode/SampleEffects.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleFillType.cpp b/samplecode/SampleFillType.cpp
index af94c9f..582dd96 100644
--- a/samplecode/SampleFillType.cpp
+++ b/samplecode/SampleFillType.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleFilter.cpp b/samplecode/SampleFilter.cpp
index acf358a..66de8f3 100644
--- a/samplecode/SampleFilter.cpp
+++ b/samplecode/SampleFilter.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 0602e2b..18806c9 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -696,8 +696,8 @@
{
SkRTreeFactory factory;
SkPictureRecorder recorder;
- SkCanvas* recordingCanvas = recorder.beginRecording(SkIntToScalar(kBitmapSize),
- SkIntToScalar(kBitmapSize),
+ SkCanvas* recordingCanvas = recorder.beginRecording(SkIntToScalar(kBitmapSize),
+ SkIntToScalar(kBitmapSize),
&factory, 0);
drawSomething(recordingCanvas);
sk_sp<SkPicture> pict(recorder.finishRecordingAsPicture());
diff --git a/samplecode/SampleFilterQuality.cpp b/samplecode/SampleFilterQuality.cpp
index ee99845..2c3eb4c 100644
--- a/samplecode/SampleFilterQuality.cpp
+++ b/samplecode/SampleFilterQuality.cpp
@@ -54,7 +54,7 @@
SkPaint paint;
paint.setShader(make_shader(SkRect::MakeWH(N, N)));
-
+
canvas->drawPath(path, paint);
return surface->makeImageSnapshot();
}
@@ -63,7 +63,7 @@
const SkScalar S = 16; // amount to scale up
const int D = 2; // dimension scaling for the offscreen
// since we only view the center, don't need to produce the entire thing
-
+
SkImageInfo info = SkImageInfo::MakeN32(orig->width() * D, orig->height() * D,
kOpaque_SkAlphaType);
auto surface(origSurf->makeSurface(info));
@@ -73,7 +73,7 @@
canvas->translate(-SkScalarHalf(orig->width()) * (S - D) / S,
-SkScalarHalf(orig->height()) * (S - D) / S);
canvas->drawImage(orig, 0, 0, nullptr);
-
+
if (S > 3) {
SkPaint paint;
paint.setColor(SK_ColorWHITE);
diff --git a/samplecode/SampleFontCache.cpp b/samplecode/SampleFontCache.cpp
index 5391d24..97c9565 100644
--- a/samplecode/SampleFontCache.cpp
+++ b/samplecode/SampleFontCache.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleFontScalerTest.cpp b/samplecode/SampleFontScalerTest.cpp
index 0105a47..ce3b81e 100644
--- a/samplecode/SampleFontScalerTest.cpp
+++ b/samplecode/SampleFontScalerTest.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleFuzz.cpp b/samplecode/SampleFuzz.cpp
index d1a696f..b8c800a 100644
--- a/samplecode/SampleFuzz.cpp
+++ b/samplecode/SampleFuzz.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleGradients.cpp b/samplecode/SampleGradients.cpp
index 5e9450e..19ba74b 100644
--- a/samplecode/SampleGradients.cpp
+++ b/samplecode/SampleGradients.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleHT.cpp b/samplecode/SampleHT.cpp
index 1989c3a..d0cd3a5 100644
--- a/samplecode/SampleHT.cpp
+++ b/samplecode/SampleHT.cpp
@@ -57,7 +57,7 @@
fInterp = nullptr;
fTime = 0;
}
-
+
void spawnAnimation(SkMSec now) {
this->setTime(now);
@@ -122,14 +122,14 @@
W = 640,
H = 480,
};
-
+
struct Rec {
HTDrawable* fDrawable;
};
Rec fArray[N];
sk_sp<SkDrawable> fRoot;
SkMSec fTime;
-
+
HTView() {
SkRandom rand;
diff --git a/samplecode/SampleHairCurves.cpp b/samplecode/SampleHairCurves.cpp
index 2cf0b3c..967c4f2 100644
--- a/samplecode/SampleHairCurves.cpp
+++ b/samplecode/SampleHairCurves.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleLCD.cpp b/samplecode/SampleLCD.cpp
index 130a28c..862d935 100644
--- a/samplecode/SampleLCD.cpp
+++ b/samplecode/SampleLCD.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index b31c839..8c2724c 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -306,4 +306,3 @@
typedef SampleView INHERITED;
};
DEF_SAMPLE( return new BackdropView; )
-
diff --git a/samplecode/SampleLighting.cpp b/samplecode/SampleLighting.cpp
index 1da888f..5171579 100755
--- a/samplecode/SampleLighting.cpp
+++ b/samplecode/SampleLighting.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2015 Google Inc.
*
@@ -71,7 +70,7 @@
nullptr, nullptr));
paint.setColor(SK_ColorBLACK);
- SkRect r = SkRect::MakeWH((SkScalar)fDiffuseBitmap.width(),
+ SkRect r = SkRect::MakeWH((SkScalar)fDiffuseBitmap.width(),
(SkScalar)fDiffuseBitmap.height());
canvas->drawRect(r, paint);
diff --git a/samplecode/SampleManyRects.cpp b/samplecode/SampleManyRects.cpp
index 0290af2..950b983 100644
--- a/samplecode/SampleManyRects.cpp
+++ b/samplecode/SampleManyRects.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2013 Google Inc.
*
diff --git a/samplecode/SampleMeasure.cpp b/samplecode/SampleMeasure.cpp
index 20335f2..dc771db 100644
--- a/samplecode/SampleMeasure.cpp
+++ b/samplecode/SampleMeasure.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SamplePath.cpp b/samplecode/SamplePath.cpp
index fec3b5e..12cc402 100644
--- a/samplecode/SamplePath.cpp
+++ b/samplecode/SamplePath.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -345,4 +344,3 @@
typedef SampleView INHERITED;
};
DEF_SAMPLE( return new ArcToView; )
-
diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp
index 02a613a..a53fe71 100644
--- a/samplecode/SamplePathClip.cpp
+++ b/samplecode/SamplePathClip.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -80,7 +79,7 @@
if (p0.fY == p1.fY) {
return 0;
}
-
+
if (p0.fY > p1.fY) {
SkTSwap(p0, p1);
}
@@ -88,7 +87,7 @@
if (p1.fY <= bounds.top() || p0.fY >= bounds.bottom()) {
return 0;
}
-
+
double dxdy = (double)(p1.fX - p0.fX) / (p1.fY - p0.fY);
if (p0.fY < bounds.top()) {
p0.fX = SkDoubleToScalar(p0.fX + dxdy * (bounds.top() - p0.fY));
@@ -98,14 +97,14 @@
p1.fX = SkDoubleToScalar(p1.fX + dxdy * (bounds.bottom() - p1.fY));
p1.fY = bounds.bottom();
}
-
+
// Now p0...p1 is strictly inside bounds vertically, so we just need to clip horizontally
-
+
if (p0.fX > p1.fX) {
SkTSwap(p0, p1);
}
// now we're left-to-right: p0 .. p1
-
+
if (p1.fX <= bounds.left()) { // entirely to the left
p0.fX = p1.fX = bounds.left();
*edges++ = p0;
@@ -118,7 +117,7 @@
*edges++ = p1;
return 2;
}
-
+
if (p0.fX < bounds.left()) {
float y = SkDoubleToScalar(p0.fY + (bounds.left() - p0.fX) / dxdy);
*edges++ = SkPoint::Make(bounds.left(), p0.fY);
@@ -157,7 +156,7 @@
SkPoint fPoly[N];
SkRect fClip;
SkColor fEdgeColor[N];
-
+
EdgeClipView() : fClip(SkRect::MakeLTRB(150, 150, 550, 450)) {
fPoly[0].set(300, 40);
fPoly[1].set(550, 250);
@@ -167,7 +166,7 @@
fEdgeColor[1] = 0xFF00FF00;
fEdgeColor[2] = 0xFF0000FF;
}
-
+
protected:
bool onQuery(SkEvent* evt) override {
if (SampleCode::TitleQ(*evt)) {
@@ -240,21 +239,21 @@
MyClick(SkView* view) : Click(view) {}
virtual void handleMove() = 0;
};
-
+
class VertClick : public MyClick {
SkPoint* fPt;
public:
VertClick(SkView* view, SkPoint* pt) : MyClick(view), fPt(pt) {}
void handleMove() override { *fPt = snap(fCurr); }
};
-
+
class DragRectClick : public MyClick {
SkRect* fRect;
public:
DragRectClick(SkView* view, SkRect* rect) : MyClick(view), fRect(rect) {}
void handleMove() override { fRect->offset(fCurr.x() - fPrev.x(), fCurr.y() - fPrev.y()); }
};
-
+
class DragPolyClick : public MyClick {
SkPoint fSrc[100];
SkPoint* fPoly;
@@ -294,7 +293,7 @@
return new VertClick(this, &fPoly[i]);
}
}
-
+
SkPath path;
path.addPoly(fPoly, N, true);
if (path.contains(x, y)) {
@@ -306,15 +305,14 @@
}
return new DoNothingClick(this);
}
-
+
bool onClick(Click* click) override {
((MyClick*)click)->handleMove();
this->inval(nullptr);
return false;
}
-
+
private:
typedef SampleView INHERITED;
};
DEF_SAMPLE( return new EdgeClipView; )
-
diff --git a/samplecode/SamplePathFill.cpp b/samplecode/SamplePathFill.cpp
index 1a79d7f..2f0dc6f 100644
--- a/samplecode/SamplePathFill.cpp
+++ b/samplecode/SamplePathFill.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SamplePathFuzz.cpp b/samplecode/SamplePathFuzz.cpp
index d719826..05eb76f 100644
--- a/samplecode/SamplePathFuzz.cpp
+++ b/samplecode/SamplePathFuzz.cpp
@@ -698,5 +698,3 @@
static SkView* MyFactory() { return new PathFuzzView; }
static SkViewRegister reg(MyFactory);
-
-
diff --git a/samplecode/SamplePolyToPoly.cpp b/samplecode/SamplePolyToPoly.cpp
index 1283a23..6cb818a 100644
--- a/samplecode/SamplePolyToPoly.cpp
+++ b/samplecode/SamplePolyToPoly.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleQuadStroker.cpp b/samplecode/SampleQuadStroker.cpp
index 40f01fd..ab65ff6 100644
--- a/samplecode/SampleQuadStroker.cpp
+++ b/samplecode/SampleQuadStroker.cpp
@@ -393,7 +393,7 @@
return;
}
SkRect bounds = path.getBounds();
- this->setWHZ(SkScalarCeilToInt(bounds.right()), drawText
+ this->setWHZ(SkScalarCeilToInt(bounds.right()), drawText
? SkScalarRoundToInt(scale * 3 / 2) : SkScalarRoundToInt(scale),
SkScalarRoundToInt(950.0f / scale));
erase(fMinSurface);
@@ -474,7 +474,7 @@
path.reset();
path.setFillType(SkPath::kEvenOdd_FillType);
path.addCircle(center.fX, center.fY, maxSide + width / 2);
- SkRect outside = SkRect::MakeXYWH(center.fX - maxSide - width, center.fY - maxSide - width,
+ SkRect outside = SkRect::MakeXYWH(center.fX - maxSide - width, center.fY - maxSide - width,
(maxSide + width) * 2, (maxSide + width) * 2);
path.addRect(outside);
canvas->drawPath(path, paint);
@@ -648,7 +648,7 @@
if (fArcButton.fEnabled) {
SkPoint center;
if (arcCenter(¢er)) {
- r.set(center.fX - fRadius, center.fY - fRadius, center.fX + fRadius,
+ r.set(center.fX - fRadius, center.fY - fRadius, center.fX + fRadius,
center.fY + fRadius);
}
}
diff --git a/samplecode/SampleRectanizer.cpp b/samplecode/SampleRectanizer.cpp
index 55e70a2..4ff28b2 100644
--- a/samplecode/SampleRectanizer.cpp
+++ b/samplecode/SampleRectanizer.cpp
@@ -100,7 +100,7 @@
long totArea = 0;
for (int i = 0; i < fCurRandRect; ++i) {
- r = SkRect::MakeXYWH(SkIntToScalar(fRectLocations[i].fX),
+ r = SkRect::MakeXYWH(SkIntToScalar(fRectLocations[i].fX),
SkIntToScalar(fRectLocations[i].fY),
SkIntToScalar((*fCurRects)[i].fWidth),
SkIntToScalar((*fCurRects)[i].fHeight));
diff --git a/samplecode/SampleRepeatTile.cpp b/samplecode/SampleRepeatTile.cpp
index 598a088..f56492d 100644
--- a/samplecode/SampleRepeatTile.cpp
+++ b/samplecode/SampleRepeatTile.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleShip.cpp b/samplecode/SampleShip.cpp
index daaf5e3..1335c31 100644
--- a/samplecode/SampleShip.cpp
+++ b/samplecode/SampleShip.cpp
@@ -35,7 +35,7 @@
for (int i = 0; i < count; ++i) {
SkMatrix matrix;
matrix.setRSXform(xform[i]);
-
+
canvas->save();
canvas->concat(matrix);
canvas->drawImageRect(atlas, tex[i], tex[i].makeOffset(-tex[i].x(), -tex[i].y()), paint,
@@ -58,7 +58,7 @@
return;
}
}
-
+
SkScalar anchorX = fAtlas->width()*0.5f;
SkScalar anchorY = fAtlas->height()*0.5f;
int currIndex = 0;
@@ -66,7 +66,7 @@
for (int y = 0; y < kGrid; y++) {
float xPos = (x / (kGrid - 1.0f)) * kWidth;
float yPos = (y / (kGrid - 1.0f)) * kWidth;
-
+
fTex[currIndex] = SkRect::MakeLTRB(0.0f, 0.0f,
SkIntToScalar(fAtlas->width()),
SkIntToScalar(fAtlas->height()));
@@ -80,13 +80,13 @@
SkIntToScalar(fAtlas->height()));
fXform[currIndex] = SkRSXform::MakeFromRadians(0.5f, SK_ScalarPI*0.5f,
kWidth*0.5f, kHeight*0.5f, anchorX, anchorY);
-
+
fCurrentTime = 0;
fTimer.start();
}
~DrawShipView() override {}
-
+
protected:
// overrides from SkEventSink
bool onQuery(SkEvent* evt) override {
@@ -96,25 +96,25 @@
}
return this->INHERITED::onQuery(evt);
}
-
+
void onDrawContent(SkCanvas* canvas) override {
const float kCosDiff = 0.99984769515f;
const float kSinDiff = 0.01745240643f;
-
+
if (!fAtlas) {
return;
}
-
+
SkPaint paint;
paint.setFilterQuality(kLow_SkFilterQuality);
paint.setColor(SK_ColorWHITE);
paint.setTextSize(15.0f);
-
+
fTimer.end();
-
+
fTimes[fCurrentTime] = (float)(fTimer.fWall);
fCurrentTime = (fCurrentTime + 1) & 0x1f;
-
+
float meanTime = 0.0f;
for (int i = 0; i < 32; ++i) {
meanTime += fTimes[i];
@@ -125,27 +125,27 @@
outString.appendScalar(fps);
outString.append(" ms: ");
outString.appendScalar(meanTime);
-
+
fTimer.start();
-
+
SkScalar anchorX = fAtlas->width()*0.5f;
SkScalar anchorY = fAtlas->height()*0.5f;
for (int i = 0; i < kGrid*kGrid+1; ++i) {
SkScalar c = fXform[i].fSCos;
SkScalar s = fXform[i].fSSin;
-
+
SkScalar dx = c*anchorX - s*anchorY;
SkScalar dy = s*anchorX + c*anchorY;
-
+
fXform[i].fSCos = kCosDiff*c - kSinDiff*s;
fXform[i].fSSin = kSinDiff*c + kCosDiff*s;
-
+
dx -= fXform[i].fSCos*anchorX - fXform[i].fSSin*anchorY;
dy -= fXform[i].fSSin*anchorX + fXform[i].fSCos*anchorY;
fXform[i].fTx += dx;
fXform[i].fTy += dy;
}
-
+
fProc(canvas, fAtlas.get(), fXform, fTex, nullptr, kGrid*kGrid+1, nullptr, &paint);
paint.setColor(SK_ColorBLACK);
canvas->drawRect(SkRect::MakeXYWH(0, 0, 200, 24), paint);
@@ -167,15 +167,15 @@
private:
const char* fName;
DrawAtlasProc fProc;
-
+
sk_sp<SkImage> fAtlas;
SkRSXform fXform[kGrid*kGrid+1];
SkRect fTex[kGrid*kGrid+1];
WallTimer fTimer;
float fTimes[32];
int fCurrentTime;
-
-
+
+
typedef SampleView INHERITED;
};
diff --git a/samplecode/SampleSkLayer.cpp b/samplecode/SampleSkLayer.cpp
index c57a281..0422561 100644
--- a/samplecode/SampleSkLayer.cpp
+++ b/samplecode/SampleSkLayer.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index 9b054ad..b4ebb3c 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleStrokePath.cpp b/samplecode/SampleStrokePath.cpp
index 9bcfcd9..f3cdee3 100644
--- a/samplecode/SampleStrokePath.cpp
+++ b/samplecode/SampleStrokePath.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleStrokeRect.cpp b/samplecode/SampleStrokeRect.cpp
index 59e0a46..a0cc5b2 100644
--- a/samplecode/SampleStrokeRect.cpp
+++ b/samplecode/SampleStrokeRect.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleTextAlpha.cpp b/samplecode/SampleTextAlpha.cpp
index 6e2e950..a57c016 100644
--- a/samplecode/SampleTextAlpha.cpp
+++ b/samplecode/SampleTextAlpha.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleTextBox.cpp b/samplecode/SampleTextBox.cpp
index aedeaf6..8540ca4 100644
--- a/samplecode/SampleTextBox.cpp
+++ b/samplecode/SampleTextBox.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp
index 7c71084..63b7ef2 100644
--- a/samplecode/SampleTextOnPath.cpp
+++ b/samplecode/SampleTextOnPath.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp
index dbc7d09..84346b0 100644
--- a/samplecode/SampleTiling.cpp
+++ b/samplecode/SampleTiling.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp
index 985ef60..0d43962 100644
--- a/samplecode/SampleVertices.cpp
+++ b/samplecode/SampleVertices.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleWritePixels.cpp b/samplecode/SampleWritePixels.cpp
index bce7980..912567d 100644
--- a/samplecode/SampleWritePixels.cpp
+++ b/samplecode/SampleWritePixels.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
diff --git a/samplecode/SampleXfer.cpp b/samplecode/SampleXfer.cpp
index 58546e1..6aaffe5 100644
--- a/samplecode/SampleXfer.cpp
+++ b/samplecode/SampleXfer.cpp
@@ -57,7 +57,7 @@
fColor = (gRand.nextU() & 0x7F7F7F7F) | SkColorSetARGB(0xFF, 0, 0, 0x80);
fFast32 = fast;
}
-
+
protected:
void onPrepareWidEvent(SkEvent* evt) override {
evt->setType("push-button");
@@ -101,7 +101,7 @@
}
return true;
}
-
+
private:
typedef HasEventWig INHERITED;
};
@@ -151,7 +151,7 @@
enum {
N = 4
};
-
+
SkRect fModeRect[N_Modes];
SkAutoTUnref<CircDrawable> fDrs[N];
CircDrawable* fSelected;
@@ -234,7 +234,7 @@
this->inval(nullptr);
return fSelected ? new Click(this) : nullptr;
}
-
+
bool onClick(Click* click) override {
fSelected->fLoc.fX += click->fCurr.fX - click->fPrev.fX;
fSelected->fLoc.fY += click->fCurr.fY - click->fPrev.fY;
diff --git a/samplecode/vertexdump.cpp b/samplecode/vertexdump.cpp
index 9bfb0ce..69fd967 100644
--- a/samplecode/vertexdump.cpp
+++ b/samplecode/vertexdump.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*