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

Side by Side Diff: tests/PathOpsCubicLineIntersectionTest.cpp

Issue 52653002: pathops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add raster vs gpu test Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsCubicIntersectionTest.cpp ('k') | tests/PathOpsCubicQuadIntersectionTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsTestCommon.h" 7 #include "PathOpsTestCommon.h"
8 #include "SkIntersections.h" 8 #include "SkIntersections.h"
9 #include "SkPathOpsCubic.h" 9 #include "SkPathOpsCubic.h"
10 #include "SkPathOpsLine.h" 10 #include "SkPathOpsLine.h"
11 #include "SkReduceOrder.h" 11 #include "SkReduceOrder.h"
12 #include "Test.h" 12 #include "Test.h"
13 13
14 static struct lineCubic { 14 static struct lineCubic {
15 SkDCubic cubic; 15 SkDCubic cubic;
16 SkDLine line; 16 SkDLine line;
17 } lineCubicTests[] = { 17 } lineCubicTests[] = {
18 {{{{154,715}, {151.238571,715}, {149,712.761414}, {149,710}}},
19 {{{149,675}, {149,710.001465}}}},
20
18 {{{{0,1}, {1,6}, {4,1}, {4,3}}}, 21 {{{{0,1}, {1,6}, {4,1}, {4,3}}},
19 {{{6,1}, {1,4}}}}, 22 {{{6,1}, {1,4}}}},
20 23
21 {{{{0,1}, {2,6}, {4,1}, {5,4}}}, 24 {{{{0,1}, {2,6}, {4,1}, {5,4}}},
22 {{{6,2}, {1,4}}}}, 25 {{{6,2}, {1,4}}}},
23 26
24 {{{{0,4}, {3,4}, {6,2}, {5,2}}}, 27 {{{{0,4}, {3,4}, {6,2}, {5,2}}},
25 {{{4,3}, {2,6}}}}, 28 {{{4,3}, {2,6}}}},
26 #if 0 29 #if 0
27 {{{{258, 122}, {260.761414, 122}, { 263, 124.238579}, {263, 127}}}, 30 {{{{258, 122}, {260.761414, 122}, { 263, 124.238579}, {263, 127}}},
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 SkDebugf("{{%1.9g,%1.9g}, {%1.9g,%1.9g}},\n", i.pt(0).fX, i.pt(0).fY, nextL. fX, nextL.fY); 107 SkDebugf("{{%1.9g,%1.9g}, {%1.9g,%1.9g}},\n", i.pt(0).fX, i.pt(0).fY, nextL. fX, nextL.fY);
105 SkDebugf("prevD=%1.9g dist=%1.9g nextD=%1.9g\n", prev.distance(nextL), 108 SkDebugf("prevD=%1.9g dist=%1.9g nextD=%1.9g\n", prev.distance(nextL),
106 sect.distance(i.pt(0)), cubic[3].distance(prevL)); 109 sect.distance(i.pt(0)), cubic[3].distance(prevL));
107 #endif 110 #endif
108 } 111 }
109 112
110 #include "TestClassDef.h" 113 #include "TestClassDef.h"
111 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionTest) 114 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionTest)
112 115
113 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionOneOffTest) 116 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionOneOffTest)
OLDNEW
« no previous file with comments | « tests/PathOpsCubicIntersectionTest.cpp ('k') | tests/PathOpsCubicQuadIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698