OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #define TEST(name) { name, #name } | 10 #define TEST(name) { name, #name } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 path.quadTo(SkBits2Float(0xc05413cd), SkBits2Float(0x41c80000), SkBits2Float(0x0
0000000), SkBits2Float(0x41c80000)); | 114 path.quadTo(SkBits2Float(0xc05413cd), SkBits2Float(0x41c80000), SkBits2Float(0x0
0000000), SkBits2Float(0x41c80000)); |
115 path.quadTo(SkBits2Float(0x405413cd), SkBits2Float(0x41c80000), SkBits2Float(0x4
0b504f3), SkBits2Float(0x41dabec3)); | 115 path.quadTo(SkBits2Float(0x405413cd), SkBits2Float(0x41c80000), SkBits2Float(0x4
0b504f3), SkBits2Float(0x41dabec3)); |
116 path.quadTo(SkBits2Float(0x41000000), SkBits2Float(0x41ed7d86), SkBits2Float(0x4
1000000), SkBits2Float(0x42040000)); | 116 path.quadTo(SkBits2Float(0x41000000), SkBits2Float(0x41ed7d86), SkBits2Float(0x4
1000000), SkBits2Float(0x42040000)); |
117 path.close(); | 117 path.close(); |
118 | 118 |
119 SkPath path2(path); | 119 SkPath path2(path); |
120 testPathOp(reporter, path1, path2, (SkPathOp) 2, filename); | 120 testPathOp(reporter, path1, path2, (SkPathOp) 2, filename); |
121 } | 121 } |
122 | 122 |
123 static void fuzz763_378(skiatest::Reporter* reporter, const char* filename) { | 123 static void fuzz763_378(skiatest::Reporter* reporter, const char* filename) { |
| 124 #if SK_BUILD_FOR_ANDROID |
| 125 if (!FLAGS_runFail) { |
| 126 return; // fails on nexus 9 in release, possibly related to fus
ed multiply-add |
| 127 } |
| 128 #endif |
124 SkPath path; | 129 SkPath path; |
125 path.setFillType((SkPath::FillType) 1); | 130 path.setFillType((SkPath::FillType) 1); |
126 path.moveTo(SkBits2Float(0x41013776), SkBits2Float(0xc25007a8)); | 131 path.moveTo(SkBits2Float(0x41013776), SkBits2Float(0xc25007a8)); |
127 path.quadTo(SkBits2Float(0x412f219e), SkBits2Float(0xc256a86f), SkBits2Float(0x4
1625842), SkBits2Float(0xc2533a60)); | 132 path.quadTo(SkBits2Float(0x412f219e), SkBits2Float(0xc256a86f), SkBits2Float(0x4
1625842), SkBits2Float(0xc2533a60)); |
128 path.quadTo(SkBits2Float(0x418ac776), SkBits2Float(0xc24fcc52), SkBits2Float(0x4
1980904), SkBits2Float(0xc24451c8)); | 133 path.quadTo(SkBits2Float(0x418ac776), SkBits2Float(0xc24fcc52), SkBits2Float(0x4
1980904), SkBits2Float(0xc24451c8)); |
129 path.quadTo(SkBits2Float(0x41a54a92), SkBits2Float(0xc238d73e), SkBits2Float(0x4
19e6e72), SkBits2Float(0xc22c0994)); | 134 path.quadTo(SkBits2Float(0x41a54a92), SkBits2Float(0xc238d73e), SkBits2Float(0x4
19e6e72), SkBits2Float(0xc22c0994)); |
130 path.quadTo(SkBits2Float(0x41979256), SkBits2Float(0xc21f3bea), SkBits2Float(0x4
1809d42), SkBits2Float(0xc2189b23)); | 135 path.quadTo(SkBits2Float(0x41979256), SkBits2Float(0xc21f3bea), SkBits2Float(0x4
1809d42), SkBits2Float(0xc2189b23)); |
131 path.quadTo(SkBits2Float(0x4153505c), SkBits2Float(0xc211fa5c), SkBits2Float(0x4
12019b5), SkBits2Float(0xc215686b)); | 136 path.quadTo(SkBits2Float(0x4153505c), SkBits2Float(0xc211fa5c), SkBits2Float(0x4
12019b5), SkBits2Float(0xc215686b)); |
132 path.quadTo(SkBits2Float(0x40d9c61e), SkBits2Float(0xc218d67a), SkBits2Float(0x4
0a4bfe8), SkBits2Float(0xc2245104)); | 137 path.quadTo(SkBits2Float(0x40d9c61e), SkBits2Float(0xc218d67a), SkBits2Float(0x4
0a4bfe8), SkBits2Float(0xc2245104)); |
133 path.quadTo(SkBits2Float(0x405f7360), SkBits2Float(0xc22fcb8e), SkBits2Float(0x4
08b2a24), SkBits2Float(0xc23c9937)); | 138 path.quadTo(SkBits2Float(0x405f7360), SkBits2Float(0xc22fcb8e), SkBits2Float(0x4
08b2a24), SkBits2Float(0xc23c9937)); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 path.quadTo(SkBits2Float(0xc218d5ba), SkBits2Float(0x40d9e7cc), SkBits2Float(0xc
2156751), SkBits2Float(0x41202a2d)); | 212 path.quadTo(SkBits2Float(0xc218d5ba), SkBits2Float(0x40d9e7cc), SkBits2Float(0xc
2156751), SkBits2Float(0x41202a2d)); |
208 path.quadTo(SkBits2Float(0xc211f8e8), SkBits2Float(0x41536071), SkBits2Float(0xc
218995e), SkBits2Float(0x4180a5aa)); | 213 path.quadTo(SkBits2Float(0xc211f8e8), SkBits2Float(0x41536071), SkBits2Float(0xc
218995e), SkBits2Float(0x4180a5aa)); |
209 path.quadTo(SkBits2Float(0xc21f39d4), SkBits2Float(0x41979b1c), SkBits2Float(0xc
22c0765), SkBits2Float(0x419e77ee)); | 214 path.quadTo(SkBits2Float(0xc21f39d4), SkBits2Float(0x41979b1c), SkBits2Float(0xc
22c0765), SkBits2Float(0x419e77ee)); |
210 path.quadTo(SkBits2Float(0xc238d4f6), SkBits2Float(0x41a554c0), SkBits2Float(0xc
2444fb0), SkBits2Float(0x419813d4)); | 215 path.quadTo(SkBits2Float(0xc238d4f6), SkBits2Float(0x41a554c0), SkBits2Float(0xc
2444fb0), SkBits2Float(0x419813d4)); |
211 path.close(); | 216 path.close(); |
212 SkPath path2(path); | 217 SkPath path2(path); |
213 testPathOpCheck(reporter, path1, path2, (SkPathOp) 2, filename, FLAGS_runFai
l); | 218 testPathOpCheck(reporter, path1, path2, (SkPathOp) 2, filename, FLAGS_runFai
l); |
214 } | 219 } |
215 | 220 |
216 static void fuzz763_378b(skiatest::Reporter* reporter, const char* filename) { | 221 static void fuzz763_378b(skiatest::Reporter* reporter, const char* filename) { |
| 222 #if SK_BUILD_FOR_ANDROID |
| 223 if (!FLAGS_runFail) { |
| 224 return; // fails on nexus 9 in release, possibly related to fus
ed multiply-add |
| 225 } |
| 226 #endif |
217 SkPath path; | 227 SkPath path; |
218 path.setFillType((SkPath::FillType) 1); | 228 path.setFillType((SkPath::FillType) 1); |
219 path.moveTo(-47.1494f, 4.35143f); | 229 path.moveTo(-47.1494f, 4.35143f); |
220 path.quadTo(-39.8075f, 18.9486f, -43.0083f, 19.8062f); | 230 path.quadTo(-39.8075f, 18.9486f, -43.0083f, 19.8062f); |
221 path.quadTo(-50.35f, 5.21042f, -52.0068f, 8.08022f); | 231 path.quadTo(-50.35f, 5.21042f, -52.0068f, 8.08022f); |
222 path.quadTo(-53.6632f, 10.9494f, -52.8062f, 14.1494f); | 232 path.quadTo(-53.6632f, 10.9494f, -52.8062f, 14.1494f); |
223 path.quadTo(-53.6639f, 10.9486f, -52.007f, 8.07884f); | 233 path.quadTo(-53.6639f, 10.9486f, -52.007f, 8.07884f); |
224 path.quadTo(-50.3502f, 5.20908f, -47.1494f, 4.35143f); | 234 path.quadTo(-50.3502f, 5.20908f, -47.1494f, 4.35143f); |
225 path.close(); | 235 path.close(); |
226 SkPath path1(path); | 236 SkPath path1(path); |
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2425 static const size_t testCount = SK_ARRAY_COUNT(tests); | 2435 static const size_t testCount = SK_ARRAY_COUNT(tests); |
2426 | 2436 |
2427 static bool runReverse = false; | 2437 static bool runReverse = false; |
2428 | 2438 |
2429 DEF_TEST(PathOpsFuzz763, reporter) { | 2439 DEF_TEST(PathOpsFuzz763, reporter) { |
2430 #if DEBUG_SHOW_TEST_NAME | 2440 #if DEBUG_SHOW_TEST_NAME |
2431 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 2441 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
2432 #endif | 2442 #endif |
2433 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); | 2443 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); |
2434 } | 2444 } |
OLD | NEW |