diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkMatrix.cpp | 2 | ||||
-rw-r--r-- | src/core/SkPath.cpp | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index 1eabc78fba..5c9547e8a7 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -1826,7 +1826,7 @@ bool SkTreatAsSprite(const SkMatrix& mat, int width, int height, SkRect dst; SkIRect isrc = { 0, 0, width, height }; - + { SkRect src; src.set(isrc); diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 88d7c43d6b..5e0d198182 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -1034,38 +1034,38 @@ bool SkPath::hasOnlyMoveTos() const { void SkPath::addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, Direction dir) { assert_known_direction(dir); - + SkScalar w = rect.width(); SkScalar halfW = SkScalarHalf(w); SkScalar h = rect.height(); SkScalar halfH = SkScalarHalf(h); - + if (halfW <= 0 || halfH <= 0) { return; } - + bool skip_hori = rx >= halfW; bool skip_vert = ry >= halfH; - + if (skip_hori && skip_vert) { this->addOval(rect, dir); return; } - + fDirection = this->hasOnlyMoveTos() ? dir : kUnknown_Direction; - + SkAutoPathBoundsUpdate apbu(this, rect); SkAutoDisableDirectionCheck(this); - + if (skip_hori) { rx = halfW; } else if (skip_vert) { ry = halfH; } - + SkScalar sx = SkScalarMul(rx, CUBIC_ARC_FACTOR); SkScalar sy = SkScalarMul(ry, CUBIC_ARC_FACTOR); - + this->incReserve(17); this->moveTo(rect.fRight - rx, rect.fTop); if (dir == kCCW_Direction) { |