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

Unified Diff: src/core/SkStrokerPriv.cpp

Issue 1023103004: remove SK_SUPPORT_LEGACY_ARCTO_QUADS code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/SkPath.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStrokerPriv.cpp
diff --git a/src/core/SkStrokerPriv.cpp b/src/core/SkStrokerPriv.cpp
index fbd552abfd5dc10dc79b2e29c24e210ed2b9c035..bc8e0435a1e1dbd161003694c82995ca1c1e9195 100644
--- a/src/core/SkStrokerPriv.cpp
+++ b/src/core/SkStrokerPriv.cpp
@@ -22,21 +22,6 @@ static void RoundCapper(SkPath* path, const SkPoint& pivot,
const SkVector& normal, const SkPoint& stop,
SkPath*)
{
-#ifdef SK_SUPPORT_LEGACY_ARCTO_QUADS
- SkScalar px = pivot.fX;
- SkScalar py = pivot.fY;
- SkScalar nx = normal.fX;
- SkScalar ny = normal.fY;
- SkScalar sx = SkScalarMul(nx, CUBIC_ARC_FACTOR);
- SkScalar sy = SkScalarMul(ny, CUBIC_ARC_FACTOR);
-
- path->cubicTo(px + nx + CWX(sx, sy), py + ny + CWY(sx, sy),
- px + CWX(nx, ny) + sx, py + CWY(nx, ny) + sy,
- px + CWX(nx, ny), py + CWY(nx, ny));
- path->cubicTo(px + CWX(nx, ny) - sx, py + CWY(nx, ny) - sy,
- px - nx + CWX(sx, sy), py - ny + CWY(sx, sy),
- stop.fX, stop.fY);
-#else
SkVector parallel;
normal.rotateCW(&parallel);
@@ -44,7 +29,6 @@ static void RoundCapper(SkPath* path, const SkPoint& pivot,
path->conicTo(projectedCenter + normal, projectedCenter, SK_ScalarRoot2Over2);
path->conicTo(projectedCenter - normal, stop, SK_ScalarRoot2Over2);
-#endif
}
static void SquareCapper(SkPath* path, const SkPoint& pivot,
@@ -149,18 +133,6 @@ static void RoundJoiner(SkPath* outer, SkPath* inner, const SkVector& beforeUnit
SkMatrix matrix;
matrix.setScale(radius, radius);
matrix.postTranslate(pivot.fX, pivot.fY);
-#ifdef SK_SUPPORT_LEGACY_ARCTO_QUADS
- SkPoint pts[kSkBuildQuadArcStorage];
- int count = SkBuildQuadArc(before, after, dir, &matrix, pts);
- SkASSERT((count & 1) == 1);
- if (count > 1) {
- for (int i = 1; i < count; i += 2) {
- outer->quadTo(pts[i].fX, pts[i].fY, pts[i+1].fX, pts[i+1].fY);
- }
- after.scale(radius);
- HandleInnerJoin(inner, pivot, after);
- }
-#else
SkConic conics[SkConic::kMaxConicsForArc];
int count = SkConic::BuildUnitArc(before, after, dir, &matrix, conics);
if (count > 0) {
@@ -170,7 +142,6 @@ static void RoundJoiner(SkPath* outer, SkPath* inner, const SkVector& beforeUnit
after.scale(radius);
HandleInnerJoin(inner, pivot, after);
}
-#endif
}
#define kOneOverSqrt2 (0.707106781f)
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698