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 5313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5324 } | 5324 } |
5325 tiger8b_x(reporter, filename, testlines); | 5325 tiger8b_x(reporter, filename, testlines); |
5326 } | 5326 } |
5327 } | 5327 } |
5328 } | 5328 } |
5329 | 5329 |
5330 static void tiger8b_h_1(skiatest::Reporter* reporter, const char* filename) { | 5330 static void tiger8b_h_1(skiatest::Reporter* reporter, const char* filename) { |
5331 #if DEBUG_UNDER_DEVELOPMENT // tiger | 5331 #if DEBUG_UNDER_DEVELOPMENT // tiger |
5332 return; | 5332 return; |
5333 #endif | 5333 #endif |
5334 uint64_t testlines = 0x0000000001000893; // best so far: 0x0000000001000893 | 5334 uint64_t testlines = 0x0000001000350204; // best so far: 0x0000000104080223 |
5335 tiger8b_x(reporter, filename, testlines); | 5335 tiger8b_x(reporter, filename, testlines); |
5336 } | 5336 } |
5337 | 5337 |
5338 // tries to add same edge twice | 5338 // tries to add same edge twice |
5339 static void tiger8b(skiatest::Reporter* reporter, const char* filename) { | 5339 static void tiger8b(skiatest::Reporter* reporter, const char* filename) { |
5340 #if DEBUG_UNDER_DEVELOPMENT // tiger | 5340 #if DEBUG_UNDER_DEVELOPMENT // tiger |
5341 return; | 5341 return; |
5342 #endif | 5342 #endif |
5343 SkPath path; | 5343 SkPath path; |
5344 path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 494.349f, 2
24.584f | 5344 path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 494.349f, 2
24.584f |
(...skipping 30 matching lines...) Expand all Loading... |
5375 path.lineTo(SkBits2Float(0x43ffcaf2), SkBits2Float(0x43541e6d)); // 511.586f, 2
12.119f | 5375 path.lineTo(SkBits2Float(0x43ffcaf2), SkBits2Float(0x43541e6d)); // 511.586f, 2
12.119f |
5376 path.quadTo(SkBits2Float(0x43fd4888), SkBits2Float(0x435a7d38), SkBits2Float(0x4
3f8d864), SkBits2Float(0x435b4bbf)); // 506.567f, 218.489f, 497.691f, 219.296f | 5376 path.quadTo(SkBits2Float(0x43fd4888), SkBits2Float(0x435a7d38), SkBits2Float(0x4
3f8d864), SkBits2Float(0x435b4bbf)); // 506.567f, 218.489f, 497.691f, 219.296f |
5377 path.lineTo(SkBits2Float(0x43f8cccd), SkBits2Float(0x435a4ccc)); // 497.6f, 218
.3f | 5377 path.lineTo(SkBits2Float(0x43f8cccd), SkBits2Float(0x435a4ccc)); // 497.6f, 218
.3f |
5378 path.lineTo(SkBits2Float(0x43f8e5e7), SkBits2Float(0x435b47d3)); // 497.796f, 2
19.281f | 5378 path.lineTo(SkBits2Float(0x43f8e5e7), SkBits2Float(0x435b47d3)); // 497.796f, 2
19.281f |
5379 path.quadTo(SkBits2Float(0x43f84300), SkBits2Float(0x435b88fd), SkBits2Float(0x4
3f7b75b), SkBits2Float(0x435c5e8e)); // 496.523f, 219.535f, 495.432f, 220.369f | 5379 path.quadTo(SkBits2Float(0x43f84300), SkBits2Float(0x435b88fd), SkBits2Float(0x4
3f7b75b), SkBits2Float(0x435c5e8e)); // 496.523f, 219.535f, 495.432f, 220.369f |
5380 path.quadTo(SkBits2Float(0x43f6b984), SkBits2Float(0x435de2c4), SkBits2Float(0x4
3f72ca1), SkBits2Float(0x43609572)); // 493.449f, 221.886f, 494.349f, 224.584f | 5380 path.quadTo(SkBits2Float(0x43f6b984), SkBits2Float(0x435de2c4), SkBits2Float(0x4
3f72ca1), SkBits2Float(0x43609572)); // 493.449f, 221.886f, 494.349f, 224.584f |
5381 path.close(); | 5381 path.close(); |
5382 testSimplify(reporter, path, filename); | 5382 testSimplify(reporter, path, filename); |
5383 } | 5383 } |
5384 | 5384 |
5385 // FIXME: this should not fail -- it was isolated looking for the root cause to
fuzz763_4713 | |
5386 // it fails with and without that change | |
5387 static void fuzz763_4713_b(skiatest::Reporter* reporter, const char* filename) { | 5385 static void fuzz763_4713_b(skiatest::Reporter* reporter, const char* filename) { |
5388 SkPath path; | 5386 SkPath path; |
5389 path.setFillType((SkPath::FillType) 0); | 5387 path.setFillType((SkPath::FillType) 0); |
5390 path.moveTo(SkBits2Float(0x42240000), SkBits2Float(0x42040000)); | 5388 path.moveTo(SkBits2Float(0x42240000), SkBits2Float(0x42040000)); |
5391 path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x4211413d), SkBits2Float(0x4
21aa09e), SkBits2Float(0x421aa09e)); | 5389 path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x4211413d), SkBits2Float(0x4
21aa09e), SkBits2Float(0x421aa09e)); |
5392 path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x4
2040000), SkBits2Float(0x42240000)); | 5390 path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x4
2040000), SkBits2Float(0x42240000)); |
5393 path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x4
1dabec3), SkBits2Float(0x421aa09e)); | 5391 path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x4
1dabec3), SkBits2Float(0x421aa09e)); |
5394 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x4
1c80000), SkBits2Float(0x42040000)); | 5392 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x4
1c80000), SkBits2Float(0x42040000)); |
5395 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x4
1dabec3), SkBits2Float(0x41dabec3)); | 5393 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x4
1dabec3), SkBits2Float(0x41dabec3)); |
5396 path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x41c80000), SkBits2Float(0x4
2040000), SkBits2Float(0x41c80000)); | 5394 path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x41c80000), SkBits2Float(0x4
2040000), SkBits2Float(0x41c80000)); |
(...skipping 12 matching lines...) Expand all Loading... |
5409 path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x4
2040000), SkBits2Float(0x42240000)); | 5407 path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x4
2040000), SkBits2Float(0x42240000)); |
5410 path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x4
1dabec3), SkBits2Float(0x421aa09e)); | 5408 path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x4
1dabec3), SkBits2Float(0x421aa09e)); |
5411 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x4
1c80000), SkBits2Float(0x42040000)); | 5409 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x4
1c80000), SkBits2Float(0x42040000)); |
5412 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x4
1dabec3), SkBits2Float(0x41dabec3)); | 5410 path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x4
1dabec3), SkBits2Float(0x41dabec3)); |
5413 path.quadTo(SkBits2Float(0x41db19b1), SkBits2Float(0x41da63d5), SkBits2Float(0x4
1db755b), SkBits2Float(0x41da0a9b)); | 5411 path.quadTo(SkBits2Float(0x41db19b1), SkBits2Float(0x41da63d5), SkBits2Float(0x4
1db755b), SkBits2Float(0x41da0a9b)); |
5414 path.quadTo(SkBits2Float(0x41dbce01), SkBits2Float(0x41d9ae59), SkBits2Float(0x4
1dc285e), SkBits2Float(0x41d952ce)); | 5412 path.quadTo(SkBits2Float(0x41dbce01), SkBits2Float(0x41d9ae59), SkBits2Float(0x4
1dc285e), SkBits2Float(0x41d952ce)); |
5415 path.quadTo(SkBits2Float(0x41dc55b6), SkBits2Float(0x41d924df), SkBits2Float(0x4
1dc82cd), SkBits2Float(0x41d8f7cd)); | 5413 path.quadTo(SkBits2Float(0x41dc55b6), SkBits2Float(0x41d924df), SkBits2Float(0x4
1dc82cd), SkBits2Float(0x41d8f7cd)); |
5416 path.quadTo(SkBits2Float(0x41dcaf1e), SkBits2Float(0x41d8ca01), SkBits2Float(0x4
1dcdc4c), SkBits2Float(0x41d89bf0)); | 5414 path.quadTo(SkBits2Float(0x41dcaf1e), SkBits2Float(0x41d8ca01), SkBits2Float(0x4
1dcdc4c), SkBits2Float(0x41d89bf0)); |
5417 path.quadTo(SkBits2Float(0x41ef6c33), SkBits2Float(0x41c5aec5), SkBits2Float(0x4
204f72e), SkBits2Float(0x41c56cd2)); | 5415 path.quadTo(SkBits2Float(0x41ef6c33), SkBits2Float(0x41c5aec5), SkBits2Float(0x4
204f72e), SkBits2Float(0x41c56cd2)); |
5418 path.close(); | 5416 path.close(); |
5419 // DEBUG_UNDER_DEVELOPMENT fuzz763_4713_b disable expectation check for now | 5417 testSimplify(reporter, path, filename); |
5420 testSimplifyCheck(reporter, path, filename, !FLAGS_runFail); | |
5421 } | 5418 } |
5422 | 5419 |
5423 static void dean4(skiatest::Reporter* reporter, const char* filename) { | 5420 static void dean4(skiatest::Reporter* reporter, const char* filename) { |
5424 // FIXME: This fails unexpectedly when GYP_DEFINES="skia_fast=1" is set on a z84
0 calibre machine | 5421 // FIXME: This fails unexpectedly when GYP_DEFINES="skia_fast=1" is set on a z84
0 calibre machine |
5425 #if DEBUG_UNDER_DEVELOPMENT | 5422 #if DEBUG_UNDER_DEVELOPMENT |
5426 return; | 5423 return; |
5427 #endif | 5424 #endif |
5428 SkPath path; | 5425 SkPath path; |
5429 | 5426 |
5430 // start region | 5427 // start region |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5852 path.quadTo(2, 3, 3, 3); | 5849 path.quadTo(2, 3, 3, 3); |
5853 path.lineTo(3, 3); | 5850 path.lineTo(3, 3); |
5854 path.close(); | 5851 path.close(); |
5855 path.moveTo(0, 1); | 5852 path.moveTo(0, 1); |
5856 path.lineTo(2, 2); | 5853 path.lineTo(2, 2); |
5857 path.quadTo(1, 3, 3, 3); | 5854 path.quadTo(1, 3, 3, 3); |
5858 path.close(); | 5855 path.close(); |
5859 testSimplify(reporter, path, filename); | 5856 testSimplify(reporter, path, filename); |
5860 } | 5857 } |
5861 | 5858 |
| 5859 static void testQuads73(skiatest::Reporter* reporter, const char* filename) { |
| 5860 SkPath path; |
| 5861 path.moveTo(0, 0); |
| 5862 path.quadTo(0, 1, 1, 2); |
| 5863 path.lineTo(0, 3); |
| 5864 path.close(); |
| 5865 path.moveTo(0, 0); |
| 5866 path.lineTo(0, 0); |
| 5867 path.quadTo(0, 1, 1, 1); |
| 5868 path.close(); |
| 5869 testSimplify(reporter, path, filename); |
| 5870 } |
| 5871 |
5862 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 5872 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
5863 static void (*firstTest)(skiatest::Reporter* , const char* filename) = tiger8b_h
_1; | 5873 static void (*firstTest)(skiatest::Reporter* , const char* filename) = tiger8b_h
_1; |
5864 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 5874 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
5865 | 5875 |
5866 static TestDesc tests[] = { | 5876 static TestDesc tests[] = { |
| 5877 TEST(testQuads73), |
5867 TEST(tiger8a_h_1), | 5878 TEST(tiger8a_h_1), |
5868 TEST(tiger8a_h), | 5879 TEST(tiger8a_h), |
5869 TEST(tiger8a), | 5880 TEST(tiger8a), |
5870 TEST(tiger8b_h_1), | 5881 TEST(tiger8b_h_1), |
5871 TEST(tiger8b_h), | 5882 TEST(tiger8b_h), |
5872 TEST(tiger8b), | 5883 TEST(tiger8b), |
5873 TEST(tiger8), | 5884 TEST(tiger8), |
5874 TEST(testQuads72), | 5885 TEST(testQuads72), |
5875 TEST(testQuads71), | 5886 TEST(testQuads71), |
5876 TEST(testQuads70), | 5887 TEST(testQuads70), |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6327 | 6338 |
6328 DEF_TEST(PathOpsSimplify, reporter) { | 6339 DEF_TEST(PathOpsSimplify, reporter) { |
6329 if (runSubTests && runSubTestsFirst) { | 6340 if (runSubTests && runSubTestsFirst) { |
6330 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 6341 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
6331 } | 6342 } |
6332 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 6343 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
6333 if (runSubTests && !runSubTestsFirst) { | 6344 if (runSubTests && !runSubTestsFirst) { |
6334 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 6345 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
6335 } | 6346 } |
6336 } | 6347 } |
OLD | NEW |