Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: src/core/SkPath.cpp

Issue 1627703002: remove legacy defines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove SK_SUPPORT_LEGACY_PATH_MEASURE_TVALUE etc Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkGeometry.cpp ('k') | src/core/SkPathMeasure.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPath.cpp
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 40ca50b5caf99b4c93f6f9380a9ea62a9f2b7793..5fa0b9a14d6970eb4a22db8e34886ec10814724d 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1412,41 +1412,10 @@ void SkPath::arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar
SkScalar xx = x1 - SkScalarMul(dist, before.fX);
SkScalar yy = y1 - SkScalarMul(dist, before.fY);
-#ifndef SK_SUPPORT_LEGACY_ARCTO
after.setLength(dist);
this->lineTo(xx, yy);
SkScalar weight = SkScalarSqrt(SK_ScalarHalf + cosh * SK_ScalarHalf);
this->conicTo(x1, y1, x1 + after.fX, y1 + after.fY, weight);
-#else
- SkRotationDirection arcDir;
-
- // now turn before/after into normals
- if (sinh > 0) {
- before.rotateCCW();
- after.rotateCCW();
- arcDir = kCW_SkRotationDirection;
- } else {
- before.rotateCW();
- after.rotateCW();
- arcDir = kCCW_SkRotationDirection;
- }
-
- SkMatrix matrix;
- SkPoint pts[kSkBuildQuadArcStorage];
-
- matrix.setScale(radius, radius);
- matrix.postTranslate(xx - SkScalarMul(radius, before.fX),
- yy - SkScalarMul(radius, before.fY));
-
- int count = SkBuildQuadArc(before, after, arcDir, &matrix, pts);
-
- this->incReserve(count);
- // [xx,yy] == pts[0]
- this->lineTo(xx, yy);
- for (int i = 1; i < count; i += 2) {
- this->quadTo(pts[i], pts[i+1]);
- }
-#endif
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/core/SkGeometry.cpp ('k') | src/core/SkPathMeasure.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698