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 | 124 #ifdef SK_BUILD_FOR_ANDROID |
125 if (!FLAGS_runFail) { | 125 if (!FLAGS_runFail) { |
126 return; // fails on nexus 9 in release, possibly related to fus
ed multiply-add | 126 return; // fails on nexus 9 in release, possibly related to fus
ed multiply-add |
127 } | 127 } |
128 #endif | 128 #endif |
129 SkPath path; | 129 SkPath path; |
130 path.setFillType((SkPath::FillType) 1); | 130 path.setFillType((SkPath::FillType) 1); |
131 path.moveTo(SkBits2Float(0x41013776), SkBits2Float(0xc25007a8)); | 131 path.moveTo(SkBits2Float(0x41013776), SkBits2Float(0xc25007a8)); |
132 path.quadTo(SkBits2Float(0x412f219e), SkBits2Float(0xc256a86f), SkBits2Float(0x4
1625842), SkBits2Float(0xc2533a60)); | 132 path.quadTo(SkBits2Float(0x412f219e), SkBits2Float(0xc256a86f), SkBits2Float(0x4
1625842), SkBits2Float(0xc2533a60)); |
133 path.quadTo(SkBits2Float(0x418ac776), SkBits2Float(0xc24fcc52), SkBits2Float(0x4
1980904), SkBits2Float(0xc24451c8)); | 133 path.quadTo(SkBits2Float(0x418ac776), SkBits2Float(0xc24fcc52), SkBits2Float(0x4
1980904), SkBits2Float(0xc24451c8)); |
134 path.quadTo(SkBits2Float(0x41a54a92), SkBits2Float(0xc238d73e), SkBits2Float(0x4
19e6e72), SkBits2Float(0xc22c0994)); | 134 path.quadTo(SkBits2Float(0x41a54a92), SkBits2Float(0xc238d73e), SkBits2Float(0x4
19e6e72), SkBits2Float(0xc22c0994)); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 path.quadTo(SkBits2Float(0xc218d5ba), SkBits2Float(0x40d9e7cc), SkBits2Float(0xc
2156751), SkBits2Float(0x41202a2d)); | 212 path.quadTo(SkBits2Float(0xc218d5ba), SkBits2Float(0x40d9e7cc), SkBits2Float(0xc
2156751), SkBits2Float(0x41202a2d)); |
213 path.quadTo(SkBits2Float(0xc211f8e8), SkBits2Float(0x41536071), SkBits2Float(0xc
218995e), SkBits2Float(0x4180a5aa)); | 213 path.quadTo(SkBits2Float(0xc211f8e8), SkBits2Float(0x41536071), SkBits2Float(0xc
218995e), SkBits2Float(0x4180a5aa)); |
214 path.quadTo(SkBits2Float(0xc21f39d4), SkBits2Float(0x41979b1c), SkBits2Float(0xc
22c0765), SkBits2Float(0x419e77ee)); | 214 path.quadTo(SkBits2Float(0xc21f39d4), SkBits2Float(0x41979b1c), SkBits2Float(0xc
22c0765), SkBits2Float(0x419e77ee)); |
215 path.quadTo(SkBits2Float(0xc238d4f6), SkBits2Float(0x41a554c0), SkBits2Float(0xc
2444fb0), SkBits2Float(0x419813d4)); | 215 path.quadTo(SkBits2Float(0xc238d4f6), SkBits2Float(0x41a554c0), SkBits2Float(0xc
2444fb0), SkBits2Float(0x419813d4)); |
216 path.close(); | 216 path.close(); |
217 SkPath path2(path); | 217 SkPath path2(path); |
218 testPathOpCheck(reporter, path1, path2, (SkPathOp) 2, filename, FLAGS_runFai
l); | 218 testPathOpCheck(reporter, path1, path2, (SkPathOp) 2, filename, FLAGS_runFai
l); |
219 } | 219 } |
220 | 220 |
221 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 | 222 #ifdef SK_BUILD_FOR_ANDROID |
223 if (!FLAGS_runFail) { | 223 if (!FLAGS_runFail) { |
224 return; // fails on nexus 9 in release, possibly related to fus
ed multiply-add | 224 return; // fails on nexus 9 in release, possibly related to fus
ed multiply-add |
225 } | 225 } |
226 #endif | 226 #endif |
227 SkPath path; | 227 SkPath path; |
228 path.setFillType((SkPath::FillType) 1); | 228 path.setFillType((SkPath::FillType) 1); |
229 path.moveTo(-47.1494f, 4.35143f); | 229 path.moveTo(-47.1494f, 4.35143f); |
230 path.quadTo(-39.8075f, 18.9486f, -43.0083f, 19.8062f); | 230 path.quadTo(-39.8075f, 18.9486f, -43.0083f, 19.8062f); |
231 path.quadTo(-50.35f, 5.21042f, -52.0068f, 8.08022f); | 231 path.quadTo(-50.35f, 5.21042f, -52.0068f, 8.08022f); |
232 path.quadTo(-53.6632f, 10.9494f, -52.8062f, 14.1494f); | 232 path.quadTo(-53.6632f, 10.9494f, -52.8062f, 14.1494f); |
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2435 static const size_t testCount = SK_ARRAY_COUNT(tests); | 2435 static const size_t testCount = SK_ARRAY_COUNT(tests); |
2436 | 2436 |
2437 static bool runReverse = false; | 2437 static bool runReverse = false; |
2438 | 2438 |
2439 DEF_TEST(PathOpsFuzz763, reporter) { | 2439 DEF_TEST(PathOpsFuzz763, reporter) { |
2440 #if DEBUG_SHOW_TEST_NAME | 2440 #if DEBUG_SHOW_TEST_NAME |
2441 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 2441 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
2442 #endif | 2442 #endif |
2443 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); | 2443 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); |
2444 } | 2444 } |
OLD | NEW |