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

Unified Diff: src/core/SkGeometry.cpp

Issue 1092483003: Revert of Speeup hairline curves (quads and cubics) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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.h ('k') | src/core/SkScan_Hairline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGeometry.cpp
diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp
index 59796154252dac1f7494591f281fa9da02b3a5a4..50af22de37d1acc968676bd581f90fe9cf5696b5 100644
--- a/src/core/SkGeometry.cpp
+++ b/src/core/SkGeometry.cpp
@@ -9,7 +9,6 @@
#include "SkMatrix.h"
#include "SkNx.h"
-#if 0
static Sk2s from_point(const SkPoint& point) {
return Sk2s::Load(&point.fX);
}
@@ -19,7 +18,6 @@
x.store(&point.fX);
return point;
}
-#endif
static SkVector to_vector(const Sk2s& x) {
SkVector vector;
@@ -135,18 +133,6 @@
SkScalar B = src[2] - src[0];
return 2 * SkScalarMulAdd(A, t, B);
-}
-
-void SkQuadToCoeff(const SkPoint pts[3], SkPoint coeff[3]) {
- Sk2s p0 = from_point(pts[0]);
- Sk2s p1 = from_point(pts[1]);
- Sk2s p2 = from_point(pts[2]);
-
- Sk2s p1minus2 = p1 - p0;
-
- coeff[0] = to_point(p2 - p1 - p1 + p0); // A * t^2
- coeff[1] = to_point(p1minus2 + p1minus2); // B * t
- coeff[2] = pts[0]; // C
}
void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, SkVector* tangent) {
@@ -464,26 +450,6 @@
dst[4] = to_point(bcd);
dst[5] = to_point(cd);
dst[6] = src[3];
-}
-
-void SkCubicToCoeff(const SkPoint pts[4], SkPoint coeff[4]) {
- Sk2s p0 = from_point(pts[0]);
- Sk2s p1 = from_point(pts[1]);
- Sk2s p2 = from_point(pts[2]);
- Sk2s p3 = from_point(pts[3]);
-
- const Sk2s three(3);
- Sk2s p1minusp2 = p1 - p2;
-
- Sk2s D = p0;
- Sk2s A = p3 + three * p1minusp2 - D;
- Sk2s B = three * (D - p1minusp2 - p1);
- Sk2s C = three * (p1 - D);
-
- coeff[0] = to_point(A);
- coeff[1] = to_point(B);
- coeff[2] = to_point(C);
- coeff[3] = to_point(D);
}
/* http://code.google.com/p/skia/issues/detail?id=32
« no previous file with comments | « src/core/SkGeometry.h ('k') | src/core/SkScan_Hairline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698