caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
Cary Clark | 4533f3d | 2018-08-08 09:48:09 -0400 | [diff] [blame] | 7 | #include "PathOpsDebug.h" |
caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 8 | #include "PathOpsExtendedTest.h" |
| 9 | #include "PathOpsThreadedCommon.h" |
Cary Clark | 8af4c40 | 2018-08-08 23:22:37 -0400 | [diff] [blame^] | 10 | #include <atomic> |
caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 11 | |
| 12 | #define TEST(name) { name, #name } |
| 13 | |
| 14 | static void tiger8(skiatest::Reporter* reporter, const char* filename) { |
| 15 | SkPath path; |
| 16 | path.moveTo(SkBits2Float(0x43f639c5), SkBits2Float(0x4361375a)); // 492.451f, 225.216f |
| 17 | path.quadTo(SkBits2Float(0x43f58ce4), SkBits2Float(0x435d2a04), SkBits2Float(0x43f71bd9), SkBits2Float(0x435ac7d8)); // 491.101f, 221.164f, 494.218f, 218.781f |
| 18 | path.quadTo(SkBits2Float(0x43f7d69d), SkBits2Float(0x4359aa35), SkBits2Float(0x43f8b3b3), SkBits2Float(0x435951c5)); // 495.677f, 217.665f, 497.404f, 217.319f |
| 19 | path.conicTo(SkBits2Float(0x43f8ba67), SkBits2Float(0x43594f16), SkBits2Float(0x43f8c136), SkBits2Float(0x43594dd9), SkBits2Float(0x3f7fa2b1)); // 497.456f, 217.309f, 497.509f, 217.304f, 0.998576f |
| 20 | path.quadTo(SkBits2Float(0x43fcc3a8), SkBits2Float(0x43589340), SkBits2Float(0x43ff01dc), SkBits2Float(0x4352e191)); // 505.529f, 216.575f, 510.015f, 210.881f |
| 21 | path.conicTo(SkBits2Float(0x43ff5113), SkBits2Float(0x4352187b), SkBits2Float(0x43ffb59e), SkBits2Float(0x4352b6e9), SkBits2Float(0x3f3504f3)); // 510.633f, 210.096f, 511.419f, 210.714f, 0.707107f |
| 22 | path.conicTo(SkBits2Float(0x43ffdc85), SkBits2Float(0x4352f435), SkBits2Float(0x43ffe4a9), SkBits2Float(0x435355e9), SkBits2Float(0x3f6ec0ae)); // 511.723f, 210.954f, 511.786f, 211.336f, 0.932628f |
| 23 | path.quadTo(SkBits2Float(0x4400461c), SkBits2Float(0x435b3080), SkBits2Float(0x4400b692), SkBits2Float(0x4360b229)); // 513.095f, 219.189f, 514.853f, 224.696f |
| 24 | path.conicTo(SkBits2Float(0x4400c662), SkBits2Float(0x43617856), SkBits2Float(0x44009920), SkBits2Float(0x4361decb), SkBits2Float(0x3f46ad5b)); // 515.1f, 225.47f, 514.393f, 225.87f, 0.776083f |
| 25 | path.quadTo(SkBits2Float(0x43fb4920), SkBits2Float(0x43688f50), SkBits2Float(0x43f8340f), SkBits2Float(0x4365b887)); // 502.571f, 232.56f, 496.407f, 229.721f |
| 26 | path.quadTo(SkBits2Float(0x43f72cd2), SkBits2Float(0x4364c612), SkBits2Float(0x43f69888), SkBits2Float(0x4362e330)); // 494.35f, 228.774f, 493.192f, 226.887f |
| 27 | path.quadTo(SkBits2Float(0x43f66a00), SkBits2Float(0x43624bae), SkBits2Float(0x43f64c73), SkBits2Float(0x4361ad04)); // 492.828f, 226.296f, 492.597f, 225.676f |
| 28 | path.quadTo(SkBits2Float(0x43f642ea), SkBits2Float(0x436179d2), SkBits2Float(0x43f63c1c), SkBits2Float(0x43614abe)); // 492.523f, 225.476f, 492.47f, 225.292f |
| 29 | path.quadTo(SkBits2Float(0x43f639c9), SkBits2Float(0x43613aa5), SkBits2Float(0x43f63809), SkBits2Float(0x43612cda)); // 492.451f, 225.229f, 492.438f, 225.175f |
| 30 | path.quadTo(SkBits2Float(0x43f63777), SkBits2Float(0x43612855), SkBits2Float(0x43f636df), SkBits2Float(0x43612357)); // 492.433f, 225.158f, 492.429f, 225.138f |
| 31 | path.quadTo(SkBits2Float(0x43f6368f), SkBits2Float(0x436120b2), SkBits2Float(0x43f6367b), SkBits2Float(0x43612005)); // 492.426f, 225.128f, 492.426f, 225.125f |
| 32 | path.lineTo(SkBits2Float(0x43f63656), SkBits2Float(0x43611ebc)); // 492.424f, 225.12f |
| 33 | path.lineTo(SkBits2Float(0x43f63647), SkBits2Float(0x43611e34)); // 492.424f, 225.118f |
| 34 | path.lineTo(SkBits2Float(0x43f6363f), SkBits2Float(0x43611df3)); // 492.424f, 225.117f |
| 35 | path.lineTo(SkBits2Float(0x43f6363e), SkBits2Float(0x43611de5)); // 492.424f, 225.117f |
| 36 | path.lineTo(SkBits2Float(0x43f6363f), SkBits2Float(0x43611deb)); // 492.424f, 225.117f |
| 37 | path.lineTo(SkBits2Float(0x43f63647), SkBits2Float(0x43611e37)); // 492.424f, 225.118f |
| 38 | path.lineTo(SkBits2Float(0x43f63644), SkBits2Float(0x43611e19)); // 492.424f, 225.118f |
| 39 | path.quadTo(SkBits2Float(0x43f6365c), SkBits2Float(0x43611ee7), SkBits2Float(0x43f6365d), SkBits2Float(0x43611ef9)); // 492.425f, 225.121f, 492.425f, 225.121f |
| 40 | path.quadTo(SkBits2Float(0x43f63666), SkBits2Float(0x43611f4b), SkBits2Float(0x43f63672), SkBits2Float(0x43611fb1)); // 492.425f, 225.122f, 492.425f, 225.124f |
| 41 | path.quadTo(SkBits2Float(0x43f636ab), SkBits2Float(0x436121a4), SkBits2Float(0x43f636e3), SkBits2Float(0x4361236a)); // 492.427f, 225.131f, 492.429f, 225.138f |
| 42 | path.quadTo(SkBits2Float(0x43f636fd), SkBits2Float(0x43612443), SkBits2Float(0x43f63705), SkBits2Float(0x4361247e)); // 492.43f, 225.142f, 492.43f, 225.143f |
| 43 | path.quadTo(SkBits2Float(0x43f637d7), SkBits2Float(0x43612b15), SkBits2Float(0x43f638dc), SkBits2Float(0x436131b0)); // 492.436f, 225.168f, 492.444f, 225.194f |
| 44 | path.quadTo(SkBits2Float(0x43f63b88), SkBits2Float(0x43614303), SkBits2Float(0x43f63f62), SkBits2Float(0x43615368)); // 492.465f, 225.262f, 492.495f, 225.326f |
| 45 | path.quadTo(SkBits2Float(0x43f6436f), SkBits2Float(0x4361649f), SkBits2Float(0x43f648b2), SkBits2Float(0x43617468)); // 492.527f, 225.393f, 492.568f, 225.455f |
| 46 | path.quadTo(SkBits2Float(0x43f68760), SkBits2Float(0x43623072), SkBits2Float(0x43f6ec71), SkBits2Float(0x4361cb60)); // 493.058f, 226.189f, 493.847f, 225.794f |
| 47 | path.quadTo(SkBits2Float(0x43f722ef), SkBits2Float(0x436194e0), SkBits2Float(0x43f73027), SkBits2Float(0x43611df0)); // 494.273f, 225.582f, 494.376f, 225.117f |
| 48 | path.quadTo(SkBits2Float(0x43f73334), SkBits2Float(0x43610284), SkBits2Float(0x43f73333), SkBits2Float(0x4360e667)); // 494.4f, 225.01f, 494.4f, 224.9f |
| 49 | path.lineTo(SkBits2Float(0x43f63638), SkBits2Float(0x43611daf)); // 492.424f, 225.116f |
| 50 | path.lineTo(SkBits2Float(0x43f6b333), SkBits2Float(0x4360e666)); // 493.4f, 224.9f |
| 51 | path.lineTo(SkBits2Float(0x43f639c5), SkBits2Float(0x4361375a)); // 492.451f, 225.216f |
| 52 | path.close(); |
| 53 | path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 494.349f, 224.584f |
| 54 | path.conicTo(SkBits2Float(0x43f72ebd), SkBits2Float(0x4360a219), SkBits2Float(0x43f7302e), SkBits2Float(0x4360af1f), SkBits2Float(0x3f7fa741)); // 494.365f, 224.633f, 494.376f, 224.684f, 0.998646f |
| 55 | path.lineTo(SkBits2Float(0x43f63333), SkBits2Float(0x4360e667)); // 492.4f, 224.9f |
| 56 | path.quadTo(SkBits2Float(0x43f63333), SkBits2Float(0x4360ca4b), SkBits2Float(0x43f6363f), SkBits2Float(0x4360aede)); // 492.4f, 224.79f, 492.424f, 224.683f |
| 57 | path.quadTo(SkBits2Float(0x43f64377), SkBits2Float(0x436037ee), SkBits2Float(0x43f679f5), SkBits2Float(0x4360016e)); // 492.527f, 224.218f, 492.953f, 224.006f |
| 58 | path.quadTo(SkBits2Float(0x43f6df06), SkBits2Float(0x435f9c5c), SkBits2Float(0x43f71db4), SkBits2Float(0x43605866)); // 493.742f, 223.611f, 494.232f, 224.345f |
| 59 | path.quadTo(SkBits2Float(0x43f722f8), SkBits2Float(0x43606830), SkBits2Float(0x43f72704), SkBits2Float(0x43607966)); // 494.273f, 224.407f, 494.305f, 224.474f |
| 60 | path.quadTo(SkBits2Float(0x43f72ae0), SkBits2Float(0x436089cd), SkBits2Float(0x43f72d8a), SkBits2Float(0x43609b1e)); // 494.335f, 224.538f, 494.356f, 224.606f |
| 61 | path.quadTo(SkBits2Float(0x43f72e8e), SkBits2Float(0x4360a1b8), SkBits2Float(0x43f72f61), SkBits2Float(0x4360a850)); // 494.364f, 224.632f, 494.37f, 224.657f |
| 62 | path.quadTo(SkBits2Float(0x43f72f68), SkBits2Float(0x4360a88a), SkBits2Float(0x43f72f83), SkBits2Float(0x4360a964)); // 494.37f, 224.658f, 494.371f, 224.662f |
| 63 | path.quadTo(SkBits2Float(0x43f72fbb), SkBits2Float(0x4360ab2a), SkBits2Float(0x43f72ff4), SkBits2Float(0x4360ad1d)); // 494.373f, 224.669f, 494.375f, 224.676f |
| 64 | path.quadTo(SkBits2Float(0x43f73000), SkBits2Float(0x4360ad83), SkBits2Float(0x43f73009), SkBits2Float(0x4360add5)); // 494.375f, 224.678f, 494.375f, 224.679f |
| 65 | path.quadTo(SkBits2Float(0x43f7300b), SkBits2Float(0x4360ade9), SkBits2Float(0x43f73022), SkBits2Float(0x4360aeb5)); // 494.375f, 224.679f, 494.376f, 224.682f |
| 66 | path.lineTo(SkBits2Float(0x43f7301f), SkBits2Float(0x4360ae97)); // 494.376f, 224.682f |
| 67 | path.lineTo(SkBits2Float(0x43f73027), SkBits2Float(0x4360aee3)); // 494.376f, 224.683f |
| 68 | path.lineTo(SkBits2Float(0x43f73028), SkBits2Float(0x4360aeeb)); // 494.376f, 224.683f |
| 69 | path.lineTo(SkBits2Float(0x43f73027), SkBits2Float(0x4360aedf)); // 494.376f, 224.683f |
| 70 | path.lineTo(SkBits2Float(0x43f73021), SkBits2Float(0x4360aeaa)); // 494.376f, 224.682f |
| 71 | path.lineTo(SkBits2Float(0x43f73016), SkBits2Float(0x4360ae50)); // 494.376f, 224.681f |
| 72 | path.lineTo(SkBits2Float(0x43f73007), SkBits2Float(0x4360adc1)); // 494.375f, 224.679f |
| 73 | path.lineTo(SkBits2Float(0x43f72ff9), SkBits2Float(0x4360ad4d)); // 494.375f, 224.677f |
| 74 | path.quadTo(SkBits2Float(0x43f7300d), SkBits2Float(0x4360adf7), SkBits2Float(0x43f73031), SkBits2Float(0x4360af12)); // 494.375f, 224.68f, 494.376f, 224.684f |
| 75 | path.quadTo(SkBits2Float(0x43f730f0), SkBits2Float(0x4360b4f1), SkBits2Float(0x43f7320a), SkBits2Float(0x4360bc94)); // 494.382f, 224.707f, 494.391f, 224.737f |
| 76 | path.quadTo(SkBits2Float(0x43f73625), SkBits2Float(0x4360d8fe), SkBits2Float(0x43f73c59), SkBits2Float(0x4360fa4a)); // 494.423f, 224.848f, 494.471f, 224.978f |
| 77 | path.quadTo(SkBits2Float(0x43f75132), SkBits2Float(0x43616a36), SkBits2Float(0x43f772ac), SkBits2Float(0x4361d738)); // 494.634f, 225.415f, 494.896f, 225.841f |
| 78 | path.quadTo(SkBits2Float(0x43f7de60), SkBits2Float(0x436335ea), SkBits2Float(0x43f89f25), SkBits2Float(0x4363e779)); // 495.737f, 227.211f, 497.243f, 227.904f |
| 79 | path.quadTo(SkBits2Float(0x43fb3d30), SkBits2Float(0x436650a0), SkBits2Float(0x44005a14), SkBits2Float(0x43602133)); // 502.478f, 230.315f, 513.407f, 224.13f |
| 80 | path.lineTo(SkBits2Float(0x4400799a), SkBits2Float(0x4360ffff)); // 513.9f, 225 |
| 81 | path.lineTo(SkBits2Float(0x44003ca2), SkBits2Float(0x43614dd5)); // 512.947f, 225.304f |
| 82 | path.quadTo(SkBits2Float(0x43ff92b8), SkBits2Float(0x435ba8f8), SkBits2Float(0x43fee825), SkBits2Float(0x4353aa15)); // 511.146f, 219.66f, 509.814f, 211.664f |
| 83 | path.lineTo(SkBits2Float(0x43ff6667), SkBits2Float(0x43537fff)); // 510.8f, 211.5f |
| 84 | path.lineTo(SkBits2Float(0x43ffcaf2), SkBits2Float(0x43541e6d)); // 511.586f, 212.119f |
| 85 | path.quadTo(SkBits2Float(0x43fd4888), SkBits2Float(0x435a7d38), SkBits2Float(0x43f8d864), SkBits2Float(0x435b4bbf)); // 506.567f, 218.489f, 497.691f, 219.296f |
| 86 | path.lineTo(SkBits2Float(0x43f8cccd), SkBits2Float(0x435a4ccc)); // 497.6f, 218.3f |
| 87 | path.lineTo(SkBits2Float(0x43f8e5e7), SkBits2Float(0x435b47d3)); // 497.796f, 219.281f |
| 88 | path.quadTo(SkBits2Float(0x43f84300), SkBits2Float(0x435b88fd), SkBits2Float(0x43f7b75b), SkBits2Float(0x435c5e8e)); // 496.523f, 219.535f, 495.432f, 220.369f |
| 89 | path.quadTo(SkBits2Float(0x43f6b984), SkBits2Float(0x435de2c4), SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 493.449f, 221.886f, 494.349f, 224.584f |
| 90 | path.close(); |
| 91 | testSimplify(reporter, path, filename); |
| 92 | } |
| 93 | |
| 94 | // fails to include a line of edges, probably mis-sorting |
| 95 | static void tiger8a(skiatest::Reporter* reporter, const char* filename) { |
| 96 | SkPath path; |
| 97 | path.moveTo(SkBits2Float(0x43f639c5), SkBits2Float(0x4361375a)); // 492.451f, 225.216f |
| 98 | path.quadTo(SkBits2Float(0x43f58ce4), SkBits2Float(0x435d2a04), SkBits2Float(0x43f71bd9), SkBits2Float(0x435ac7d8)); // 491.101f, 221.164f, 494.218f, 218.781f |
| 99 | path.quadTo(SkBits2Float(0x43f7d69d), SkBits2Float(0x4359aa35), SkBits2Float(0x43f8b3b3), SkBits2Float(0x435951c5)); // 495.677f, 217.665f, 497.404f, 217.319f |
| 100 | path.conicTo(SkBits2Float(0x43f8ba67), SkBits2Float(0x43594f16), SkBits2Float(0x43f8c136), SkBits2Float(0x43594dd9), SkBits2Float(0x3f7fa2b1)); // 497.456f, 217.309f, 497.509f, 217.304f, 0.998576f |
| 101 | path.quadTo(SkBits2Float(0x43fcc3a8), SkBits2Float(0x43589340), SkBits2Float(0x43ff01dc), SkBits2Float(0x4352e191)); // 505.529f, 216.575f, 510.015f, 210.881f |
| 102 | path.conicTo(SkBits2Float(0x43ff5113), SkBits2Float(0x4352187b), SkBits2Float(0x43ffb59e), SkBits2Float(0x4352b6e9), SkBits2Float(0x3f3504f3)); // 510.633f, 210.096f, 511.419f, 210.714f, 0.707107f |
| 103 | path.conicTo(SkBits2Float(0x43ffdc85), SkBits2Float(0x4352f435), SkBits2Float(0x43ffe4a9), SkBits2Float(0x435355e9), SkBits2Float(0x3f6ec0ae)); // 511.723f, 210.954f, 511.786f, 211.336f, 0.932628f |
| 104 | path.quadTo(SkBits2Float(0x4400461c), SkBits2Float(0x435b3080), SkBits2Float(0x4400b692), SkBits2Float(0x4360b229)); // 513.095f, 219.189f, 514.853f, 224.696f |
| 105 | path.conicTo(SkBits2Float(0x4400c662), SkBits2Float(0x43617856), SkBits2Float(0x44009920), SkBits2Float(0x4361decb), SkBits2Float(0x3f46ad5b)); // 515.1f, 225.47f, 514.393f, 225.87f, 0.776083f |
| 106 | path.quadTo(SkBits2Float(0x43fb4920), SkBits2Float(0x43688f50), SkBits2Float(0x43f8340f), SkBits2Float(0x4365b887)); // 502.571f, 232.56f, 496.407f, 229.721f |
| 107 | path.quadTo(SkBits2Float(0x43f72cd2), SkBits2Float(0x4364c612), SkBits2Float(0x43f69888), SkBits2Float(0x4362e330)); // 494.35f, 228.774f, 493.192f, 226.887f |
| 108 | path.quadTo(SkBits2Float(0x43f66a00), SkBits2Float(0x43624bae), SkBits2Float(0x43f64c73), SkBits2Float(0x4361ad04)); // 492.828f, 226.296f, 492.597f, 225.676f |
| 109 | path.quadTo(SkBits2Float(0x43f642ea), SkBits2Float(0x436179d2), SkBits2Float(0x43f63c1c), SkBits2Float(0x43614abe)); // 492.523f, 225.476f, 492.47f, 225.292f |
| 110 | path.quadTo(SkBits2Float(0x43f639c9), SkBits2Float(0x43613aa5), SkBits2Float(0x43f63809), SkBits2Float(0x43612cda)); // 492.451f, 225.229f, 492.438f, 225.175f |
| 111 | path.quadTo(SkBits2Float(0x43f63777), SkBits2Float(0x43612855), SkBits2Float(0x43f636df), SkBits2Float(0x43612357)); // 492.433f, 225.158f, 492.429f, 225.138f |
| 112 | path.quadTo(SkBits2Float(0x43f6368f), SkBits2Float(0x436120b2), SkBits2Float(0x43f6367b), SkBits2Float(0x43612005)); // 492.426f, 225.128f, 492.426f, 225.125f |
| 113 | path.lineTo(SkBits2Float(0x43f63656), SkBits2Float(0x43611ebc)); // 492.424f, 225.12f |
| 114 | path.lineTo(SkBits2Float(0x43f63647), SkBits2Float(0x43611e34)); // 492.424f, 225.118f |
| 115 | path.lineTo(SkBits2Float(0x43f6363f), SkBits2Float(0x43611df3)); // 492.424f, 225.117f |
| 116 | path.lineTo(SkBits2Float(0x43f6363e), SkBits2Float(0x43611de5)); // 492.424f, 225.117f |
| 117 | path.lineTo(SkBits2Float(0x43f6363f), SkBits2Float(0x43611deb)); // 492.424f, 225.117f |
| 118 | path.lineTo(SkBits2Float(0x43f63647), SkBits2Float(0x43611e37)); // 492.424f, 225.118f |
| 119 | path.lineTo(SkBits2Float(0x43f63644), SkBits2Float(0x43611e19)); // 492.424f, 225.118f |
| 120 | path.quadTo(SkBits2Float(0x43f6365c), SkBits2Float(0x43611ee7), SkBits2Float(0x43f6365d), SkBits2Float(0x43611ef9)); // 492.425f, 225.121f, 492.425f, 225.121f |
| 121 | path.quadTo(SkBits2Float(0x43f63666), SkBits2Float(0x43611f4b), SkBits2Float(0x43f63672), SkBits2Float(0x43611fb1)); // 492.425f, 225.122f, 492.425f, 225.124f |
| 122 | path.quadTo(SkBits2Float(0x43f636ab), SkBits2Float(0x436121a4), SkBits2Float(0x43f636e3), SkBits2Float(0x4361236a)); // 492.427f, 225.131f, 492.429f, 225.138f |
| 123 | path.quadTo(SkBits2Float(0x43f636fd), SkBits2Float(0x43612443), SkBits2Float(0x43f63705), SkBits2Float(0x4361247e)); // 492.43f, 225.142f, 492.43f, 225.143f |
| 124 | path.quadTo(SkBits2Float(0x43f637d7), SkBits2Float(0x43612b15), SkBits2Float(0x43f638dc), SkBits2Float(0x436131b0)); // 492.436f, 225.168f, 492.444f, 225.194f |
| 125 | path.quadTo(SkBits2Float(0x43f63b88), SkBits2Float(0x43614303), SkBits2Float(0x43f63f62), SkBits2Float(0x43615368)); // 492.465f, 225.262f, 492.495f, 225.326f |
| 126 | path.quadTo(SkBits2Float(0x43f6436f), SkBits2Float(0x4361649f), SkBits2Float(0x43f648b2), SkBits2Float(0x43617468)); // 492.527f, 225.393f, 492.568f, 225.455f |
| 127 | path.quadTo(SkBits2Float(0x43f68760), SkBits2Float(0x43623072), SkBits2Float(0x43f6ec71), SkBits2Float(0x4361cb60)); // 493.058f, 226.189f, 493.847f, 225.794f |
| 128 | path.quadTo(SkBits2Float(0x43f722ef), SkBits2Float(0x436194e0), SkBits2Float(0x43f73027), SkBits2Float(0x43611df0)); // 494.273f, 225.582f, 494.376f, 225.117f |
| 129 | path.quadTo(SkBits2Float(0x43f73334), SkBits2Float(0x43610284), SkBits2Float(0x43f73333), SkBits2Float(0x4360e667)); // 494.4f, 225.01f, 494.4f, 224.9f |
| 130 | path.lineTo(SkBits2Float(0x43f63638), SkBits2Float(0x43611daf)); // 492.424f, 225.116f |
| 131 | path.lineTo(SkBits2Float(0x43f6b333), SkBits2Float(0x4360e666)); // 493.4f, 224.9f |
| 132 | path.lineTo(SkBits2Float(0x43f639c5), SkBits2Float(0x4361375a)); // 492.451f, 225.216f |
| 133 | path.close(); |
| 134 | testSimplify(reporter, path, filename); |
| 135 | } |
| 136 | |
Cary Clark | 8af4c40 | 2018-08-08 23:22:37 -0400 | [diff] [blame^] | 137 | static std::atomic<int> gTigerTests{0}; |
Cary Clark | 4533f3d | 2018-08-08 09:48:09 -0400 | [diff] [blame] | 138 | |
caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 139 | static void tiger8a_x(skiatest::Reporter* reporter, uint64_t testlines) { |
| 140 | SkPath path; |
| 141 | uint64_t i = 0; |
| 142 | if (testlines & (1LL << i++)) path.moveTo(SkBits2Float(0x43f639c5), SkBits2Float(0x4361375a)); // 492.451f, 225.216f |
| 143 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f58ce4), SkBits2Float(0x435d2a04), SkBits2Float(0x43f71bd9), SkBits2Float(0x435ac7d8)); // 491.101f, 221.164f, 494.218f, 218.781f |
| 144 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f7d69d), SkBits2Float(0x4359aa35), SkBits2Float(0x43f8b3b3), SkBits2Float(0x435951c5)); // 495.677f, 217.665f, 497.404f, 217.319f |
| 145 | if (testlines & (1LL << i++)) path.conicTo(SkBits2Float(0x43f8ba67), SkBits2Float(0x43594f16), SkBits2Float(0x43f8c136), SkBits2Float(0x43594dd9), SkBits2Float(0x3f7fa2b1)); // 497.456f, 217.309f, 497.509f, 217.304f, 0.998576f |
| 146 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43fcc3a8), SkBits2Float(0x43589340), SkBits2Float(0x43ff01dc), SkBits2Float(0x4352e191)); // 505.529f, 216.575f, 510.015f, 210.881f |
| 147 | if (testlines & (1LL << i++)) path.conicTo(SkBits2Float(0x43ff5113), SkBits2Float(0x4352187b), SkBits2Float(0x43ffb59e), SkBits2Float(0x4352b6e9), SkBits2Float(0x3f3504f3)); // 510.633f, 210.096f, 511.419f, 210.714f, 0.707107f |
| 148 | if (testlines & (1LL << i++)) path.conicTo(SkBits2Float(0x43ffdc85), SkBits2Float(0x4352f435), SkBits2Float(0x43ffe4a9), SkBits2Float(0x435355e9), SkBits2Float(0x3f6ec0ae)); // 511.723f, 210.954f, 511.786f, 211.336f, 0.932628f |
| 149 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x4400461c), SkBits2Float(0x435b3080), SkBits2Float(0x4400b692), SkBits2Float(0x4360b229)); // 513.095f, 219.189f, 514.853f, 224.696f |
| 150 | if (testlines & (1LL << i++)) path.conicTo(SkBits2Float(0x4400c662), SkBits2Float(0x43617856), SkBits2Float(0x44009920), SkBits2Float(0x4361decb), SkBits2Float(0x3f46ad5b)); // 515.1f, 225.47f, 514.393f, 225.87f, 0.776083f |
| 151 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43fb4920), SkBits2Float(0x43688f50), SkBits2Float(0x43f8340f), SkBits2Float(0x4365b887)); // 502.571f, 232.56f, 496.407f, 229.721f |
| 152 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f72cd2), SkBits2Float(0x4364c612), SkBits2Float(0x43f69888), SkBits2Float(0x4362e330)); // 494.35f, 228.774f, 493.192f, 226.887f |
| 153 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f66a00), SkBits2Float(0x43624bae), SkBits2Float(0x43f64c73), SkBits2Float(0x4361ad04)); // 492.828f, 226.296f, 492.597f, 225.676f |
| 154 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f642ea), SkBits2Float(0x436179d2), SkBits2Float(0x43f63c1c), SkBits2Float(0x43614abe)); // 492.523f, 225.476f, 492.47f, 225.292f |
| 155 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f639c9), SkBits2Float(0x43613aa5), SkBits2Float(0x43f63809), SkBits2Float(0x43612cda)); // 492.451f, 225.229f, 492.438f, 225.175f |
| 156 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f63777), SkBits2Float(0x43612855), SkBits2Float(0x43f636df), SkBits2Float(0x43612357)); // 492.433f, 225.158f, 492.429f, 225.138f |
| 157 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f6368f), SkBits2Float(0x436120b2), SkBits2Float(0x43f6367b), SkBits2Float(0x43612005)); // 492.426f, 225.128f, 492.426f, 225.125f |
| 158 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f63656), SkBits2Float(0x43611ebc)); // 492.424f, 225.12f |
| 159 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f63647), SkBits2Float(0x43611e34)); // 492.424f, 225.118f |
| 160 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f6363f), SkBits2Float(0x43611df3)); // 492.424f, 225.117f |
| 161 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f6363e), SkBits2Float(0x43611de5)); // 492.424f, 225.117f |
| 162 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f6363f), SkBits2Float(0x43611deb)); // 492.424f, 225.117f |
| 163 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f63647), SkBits2Float(0x43611e37)); // 492.424f, 225.118f |
| 164 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f63644), SkBits2Float(0x43611e19)); // 492.424f, 225.118f |
| 165 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f6365c), SkBits2Float(0x43611ee7), SkBits2Float(0x43f6365d), SkBits2Float(0x43611ef9)); // 492.425f, 225.121f, 492.425f, 225.121f |
| 166 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f63666), SkBits2Float(0x43611f4b), SkBits2Float(0x43f63672), SkBits2Float(0x43611fb1)); // 492.425f, 225.122f, 492.425f, 225.124f |
| 167 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f636ab), SkBits2Float(0x436121a4), SkBits2Float(0x43f636e3), SkBits2Float(0x4361236a)); // 492.427f, 225.131f, 492.429f, 225.138f |
| 168 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f636fd), SkBits2Float(0x43612443), SkBits2Float(0x43f63705), SkBits2Float(0x4361247e)); // 492.43f, 225.142f, 492.43f, 225.143f |
| 169 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f637d7), SkBits2Float(0x43612b15), SkBits2Float(0x43f638dc), SkBits2Float(0x436131b0)); // 492.436f, 225.168f, 492.444f, 225.194f |
| 170 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f63b88), SkBits2Float(0x43614303), SkBits2Float(0x43f63f62), SkBits2Float(0x43615368)); // 492.465f, 225.262f, 492.495f, 225.326f |
| 171 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f6436f), SkBits2Float(0x4361649f), SkBits2Float(0x43f648b2), SkBits2Float(0x43617468)); // 492.527f, 225.393f, 492.568f, 225.455f |
| 172 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f68760), SkBits2Float(0x43623072), SkBits2Float(0x43f6ec71), SkBits2Float(0x4361cb60)); // 493.058f, 226.189f, 493.847f, 225.794f |
| 173 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f722ef), SkBits2Float(0x436194e0), SkBits2Float(0x43f73027), SkBits2Float(0x43611df0)); // 494.273f, 225.582f, 494.376f, 225.117f |
| 174 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f73334), SkBits2Float(0x43610284), SkBits2Float(0x43f73333), SkBits2Float(0x4360e667)); // 494.4f, 225.01f, 494.4f, 224.9f |
| 175 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f63638), SkBits2Float(0x43611daf)); // 492.424f, 225.116f |
| 176 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f6b333), SkBits2Float(0x4360e666)); // 493.4f, 224.9f |
| 177 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f639c5), SkBits2Float(0x4361375a)); // 492.451f, 225.216f |
| 178 | if (testlines & (1LL << i++)) path.close(); |
Cary Clark | 4533f3d | 2018-08-08 09:48:09 -0400 | [diff] [blame] | 179 | SkString testName; |
| 180 | testName.printf("tiger8a_x%d", ++gTigerTests); |
| 181 | testSimplify(reporter, path, testName.c_str()); |
caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | #include "SkRandom.h" |
| 185 | |
| 186 | static void tiger8a_h_1(skiatest::Reporter* reporter, const char* ) { |
| 187 | uint64_t testlines = 0x0000000000002008; // best so far: 0x0000001d14c14bb1; |
| 188 | tiger8a_x(reporter, testlines); |
| 189 | } |
| 190 | |
| 191 | static void tiger8b_x(skiatest::Reporter* reporter, uint64_t testlines) { |
| 192 | SkPath path; |
| 193 | uint64_t i = 0; |
| 194 | if (testlines & (1LL << i++)) path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 494.349f, 224.584f |
| 195 | if (testlines & (1LL << i++)) path.conicTo(SkBits2Float(0x43f72ebd), SkBits2Float(0x4360a219), SkBits2Float(0x43f7302e), SkBits2Float(0x4360af1f), SkBits2Float(0x3f7fa741)); // 494.365f, 224.633f, 494.376f, 224.684f, 0.998646f |
| 196 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f63333), SkBits2Float(0x4360e667)); // 492.4f, 224.9f |
| 197 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f63333), SkBits2Float(0x4360ca4b), SkBits2Float(0x43f6363f), SkBits2Float(0x4360aede)); // 492.4f, 224.79f, 492.424f, 224.683f |
| 198 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f64377), SkBits2Float(0x436037ee), SkBits2Float(0x43f679f5), SkBits2Float(0x4360016e)); // 492.527f, 224.218f, 492.953f, 224.006f |
| 199 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f6df06), SkBits2Float(0x435f9c5c), SkBits2Float(0x43f71db4), SkBits2Float(0x43605866)); // 493.742f, 223.611f, 494.232f, 224.345f |
| 200 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f722f8), SkBits2Float(0x43606830), SkBits2Float(0x43f72704), SkBits2Float(0x43607966)); // 494.273f, 224.407f, 494.305f, 224.474f |
| 201 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f72ae0), SkBits2Float(0x436089cd), SkBits2Float(0x43f72d8a), SkBits2Float(0x43609b1e)); // 494.335f, 224.538f, 494.356f, 224.606f |
| 202 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f72e8e), SkBits2Float(0x4360a1b8), SkBits2Float(0x43f72f61), SkBits2Float(0x4360a850)); // 494.364f, 224.632f, 494.37f, 224.657f |
| 203 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f72f68), SkBits2Float(0x4360a88a), SkBits2Float(0x43f72f83), SkBits2Float(0x4360a964)); // 494.37f, 224.658f, 494.371f, 224.662f |
| 204 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f72fbb), SkBits2Float(0x4360ab2a), SkBits2Float(0x43f72ff4), SkBits2Float(0x4360ad1d)); // 494.373f, 224.669f, 494.375f, 224.676f |
| 205 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f73000), SkBits2Float(0x4360ad83), SkBits2Float(0x43f73009), SkBits2Float(0x4360add5)); // 494.375f, 224.678f, 494.375f, 224.679f |
| 206 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f7300b), SkBits2Float(0x4360ade9), SkBits2Float(0x43f73022), SkBits2Float(0x4360aeb5)); // 494.375f, 224.679f, 494.376f, 224.682f |
| 207 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f7301f), SkBits2Float(0x4360ae97)); // 494.376f, 224.682f |
| 208 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f73027), SkBits2Float(0x4360aee3)); // 494.376f, 224.683f |
| 209 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f73028), SkBits2Float(0x4360aeeb)); // 494.376f, 224.683f |
| 210 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f73027), SkBits2Float(0x4360aedf)); // 494.376f, 224.683f |
| 211 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f73021), SkBits2Float(0x4360aeaa)); // 494.376f, 224.682f |
| 212 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f73016), SkBits2Float(0x4360ae50)); // 494.376f, 224.681f |
| 213 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f73007), SkBits2Float(0x4360adc1)); // 494.375f, 224.679f |
| 214 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f72ff9), SkBits2Float(0x4360ad4d)); // 494.375f, 224.677f |
| 215 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f7300d), SkBits2Float(0x4360adf7), SkBits2Float(0x43f73031), SkBits2Float(0x4360af12)); // 494.375f, 224.68f, 494.376f, 224.684f |
| 216 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f730f0), SkBits2Float(0x4360b4f1), SkBits2Float(0x43f7320a), SkBits2Float(0x4360bc94)); // 494.382f, 224.707f, 494.391f, 224.737f |
| 217 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f73625), SkBits2Float(0x4360d8fe), SkBits2Float(0x43f73c59), SkBits2Float(0x4360fa4a)); // 494.423f, 224.848f, 494.471f, 224.978f |
| 218 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f75132), SkBits2Float(0x43616a36), SkBits2Float(0x43f772ac), SkBits2Float(0x4361d738)); // 494.634f, 225.415f, 494.896f, 225.841f |
| 219 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f7de60), SkBits2Float(0x436335ea), SkBits2Float(0x43f89f25), SkBits2Float(0x4363e779)); // 495.737f, 227.211f, 497.243f, 227.904f |
| 220 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43fb3d30), SkBits2Float(0x436650a0), SkBits2Float(0x44005a14), SkBits2Float(0x43602133)); // 502.478f, 230.315f, 513.407f, 224.13f |
| 221 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x4400799a), SkBits2Float(0x4360ffff)); // 513.9f, 225 |
| 222 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x44003ca2), SkBits2Float(0x43614dd5)); // 512.947f, 225.304f |
| 223 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43ff92b8), SkBits2Float(0x435ba8f8), SkBits2Float(0x43fee825), SkBits2Float(0x4353aa15)); // 511.146f, 219.66f, 509.814f, 211.664f |
| 224 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43ff6667), SkBits2Float(0x43537fff)); // 510.8f, 211.5f |
| 225 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43ffcaf2), SkBits2Float(0x43541e6d)); // 511.586f, 212.119f |
| 226 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43fd4888), SkBits2Float(0x435a7d38), SkBits2Float(0x43f8d864), SkBits2Float(0x435b4bbf)); // 506.567f, 218.489f, 497.691f, 219.296f |
| 227 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f8cccd), SkBits2Float(0x435a4ccc)); // 497.6f, 218.3f |
| 228 | if (testlines & (1LL << i++)) path.lineTo(SkBits2Float(0x43f8e5e7), SkBits2Float(0x435b47d3)); // 497.796f, 219.281f |
| 229 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f84300), SkBits2Float(0x435b88fd), SkBits2Float(0x43f7b75b), SkBits2Float(0x435c5e8e)); // 496.523f, 219.535f, 495.432f, 220.369f |
| 230 | if (testlines & (1LL << i++)) path.quadTo(SkBits2Float(0x43f6b984), SkBits2Float(0x435de2c4), SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 493.449f, 221.886f, 494.349f, 224.584f |
| 231 | if (testlines & (1LL << i++)) path.close(); |
Cary Clark | 4533f3d | 2018-08-08 09:48:09 -0400 | [diff] [blame] | 232 | SkString testName; |
| 233 | testName.printf("tiger8b_x%d", ++gTigerTests); |
| 234 | testSimplify(reporter, path, testName.c_str()); |
caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 235 | } |
| 236 | |
| 237 | static void testTiger(PathOpsThreadState* data) { |
| 238 | uint64_t testlines = ((uint64_t) data->fB << 32) | (unsigned int) data->fA; |
| 239 | if (data->fC) { |
| 240 | tiger8b_x(data->fReporter, testlines); |
| 241 | } else { |
| 242 | tiger8a_x(data->fReporter, testlines); |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | static void tiger_threaded(skiatest::Reporter* reporter, const char* filename) { |
| 247 | initializeTests(reporter, "tigerb"); |
| 248 | PathOpsThreadedTestRunner testRunner(reporter); |
| 249 | for (int ab = 0; ab < 2; ++ab) { |
| 250 | SkRandom r; |
| 251 | int testCount = reporter->allowExtendedTest() ? 10000 : 100; |
| 252 | for (int samples = 2; samples < 37; ++samples) { |
| 253 | for (int tests = 0; tests < testCount; ++tests) { |
| 254 | uint64_t testlines = 0; |
| 255 | for (int i = 0; i < samples; ++i) { |
| 256 | int bit; |
| 257 | do { |
| 258 | bit = r.nextRangeU(0, 38); |
| 259 | } while (testlines & (1LL << bit)); |
| 260 | testlines |= 1LL << bit; |
| 261 | } |
| 262 | *testRunner.fRunnables.append() = |
Ben Wagner | 63fd760 | 2017-10-09 15:45:33 -0400 | [diff] [blame] | 263 | new PathOpsThreadedRunnable(&testTiger, |
caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 264 | (int) (unsigned) (testlines & 0xFFFFFFFF), |
| 265 | (int) (unsigned) (testlines >> 32), |
| 266 | ab, 0, &testRunner); |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | testRunner.render(); |
| 271 | } |
| 272 | |
| 273 | static void tiger8b_h_1(skiatest::Reporter* reporter, const char* filename) { |
| 274 | uint64_t testlines = 0x000000000f27b9e3; // best so far: 0x000000201304b4a3 |
| 275 | tiger8b_x(reporter, testlines); |
| 276 | } |
| 277 | |
| 278 | // tries to add same edge twice |
| 279 | static void tiger8b(skiatest::Reporter* reporter, const char* filename) { |
| 280 | SkPath path; |
| 281 | path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 494.349f, 224.584f |
| 282 | path.conicTo(SkBits2Float(0x43f72ebd), SkBits2Float(0x4360a219), SkBits2Float(0x43f7302e), SkBits2Float(0x4360af1f), SkBits2Float(0x3f7fa741)); // 494.365f, 224.633f, 494.376f, 224.684f, 0.998646f |
| 283 | path.lineTo(SkBits2Float(0x43f63333), SkBits2Float(0x4360e667)); // 492.4f, 224.9f |
| 284 | path.quadTo(SkBits2Float(0x43f63333), SkBits2Float(0x4360ca4b), SkBits2Float(0x43f6363f), SkBits2Float(0x4360aede)); // 492.4f, 224.79f, 492.424f, 224.683f |
| 285 | path.quadTo(SkBits2Float(0x43f64377), SkBits2Float(0x436037ee), SkBits2Float(0x43f679f5), SkBits2Float(0x4360016e)); // 492.527f, 224.218f, 492.953f, 224.006f |
| 286 | path.quadTo(SkBits2Float(0x43f6df06), SkBits2Float(0x435f9c5c), SkBits2Float(0x43f71db4), SkBits2Float(0x43605866)); // 493.742f, 223.611f, 494.232f, 224.345f |
| 287 | path.quadTo(SkBits2Float(0x43f722f8), SkBits2Float(0x43606830), SkBits2Float(0x43f72704), SkBits2Float(0x43607966)); // 494.273f, 224.407f, 494.305f, 224.474f |
| 288 | path.quadTo(SkBits2Float(0x43f72ae0), SkBits2Float(0x436089cd), SkBits2Float(0x43f72d8a), SkBits2Float(0x43609b1e)); // 494.335f, 224.538f, 494.356f, 224.606f |
| 289 | path.quadTo(SkBits2Float(0x43f72e8e), SkBits2Float(0x4360a1b8), SkBits2Float(0x43f72f61), SkBits2Float(0x4360a850)); // 494.364f, 224.632f, 494.37f, 224.657f |
| 290 | path.quadTo(SkBits2Float(0x43f72f68), SkBits2Float(0x4360a88a), SkBits2Float(0x43f72f83), SkBits2Float(0x4360a964)); // 494.37f, 224.658f, 494.371f, 224.662f |
| 291 | path.quadTo(SkBits2Float(0x43f72fbb), SkBits2Float(0x4360ab2a), SkBits2Float(0x43f72ff4), SkBits2Float(0x4360ad1d)); // 494.373f, 224.669f, 494.375f, 224.676f |
| 292 | path.quadTo(SkBits2Float(0x43f73000), SkBits2Float(0x4360ad83), SkBits2Float(0x43f73009), SkBits2Float(0x4360add5)); // 494.375f, 224.678f, 494.375f, 224.679f |
| 293 | path.quadTo(SkBits2Float(0x43f7300b), SkBits2Float(0x4360ade9), SkBits2Float(0x43f73022), SkBits2Float(0x4360aeb5)); // 494.375f, 224.679f, 494.376f, 224.682f |
| 294 | path.lineTo(SkBits2Float(0x43f7301f), SkBits2Float(0x4360ae97)); // 494.376f, 224.682f |
| 295 | path.lineTo(SkBits2Float(0x43f73027), SkBits2Float(0x4360aee3)); // 494.376f, 224.683f |
| 296 | path.lineTo(SkBits2Float(0x43f73028), SkBits2Float(0x4360aeeb)); // 494.376f, 224.683f |
| 297 | path.lineTo(SkBits2Float(0x43f73027), SkBits2Float(0x4360aedf)); // 494.376f, 224.683f |
| 298 | path.lineTo(SkBits2Float(0x43f73021), SkBits2Float(0x4360aeaa)); // 494.376f, 224.682f |
| 299 | path.lineTo(SkBits2Float(0x43f73016), SkBits2Float(0x4360ae50)); // 494.376f, 224.681f |
| 300 | path.lineTo(SkBits2Float(0x43f73007), SkBits2Float(0x4360adc1)); // 494.375f, 224.679f |
| 301 | path.lineTo(SkBits2Float(0x43f72ff9), SkBits2Float(0x4360ad4d)); // 494.375f, 224.677f |
| 302 | path.quadTo(SkBits2Float(0x43f7300d), SkBits2Float(0x4360adf7), SkBits2Float(0x43f73031), SkBits2Float(0x4360af12)); // 494.375f, 224.68f, 494.376f, 224.684f |
| 303 | path.quadTo(SkBits2Float(0x43f730f0), SkBits2Float(0x4360b4f1), SkBits2Float(0x43f7320a), SkBits2Float(0x4360bc94)); // 494.382f, 224.707f, 494.391f, 224.737f |
| 304 | path.quadTo(SkBits2Float(0x43f73625), SkBits2Float(0x4360d8fe), SkBits2Float(0x43f73c59), SkBits2Float(0x4360fa4a)); // 494.423f, 224.848f, 494.471f, 224.978f |
| 305 | path.quadTo(SkBits2Float(0x43f75132), SkBits2Float(0x43616a36), SkBits2Float(0x43f772ac), SkBits2Float(0x4361d738)); // 494.634f, 225.415f, 494.896f, 225.841f |
| 306 | path.quadTo(SkBits2Float(0x43f7de60), SkBits2Float(0x436335ea), SkBits2Float(0x43f89f25), SkBits2Float(0x4363e779)); // 495.737f, 227.211f, 497.243f, 227.904f |
| 307 | path.quadTo(SkBits2Float(0x43fb3d30), SkBits2Float(0x436650a0), SkBits2Float(0x44005a14), SkBits2Float(0x43602133)); // 502.478f, 230.315f, 513.407f, 224.13f |
| 308 | path.lineTo(SkBits2Float(0x4400799a), SkBits2Float(0x4360ffff)); // 513.9f, 225 |
| 309 | path.lineTo(SkBits2Float(0x44003ca2), SkBits2Float(0x43614dd5)); // 512.947f, 225.304f |
| 310 | path.quadTo(SkBits2Float(0x43ff92b8), SkBits2Float(0x435ba8f8), SkBits2Float(0x43fee825), SkBits2Float(0x4353aa15)); // 511.146f, 219.66f, 509.814f, 211.664f |
| 311 | path.lineTo(SkBits2Float(0x43ff6667), SkBits2Float(0x43537fff)); // 510.8f, 211.5f |
| 312 | path.lineTo(SkBits2Float(0x43ffcaf2), SkBits2Float(0x43541e6d)); // 511.586f, 212.119f |
| 313 | path.quadTo(SkBits2Float(0x43fd4888), SkBits2Float(0x435a7d38), SkBits2Float(0x43f8d864), SkBits2Float(0x435b4bbf)); // 506.567f, 218.489f, 497.691f, 219.296f |
| 314 | path.lineTo(SkBits2Float(0x43f8cccd), SkBits2Float(0x435a4ccc)); // 497.6f, 218.3f |
| 315 | path.lineTo(SkBits2Float(0x43f8e5e7), SkBits2Float(0x435b47d3)); // 497.796f, 219.281f |
| 316 | path.quadTo(SkBits2Float(0x43f84300), SkBits2Float(0x435b88fd), SkBits2Float(0x43f7b75b), SkBits2Float(0x435c5e8e)); // 496.523f, 219.535f, 495.432f, 220.369f |
| 317 | path.quadTo(SkBits2Float(0x43f6b984), SkBits2Float(0x435de2c4), SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 493.449f, 221.886f, 494.349f, 224.584f |
| 318 | path.close(); |
| 319 | testSimplify(reporter, path, filename); |
| 320 | } |
| 321 | |
| 322 | |
| 323 | |
Ben Wagner | a93a14a | 2017-08-28 10:34:05 -0400 | [diff] [blame] | 324 | static void (*skipTest)(skiatest::Reporter* , const char* filename) = nullptr; |
| 325 | static void (*firstTest)(skiatest::Reporter* , const char* filename) = nullptr; |
| 326 | static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; |
caryclark | a8a9dde | 2016-09-26 10:25:26 -0700 | [diff] [blame] | 327 | |
| 328 | static TestDesc tests[] = { |
| 329 | TEST(tiger8a_h_1), |
| 330 | TEST(tiger8a), |
| 331 | TEST(tiger8b_h_1), |
| 332 | TEST(tiger8b), |
| 333 | TEST(tiger8), |
| 334 | TEST(tiger_threaded), |
| 335 | }; |
| 336 | |
| 337 | static const size_t testCount = SK_ARRAY_COUNT(tests); |
| 338 | static bool runReverse = false; |
| 339 | |
| 340 | DEF_TEST(PathOpsTiger, reporter) { |
| 341 | RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runReverse); |
| 342 | } |