OLD | NEW |
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 "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
8 | 8 |
9 #define TEST(name) { name, #name } | 9 #define TEST(name) { name, #name } |
10 | 10 |
(...skipping 3887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3898 path.quadTo(0, 1, 3, 2); | 3898 path.quadTo(0, 1, 3, 2); |
3899 path.lineTo(0, 3); | 3899 path.lineTo(0, 3); |
3900 path.close(); | 3900 path.close(); |
3901 path.moveTo(1, 0); | 3901 path.moveTo(1, 0); |
3902 path.lineTo(3, 0); | 3902 path.lineTo(3, 0); |
3903 path.quadTo(1, 1, 2, 2); | 3903 path.quadTo(1, 1, 2, 2); |
3904 path.close(); | 3904 path.close(); |
3905 testSimplify(reporter, path); | 3905 testSimplify(reporter, path); |
3906 } | 3906 } |
3907 | 3907 |
3908 static void (*firstTest)(skiatest::Reporter* ) = testRect2; | 3908 static void testTriangles4x(skiatest::Reporter* reporter) { |
| 3909 SkPath path; |
| 3910 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3911 path.moveTo(0, 0); |
| 3912 path.quadTo(2, 0, 0, 3); |
| 3913 path.lineTo(2, 3); |
| 3914 path.close(); |
| 3915 path.moveTo(0, 0); |
| 3916 path.lineTo(0, 1); |
| 3917 path.quadTo(3, 2, 2, 3); |
| 3918 path.close(); |
| 3919 testSimplify(reporter, path); |
| 3920 } |
| 3921 |
| 3922 static void (*firstTest)(skiatest::Reporter* ) = 0; |
3909 | 3923 |
3910 static TestDesc tests[] = { | 3924 static TestDesc tests[] = { |
| 3925 TEST(testTriangles4x), |
3911 TEST(testQuad8), | 3926 TEST(testQuad8), |
3912 TEST(testTriangles3x), | 3927 TEST(testTriangles3x), |
3913 TEST(testRect2), | 3928 TEST(testRect2), |
3914 TEST(testRect1), | 3929 TEST(testRect1), |
3915 TEST(tooCloseTest), | 3930 TEST(tooCloseTest), |
3916 TEST(skphealth_com76), | 3931 TEST(skphealth_com76), |
3917 TEST(testQuadLineIntersect1), | 3932 TEST(testQuadLineIntersect1), |
3918 TEST(testQuadLineIntersect2), | 3933 TEST(testQuadLineIntersect2), |
3919 TEST(testQuadLineIntersect3), | 3934 TEST(testQuadLineIntersect3), |
3920 TEST(testQuad7), | 3935 TEST(testQuad7), |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4292 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 4307 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); |
4293 } | 4308 } |
4294 #ifdef SK_DEBUG | 4309 #ifdef SK_DEBUG |
4295 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; | 4310 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; |
4296 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; | 4311 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; |
4297 #endif | 4312 #endif |
4298 } | 4313 } |
4299 | 4314 |
4300 #include "TestClassDef.h" | 4315 #include "TestClassDef.h" |
4301 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyTest) | 4316 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyTest) |
OLD | NEW |