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 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 | 9 |
10 class PathTest_Private { | 10 class PathTest_Private { |
(...skipping 5146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5157 SkPath path, pathB; | 5157 SkPath path, pathB; |
5158 path.moveTo(100.34f, 303.312f); | 5158 path.moveTo(100.34f, 303.312f); |
5159 path.lineTo(-1e+08, 303.312f); | 5159 path.lineTo(-1e+08, 303.312f); |
5160 path.lineTo(102, 310.156f); | 5160 path.lineTo(102, 310.156f); |
5161 path.lineTo(100.34f, 310.156f); | 5161 path.lineTo(100.34f, 310.156f); |
5162 path.lineTo(100.34f, 303.312f); | 5162 path.lineTo(100.34f, 303.312f); |
5163 path.close(); | 5163 path.close(); |
5164 testPathOpCheck(reporter, path, pathB, kUnion_SkPathOp, filename, FLAGS_runF
ail); | 5164 testPathOpCheck(reporter, path, pathB, kUnion_SkPathOp, filename, FLAGS_runF
ail); |
5165 } | 5165 } |
5166 | 5166 |
5167 static void fuzz763_3(skiatest::Reporter* reporter, const char* filename) { | 5167 static void crbug_526025(skiatest::Reporter* reporter, const char* filename) { |
5168 SkPath path; | 5168 SkPath path; |
5169 path.setFillType((SkPath::FillType) 1); | 5169 path.setFillType((SkPath::FillType) 1); |
5170 path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0xcf000000)); // 360, -2.147
48e+09f | 5170 path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0xcf000000)); // 360, -2.147
48e+09f |
5171 path.cubicTo(SkBits2Float(0x4e0d628f), SkBits2Float(0xceffffff), SkBits2Float(0x
4e800003), SkBits2Float(0xcec6b143), SkBits2Float(0x4e800002), SkBits2Float(0xce
7ffffc)); // 5.93012e+08f, -2.14748e+09f, 1.07374e+09f, -1.66675e+09f, 1.07374e
+09f, -1.07374e+09f | 5171 path.cubicTo(SkBits2Float(0x4e0d628f), SkBits2Float(0xceffffff), SkBits2Float(0x
4e800003), SkBits2Float(0xcec6b143), SkBits2Float(0x4e800002), SkBits2Float(0xce
7ffffc)); // 5.93012e+08f, -2.14748e+09f, 1.07374e+09f, -1.66675e+09f, 1.07374e
+09f, -1.07374e+09f |
5172 path.cubicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcde53aee), SkBits2Float(0x
4e0d6292), SkBits2Float(0xc307820e), SkBits2Float(0x44627d00), SkBits2Float(0x43
7ffff2)); // 1.07374e+09f, -4.80731e+08f, 5.93012e+08f, -135.508f, 905.953f, 25
6 | 5172 path.cubicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcde53aee), SkBits2Float(0x
4e0d6292), SkBits2Float(0xc307820e), SkBits2Float(0x44627d00), SkBits2Float(0x43
7ffff2)); // 1.07374e+09f, -4.80731e+08f, 5.93012e+08f, -135.508f, 905.953f, 25
6 |
5173 path.lineTo(SkBits2Float(0x444bf3bc), SkBits2Float(0x4460537e)); // 815.808f, 8
97.305f | 5173 path.lineTo(SkBits2Float(0x444bf3bc), SkBits2Float(0x4460537e)); // 815.808f, 8
97.305f |
5174 path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 5
72.949f | 5174 path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 5
72.949f |
5175 path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16 | 5175 path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16 |
5176 path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512 | 5176 path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512 |
5177 path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 5
72.949f | 5177 path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 5
72.949f |
(...skipping 14 matching lines...) Expand all Loading... |
5192 testPathOp(reporter, path1, path2, (SkPathOp) 2, filename); | 5192 testPathOp(reporter, path1, path2, (SkPathOp) 2, filename); |
5193 } | 5193 } |
5194 | 5194 |
5195 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 5195 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
5196 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 5196 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
5197 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 5197 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
5198 | 5198 |
5199 #define TEST(name) { name, #name } | 5199 #define TEST(name) { name, #name } |
5200 | 5200 |
5201 static struct TestDesc tests[] = { | 5201 static struct TestDesc tests[] = { |
5202 TEST(fuzz763_3), | 5202 TEST(crbug_526025), |
5203 TEST(fuzz38), | 5203 TEST(fuzz38), |
5204 TEST(cubics44d), | 5204 TEST(cubics44d), |
5205 TEST(cubics45u), | 5205 TEST(cubics45u), |
5206 TEST(loops61i), | 5206 TEST(loops61i), |
5207 TEST(loops62i), | 5207 TEST(loops62i), |
5208 TEST(loops63i), | 5208 TEST(loops63i), |
5209 TEST(loops58iAsQuads), | 5209 TEST(loops58iAsQuads), |
5210 TEST(cubics41d), | 5210 TEST(cubics41d), |
5211 TEST(loops59iasQuads), | 5211 TEST(loops59iasQuads), |
5212 TEST(loops59i), | 5212 TEST(loops59i), |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5767 }; | 5767 }; |
5768 | 5768 |
5769 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); | 5769 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); |
5770 | 5770 |
5771 DEF_TEST(PathOpsFailOp, reporter) { | 5771 DEF_TEST(PathOpsFailOp, reporter) { |
5772 #if DEBUG_SHOW_TEST_NAME | 5772 #if DEBUG_SHOW_TEST_NAME |
5773 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 5773 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
5774 #endif | 5774 #endif |
5775 RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, fa
lse); | 5775 RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, fa
lse); |
5776 } | 5776 } |
OLD | NEW |