diff options
author | 2012-09-15 02:01:41 +0000 | |
---|---|---|
committer | 2012-09-15 02:01:41 +0000 | |
commit | 055c7c299cb47eebd360b809ad58a0006e2e55f7 (patch) | |
tree | 1c94178b85a8154c3c9a22f5b15b0c1e8666bd76 | |
parent | 6c5418e6c25141cc3a1cc798d55219012bc881ec (diff) |
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5561 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | experimental/Intersection/DataTypes.h | 2 | ||||
-rw-r--r-- | experimental/Intersection/Intersections.cpp | 4 | ||||
-rw-r--r-- | experimental/Intersection/Intersections.h | 6 | ||||
-rw-r--r-- | experimental/Intersection/QuadraticImplicit.cpp | 2 | ||||
-rw-r--r-- | experimental/Intersection/QuadraticIntersection.cpp | 2 | ||||
-rw-r--r-- | experimental/Intersection/QuadraticParameterization.h | 2 | ||||
-rw-r--r-- | experimental/Intersection/QuarticRoot.cpp | 14 | ||||
-rw-r--r-- | experimental/Intersection/ShapeOps.cpp | 2 | ||||
-rw-r--r-- | experimental/Intersection/Simplify.cpp | 16 | ||||
-rw-r--r-- | src/core/SkEdge.cpp | 2 | ||||
-rw-r--r-- | tests/PathTest.cpp | 8 |
11 files changed, 30 insertions, 30 deletions
diff --git a/experimental/Intersection/DataTypes.h b/experimental/Intersection/DataTypes.h index dc61699fa0..0c51a20647 100644 --- a/experimental/Intersection/DataTypes.h +++ b/experimental/Intersection/DataTypes.h @@ -190,7 +190,7 @@ struct _Rect { bottom = pt.y; } } - + // FIXME: used by debugging only ? bool contains(const _Point& pt) { return approximately_between(left, pt.x, right) diff --git a/experimental/Intersection/Intersections.cpp b/experimental/Intersection/Intersections.cpp index 089a432e09..3f4e8cf32b 100644 --- a/experimental/Intersection/Intersections.cpp +++ b/experimental/Intersection/Intersections.cpp @@ -4,7 +4,7 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ - + #include "DataTypes.h" #include "Intersections.h" @@ -12,5 +12,5 @@ void Intersections::cleanUp() { assert(fCoincidentUsed); assert(fUsed); // find any entries in fT that could be part of the coincident range - + } diff --git a/experimental/Intersection/Intersections.h b/experimental/Intersection/Intersections.h index 464e1a8929..a09cfcda9c 100644 --- a/experimental/Intersection/Intersections.h +++ b/experimental/Intersection/Intersections.h @@ -118,7 +118,7 @@ public: fT[fSwap][index] = val; } } - + void insert(double one, double two) { assert(fUsed <= 1 || fT[0][0] < fT[0][1]); int index; @@ -141,7 +141,7 @@ public: fT[1][index] = two; ++fUsed; } - + void insertOne(double t, int side) { int used = side ? fUsed2 : fUsed; assert(used <= 1 || fT[side][0] < fT[side][1]); @@ -166,7 +166,7 @@ public: bool intersected() const { return fUsed > 0; } - + bool insertBalanced() const { return fUsed == fUsed2; } diff --git a/experimental/Intersection/QuadraticImplicit.cpp b/experimental/Intersection/QuadraticImplicit.cpp index b5efd037db..c8635d408c 100644 --- a/experimental/Intersection/QuadraticImplicit.cpp +++ b/experimental/Intersection/QuadraticImplicit.cpp @@ -14,7 +14,7 @@ /* given the implicit form 0 = Ax^2 + Bxy + Cy^2 + Dx + Ey + F * and given x = at^2 + bt + c (the parameterized form) * y = dt^2 + et + f - * then + * then * 0 = A(at^2+bt+c)(at^2+bt+c)+B(at^2+bt+c)(dt^2+et+f)+C(dt^2+et+f)(dt^2+et+f)+D(at^2+bt+c)+E(dt^2+et+f)+F */ diff --git a/experimental/Intersection/QuadraticIntersection.cpp b/experimental/Intersection/QuadraticIntersection.cpp index 28299dd866..800964d350 100644 --- a/experimental/Intersection/QuadraticIntersection.cpp +++ b/experimental/Intersection/QuadraticIntersection.cpp @@ -262,7 +262,7 @@ double coinMaxT2; static void hackToFixPartialCoincidence(const Quadratic& q1, const Quadratic& q2, Intersections& i) { // look to see if non-coincident data basically has unsortable tangents - + // look to see if a point between non-coincident data is on the curve int cIndex; for (int uIndex = 0; uIndex < i.fUsed; ) { diff --git a/experimental/Intersection/QuadraticParameterization.h b/experimental/Intersection/QuadraticParameterization.h index 5c651b61cf..ca7d072208 100644 --- a/experimental/Intersection/QuadraticParameterization.h +++ b/experimental/Intersection/QuadraticParameterization.h @@ -4,7 +4,7 @@ class QuadImplicitForm { public: QuadImplicitForm(const Quadratic& q); bool implicit_match(const QuadImplicitForm& two) const; - + double x2() const { return p[xx_coeff]; } double xy() const { return p[xy_coeff]; } double y2() const { return p[yy_coeff]; } diff --git a/experimental/Intersection/QuarticRoot.cpp b/experimental/Intersection/QuarticRoot.cpp index 509a4f0263..e0ec2b0f29 100644 --- a/experimental/Intersection/QuarticRoot.cpp +++ b/experimental/Intersection/QuarticRoot.cpp @@ -14,9 +14,9 @@ * * Jan 26, 1990 Version for Graphics Gems * Oct 11, 1990 Fixed sign problem for negative q's in SolveQuartic - * (reported by Mark Podlipec), - * Old-style function definitions, - * IsZero() as a macro + * (reported by Mark Podlipec), + * Old-style function definitions, + * IsZero() as a macro * Nov 23, 1990 Some systems do not declare acos() and cbrt() in * <math.h>, though the functions exist in the library. * If large coefficients are used, EQN_EPS should be @@ -72,7 +72,7 @@ static int cubicRootsX(const double A, const double B, const double C, const double b = C * invA; const double c = D * invA; /* substitute x = y - a/3 to eliminate quadric term: - x^3 +px + q = 0 */ + x^3 +px + q = 0 */ const double a2 = a * a; const double Q = (-a2 + b * 3) / 9; const double R = (2 * a2 * a - 9 * a * b + 27 * c) / 54; @@ -84,7 +84,7 @@ static int cubicRootsX(const double A, const double B, const double C, s[0] = 0; num = 1; } else { /* one single and one double solution */ - + double u = cube_root(-R); s[0] = 2 * u; s[1] = -u; @@ -130,13 +130,13 @@ int quarticRoots(const double A, const double B, const double C, const double D, const double c = D * invA; const double d = E * invA; /* substitute x = y - a/4 to eliminate cubic term: - x^4 + px^2 + qx + r = 0 */ + x^4 + px^2 + qx + r = 0 */ const double a2 = a * a; const double p = -3 * a2 / 8 + b; const double q = a2 * a / 8 - a * b / 2 + c; const double r = -3 * a2 * a2 / 256 + a2 * b / 16 - a * c / 4 + d; if (approximately_zero(r)) { - /* no absolute term: y(y^3 + py + q) = 0 */ + /* no absolute term: y(y^3 + py + q) = 0 */ num = cubicRootsX(1, 0, p, q, s); s[num++] = 0; } else { diff --git a/experimental/Intersection/ShapeOps.cpp b/experimental/Intersection/ShapeOps.cpp index 74e1626c66..4058a16ca0 100644 --- a/experimental/Intersection/ShapeOps.cpp +++ b/experimental/Intersection/ShapeOps.cpp @@ -16,7 +16,7 @@ static bool windingIsActive(int winding, int spanWinding, int oppWinding, && (!winding || !spanWinding || winding == -spanWinding); } -static void bridgeOp(SkTDArray<Contour*>& contourList, const ShapeOp op, +static void bridgeOp(SkTDArray<Contour*>& contourList, const ShapeOp op, const int aXorMask, const int bXorMask, SkPath& simple) { bool firstContour = true; do { diff --git a/experimental/Intersection/Simplify.cpp b/experimental/Intersection/Simplify.cpp index 78c36f6510..b5403bfbb4 100644 --- a/experimental/Intersection/Simplify.cpp +++ b/experimental/Intersection/Simplify.cpp @@ -539,7 +539,7 @@ public: SkASSERT(fSide != rh.fSide); return fSide < rh.fSide; } - #if 0 // the following code is a bust. In particular, tangent length doesn't provide a sort + #if 0 // the following code is a bust. In particular, tangent length doesn't provide a sort if (y != ry) { return (fabs(y) < fabs(ry)) ^ (fSide > 0); } @@ -555,7 +555,7 @@ public: #else SkASSERT(fVerb == SkPath::kQuad_Verb); // worry about cubics later SkASSERT(rh.fVerb == SkPath::kQuad_Verb); - // FIXME: until I can think of something better, project a ray perpendicular from the + // FIXME: until I can think of something better, project a ray perpendicular from the // end of the shorter tangent through both curves and use the resulting angle to sort // FIXME: some of this setup can be moved to set() if it works, or cached if it's expensive double len = fTangent1.normalSquared(); @@ -1653,7 +1653,7 @@ public: const Span& mSpan = fTs[SkMin32(start, end)]; return mSpan.fDone; } - + Segment* findNextOp(SkTDArray<Span*>& chase, bool active, int& nextStart, int& nextEnd, int& winding, int& spanWinding, ShapeOp op, const int aXorMask, const int bXorMask) { @@ -1765,7 +1765,7 @@ public: SkDebugf("%s [%d] maxWinding=%d sumWinding=%d sign=%d altFlipped=%d\n", __FUNCTION__, nextIndex, maxWinding, sumWinding, nextAngle->sign(), altFlipped); #endif - + if (!(sumWinding & xorMask) && activeOp(angleIsOp, otherNonZero, op)) { if (!active) { markDone(SkMin32(startIndex, endIndex), outerWinding); @@ -2603,7 +2603,7 @@ public: } return -1; } - + bool operand() const { return fOperand; } @@ -2710,7 +2710,7 @@ public: SkScalar xAtT(const Span* span) const { return xyAtT(span).fX; } - + const SkPoint& xyAtT(int index) const { return xyAtT(&fTs[index]); } @@ -3157,7 +3157,7 @@ public: void setOperand(bool isOp) { fOperand = isOp; } - + void setXor(bool isXor) { fXor = isXor; } @@ -3441,7 +3441,7 @@ void walk() { SkASSERT(fCurrentContour); if (verbPtr == endOfFirstHalf) { fOperand = true; - } + } } } diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp index 4c264c2eb9..fff3dbcc6a 100644 --- a/src/core/SkEdge.cpp +++ b/src/core/SkEdge.cpp @@ -476,7 +476,7 @@ int SkCubicEdge::updateCubic() newx = fCLastX; newy = fCLastY; } - + // we want to say SkASSERT(oldy <= newy), but our finite fixedpoint // doesn't always achieve that, so we have to explicitly pin it here. if (newy < oldy) { diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index b9add7afb5..8b2d87e098 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -31,10 +31,10 @@ static SkSurface* new_surface(int w, int h) { // assert in the SK_DEBUG build. static void test_tricky_cubic(skiatest::Reporter* reporter) { const SkPoint pts[] = { - { SkDoubleToScalar(18.8943768), SkDoubleToScalar(129.121277) }, - { SkDoubleToScalar(18.8937435), SkDoubleToScalar(129.121689) }, - { SkDoubleToScalar(18.8950119), SkDoubleToScalar(129.120422) }, - { SkDoubleToScalar(18.5030727), SkDoubleToScalar(129.13121) }, + { SkDoubleToScalar(18.8943768), SkDoubleToScalar(129.121277) }, + { SkDoubleToScalar(18.8937435), SkDoubleToScalar(129.121689) }, + { SkDoubleToScalar(18.8950119), SkDoubleToScalar(129.120422) }, + { SkDoubleToScalar(18.5030727), SkDoubleToScalar(129.13121) }, }; SkPath path; |