aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-05 07:01:06 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-05 07:01:06 +0000
commit8f6ef4010f6835c5ce9ede180e50a6a58512a81e (patch)
treec66f46fb0b3242dfb7abbab5386c7d81ce57b375
parent4a3ca94322510351f7304af2092d6513442ab9d7 (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9440 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--include/core/SkDraw.h2
-rw-r--r--include/core/SkPaint.h6
-rw-r--r--src/core/SkDraw.cpp8
-rw-r--r--src/core/SkPaint.cpp8
-rw-r--r--src/core/SkString.cpp2
-rw-r--r--src/pathops/SkOpAngle.cpp8
-rw-r--r--src/pathops/SkOpAngle.h2
-rw-r--r--src/pathops/SkPathOpsCubic.cpp2
-rw-r--r--src/pathops/SkPathOpsCubic.h2
-rw-r--r--src/pathops/SkPathOpsQuad.cpp2
-rw-r--r--tests/PathOpsAngleTest.cpp8
11 files changed, 25 insertions, 25 deletions
diff --git a/include/core/SkDraw.h b/include/core/SkDraw.h
index 293d4e3c78..8642f0ab79 100644
--- a/include/core/SkDraw.h
+++ b/include/core/SkDraw.h
@@ -106,7 +106,7 @@ private:
void drawPosText_asPaths(const char text[], size_t byteLength,
const SkScalar pos[], SkScalar constY,
int scalarsPerPosition, const SkPaint&) const;
-
+
/**
* Return the current clip bounds, in local coordinates, with slop to account
* for antialiasing or hairlines (i.e. device-bounds outset by 1, and then
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 624f39c36d..13be355463 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -946,11 +946,11 @@ public:
}
return matrix;
}
-
+
SkMatrix* setTextMatrix(SkMatrix* matrix) const {
return SetTextMatrix(matrix, fTextSize, fTextScaleX, fTextSkewX);
}
-
+
SkDEVCODE(void toString(SkString*) const;)
private:
@@ -1033,7 +1033,7 @@ private:
bool tooBigToUseCache() const;
bool tooBigToUseCache(const SkMatrix& ctm) const;
-
+
// Set flags/hinting/textSize up to use for drawing text as paths.
// Returns scale factor to restore the original textSize, since will will
// have change it to kCanonicalTextSizeForPaths.
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index f313c4b119..5782fc537e 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -37,7 +37,7 @@ bool SkDraw::ShouldDrawTextAsPaths(const SkPaint& paint, const SkMatrix& ctm) {
0 == paint.getStrokeWidth()) {
return true;
}
-
+
// we don't cache perspective
if (ctm.hasPerspective()) {
return true;
@@ -1867,7 +1867,7 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
SkMatrix matrix = *fMatrix;
matrix.preScale(matrixScale, matrixScale);
const SkScalar posScale = SkScalarInvert(matrixScale);
-
+
SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
SkAutoGlyphCache autoCache(paint, NULL, NULL);
SkGlyphCache* cache = autoCache.getCache();
@@ -1876,7 +1876,7 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
AlignProc alignProc = pick_align_proc(paint.getTextAlign());
TextMapState tms(SkMatrix::I(), constY);
TextMapState::Proc tmsProc = tms.pickProc(scalarsPerPosition);
-
+
while (text < stop) {
const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
if (glyph.fWidth) {
@@ -1885,7 +1885,7 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
tmsProc(tms, pos);
SkIPoint fixedLoc;
alignProc(tms.fLoc, glyph, &fixedLoc);
-
+
SkMatrix localMatrix = matrix;
localMatrix.preTranslate(SkFixedToScalar(fixedLoc.fX) * posScale,
SkFixedToScalar(fixedLoc.fY) * posScale);
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index e781cd45a7..886794c479 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -961,10 +961,10 @@ SkScalar SkPaint::setupForAsPaths() {
flags &= ~TEXT_AS_PATHS_PAINT_FLAGS_TO_IGNORE;
// set the flags we do care about
flags |= SkPaint::kSubpixelText_Flag;
-
+
this->setFlags(flags);
this->setHinting(SkPaint::kNo_Hinting);
-
+
SkScalar textSize = fTextSize;
this->setTextSize(kCanonicalTextSizeForPaths);
return textSize / kCanonicalTextSizeForPaths;
@@ -981,7 +981,7 @@ public:
}
const SkPaint& getPaint() const { return *fPaint; }
-
+
/**
* Returns 0 if the paint was unmodified, or the scale factor need to
* the original textSize
@@ -1274,7 +1274,7 @@ SkScalar SkPaint::getFontMetrics(FontMetrics* metrics, SkScalar zoom) const {
SkCanonicalizePaint canon(*this);
const SkPaint& paint = canon.getPaint();
SkScalar scale = canon.getScale();
-
+
SkMatrix zoomMatrix, *zoomPtr = NULL;
if (zoom) {
zoomMatrix.setScale(zoom, zoom);
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index 3fae07e12a..d9d74c4caa 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -449,7 +449,7 @@ void SkString::insert(size_t offset, const char text[], size_t len) {
if (offset > length) {
offset = length;
}
-
+
// Check if length + len exceeds 32bits, we trim len
len = check_add32(length, len);
if (0 == len) {
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp
index c295bfb9d8..0ac5a3da78 100644
--- a/src/pathops/SkOpAngle.cpp
+++ b/src/pathops/SkOpAngle.cpp
@@ -30,7 +30,7 @@ static const int bugChar = strlen(funcName) + 1;
#define COMPARE_RESULT(append, compare) CompareResult(&bugOut, append, compare)
#else
- #define COMPARE_RESULT(append, compare) compare
+ #define COMPARE_RESULT(append, compare) compare
#endif
bool SkOpAngle::calcSlop(double x, double y, double rx, double ry, bool* result) const{
@@ -105,7 +105,7 @@ bool SkOpAngle::operator<(const SkOpAngle& rh) const { // this/lh: left-hand; r
}
// at this point, both y's are zero, so lines are coincident or one is degenerate
SkASSERT(x * rx != 0); // and a degenerate line should haven't gotten this far
- }
+ }
// see if either curve can be lengthened before trying the tangent
if (fSegment->other(fEnd) != rh.fSegment // tangents not absolutely identical
&& rh.fSegment->other(rh.fEnd) != fSegment) { // and not intersecting
@@ -133,7 +133,7 @@ bool SkOpAngle::operator<(const SkOpAngle& rh) const { // this/lh: left-hand; r
// if the vector was a result of subdividing a curve, see if it is stable
bool sloppy1 = x_ry < rx_y;
bool sloppy2 = !sloppy1;
- if ((!fComputed || calcSlop(x, y, rx, ry, &sloppy1))
+ if ((!fComputed || calcSlop(x, y, rx, ry, &sloppy1))
&& (!rh.fComputed || rh.calcSlop(rx, ry, x, y, &sloppy2))
&& sloppy1 != sloppy2) {
return COMPARE_RESULT("8 CalcSlop(x, y ...", sloppy1);
@@ -384,7 +384,7 @@ void SkOpAngle::setSpans() {
fUnsortable = fSegment->isTiny(this);
return;
}
- }
+ }
} break;
default:
SkASSERT(0);
diff --git a/src/pathops/SkOpAngle.h b/src/pathops/SkOpAngle.h
index cca1a224dd..2800ff0568 100644
--- a/src/pathops/SkOpAngle.h
+++ b/src/pathops/SkOpAngle.h
@@ -81,7 +81,7 @@ private:
// if subdividing a quad or cubic causes the tangent to go from the maximum angle to the
// minimum, mark it unorderable. It still can be sorted, which is good enough for find-top
// but can't be ordered, and therefore can't be used to compute winding
- bool fUnorderable;
+ bool fUnorderable;
mutable bool fUnsortable; // this alone is editable by the less than operator
#if DEBUG_ANGLE
int fID;
diff --git a/src/pathops/SkPathOpsCubic.cpp b/src/pathops/SkPathOpsCubic.cpp
index c644a67117..5d77e5ab89 100644
--- a/src/pathops/SkPathOpsCubic.cpp
+++ b/src/pathops/SkPathOpsCubic.cpp
@@ -407,7 +407,7 @@ SkDCubic SkDCubic::subDivide(double t1, double t2) const {
return dst;
}
-void SkDCubic::align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const {
+void SkDCubic::align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const {
if (fPts[endIndex].fX == fPts[ctrlIndex].fX) {
dstPt->fX = fPts[endIndex].fX;
}
diff --git a/src/pathops/SkPathOpsCubic.h b/src/pathops/SkPathOpsCubic.h
index c884ea9714..7be614290d 100644
--- a/src/pathops/SkPathOpsCubic.h
+++ b/src/pathops/SkPathOpsCubic.h
@@ -33,7 +33,7 @@ struct SkDCubic {
const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < 4); return fPts[n]; }
SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < 4); return fPts[n]; }
- void align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const;
+ void align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const;
double calcPrecision() const;
SkDCubicPair chopAt(double t) const;
bool clockwise() const;
diff --git a/src/pathops/SkPathOpsQuad.cpp b/src/pathops/SkPathOpsQuad.cpp
index ce89469062..3cbc28abf4 100644
--- a/src/pathops/SkPathOpsQuad.cpp
+++ b/src/pathops/SkPathOpsQuad.cpp
@@ -221,7 +221,7 @@ SkDQuad SkDQuad::subDivide(double t1, double t2) const {
return dst;
}
-void SkDQuad::align(int endIndex, SkDPoint* dstPt) const {
+void SkDQuad::align(int endIndex, SkDPoint* dstPt) const {
if (fPts[endIndex].fX == fPts[1].fX) {
dstPt->fX = fPts[endIndex].fX;
}
diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp
index 583e901eec..1986a506bd 100644
--- a/tests/PathOpsAngleTest.cpp
+++ b/tests/PathOpsAngleTest.cpp
@@ -412,9 +412,9 @@ static int find_slop(double x, double y, double rx, double ry) {
static double diamond_angle(double y, double x)
{
if (y >= 0)
- return (x >= 0 ? y/(x+y) : 1-x/(-x+y));
+ return (x >= 0 ? y/(x+y) : 1-x/(-x+y));
else
- return (x < 0 ? 2-y/(-x-y) : 3+x/(x-y));
+ return (x < 0 ? 2-y/(-x-y) : 3+x/(x-y));
}
static const double slopTests[][4] = {
@@ -431,8 +431,8 @@ static void PathOpsAngleFindSlop(skiatest::Reporter* reporter) {
double y = slopTest[1];
double rx = slopTest[2];
double ry = slopTest[3];
- SkDebugf("%s xy %d=%d\n", __FUNCTION__, (int) index, find_slop(x, y, rx, ry));
- SkDebugf("%s rxy %d=%d\n", __FUNCTION__, (int) index, find_slop(rx, ry, x, y));
+ SkDebugf("%s xy %d=%d\n", __FUNCTION__, (int) index, find_slop(x, y, rx, ry));
+ SkDebugf("%s rxy %d=%d\n", __FUNCTION__, (int) index, find_slop(rx, ry, x, y));
double angle = diamond_angle(y, x);
double rAngle = diamond_angle(ry, rx);
double diff = fabs(angle - rAngle);