aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGeometry.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-04-15 14:38:09 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-15 14:38:09 -0700
commit639a82855b94b93c4fa45560e67df8ec4a8bbb3a (patch)
tree6a640af81f07013b7ae04eef650f557228d24480 /src/core/SkGeometry.cpp
parentbed83a66f5fa5821a3a08da32157a6155960b15e (diff)
Revert of Speeup hairline curves (quads and cubics) (patchset #7 id:120001 of https://codereview.chromium.org/1078413003/)
Reason for revert: Crazy failings in chrome tests http://build.chromium.org/p/client.skia/builders/Linux%20Tests/builds/1862 Original issue's description: > Speeup hairline curves (quads and cubics) > > /skia/trunk> cat ../old.txt > maxrss loops min median mean max stddev samples config bench > 9M 1 4.28ms 4.32ms 4.36ms 4.67ms 3% ▄▁▁▃▂▂▁▁▂█ 8888 path_hairline_small_AA_cubic > 9M 1 743µs 767µs 770µs 825µs 4% ▃▃▇▃▁▁▅▁█▁ 8888 path_hairline_small_AA_conic > 9M 1 533µs 606µs 598µs 680µs 9% ▁▂▂█▆▇▇▄▂▂ 8888 path_hairline_small_AA_quad > 9M 1 451µs 452µs 456µs 495µs 3% ▁▁▁▁█▁▁▁▁▁ 8888 path_hairline_small_AA_line > > /skia/trunk> cat ../new.txt > maxrss loops min median mean max stddev samples config bench > 9M 1 827µs 827µs 831µs 869µs 2% ▁▁▁▁▁▁▁█▁▁ 8888 path_hairline_small_AA_cubic > 9M 1 515µs 517µs 517µs 518µs 0% ▇█▆▅▃▃▁▁▁▅ 8888 path_hairline_small_AA_conic > 9M 1 310µs 311µs 315µs 332µs 2% ▂▁█▆▁▁▁▁▁▁ 8888 path_hairline_small_AA_quad > 9M 1 254µs 254µs 258µs 276µs 3% ▁▁▁▁▁▁▁█▇▂ 8888 path_hairline_small_AA_line > > Edited revert of https://codereview.chromium.org/1085013003 > > TBR= > > Expectations: > - no effect on chrome, as it is guarded > - lots of tiny rebaselines for skia TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1092483003
Diffstat (limited to 'src/core/SkGeometry.cpp')
-rw-r--r--src/core/SkGeometry.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp
index 5979615425..50af22de37 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 @@ static SkPoint to_point(const Sk2s& x) {
x.store(&point.fX);
return point;
}
-#endif
static SkVector to_vector(const Sk2s& x) {
SkVector vector;
@@ -137,18 +135,6 @@ static SkScalar eval_quad_derivative(const SkScalar src[], SkScalar t) {
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) {
SkASSERT(src);
SkASSERT(t >= 0 && t <= SK_Scalar1);
@@ -466,26 +452,6 @@ void SkChopCubicAt(const SkPoint src[4], SkPoint dst[7], SkScalar t) {
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
This test code would fail when we didn't check the return result of