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

Unified Diff: tests/PathOpsCubicQuadIntersectionTest.cpp

Issue 1037953004: add conics to path ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix linux build 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
Index: tests/PathOpsCubicQuadIntersectionTest.cpp
diff --git a/tests/PathOpsCubicQuadIntersectionTest.cpp b/tests/PathOpsCubicQuadIntersectionTest.cpp
index d1ce05b638122c4eff9eb9e32c6623b5bb3f5593..24d7c14f4546b7232ae45b7d8382c1b58dcffcea 100644
--- a/tests/PathOpsCubicQuadIntersectionTest.cpp
+++ b/tests/PathOpsCubicQuadIntersectionTest.cpp
@@ -16,6 +16,9 @@ static struct quadCubic {
SkDCubic cubic;
SkDQuad quad;
} quadCubicTests[] = {
+ {{{{778, 14089}, {778, 14091.208984375}, {776.20916748046875, 14093}, {774, 14093}}},
+ {{{778, 14089}, {777.99957275390625, 14090.65625}, {776.82843017578125, 14091.828125}}}},
+
{{{{1020.08099,672.161987}, {1020.08002,630.73999}, {986.502014,597.161987}, {945.080994,597.161987}}},
{{{1020,672}, {1020,640.93396}, {998.03302,618.96698}}}},
@@ -63,9 +66,8 @@ static void cubicQuadIntersection(skiatest::Reporter* reporter, int index) {
SkDebugf("[%d] quad order=%d\n", iIndex, order2);
REPORTER_ASSERT(reporter, 0);
}
- SkDCubic quadToCubic = quad.toCubic();
SkIntersections i;
- int roots = i.intersect(cubic, quadToCubic);
+ int roots = i.intersect(cubic, quad);
for (int pt = 0; pt < roots; ++pt) {
double tt1 = i[0][pt];
SkDPoint xy1 = cubic.ptAtT(tt1);

Powered by Google App Engine
This is Rietveld 408576698