aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/DashBench.cpp2
-rw-r--r--gm/pathinterior.cpp4
-rw-r--r--include/utils/SkMatrix44.h10
-rw-r--r--src/core/SkDraw.cpp2
-rw-r--r--src/utils/SkMatrix44.cpp16
-rw-r--r--tests/Matrix44Test.cpp10
-rw-r--r--tools/skdiff_main.cpp2
-rw-r--r--tools/skdiff_utils.h2
8 files changed, 24 insertions, 24 deletions
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index e71773d891..a3ed886b2e 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -271,7 +271,7 @@ class DrawPointsDashingBench : public SkBenchmark {
};
public:
- DrawPointsDashingBench(void* param, int dashLength, int strokeWidth, bool doAA)
+ DrawPointsDashingBench(void* param, int dashLength, int strokeWidth, bool doAA)
: INHERITED(param) {
fName.printf("drawpointsdash_%d_%d%s", dashLength, strokeWidth, doAA ? "_aa" : "_bw");
fStrokeWidth = strokeWidth;
diff --git a/gm/pathinterior.cpp b/gm/pathinterior.cpp
index 2fde16259b..f7e0b5e867 100644
--- a/gm/pathinterior.cpp
+++ b/gm/pathinterior.cpp
@@ -74,7 +74,7 @@ protected:
path.setFillType(doEvenOdd ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType);
SkPath::Direction outerDir = outerCW ? SkPath::kCW_Direction : SkPath::kCCW_Direction;
SkPath::Direction innerDir = innerCW ? SkPath::kCW_Direction : SkPath::kCCW_Direction;
-
+
SkRect r = insetFirst ? inset(rect) : rect;
if (outerRR) {
path.addRoundRect(r, RAD, RAD, outerDir);
@@ -92,7 +92,7 @@ protected:
SkScalar dy = (i % 8) * rect.height() * 6 / 5;
i++;
path.offset(dx, dy);
-
+
this->show(canvas, path);
}
}
diff --git a/include/utils/SkMatrix44.h b/include/utils/SkMatrix44.h
index 565fcf5848..2e1872e644 100644
--- a/include/utils/SkMatrix44.h
+++ b/include/utils/SkMatrix44.h
@@ -37,7 +37,7 @@
#endif
typedef float SkMScalar;
typedef int32_t SkMIntScalar;
-
+
static inline float SkFloatToMScalar(float x) {
return x;
}
@@ -134,7 +134,7 @@ public:
kAffine_Mask = 0x04, //!< set if the matrix skews or rotates
kPerspective_Mask = 0x08 //!< set if the matrix is in perspective
};
-
+
/**
* Returns a bitfield describing the transformations the matrix may
* perform. The bitfield is computed conservatively, so it may include
@@ -153,7 +153,7 @@ public:
inline bool isIdentity() const {
return 0 == this->getType();
}
-
+
void setIdentity();
inline void reset() { this->setIdentity();}
@@ -330,7 +330,7 @@ private:
// we are always packed with no extra bits, allowing us to call memcpy
// without fear of copying uninitialized bits.
mutable SkMIntScalar fTypeMask;
-
+
enum {
kUnknown_Mask = 0x80,
@@ -344,7 +344,7 @@ private:
SkMScalar scaleX() const { return fMat[0][0]; }
SkMScalar scaleY() const { return fMat[1][1]; }
SkMScalar scaleZ() const { return fMat[2][2]; }
-
+
SkMScalar perspX() const { return fMat[0][3]; }
SkMScalar perspY() const { return fMat[1][3]; }
SkMScalar perspZ() const { return fMat[2][3]; }
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 7593086abe..3035afe1ef 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -680,7 +680,7 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count,
newP.setStrokeCap(SkPaint::kButt_Cap);
}
if (fDevice) {
- fDevice->drawPoints(*this,
+ fDevice->drawPoints(*this,
SkCanvas::kPoints_PointMode,
dst.fNumPoints,
dst.fPoints,
diff --git a/src/utils/SkMatrix44.cpp b/src/utils/SkMatrix44.cpp
index fbbefa07d7..1c9fd845fb 100644
--- a/src/utils/SkMatrix44.cpp
+++ b/src/utils/SkMatrix44.cpp
@@ -62,7 +62,7 @@ bool SkMatrix44::operator==(const SkMatrix44& other) const {
int SkMatrix44::computeTypeMask() const {
unsigned mask = 0;
-
+
if (0 != perspX() || 0 != perspY() || 0 != perspZ() || 1 != fMat[3][3]) {
return kTranslate_Mask | kScale_Mask | kAffine_Mask | kPerspective_Mask;
}
@@ -214,7 +214,7 @@ void SkMatrix44::setTranslate(SkMScalar dx, SkMScalar dy, SkMScalar dz) {
if (!dx && !dy && !dz) {
return;
}
-
+
fMat[3][0] = dx;
fMat[3][1] = dy;
fMat[3][2] = dz;
@@ -276,7 +276,7 @@ void SkMatrix44::preScale(SkMScalar sx, SkMScalar sy, SkMScalar sz) {
if (1 == sx && 1 == sy && 1 == sz) {
return;
}
-
+
SkMatrix44 tmp;
tmp.setScale(sx, sy, sz);
this->preConcat(tmp);
@@ -286,7 +286,7 @@ void SkMatrix44::postScale(SkMScalar sx, SkMScalar sy, SkMScalar sz) {
if (1 == sx && 1 == sy && 1 == sz) {
return;
}
-
+
for (int i = 0; i < 4; i++) {
fMat[i][0] *= sx;
fMat[i][1] *= sy;
@@ -562,7 +562,7 @@ void SkMatrix44::mapScalars(const SkScalar src[4], SkScalar dst[4]) const {
}
result[i] = SkMScalarToScalar(value);
}
-
+
if (storage == result) {
memcpy(dst, storage, sizeof(storage));
}
@@ -573,7 +573,7 @@ void SkMatrix44::mapScalars(const SkScalar src[4], SkScalar dst[4]) const {
void SkMatrix44::mapMScalars(const SkMScalar src[4], SkMScalar dst[4]) const {
SkMScalar storage[4];
SkMScalar* result = (src == dst) ? storage : dst;
-
+
for (int i = 0; i < 4; i++) {
SkMScalar value = 0;
for (int j = 0; j < 4; j++) {
@@ -581,7 +581,7 @@ void SkMatrix44::mapMScalars(const SkMScalar src[4], SkMScalar dst[4]) const {
}
result[i] = value;
}
-
+
if (storage == result) {
memcpy(dst, storage, sizeof(storage));
}
@@ -742,7 +742,7 @@ void SkMatrix44::map2(const double src2[], int count, double dst4[]) const {
static const Map2Procd gProc[] = {
map2_id, map2_td, map2_sd, map2_sd, map2_ad, map2_ad, map2_ad, map2_ad
};
-
+
TypeMask mask = this->getType();
Map2Procd proc = (mask & kPerspective_Mask) ? map2_pd : gProc[mask];
proc(fMat, src2, count, dst4);
diff --git a/tests/Matrix44Test.cpp b/tests/Matrix44Test.cpp
index 1458dfefad..9dc77c2b5d 100644
--- a/tests/Matrix44Test.cpp
+++ b/tests/Matrix44Test.cpp
@@ -86,7 +86,7 @@ static void test_translate(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kTranslate_Mask));
REPORTER_ASSERT(reporter, mat.invert(&inverse));
REPORTER_ASSERT(reporter, bits_isonly(inverse.getType(), SkMatrix44::kTranslate_Mask));
-
+
SkMatrix44 a, b, c;
a.set3x3(1, 2, 3, 4, 5, 6, 7, 8, 9);
b.setTranslate(10, 11, 12);
@@ -104,7 +104,7 @@ static void test_translate(skiatest::Reporter* reporter) {
static void test_scale(skiatest::Reporter* reporter) {
SkMatrix44 mat, inverse;
-
+
mat.setScale(1, 1, 1);
REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kIdentity_Mask));
mat.setScale(1, 2, 3);
@@ -115,12 +115,12 @@ static void test_scale(skiatest::Reporter* reporter) {
SkMatrix44 a, b, c;
a.set3x3(1, 2, 3, 4, 5, 6, 7, 8, 9);
b.setScale(10, 11, 12);
-
+
c.setConcat(a, b);
mat = a;
mat.preScale(10, 11, 12);
REPORTER_ASSERT(reporter, mat == c);
-
+
c.setConcat(b, a);
mat = a;
mat.postScale(10, 11, 12);
@@ -163,7 +163,7 @@ static void test_map2(skiatest::Reporter* reporter, const SkMatrix44& mat) {
mat.map2(src2, 1, dstA);
mat.mapMScalars(src4, dstB);
-
+
for (int i = 0; i < 4; ++i) {
REPORTER_ASSERT(reporter, dstA[i] == dstB[i]);
}
diff --git a/tools/skdiff_main.cpp b/tools/skdiff_main.cpp
index b9b00386e9..a9a1968fa5 100644
--- a/tools/skdiff_main.cpp
+++ b/tools/skdiff_main.cpp
@@ -50,7 +50,7 @@ struct DiffSummary {
for (int comparison = 0; comparison < DiffResource::kStatusCount; ++comparison) {
fStatusOfType[base][comparison].deleteAll();
}
- }
+ }
}
uint32_t fNumMatches;
diff --git a/tools/skdiff_utils.h b/tools/skdiff_utils.h
index bd496b3388..00ebf899a9 100644
--- a/tools/skdiff_utils.h
+++ b/tools/skdiff_utils.h
@@ -15,7 +15,7 @@ class SkBitmap;
class SkData;
class SkString;
-/** Returns true if the two buffers passed in are both non-NULL,
+/** Returns true if the two buffers passed in are both non-NULL,
* have the same length, and contain exactly the same byte values.
*/
bool are_buffers_equal(SkData* skdata1, SkData* skdata2);