diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp index 930688f4f6..e62fb53253 100644 --- a/bench/DashBench.cpp +++ b/bench/DashBench.cpp @@ -318,7 +318,7 @@ class GiantDashBench : public SkBenchmark { SkScalar fStrokeWidth; SkPoint fPts[2]; SkAutoTUnref fPathEffect; - + public: enum LineType { kHori_LineType, @@ -345,7 +345,7 @@ public: SkScalar cx = 640 / 2; // center X SkScalar cy = 480 / 2; // center Y SkMatrix matrix; - + switch (lt) { case kHori_LineType: matrix.setIdentity(); @@ -357,19 +357,19 @@ public: matrix.setRotate(45, cx, cy); break; } - + const SkScalar overshoot = 100*1000; const SkPoint pts[2] = { { -overshoot, cy }, { 640 + overshoot, cy } }; matrix.mapPoints(fPts, pts, 2); } - + protected: virtual const char* onGetName() SK_OVERRIDE { return fName.c_str(); } - + virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { SkPaint p; this->setupPaint(&p); @@ -379,7 +379,7 @@ protected: canvas->drawPoints(SkCanvas::kLines_PointMode, 2, fPts, p); } - + private: typedef SkBenchmark INHERITED; }; diff --git a/experimental/Intersection/CubicIntersection.cpp b/experimental/Intersection/CubicIntersection.cpp index a5b4261dfe..8de6398622 100644 --- a/experimental/Intersection/CubicIntersection.cpp +++ b/experimental/Intersection/CubicIntersection.cpp @@ -284,7 +284,7 @@ static bool intersect2(const Cubic& cubic1, double t1s, double t1e, const Cubic& cubic1, SkTMax(to1 - dt1, 0.), SkTMin(to1 + dt1, 1.), i); i.swap(); --debugDepth; - + } } t2Start = t2; diff --git a/experimental/Intersection/CubicUtilities.cpp b/experimental/Intersection/CubicUtilities.cpp index 3e2f474d7c..70f10c17a4 100644 --- a/experimental/Intersection/CubicUtilities.cpp +++ b/experimental/Intersection/CubicUtilities.cpp @@ -162,7 +162,7 @@ int cubicRootsReal(double A, double B, double C, double D, double s[3]) { *roots++ = -u - adiv3; } } - else + else #endif if (R2MinusQ3 < 0) // we have 3 real roots { diff --git a/experimental/Intersection/DataTypes.h b/experimental/Intersection/DataTypes.h index de763edcc2..a6516fa0fc 100644 --- a/experimental/Intersection/DataTypes.h +++ b/experimental/Intersection/DataTypes.h @@ -63,7 +63,7 @@ inline bool approximately_equal(double x, double y) { return approximately_zero(x - y); #else // see http://visualstudiomagazine.com/blogs/tool-tracker/2011/11/compare-floating-point-numbers.aspx -// this allows very small (e.g. degenerate) values to compare unequally, but in this case, +// this allows very small (e.g. degenerate) values to compare unequally, but in this case, // AlmostEqualUlps should be used instead. if (x == y) { return true; diff --git a/experimental/Intersection/QuadraticUtilities.cpp b/experimental/Intersection/QuadraticUtilities.cpp index 475ec13b7d..c1fab05822 100644 --- a/experimental/Intersection/QuadraticUtilities.cpp +++ b/experimental/Intersection/QuadraticUtilities.cpp @@ -21,7 +21,7 @@ and using the roots */ - + int add_valid_ts(double s[], int realRoots, double* t) { int foundRoots = 0; for (int index = 0; index < realRoots; ++index) { diff --git a/experimental/Intersection/QuarticRoot.h b/experimental/Intersection/QuarticRoot.h index f76509e2f4..3692caa1b6 100644 --- a/experimental/Intersection/QuarticRoot.h +++ b/experimental/Intersection/QuarticRoot.h @@ -1,5 +1,5 @@ int reducedQuarticRoots(const double t4, const double t3, const double t2, const double t1, const double t0, const bool oneHint, double s[4]); - + int quarticRootsReal(const double A, const double B, const double C, const double D, const double E, double s[4]); diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp index b7b39a83ea..d635535817 100644 --- a/gyp/SampleApp.gyp +++ b/gyp/SampleApp.gyp @@ -5,7 +5,7 @@ 'type': 'executable', 'mac_bundle' : 1, 'include_dirs' : [ - '../src/core', + '../src/core', '../src/effects', #needed for BlurMask.h '../gm', # needed to pull gm.h '../samplecode', # To pull SampleApp.h and SampleCode.h diff --git a/include/core/SkDraw.h b/include/core/SkDraw.h index e671d7d12c..fa02919422 100644 --- a/include/core/SkDraw.h +++ b/include/core/SkDraw.h @@ -114,7 +114,7 @@ private: */ bool SK_WARN_UNUSED_RESULT computeConservativeLocalClipBounds(SkRect* bounds) const; - + public: const SkBitmap* fBitmap; // required const SkMatrix* fMatrix; // required diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 87f117b8e7..fcaf4cf698 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -686,7 +686,7 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count, path.lineTo(pts[1]); SkRect cullRect = SkRect::Make(fRC->getBounds()); - + if (paint.getPathEffect()->asPoints(&pointData, path, rec, *fMatrix, &cullRect)) { // 'asPoints' managed to find some fast path diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index d1ce526073..c6ae6b22b4 100644 --- a/src/effects/SkDashPathEffect.cpp +++ b/src/effects/SkDashPathEffect.cpp @@ -118,7 +118,7 @@ static bool cull_path(const SkPath& srcPath, const SkStrokeRec& rec, SkScalar dx = pts[1].x() - pts[0].x(); SkScalar dy = pts[1].y() - pts[0].y(); - + // just do horizontal lines for now (lazy) if (dy) { return false; @@ -126,11 +126,11 @@ static bool cull_path(const SkPath& srcPath, const SkStrokeRec& rec, SkScalar minX = pts[0].fX; SkScalar maxX = pts[1].fX; - + if (maxX < bounds.fLeft || minX > bounds.fRight) { return false; } - + if (dx < 0) { SkTSwap(minX, maxX); } @@ -147,14 +147,14 @@ static bool cull_path(const SkPath& srcPath, const SkStrokeRec& rec, maxX = bounds.fRight + SkScalarMod(maxX - bounds.fRight, intervalLength); } - + SkASSERT(maxX > minX); if (dx < 0) { SkTSwap(minX, maxX); } pts[0].fX = minX; pts[1].fX = maxX; - + dstPath->moveTo(pts[0]); dstPath->lineTo(pts[1]); return true; @@ -243,7 +243,7 @@ bool SkDashPathEffect::filterPath(SkPath* dst, const SkPath& src, if (cull_path(src, *rec, cullRect, fIntervalLength, &cullPathStorage)) { srcPtr = &cullPathStorage; } - + SpecialLineRec lineRec; bool specialLine = lineRec.init(src, dst, rec, fCount >> 1, fIntervalLength); diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp index b9c32fdb81..28c6e682de 100644 --- a/tests/SortTest.cpp +++ b/tests/SortTest.cpp @@ -45,7 +45,7 @@ static void TestSort(skiatest::Reporter* reporter) { for (int i = 0; i < 10000; i++) { int count = rand.nextRangeU(1, SK_ARRAY_COUNT(randomArray)); rand_array(rand, randomArray, count); - + // Use qsort as the reference sort. memcpy(sortedArray, randomArray, sizeof(randomArray)); qsort(sortedArray, count, sizeof(sortedArray[0]), compare_int);