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

Side by Side Diff: tests/PathOpsQuadIntersectionTest.cpp

Issue 23542056: path ops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: verbose + mutex around file number access Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsOpTest.cpp ('k') | tests/PathOpsQuadIntersectionTestData.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 "PathOpsQuadIntersectionTestData.h" 7 #include "PathOpsQuadIntersectionTestData.h"
8 #include "PathOpsTestCommon.h" 8 #include "PathOpsTestCommon.h"
9 #include "SkIntersections.h" 9 #include "SkIntersections.h"
10 #include "SkPathOpsRect.h" 10 #include "SkPathOpsRect.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 tt2, xy2.fX, xy2.fY); 46 tt2, xy2.fX, xy2.fY);
47 REPORTER_ASSERT(reporter, 0); 47 REPORTER_ASSERT(reporter, 0);
48 } 48 }
49 } 49 }
50 } 50 }
51 } 51 }
52 } 52 }
53 } 53 }
54 54
55 static const SkDQuad testSet[] = { 55 static const SkDQuad testSet[] = {
56 {{{2.9999997378517067, 1.9737872594345709}, {2.9999997432230918, 1.9739647181863 822}, {1.2414155459263587e-163, 5.2957833941332142e-315}}},
57 {{{2.9999047485265304, 1.9739164225694723}, {3.0000947268526112, 1.9738379076623 633}, {0.61149411077591886, 0.0028382324376270418}}},
58
59 {{{2.9999996843656502, 1.9721416019045801}, {2.9999997725237835, 1.974979834 3422071},
60 {5.3039068214821359e-315, 8.9546185262775165e-307}}},
61 {{{2.9984791443874976, 1.974505741312242}, {2.9999992702127476, 1.9738772171 479178},
62 {3.0015187977319759, 1.9732495027303418}}},
63
56 {{{0.647069409,2.97691634}, {0.946860918,3.17625612}, {1.46875407,2.65105457 }}}, 64 {{{0.647069409,2.97691634}, {0.946860918,3.17625612}, {1.46875407,2.65105457 }}},
57 {{{0,1}, {0.723699095,2.82756208}, {1.08907197,2.97497449}}}, 65 {{{0,1}, {0.723699095,2.82756208}, {1.08907197,2.97497449}}},
58 66
59 {{{131.37418,11414.9825}, {130.28798,11415.9328}, {130.042755,11417.4131}}}, 67 {{{131.37418,11414.9825}, {130.28798,11415.9328}, {130.042755,11417.4131}}},
60 {{{130.585787,11418.4142}, {130.021447,11417.8498}, {130,11417}}}, 68 {{{130.585787,11418.4142}, {130.021447,11417.8498}, {130,11417}}},
61 69
62 {{{130.73167037963867, 11418.546386718750}, {131.26360225677490, 11418.98577 8808592}, 70 {{{130.73167037963867, 11418.546386718750}, {131.26360225677490, 11418.98577 8808592},
63 {132, 11419 }}}, 71 {132, 11419 }}},
64 {{{132, 11419}, {131.15012693405151, 11418.978546142578}, 72 {{{132, 11419}, {131.15012693405151, 11418.978546142578},
65 {130.58578681945801, 11418.414184570313}}}, 73 {130.58578681945801, 11418.414184570313}}},
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 286
279 static void oneOffTests(skiatest::Reporter* reporter) { 287 static void oneOffTests(skiatest::Reporter* reporter) {
280 for (size_t outer = 0; outer < testSetCount - 1; ++outer) { 288 for (size_t outer = 0; outer < testSetCount - 1; ++outer) {
281 for (size_t inner = outer + 1; inner < testSetCount; ++inner) { 289 for (size_t inner = outer + 1; inner < testSetCount; ++inner) {
282 oneOffTest1(reporter, outer, inner); 290 oneOffTest1(reporter, outer, inner);
283 } 291 }
284 } 292 }
285 } 293 }
286 294
287 static const SkDQuad coincidentTestSet[] = { 295 static const SkDQuad coincidentTestSet[] = {
296 #if 0
288 {{{97.9337615966796875,100}, {88,112.94264984130859375}, {88,130}}}, 297 {{{97.9337615966796875,100}, {88,112.94264984130859375}, {88,130}}},
289 {{{88,130}, {88,124.80951690673828125}, {88.91983795166015625,120}}}, 298 {{{88,130}, {88,124.80951690673828125}, {88.91983795166015625,120}}},
299 #endif
290 {{{369.850525, 145.675964}, {382.362915, 121.29287}, {406.211273, 121.29287} }}, 300 {{{369.850525, 145.675964}, {382.362915, 121.29287}, {406.211273, 121.29287} }},
291 {{{369.850525, 145.675964}, {382.362915, 121.29287}, {406.211273, 121.29287} }}, 301 {{{369.850525, 145.675964}, {382.362915, 121.29287}, {406.211273, 121.29287} }},
292 {{{8, 8}, {10, 10}, {8, -10}}}, 302 {{{8, 8}, {10, 10}, {8, -10}}},
293 {{{8, -10}, {10, 10}, {8, 8}}}, 303 {{{8, -10}, {10, 10}, {8, 8}}},
294 }; 304 };
295 305
296 const size_t coincidentTestSetCount = SK_ARRAY_COUNT(coincidentTestSet); 306 const size_t coincidentTestSetCount = SK_ARRAY_COUNT(coincidentTestSet);
297 307
298 static void coincidentTestOne(skiatest::Reporter* reporter, int test1, int test2 ) { 308 static void coincidentTestOne(skiatest::Reporter* reporter, int test1, int test2 ) {
299 const SkDQuad& quad1 = coincidentTestSet[test1]; 309 const SkDQuad& quad1 = coincidentTestSet[test1];
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 if (false) QuadraticIntersection_PointFinder(); 504 if (false) QuadraticIntersection_PointFinder();
495 } 505 }
496 506
497 507
498 #include "TestClassDef.h" 508 #include "TestClassDef.h"
499 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionTest) 509 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionTest)
500 510
501 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionOneOffTest) 511 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionOneOffTest)
502 512
503 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionCoincidenceOneOffTest) 513 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionCoincidenceOneOffTest)
OLDNEW
« no previous file with comments | « tests/PathOpsOpTest.cpp ('k') | tests/PathOpsQuadIntersectionTestData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698