caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 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 | */ |
| 7 | #include "PathOpsExtendedTest.h" |
| 8 | |
| 9 | #define TEST(name) { name, #name } |
| 10 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 11 | static void testLine1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 12 | SkPath path; |
| 13 | path.moveTo(2,0); |
| 14 | path.lineTo(1,1); |
| 15 | path.lineTo(0,0); |
| 16 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 17 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 18 | } |
| 19 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 20 | static void testLine1x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 21 | SkPath path; |
| 22 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 23 | path.moveTo(2,0); |
| 24 | path.lineTo(1,1); |
| 25 | path.lineTo(0,0); |
| 26 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 27 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | static void addInnerCWTriangle(SkPath& path) { |
| 31 | path.moveTo(3,0); |
| 32 | path.lineTo(4,1); |
| 33 | path.lineTo(2,1); |
| 34 | path.close(); |
| 35 | } |
| 36 | |
| 37 | static void addInnerCCWTriangle(SkPath& path) { |
| 38 | path.moveTo(3,0); |
| 39 | path.lineTo(2,1); |
| 40 | path.lineTo(4,1); |
| 41 | path.close(); |
| 42 | } |
| 43 | |
| 44 | static void addOuterCWTriangle(SkPath& path) { |
| 45 | path.moveTo(3,0); |
| 46 | path.lineTo(6,2); |
| 47 | path.lineTo(0,2); |
| 48 | path.close(); |
| 49 | } |
| 50 | |
| 51 | static void addOuterCCWTriangle(SkPath& path) { |
| 52 | path.moveTo(3,0); |
| 53 | path.lineTo(0,2); |
| 54 | path.lineTo(6,2); |
| 55 | path.close(); |
| 56 | } |
| 57 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 58 | static void testLine2(skiatest::Reporter* reporter, const char* filename) { |
| 59 | SkPath path; |
| 60 | addInnerCWTriangle(path); |
| 61 | addOuterCWTriangle(path); |
| 62 | testSimplify(reporter, path, filename); |
| 63 | } |
| 64 | |
| 65 | static void testLine2x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 66 | SkPath path; |
| 67 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 68 | addInnerCWTriangle(path); |
| 69 | addOuterCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 70 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 71 | } |
| 72 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 73 | static void testLine3(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 74 | SkPath path; |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 75 | addInnerCCWTriangle(path); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 76 | addOuterCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 77 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 78 | } |
| 79 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 80 | static void testLine3x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 81 | SkPath path; |
| 82 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 83 | addInnerCCWTriangle(path); |
| 84 | addOuterCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 85 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 86 | } |
| 87 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 88 | static void testLine3a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 89 | SkPath path; |
| 90 | addInnerCWTriangle(path); |
| 91 | addOuterCCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 92 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 93 | } |
| 94 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 95 | static void testLine3ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 96 | SkPath path; |
| 97 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 98 | addInnerCWTriangle(path); |
| 99 | addOuterCCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 100 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 101 | } |
| 102 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 103 | static void testLine3b(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 104 | SkPath path; |
| 105 | addInnerCCWTriangle(path); |
| 106 | addOuterCCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 107 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 108 | } |
| 109 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 110 | static void testLine3bx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 111 | SkPath path; |
| 112 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 113 | addInnerCCWTriangle(path); |
| 114 | addOuterCCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 115 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 116 | } |
| 117 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 118 | static void testLine4(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 119 | SkPath path; |
| 120 | addOuterCCWTriangle(path); |
| 121 | addOuterCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 122 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 123 | } |
| 124 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 125 | static void testLine4x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 126 | SkPath path; |
| 127 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 128 | addOuterCCWTriangle(path); |
| 129 | addOuterCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 130 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 131 | } |
| 132 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 133 | static void testLine5(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 134 | SkPath path; |
| 135 | addOuterCWTriangle(path); |
| 136 | addOuterCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 137 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 138 | } |
| 139 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 140 | static void testLine5x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 141 | SkPath path; |
| 142 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 143 | addOuterCWTriangle(path); |
| 144 | addOuterCWTriangle(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 145 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 146 | } |
| 147 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 148 | static void testLine6(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 149 | SkPath path; |
| 150 | path.moveTo(0,0); |
| 151 | path.lineTo(4,0); |
| 152 | path.lineTo(2,2); |
| 153 | path.close(); |
| 154 | path.moveTo(2,0); |
| 155 | path.lineTo(6,0); |
| 156 | path.lineTo(4,2); |
| 157 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 158 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 159 | } |
| 160 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 161 | static void testLine6x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 162 | SkPath path; |
| 163 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 164 | path.moveTo(0,0); |
| 165 | path.lineTo(4,0); |
| 166 | path.lineTo(2,2); |
| 167 | path.close(); |
| 168 | path.moveTo(2,0); |
| 169 | path.lineTo(6,0); |
| 170 | path.lineTo(4,2); |
| 171 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 172 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 173 | } |
| 174 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 175 | static void testLine7(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 176 | SkPath path; |
| 177 | path.moveTo(0,0); |
| 178 | path.lineTo(4,0); |
| 179 | path.lineTo(2,2); |
| 180 | path.close(); |
| 181 | path.moveTo(6,0); |
| 182 | path.lineTo(2,0); |
| 183 | path.lineTo(4,2); |
| 184 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 185 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 186 | } |
| 187 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 188 | static void testLine7x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 189 | SkPath path; |
| 190 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 191 | path.moveTo(0,0); |
| 192 | path.lineTo(4,0); |
| 193 | path.lineTo(2,2); |
| 194 | path.close(); |
| 195 | path.moveTo(6,0); |
| 196 | path.lineTo(2,0); |
| 197 | path.lineTo(4,2); |
| 198 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 199 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 200 | } |
| 201 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 202 | static void testLine7a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 203 | SkPath path; |
| 204 | path.moveTo(0,0); |
| 205 | path.lineTo(4,0); |
| 206 | path.lineTo(2,2); |
| 207 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 208 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 209 | } |
| 210 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 211 | static void testLine7ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 212 | SkPath path; |
| 213 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 214 | path.moveTo(0,0); |
| 215 | path.lineTo(4,0); |
| 216 | path.lineTo(2,2); |
| 217 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 218 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 219 | } |
| 220 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 221 | static void testLine7b(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 222 | SkPath path; |
| 223 | path.moveTo(0,0); |
| 224 | path.lineTo(4,0); |
| 225 | path.close(); |
| 226 | path.moveTo(6,0); |
| 227 | path.lineTo(2,0); |
| 228 | path.lineTo(4,2); |
| 229 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 230 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 231 | } |
| 232 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 233 | static void testLine7bx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 234 | SkPath path; |
| 235 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 236 | path.moveTo(0,0); |
| 237 | path.lineTo(4,0); |
| 238 | path.close(); |
| 239 | path.moveTo(6,0); |
| 240 | path.lineTo(2,0); |
| 241 | path.lineTo(4,2); |
| 242 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 243 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 244 | } |
| 245 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 246 | static void testLine8(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 247 | SkPath path; |
| 248 | path.moveTo(0,4); |
| 249 | path.lineTo(4,4); |
| 250 | path.lineTo(2,2); |
| 251 | path.close(); |
| 252 | path.moveTo(2,4); |
| 253 | path.lineTo(6,4); |
| 254 | path.lineTo(4,2); |
| 255 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 256 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 257 | } |
| 258 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 259 | static void testLine8x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 260 | SkPath path; |
| 261 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 262 | path.moveTo(0,4); |
| 263 | path.lineTo(4,4); |
| 264 | path.lineTo(2,2); |
| 265 | path.close(); |
| 266 | path.moveTo(2,4); |
| 267 | path.lineTo(6,4); |
| 268 | path.lineTo(4,2); |
| 269 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 270 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 271 | } |
| 272 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 273 | static void testLine9(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 274 | SkPath path; |
| 275 | path.moveTo(0,4); |
| 276 | path.lineTo(4,4); |
| 277 | path.lineTo(2,2); |
| 278 | path.close(); |
| 279 | path.moveTo(6,4); |
| 280 | path.lineTo(2,4); |
| 281 | path.lineTo(4,2); |
| 282 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 283 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 284 | } |
| 285 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 286 | static void testLine9x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 287 | SkPath path; |
| 288 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 289 | path.moveTo(0,4); |
| 290 | path.lineTo(4,4); |
| 291 | path.lineTo(2,2); |
| 292 | path.close(); |
| 293 | path.moveTo(6,4); |
| 294 | path.lineTo(2,4); |
| 295 | path.lineTo(4,2); |
| 296 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 297 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 298 | } |
| 299 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 300 | static void testLine10(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 301 | SkPath path; |
| 302 | path.moveTo(0,4); |
| 303 | path.lineTo(4,4); |
| 304 | path.lineTo(2,2); |
| 305 | path.close(); |
| 306 | path.moveTo(2,1); |
| 307 | path.lineTo(3,4); |
| 308 | path.lineTo(6,1); |
| 309 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 310 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 311 | } |
| 312 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 313 | static void testLine10x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 314 | SkPath path; |
| 315 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 316 | path.moveTo(0,4); |
| 317 | path.lineTo(4,4); |
| 318 | path.lineTo(2,2); |
| 319 | path.close(); |
| 320 | path.moveTo(2,1); |
| 321 | path.lineTo(3,4); |
| 322 | path.lineTo(6,1); |
| 323 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 324 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 325 | } |
| 326 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 327 | static void testLine10a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 328 | SkPath path; |
| 329 | path.moveTo(0,4); |
| 330 | path.lineTo(8,4); |
| 331 | path.lineTo(4,0); |
| 332 | path.close(); |
| 333 | path.moveTo(2,2); |
| 334 | path.lineTo(3,3); |
| 335 | path.lineTo(4,2); |
| 336 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 337 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 338 | } |
| 339 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 340 | static void testLine10ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 341 | SkPath path; |
| 342 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 343 | path.moveTo(0,4); |
| 344 | path.lineTo(8,4); |
| 345 | path.lineTo(4,0); |
| 346 | path.close(); |
| 347 | path.moveTo(2,2); |
| 348 | path.lineTo(3,3); |
| 349 | path.lineTo(4,2); |
| 350 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 351 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | static void addCWContainer(SkPath& path) { |
| 355 | path.moveTo(6,4); |
| 356 | path.lineTo(0,4); |
| 357 | path.lineTo(3,1); |
| 358 | path.close(); |
| 359 | } |
| 360 | |
| 361 | static void addCCWContainer(SkPath& path) { |
| 362 | path.moveTo(0,4); |
| 363 | path.lineTo(6,4); |
| 364 | path.lineTo(3,1); |
| 365 | path.close(); |
| 366 | } |
| 367 | |
| 368 | static void addCWContents(SkPath& path) { |
| 369 | path.moveTo(2,3); |
| 370 | path.lineTo(3,2); |
| 371 | path.lineTo(4,3); |
| 372 | path.close(); |
| 373 | } |
| 374 | |
| 375 | static void addCCWContents(SkPath& path) { |
| 376 | path.moveTo(3,2); |
| 377 | path.lineTo(2,3); |
| 378 | path.lineTo(4,3); |
| 379 | path.close(); |
| 380 | } |
| 381 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 382 | static void testLine11(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 383 | SkPath path; |
| 384 | addCWContainer(path); |
| 385 | addCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 386 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 387 | } |
| 388 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 389 | static void testLine11x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 390 | SkPath path; |
| 391 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 392 | addCWContainer(path); |
| 393 | addCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 394 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 395 | } |
| 396 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 397 | static void testLine12(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 398 | SkPath path; |
| 399 | addCCWContainer(path); |
| 400 | addCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 401 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 402 | } |
| 403 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 404 | static void testLine12x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 405 | SkPath path; |
| 406 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 407 | addCCWContainer(path); |
| 408 | addCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 409 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 410 | } |
| 411 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 412 | static void testLine13(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 413 | SkPath path; |
| 414 | addCWContainer(path); |
| 415 | addCCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 416 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 417 | } |
| 418 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 419 | static void testLine13x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 420 | SkPath path; |
| 421 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 422 | addCWContainer(path); |
| 423 | addCCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 424 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 425 | } |
| 426 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 427 | static void testLine14(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 428 | SkPath path; |
| 429 | addCCWContainer(path); |
| 430 | addCCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 431 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 432 | } |
| 433 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 434 | static void testLine14x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 435 | SkPath path; |
| 436 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 437 | addCCWContainer(path); |
| 438 | addCCWContents(path); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 439 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 440 | } |
| 441 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 442 | static void testLine15(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 443 | SkPath path; |
| 444 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 445 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 446 | } |
| 447 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 448 | static void testLine15x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 449 | SkPath path; |
| 450 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 451 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 452 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 453 | } |
| 454 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 455 | static void testLine16(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 456 | SkPath path; |
| 457 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 458 | path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 459 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 460 | } |
| 461 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 462 | static void testLine16x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 463 | SkPath path; |
| 464 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 465 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 466 | path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 467 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 468 | } |
| 469 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 470 | static void testLine17(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 471 | SkPath path; |
| 472 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 473 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 474 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 475 | } |
| 476 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 477 | static void testLine17x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 478 | SkPath path; |
| 479 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 480 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 481 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 482 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 483 | } |
| 484 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 485 | static void testLine18(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 486 | SkPath path; |
| 487 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 488 | path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 489 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 490 | } |
| 491 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 492 | static void testLine18x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 493 | SkPath path; |
| 494 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 495 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 496 | path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 497 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 498 | } |
| 499 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 500 | static void testLine19(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 501 | SkPath path; |
| 502 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 503 | path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 504 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 505 | } |
| 506 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 507 | static void testLine19x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 508 | SkPath path; |
| 509 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 510 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 511 | path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 512 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 513 | } |
| 514 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 515 | static void testLine20(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 516 | SkPath path; |
| 517 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 518 | path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 519 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 520 | } |
| 521 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 522 | static void testLine20x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 523 | SkPath path; |
| 524 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 525 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 526 | path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 527 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 528 | } |
| 529 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 530 | static void testLine21(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 531 | SkPath path; |
| 532 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 533 | path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 534 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 535 | } |
| 536 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 537 | static void testLine21x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 538 | SkPath path; |
| 539 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 540 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 541 | path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 542 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 543 | } |
| 544 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 545 | static void testLine22(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 546 | SkPath path; |
| 547 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 548 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 549 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 550 | } |
| 551 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 552 | static void testLine22x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 553 | SkPath path; |
| 554 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 555 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 556 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 557 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 558 | } |
| 559 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 560 | static void testLine23(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 561 | SkPath path; |
| 562 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 563 | path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 564 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 565 | } |
| 566 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 567 | static void testLine23x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 568 | SkPath path; |
| 569 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 570 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 571 | path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 572 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 573 | } |
| 574 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 575 | static void testLine24a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 576 | SkPath path; |
| 577 | path.moveTo(2,0); |
| 578 | path.lineTo(4,4); |
| 579 | path.lineTo(0,4); |
| 580 | path.close(); |
| 581 | path.moveTo(2,0); |
| 582 | path.lineTo(1,2); |
| 583 | path.lineTo(2,2); |
| 584 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 585 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 586 | } |
| 587 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 588 | static void testLine24ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 589 | SkPath path; |
| 590 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 591 | path.moveTo(2,0); |
| 592 | path.lineTo(4,4); |
| 593 | path.lineTo(0,4); |
| 594 | path.close(); |
| 595 | path.moveTo(2,0); |
| 596 | path.lineTo(1,2); |
| 597 | path.lineTo(2,2); |
| 598 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 599 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 600 | } |
| 601 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 602 | static void testLine24(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 603 | SkPath path; |
| 604 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 605 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 606 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 607 | } |
| 608 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 609 | static void testLine24x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 610 | SkPath path; |
| 611 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 612 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 613 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 614 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 615 | } |
| 616 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 617 | static void testLine25(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 618 | SkPath path; |
| 619 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 620 | path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 621 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 622 | } |
| 623 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 624 | static void testLine25x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 625 | SkPath path; |
| 626 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 627 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 628 | path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 629 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 630 | } |
| 631 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 632 | static void testLine26(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 633 | SkPath path; |
| 634 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 635 | path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 636 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 637 | } |
| 638 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 639 | static void testLine26x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 640 | SkPath path; |
| 641 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 642 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 643 | path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 644 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 645 | } |
| 646 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 647 | static void testLine27(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 648 | SkPath path; |
| 649 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 650 | path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 651 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 652 | } |
| 653 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 654 | static void testLine27x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 655 | SkPath path; |
| 656 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 657 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 658 | path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 659 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 660 | } |
| 661 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 662 | static void testLine28(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 663 | SkPath path; |
| 664 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 665 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 666 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 667 | } |
| 668 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 669 | static void testLine28x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 670 | SkPath path; |
| 671 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 672 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 673 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 674 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 675 | } |
| 676 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 677 | static void testLine29(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 678 | SkPath path; |
| 679 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 680 | path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 681 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 682 | } |
| 683 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 684 | static void testLine29x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 685 | SkPath path; |
| 686 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 687 | path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 688 | path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 689 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 690 | } |
| 691 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 692 | static void testLine30(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 693 | SkPath path; |
| 694 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 695 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 696 | path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 697 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 698 | } |
| 699 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 700 | static void testLine30x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 701 | SkPath path; |
| 702 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 703 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 704 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 705 | path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 706 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 707 | } |
| 708 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 709 | static void testLine31(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 710 | SkPath path; |
| 711 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 712 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 713 | path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 714 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 715 | } |
| 716 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 717 | static void testLine31x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 718 | SkPath path; |
| 719 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 720 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 721 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 722 | path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 723 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 724 | } |
| 725 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 726 | static void testLine32(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 727 | SkPath path; |
| 728 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 729 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 730 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 731 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 732 | } |
| 733 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 734 | static void testLine32x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 735 | SkPath path; |
| 736 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 737 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 738 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 739 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 740 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 741 | } |
| 742 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 743 | static void testLine33(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 744 | SkPath path; |
| 745 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 746 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 747 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 748 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 749 | } |
| 750 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 751 | static void testLine33x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 752 | SkPath path; |
| 753 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 754 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 755 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 756 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 757 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 758 | } |
| 759 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 760 | static void testLine34(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 761 | SkPath path; |
| 762 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 763 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 764 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 765 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 766 | } |
| 767 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 768 | static void testLine34x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 769 | SkPath path; |
| 770 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 771 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 772 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 773 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 774 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 775 | } |
| 776 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 777 | static void testLine35(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 778 | SkPath path; |
| 779 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 780 | path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 781 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 782 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 783 | } |
| 784 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 785 | static void testLine35x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 786 | SkPath path; |
| 787 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 788 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 789 | path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 790 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 791 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 792 | } |
| 793 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 794 | static void testLine36(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 795 | SkPath path; |
| 796 | path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 797 | path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 798 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 799 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 800 | } |
| 801 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 802 | static void testLine36x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 803 | SkPath path; |
| 804 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 805 | path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 806 | path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 807 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 808 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 809 | } |
| 810 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 811 | static void testLine37(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 812 | SkPath path; |
| 813 | path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 814 | path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 815 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 816 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 817 | } |
| 818 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 819 | static void testLine37x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 820 | SkPath path; |
| 821 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 822 | path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 823 | path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 824 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 825 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 826 | } |
| 827 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 828 | static void testLine38(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 829 | SkPath path; |
| 830 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 831 | path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 832 | path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 833 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 834 | } |
| 835 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 836 | static void testLine38x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 837 | SkPath path; |
| 838 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 839 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 840 | path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 841 | path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 842 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 843 | } |
| 844 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 845 | static void testLine40(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 846 | SkPath path; |
| 847 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 848 | path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); |
| 849 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 850 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 851 | } |
| 852 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 853 | static void testLine40x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 854 | SkPath path; |
| 855 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 856 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 857 | path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); |
| 858 | path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 859 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 860 | } |
| 861 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 862 | static void testLine41(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 863 | SkPath path; |
| 864 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 865 | path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 866 | path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 867 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 868 | } |
| 869 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 870 | static void testLine41x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 871 | SkPath path; |
| 872 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 873 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 874 | path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 875 | path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 876 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 877 | } |
| 878 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 879 | static void testLine42(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 880 | SkPath path; |
| 881 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 882 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 883 | path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 884 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 885 | } |
| 886 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 887 | static void testLine42x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 888 | SkPath path; |
| 889 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 890 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 891 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 892 | path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 893 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 894 | } |
| 895 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 896 | static void testLine43(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 897 | SkPath path; |
| 898 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 899 | path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); |
| 900 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 901 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 902 | } |
| 903 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 904 | static void testLine43x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 905 | SkPath path; |
| 906 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 907 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 908 | path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); |
| 909 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 910 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 911 | } |
| 912 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 913 | static void testLine44(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 914 | SkPath path; |
| 915 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 916 | path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 917 | path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 918 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 919 | } |
| 920 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 921 | static void testLine44x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 922 | SkPath path; |
| 923 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 924 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 925 | path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 926 | path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 927 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 928 | } |
| 929 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 930 | static void testLine45(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 931 | SkPath path; |
| 932 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 933 | path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 934 | path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 935 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 936 | } |
| 937 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 938 | static void testLine45x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 939 | SkPath path; |
| 940 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 941 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 942 | path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 943 | path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 944 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 945 | } |
| 946 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 947 | static void testLine46(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 948 | SkPath path; |
| 949 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 950 | path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 951 | path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 952 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 953 | } |
| 954 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 955 | static void testLine46x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 956 | SkPath path; |
| 957 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 958 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 959 | path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 960 | path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 961 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 962 | } |
| 963 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 964 | static void testLine47(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 965 | SkPath path; |
| 966 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 967 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 968 | path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 969 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 970 | } |
| 971 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 972 | static void testLine47x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 973 | SkPath path; |
| 974 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 975 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 976 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 977 | path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 978 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 979 | } |
| 980 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 981 | static void testLine48(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 982 | SkPath path; |
| 983 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 984 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 985 | path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 986 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 987 | } |
| 988 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 989 | static void testLine48x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 990 | SkPath path; |
| 991 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 992 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 993 | path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 994 | path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 995 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 996 | } |
| 997 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 998 | static void testLine49(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 999 | SkPath path; |
| 1000 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1001 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 1002 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1003 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1004 | } |
| 1005 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1006 | static void testLine49x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1007 | SkPath path; |
| 1008 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1009 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1010 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 1011 | path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1012 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1013 | } |
| 1014 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1015 | static void testLine50(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1016 | SkPath path; |
| 1017 | path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1018 | path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1019 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1020 | } |
| 1021 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1022 | static void testLine50x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1023 | SkPath path; |
| 1024 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1025 | path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1026 | path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1027 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1028 | } |
| 1029 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1030 | static void testLine51(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1031 | SkPath path; |
| 1032 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1033 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1034 | path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1035 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1036 | } |
| 1037 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1038 | static void testLine51x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1039 | SkPath path; |
| 1040 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1041 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1042 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1043 | path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1044 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1045 | } |
| 1046 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1047 | static void testLine52(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1048 | SkPath path; |
| 1049 | path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1050 | path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
| 1051 | path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1052 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1053 | } |
| 1054 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1055 | static void testLine52x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1056 | SkPath path; |
| 1057 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1058 | path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1059 | path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
| 1060 | path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1061 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1062 | } |
| 1063 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1064 | static void testLine53(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1065 | SkPath path; |
| 1066 | path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1067 | path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
| 1068 | path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1069 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1070 | } |
| 1071 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1072 | static void testLine53x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1073 | SkPath path; |
| 1074 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1075 | path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1076 | path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
| 1077 | path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1078 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1079 | } |
| 1080 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1081 | static void testLine54(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1082 | SkPath path; |
| 1083 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1084 | path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 1085 | path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1086 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1087 | } |
| 1088 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1089 | static void testLine54x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1090 | SkPath path; |
| 1091 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1092 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1093 | path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 1094 | path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1095 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1096 | } |
| 1097 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1098 | static void testLine55(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1099 | SkPath path; |
| 1100 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1101 | path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); |
| 1102 | path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1103 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1104 | } |
| 1105 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1106 | static void testLine55x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1107 | SkPath path; |
| 1108 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1109 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1110 | path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); |
| 1111 | path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1112 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1113 | } |
| 1114 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1115 | static void testLine56(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1116 | SkPath path; |
| 1117 | path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1118 | path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); |
| 1119 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1120 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1121 | } |
| 1122 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1123 | static void testLine56x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1124 | SkPath path; |
| 1125 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1126 | path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1127 | path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); |
| 1128 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1129 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1130 | } |
| 1131 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1132 | static void testLine57(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1133 | SkPath path; |
| 1134 | path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1135 | path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); |
| 1136 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1137 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1138 | } |
| 1139 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1140 | static void testLine57x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1141 | SkPath path; |
| 1142 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1143 | path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1144 | path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); |
| 1145 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1146 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1147 | } |
| 1148 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1149 | static void testLine58(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1150 | SkPath path; |
| 1151 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1152 | path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); |
| 1153 | path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1154 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1155 | } |
| 1156 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1157 | static void testLine58x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1158 | SkPath path; |
| 1159 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1160 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1161 | path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); |
| 1162 | path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1163 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1164 | } |
| 1165 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1166 | static void testLine59(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1167 | SkPath path; |
| 1168 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1169 | path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); |
| 1170 | path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1171 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1172 | } |
| 1173 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1174 | static void testLine59x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1175 | SkPath path; |
| 1176 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1177 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1178 | path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); |
| 1179 | path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1180 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1181 | } |
| 1182 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1183 | static void testLine60(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1184 | SkPath path; |
| 1185 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1186 | path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); |
| 1187 | path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1188 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1189 | } |
| 1190 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1191 | static void testLine60x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1192 | SkPath path; |
| 1193 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1194 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1195 | path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); |
| 1196 | path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1197 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1198 | } |
| 1199 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1200 | static void testLine61(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1201 | SkPath path; |
| 1202 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1203 | path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); |
| 1204 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1205 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1206 | } |
| 1207 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1208 | static void testLine61x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1209 | SkPath path; |
| 1210 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1211 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1212 | path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); |
| 1213 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1214 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1215 | } |
| 1216 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1217 | static void testLine62(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1218 | SkPath path; |
| 1219 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1220 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1221 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1222 | path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1223 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1224 | } |
| 1225 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1226 | static void testLine62x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1227 | SkPath path; |
| 1228 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1229 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1230 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1231 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1232 | path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1233 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1234 | } |
| 1235 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1236 | static void testLine63(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1237 | SkPath path; |
| 1238 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1239 | path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 1240 | path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); |
| 1241 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1242 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1243 | } |
| 1244 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1245 | static void testLine63x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1246 | SkPath path; |
| 1247 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1248 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1249 | path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 1250 | path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); |
| 1251 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1252 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1253 | } |
| 1254 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1255 | static void testLine64(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1256 | SkPath path; |
| 1257 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1258 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1259 | path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1260 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1261 | } |
| 1262 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1263 | static void testLine64x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1264 | SkPath path; |
| 1265 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1266 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1267 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1268 | path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1269 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1270 | } |
| 1271 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1272 | static void testLine65(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1273 | SkPath path; |
| 1274 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1275 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 1276 | path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 1277 | path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1278 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1279 | } |
| 1280 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1281 | static void testLine65x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1282 | SkPath path; |
| 1283 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1284 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1285 | path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 1286 | path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 1287 | path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1288 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1289 | } |
| 1290 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1291 | static void testLine66(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1292 | SkPath path; |
| 1293 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1294 | path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1295 | path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1296 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1297 | } |
| 1298 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1299 | static void testLine66x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1300 | SkPath path; |
| 1301 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1302 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1303 | path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1304 | path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1305 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1306 | } |
| 1307 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1308 | static void testLine67(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1309 | SkPath path; |
| 1310 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1311 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1312 | path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
| 1313 | path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1314 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1315 | } |
| 1316 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1317 | static void testLine67x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1318 | SkPath path; |
| 1319 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1320 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1321 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1322 | path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
| 1323 | path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1324 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1325 | } |
| 1326 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1327 | static void testLine68a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1328 | SkPath path; |
| 1329 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1330 | path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1331 | path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1332 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1333 | } |
| 1334 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1335 | static void testLine68ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1336 | SkPath path; |
| 1337 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1338 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1339 | path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1340 | path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1341 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1342 | } |
| 1343 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1344 | static void testLine68b(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1345 | SkPath path; |
| 1346 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1347 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1348 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1349 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1350 | } |
| 1351 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1352 | static void testLine68bx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1353 | SkPath path; |
| 1354 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1355 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1356 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1357 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1358 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1359 | } |
| 1360 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1361 | static void testLine68c(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1362 | SkPath path; |
| 1363 | path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1364 | path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1365 | path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1366 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1367 | } |
| 1368 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1369 | static void testLine68cx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1370 | SkPath path; |
| 1371 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1372 | path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1373 | path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1374 | path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1375 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1376 | } |
| 1377 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1378 | static void testLine68d(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1379 | SkPath path; |
| 1380 | path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1381 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1382 | path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1383 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1384 | } |
| 1385 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1386 | static void testLine68dx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1387 | SkPath path; |
| 1388 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1389 | path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1390 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1391 | path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1392 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1393 | } |
| 1394 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1395 | static void testLine68e(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1396 | SkPath path; |
| 1397 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1398 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1399 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1400 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1401 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1402 | } |
| 1403 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1404 | static void testLine68ex(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1405 | SkPath path; |
| 1406 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1407 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1408 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1409 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1410 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1411 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1412 | } |
| 1413 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1414 | static void testLine68f(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1415 | SkPath path; |
| 1416 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1417 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1418 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1419 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1420 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1421 | } |
| 1422 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1423 | static void testLine68fx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1424 | SkPath path; |
| 1425 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1426 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1427 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1428 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1429 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1430 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1431 | } |
| 1432 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1433 | static void testLine68g(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1434 | SkPath path; |
| 1435 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1436 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1437 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1438 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1439 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1440 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1441 | } |
| 1442 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1443 | static void testLine68gx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1444 | SkPath path; |
| 1445 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1446 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1447 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1448 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1449 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1450 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1451 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1452 | } |
| 1453 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1454 | static void testLine68h(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1455 | SkPath path; |
| 1456 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1457 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1458 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1459 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1460 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1461 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1462 | } |
| 1463 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1464 | static void testLine68hx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1465 | SkPath path; |
| 1466 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1467 | path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1468 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1469 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1470 | path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1471 | path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1472 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1473 | } |
| 1474 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1475 | static void testLine69(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1476 | SkPath path; |
| 1477 | path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1478 | path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1479 | path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1480 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1481 | } |
| 1482 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1483 | static void testLine69x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1484 | SkPath path; |
| 1485 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1486 | path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1487 | path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1488 | path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1489 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1490 | } |
| 1491 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1492 | static void testLine70(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1493 | SkPath path; |
| 1494 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1495 | path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); |
| 1496 | path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1497 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1498 | } |
| 1499 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1500 | static void testLine70x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1501 | SkPath path; |
| 1502 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1503 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1504 | path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); |
| 1505 | path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1506 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1507 | } |
| 1508 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1509 | static void testLine71(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1510 | SkPath path; |
| 1511 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1512 | path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); |
| 1513 | path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1514 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1515 | } |
| 1516 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1517 | static void testLine71x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1518 | SkPath path; |
| 1519 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1520 | path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1521 | path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); |
| 1522 | path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1523 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1524 | } |
| 1525 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1526 | static void testLine72(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1527 | SkPath path; |
| 1528 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1529 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1530 | path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1531 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1532 | } |
| 1533 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1534 | static void testLine72x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1535 | SkPath path; |
| 1536 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1537 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1538 | path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1539 | path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1540 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1541 | } |
| 1542 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1543 | static void testLine73(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1544 | SkPath path; |
| 1545 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1546 | path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); |
| 1547 | path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1548 | path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1549 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1550 | } |
| 1551 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1552 | static void testLine73x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1553 | SkPath path; |
| 1554 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1555 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1556 | path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); |
| 1557 | path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1558 | path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1559 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1560 | } |
| 1561 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1562 | static void testLine74(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1563 | SkPath path; |
| 1564 | path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); |
| 1565 | path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1566 | path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1567 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1568 | } |
| 1569 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1570 | static void testLine74x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1571 | SkPath path; |
| 1572 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1573 | path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); |
| 1574 | path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1575 | path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1576 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1577 | } |
| 1578 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1579 | static void testLine75(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1580 | SkPath path; |
| 1581 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1582 | path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); |
| 1583 | path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); |
| 1584 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1585 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1586 | } |
| 1587 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1588 | static void testLine75x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1589 | SkPath path; |
| 1590 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1591 | path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1592 | path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); |
| 1593 | path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); |
| 1594 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1595 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1596 | } |
| 1597 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1598 | static void testLine76(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1599 | SkPath path; |
| 1600 | path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); |
| 1601 | path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); |
| 1602 | path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1603 | path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1604 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1605 | } |
| 1606 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1607 | static void testLine76x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1608 | SkPath path; |
| 1609 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1610 | path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); |
| 1611 | path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); |
| 1612 | path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1613 | path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1614 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1615 | } |
| 1616 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1617 | static void testLine77(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1618 | SkPath path; |
| 1619 | path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1620 | path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); |
| 1621 | path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1622 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1623 | } |
| 1624 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1625 | static void testLine77x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1626 | SkPath path; |
| 1627 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1628 | path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1629 | path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); |
| 1630 | path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1631 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1632 | } |
| 1633 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1634 | static void testLine78(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1635 | SkPath path; |
| 1636 | path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); |
| 1637 | path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); |
| 1638 | path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); |
| 1639 | path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1640 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1641 | } |
| 1642 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1643 | static void testLine78x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1644 | SkPath path; |
| 1645 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1646 | path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); |
| 1647 | path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); |
| 1648 | path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); |
| 1649 | path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1650 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1651 | } |
| 1652 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1653 | static void testLine79(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1654 | SkPath path; |
| 1655 | path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); |
| 1656 | path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); |
| 1657 | path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); |
| 1658 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1659 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1660 | } |
| 1661 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1662 | static void testLine79x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1663 | SkPath path; |
| 1664 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1665 | path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); |
| 1666 | path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); |
| 1667 | path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); |
| 1668 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1669 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1670 | } |
| 1671 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1672 | static void testLine81(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1673 | SkPath path; |
| 1674 | path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction); |
| 1675 | path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 1676 | path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 1677 | path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 1678 | path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1679 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1680 | } |
| 1681 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1682 | static void testDegenerate1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1683 | SkPath path; |
| 1684 | path.moveTo(0, 0); |
| 1685 | path.lineTo(0, 0); |
| 1686 | path.lineTo(2, 0); |
| 1687 | path.close(); |
| 1688 | path.moveTo(0, 0); |
| 1689 | path.lineTo(1, 0); |
| 1690 | path.lineTo(2, 0); |
| 1691 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1692 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1693 | } |
| 1694 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1695 | static void testDegenerate1x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1696 | SkPath path; |
| 1697 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1698 | path.moveTo(0, 0); |
| 1699 | path.lineTo(0, 0); |
| 1700 | path.lineTo(2, 0); |
| 1701 | path.close(); |
| 1702 | path.moveTo(0, 0); |
| 1703 | path.lineTo(1, 0); |
| 1704 | path.lineTo(2, 0); |
| 1705 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1706 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1707 | } |
| 1708 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1709 | static void testDegenerate2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1710 | SkPath path; |
| 1711 | path.moveTo(0, 0); |
| 1712 | path.lineTo(0, 0); |
| 1713 | path.lineTo(0, 0); |
| 1714 | path.close(); |
| 1715 | path.moveTo(0, 0); |
| 1716 | path.lineTo(1, 0); |
| 1717 | path.lineTo(0, 1); |
| 1718 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1719 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1720 | } |
| 1721 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1722 | static void testDegenerate2x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1723 | SkPath path; |
| 1724 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1725 | path.moveTo(0, 0); |
| 1726 | path.lineTo(0, 0); |
| 1727 | path.lineTo(0, 0); |
| 1728 | path.close(); |
| 1729 | path.moveTo(0, 0); |
| 1730 | path.lineTo(1, 0); |
| 1731 | path.lineTo(0, 1); |
| 1732 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1733 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1734 | } |
| 1735 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1736 | static void testDegenerate3(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1737 | SkPath path; |
| 1738 | path.moveTo(0, 0); |
| 1739 | path.lineTo(2, 0); |
| 1740 | path.lineTo(1, 0); |
| 1741 | path.close(); |
| 1742 | path.moveTo(0, 0); |
| 1743 | path.lineTo(0, 0); |
| 1744 | path.lineTo(3, 0); |
| 1745 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1746 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1747 | } |
| 1748 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1749 | static void testDegenerate3x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1750 | SkPath path; |
| 1751 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1752 | path.moveTo(0, 0); |
| 1753 | path.lineTo(2, 0); |
| 1754 | path.lineTo(1, 0); |
| 1755 | path.close(); |
| 1756 | path.moveTo(0, 0); |
| 1757 | path.lineTo(0, 0); |
| 1758 | path.lineTo(3, 0); |
| 1759 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1760 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1761 | } |
| 1762 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1763 | static void testDegenerate4(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1764 | SkPath path; |
| 1765 | path.moveTo(0, 0); |
| 1766 | path.lineTo(1, 0); |
| 1767 | path.lineTo(1, 3); |
| 1768 | path.close(); |
| 1769 | path.moveTo(1, 0); |
| 1770 | path.lineTo(1, 1); |
| 1771 | path.lineTo(1, 2); |
| 1772 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1773 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1774 | } |
| 1775 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1776 | static void testDegenerate4x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1777 | SkPath path; |
| 1778 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1779 | path.moveTo(0, 0); |
| 1780 | path.lineTo(1, 0); |
| 1781 | path.lineTo(1, 3); |
| 1782 | path.close(); |
| 1783 | path.moveTo(1, 0); |
| 1784 | path.lineTo(1, 1); |
| 1785 | path.lineTo(1, 2); |
| 1786 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1787 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1788 | } |
| 1789 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1790 | static void testNondegenerate1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1791 | SkPath path; |
| 1792 | path.moveTo(0, 0); |
| 1793 | path.lineTo(3, 0); |
| 1794 | path.lineTo(1, 3); |
| 1795 | path.close(); |
| 1796 | path.moveTo(1, 1); |
| 1797 | path.lineTo(2, 1); |
| 1798 | path.lineTo(1, 2); |
| 1799 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1800 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1801 | } |
| 1802 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1803 | static void testNondegenerate1x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1804 | SkPath path; |
| 1805 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1806 | path.moveTo(0, 0); |
| 1807 | path.lineTo(3, 0); |
| 1808 | path.lineTo(1, 3); |
| 1809 | path.close(); |
| 1810 | path.moveTo(1, 1); |
| 1811 | path.lineTo(2, 1); |
| 1812 | path.lineTo(1, 2); |
| 1813 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1814 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1815 | } |
| 1816 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1817 | static void testNondegenerate2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1818 | SkPath path; |
| 1819 | path.moveTo(1, 0); |
| 1820 | path.lineTo(0, 1); |
| 1821 | path.lineTo(1, 1); |
| 1822 | path.close(); |
| 1823 | path.moveTo(0, 2); |
| 1824 | path.lineTo(0, 3); |
| 1825 | path.lineTo(1, 2); |
| 1826 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1827 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1828 | } |
| 1829 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1830 | static void testNondegenerate2x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1831 | SkPath path; |
| 1832 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1833 | path.moveTo(1, 0); |
| 1834 | path.lineTo(0, 1); |
| 1835 | path.lineTo(1, 1); |
| 1836 | path.close(); |
| 1837 | path.moveTo(0, 2); |
| 1838 | path.lineTo(0, 3); |
| 1839 | path.lineTo(1, 2); |
| 1840 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1841 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1842 | } |
| 1843 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1844 | static void testNondegenerate3(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1845 | SkPath path; |
| 1846 | path.moveTo(0, 0); |
| 1847 | path.lineTo(1, 0); |
| 1848 | path.lineTo(2, 1); |
| 1849 | path.close(); |
| 1850 | path.moveTo(0, 1); |
| 1851 | path.lineTo(1, 1); |
| 1852 | path.lineTo(0, 2); |
| 1853 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1854 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1855 | } |
| 1856 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1857 | static void testNondegenerate3x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1858 | SkPath path; |
| 1859 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1860 | path.moveTo(0, 0); |
| 1861 | path.lineTo(1, 0); |
| 1862 | path.lineTo(2, 1); |
| 1863 | path.close(); |
| 1864 | path.moveTo(0, 1); |
| 1865 | path.lineTo(1, 1); |
| 1866 | path.lineTo(0, 2); |
| 1867 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1868 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1869 | } |
| 1870 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1871 | static void testNondegenerate4(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1872 | SkPath path; |
| 1873 | path.moveTo(1, 0); |
| 1874 | path.lineTo(0, 1); |
| 1875 | path.lineTo(1, 2); |
| 1876 | path.close(); |
| 1877 | path.moveTo(0, 2); |
| 1878 | path.lineTo(0, 3); |
| 1879 | path.lineTo(1, 3); |
| 1880 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1881 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1882 | } |
| 1883 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1884 | static void testNondegenerate4x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1885 | SkPath path; |
| 1886 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1887 | path.moveTo(1, 0); |
| 1888 | path.lineTo(0, 1); |
| 1889 | path.lineTo(1, 2); |
| 1890 | path.close(); |
| 1891 | path.moveTo(0, 2); |
| 1892 | path.lineTo(0, 3); |
| 1893 | path.lineTo(1, 3); |
| 1894 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1895 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1896 | } |
| 1897 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1898 | static void testQuadralateral5(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1899 | SkPath path; |
| 1900 | path.moveTo(0, 0); |
| 1901 | path.lineTo(0, 0); |
| 1902 | path.lineTo(1, 0); |
| 1903 | path.lineTo(1, 1); |
| 1904 | path.close(); |
| 1905 | path.moveTo(0, 0); |
| 1906 | path.lineTo(2, 2); |
| 1907 | path.lineTo(3, 2); |
| 1908 | path.lineTo(3, 3); |
| 1909 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1910 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1911 | } |
| 1912 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1913 | static void testQuadralateral5x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1914 | SkPath path; |
| 1915 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1916 | path.moveTo(0, 0); |
| 1917 | path.lineTo(0, 0); |
| 1918 | path.lineTo(1, 0); |
| 1919 | path.lineTo(1, 1); |
| 1920 | path.close(); |
| 1921 | path.moveTo(0, 0); |
| 1922 | path.lineTo(2, 2); |
| 1923 | path.lineTo(3, 2); |
| 1924 | path.lineTo(3, 3); |
| 1925 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1926 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1927 | } |
| 1928 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1929 | static void testQuadralateral6(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1930 | SkPath path; |
| 1931 | path.moveTo(0, 0); |
| 1932 | path.lineTo(0, 0); |
| 1933 | path.lineTo(1, 0); |
| 1934 | path.lineTo(1, 1); |
| 1935 | path.close(); |
| 1936 | path.moveTo(1, 0); |
| 1937 | path.lineTo(2, 0); |
| 1938 | path.lineTo(0, 2); |
| 1939 | path.lineTo(2, 2); |
| 1940 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1941 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1942 | } |
| 1943 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1944 | static void testQuadralateral6x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1945 | SkPath path; |
| 1946 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1947 | path.moveTo(0, 0); |
| 1948 | path.lineTo(0, 0); |
| 1949 | path.lineTo(1, 0); |
| 1950 | path.lineTo(1, 1); |
| 1951 | path.close(); |
| 1952 | path.moveTo(1, 0); |
| 1953 | path.lineTo(2, 0); |
| 1954 | path.lineTo(0, 2); |
| 1955 | path.lineTo(2, 2); |
| 1956 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1957 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1958 | } |
| 1959 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1960 | static void testFauxQuadralateral6(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1961 | SkPath path; |
| 1962 | path.moveTo(0, 0); |
| 1963 | path.lineTo(1, 0); |
| 1964 | path.lineTo(1, 1); |
| 1965 | path.close(); |
| 1966 | path.moveTo(1, 0); |
| 1967 | path.lineTo(2, 0); |
| 1968 | path.lineTo(1 + 1.0f/3, 2.0f/3); |
| 1969 | path.close(); |
| 1970 | path.moveTo(1 + 1.0f/3, 2.0f/3); |
| 1971 | path.lineTo(0, 2); |
| 1972 | path.lineTo(2, 2); |
| 1973 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1974 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1975 | } |
| 1976 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1977 | static void testFauxQuadralateral6x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1978 | SkPath path; |
| 1979 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 1980 | path.moveTo(0, 0); |
| 1981 | path.lineTo(1, 0); |
| 1982 | path.lineTo(1, 1); |
| 1983 | path.close(); |
| 1984 | path.moveTo(1, 0); |
| 1985 | path.lineTo(2, 0); |
| 1986 | path.lineTo(1 + 1.0f/3, 2.0f/3); |
| 1987 | path.close(); |
| 1988 | path.moveTo(1 + 1.0f/3, 2.0f/3); |
| 1989 | path.lineTo(0, 2); |
| 1990 | path.lineTo(2, 2); |
| 1991 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1992 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1993 | } |
| 1994 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 1995 | static void testFauxQuadralateral6a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 1996 | SkPath path; |
| 1997 | path.moveTo(0, 0); |
| 1998 | path.lineTo(3, 0); |
| 1999 | path.lineTo(3, 3); |
| 2000 | path.close(); |
| 2001 | path.moveTo(3, 0); |
| 2002 | path.lineTo(6, 0); |
| 2003 | path.lineTo(4, 2); |
| 2004 | path.close(); |
| 2005 | path.moveTo(4, 2); |
| 2006 | path.lineTo(0, 6); |
| 2007 | path.lineTo(6, 6); |
| 2008 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2009 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2010 | } |
| 2011 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2012 | static void testFauxQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2013 | SkPath path; |
| 2014 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2015 | path.moveTo(0, 0); |
| 2016 | path.lineTo(3, 0); |
| 2017 | path.lineTo(3, 3); |
| 2018 | path.close(); |
| 2019 | path.moveTo(3, 0); |
| 2020 | path.lineTo(6, 0); |
| 2021 | path.lineTo(4, 2); |
| 2022 | path.close(); |
| 2023 | path.moveTo(4, 2); |
| 2024 | path.lineTo(0, 6); |
| 2025 | path.lineTo(6, 6); |
| 2026 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2027 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2028 | } |
| 2029 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2030 | static void testFauxQuadralateral6b(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2031 | SkPath path; |
| 2032 | path.moveTo(0, 0); |
| 2033 | path.lineTo(3, 0); |
| 2034 | path.lineTo(3, 3); |
| 2035 | path.close(); |
| 2036 | path.moveTo(3, 0); |
| 2037 | path.lineTo(6, 0); |
| 2038 | path.lineTo(4, 2); |
| 2039 | path.close(); |
| 2040 | path.moveTo(4, 2); |
| 2041 | path.lineTo(6, 6); |
| 2042 | path.lineTo(0, 6); |
| 2043 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2044 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2045 | } |
| 2046 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2047 | static void testFauxQuadralateral6bx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2048 | SkPath path; |
| 2049 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2050 | path.moveTo(0, 0); |
| 2051 | path.lineTo(3, 0); |
| 2052 | path.lineTo(3, 3); |
| 2053 | path.close(); |
| 2054 | path.moveTo(3, 0); |
| 2055 | path.lineTo(6, 0); |
| 2056 | path.lineTo(4, 2); |
| 2057 | path.close(); |
| 2058 | path.moveTo(4, 2); |
| 2059 | path.lineTo(6, 6); |
| 2060 | path.lineTo(0, 6); |
| 2061 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2062 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2063 | } |
| 2064 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2065 | static void testFauxQuadralateral6c(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2066 | SkPath path; |
| 2067 | path.moveTo(0, 0); |
| 2068 | path.lineTo(3, 3); |
| 2069 | path.lineTo(3, 0); |
| 2070 | path.close(); |
| 2071 | path.moveTo(3, 0); |
| 2072 | path.lineTo(6, 0); |
| 2073 | path.lineTo(4, 2); |
| 2074 | path.close(); |
| 2075 | path.moveTo(4, 2); |
| 2076 | path.lineTo(0, 6); |
| 2077 | path.lineTo(6, 6); |
| 2078 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2079 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2080 | } |
| 2081 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2082 | static void testFauxQuadralateral6cx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2083 | SkPath path; |
| 2084 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2085 | path.moveTo(0, 0); |
| 2086 | path.lineTo(3, 3); |
| 2087 | path.lineTo(3, 0); |
| 2088 | path.close(); |
| 2089 | path.moveTo(3, 0); |
| 2090 | path.lineTo(6, 0); |
| 2091 | path.lineTo(4, 2); |
| 2092 | path.close(); |
| 2093 | path.moveTo(4, 2); |
| 2094 | path.lineTo(0, 6); |
| 2095 | path.lineTo(6, 6); |
| 2096 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2097 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2098 | } |
| 2099 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2100 | static void testFauxQuadralateral6d(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2101 | SkPath path; |
| 2102 | path.moveTo(0, 0); |
| 2103 | path.lineTo(3, 3); |
| 2104 | path.lineTo(3, 0); |
| 2105 | path.close(); |
| 2106 | path.moveTo(3, 0); |
| 2107 | path.lineTo(6, 0); |
| 2108 | path.lineTo(4, 2); |
| 2109 | path.close(); |
| 2110 | path.moveTo(4, 2); |
| 2111 | path.lineTo(6, 6); |
| 2112 | path.lineTo(0, 6); |
| 2113 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2114 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2115 | } |
| 2116 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2117 | static void testFauxQuadralateral6dx(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2118 | SkPath path; |
| 2119 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2120 | path.moveTo(0, 0); |
| 2121 | path.lineTo(3, 3); |
| 2122 | path.lineTo(3, 0); |
| 2123 | path.close(); |
| 2124 | path.moveTo(3, 0); |
| 2125 | path.lineTo(6, 0); |
| 2126 | path.lineTo(4, 2); |
| 2127 | path.close(); |
| 2128 | path.moveTo(4, 2); |
| 2129 | path.lineTo(6, 6); |
| 2130 | path.lineTo(0, 6); |
| 2131 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2132 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2133 | } |
| 2134 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2135 | static void testQuadralateral6a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2136 | SkPath path; |
| 2137 | path.moveTo(0, 0); |
| 2138 | path.lineTo(0, 0); |
| 2139 | path.lineTo(3, 0); |
| 2140 | path.lineTo(3, 3); |
| 2141 | path.close(); |
| 2142 | path.moveTo(3, 0); |
| 2143 | path.lineTo(6, 0); |
| 2144 | path.lineTo(0, 6); |
| 2145 | path.lineTo(6, 6); |
| 2146 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2147 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2148 | } |
| 2149 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2150 | static void testQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2151 | SkPath path; |
| 2152 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2153 | path.moveTo(0, 0); |
| 2154 | path.lineTo(0, 0); |
| 2155 | path.lineTo(3, 0); |
| 2156 | path.lineTo(3, 3); |
| 2157 | path.close(); |
| 2158 | path.moveTo(3, 0); |
| 2159 | path.lineTo(6, 0); |
| 2160 | path.lineTo(0, 6); |
| 2161 | path.lineTo(6, 6); |
| 2162 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2163 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2164 | } |
| 2165 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2166 | static void testQuadralateral7(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2167 | SkPath path; |
| 2168 | path.moveTo(0, 0); |
| 2169 | path.lineTo(0, 0); |
| 2170 | path.lineTo(1, 0); |
| 2171 | path.lineTo(2, 1); |
| 2172 | path.close(); |
| 2173 | path.moveTo(1, 0); |
| 2174 | path.lineTo(1, 1); |
| 2175 | path.lineTo(2, 2); |
| 2176 | path.lineTo(1, 3); |
| 2177 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2178 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2179 | } |
| 2180 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2181 | static void testQuadralateral7x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2182 | SkPath path; |
| 2183 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2184 | path.moveTo(0, 0); |
| 2185 | path.lineTo(0, 0); |
| 2186 | path.lineTo(1, 0); |
| 2187 | path.lineTo(2, 1); |
| 2188 | path.close(); |
| 2189 | path.moveTo(1, 0); |
| 2190 | path.lineTo(1, 1); |
| 2191 | path.lineTo(2, 2); |
| 2192 | path.lineTo(1, 3); |
| 2193 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2194 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2195 | } |
| 2196 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2197 | static void testQuadralateral8(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2198 | SkPath path; |
| 2199 | path.moveTo(0, 0); |
| 2200 | path.lineTo(3, 1); |
| 2201 | path.lineTo(1, 3); |
| 2202 | path.lineTo(3, 3); |
| 2203 | path.close(); |
| 2204 | path.moveTo(2, 1); |
| 2205 | path.lineTo(0, 2); |
| 2206 | path.lineTo(3, 2); |
| 2207 | path.lineTo(2, 3); |
| 2208 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2209 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2210 | } |
| 2211 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2212 | static void testQuadralateral8x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2213 | SkPath path; |
| 2214 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2215 | path.moveTo(0, 0); |
| 2216 | path.lineTo(3, 1); |
| 2217 | path.lineTo(1, 3); |
| 2218 | path.lineTo(3, 3); |
| 2219 | path.close(); |
| 2220 | path.moveTo(2, 1); |
| 2221 | path.lineTo(0, 2); |
| 2222 | path.lineTo(3, 2); |
| 2223 | path.lineTo(2, 3); |
| 2224 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2225 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2226 | } |
| 2227 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2228 | static void testQuadralateral9(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2229 | SkPath path; |
| 2230 | path.moveTo(0, 0); |
| 2231 | path.lineTo(1, 0); |
| 2232 | path.lineTo(1, 2); |
| 2233 | path.lineTo(2, 2); |
| 2234 | path.close(); |
| 2235 | path.moveTo(1, 1); |
| 2236 | path.lineTo(2, 1); |
| 2237 | path.lineTo(1, 3); |
| 2238 | path.lineTo(2, 3); |
| 2239 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2240 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2241 | } |
| 2242 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2243 | static void testQuadralateral9x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2244 | SkPath path; |
| 2245 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2246 | path.moveTo(0, 0); |
| 2247 | path.lineTo(1, 0); |
| 2248 | path.lineTo(1, 2); |
| 2249 | path.lineTo(2, 2); |
| 2250 | path.close(); |
| 2251 | path.moveTo(1, 1); |
| 2252 | path.lineTo(2, 1); |
| 2253 | path.lineTo(1, 3); |
| 2254 | path.lineTo(2, 3); |
| 2255 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2256 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2257 | } |
| 2258 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2259 | static void testLine1a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2260 | SkPath path; |
| 2261 | path.setFillType(SkPath::kWinding_FillType); |
| 2262 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 2263 | path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2264 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2265 | } |
| 2266 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2267 | static void testLine1ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2268 | SkPath path; |
| 2269 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2270 | path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 2271 | path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2272 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2273 | } |
| 2274 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2275 | static void testLine2ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2276 | SkPath path; |
| 2277 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2278 | path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 2279 | path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 2280 | path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2281 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2282 | } |
| 2283 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2284 | static void testLine3aax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2285 | SkPath path; |
| 2286 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2287 | path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 2288 | path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); |
| 2289 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2290 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2291 | } |
| 2292 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2293 | static void testLine4ax(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2294 | SkPath path; |
| 2295 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2296 | path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 2297 | path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 2298 | path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2299 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2300 | } |
| 2301 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2302 | static void testQuadratic1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2303 | SkPath path; |
| 2304 | path.moveTo(0, 0); |
| 2305 | path.quadTo(0, 0, 0, 0); |
| 2306 | path.lineTo(1, 0); |
| 2307 | path.close(); |
| 2308 | path.moveTo(0, 0); |
| 2309 | path.lineTo(0, 0); |
| 2310 | path.quadTo(0, 0, 0, 0); |
| 2311 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2312 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2313 | } |
| 2314 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2315 | static void testQuadratic1x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2316 | SkPath path; |
| 2317 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2318 | path.moveTo(0, 0); |
| 2319 | path.quadTo(0, 0, 0, 0); |
| 2320 | path.lineTo(1, 0); |
| 2321 | path.close(); |
| 2322 | path.moveTo(0, 0); |
| 2323 | path.lineTo(0, 0); |
| 2324 | path.quadTo(0, 0, 0, 0); |
| 2325 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2326 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2327 | } |
| 2328 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2329 | static void testQuadratic2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2330 | SkPath path; |
| 2331 | path.moveTo(0, 0); |
| 2332 | path.quadTo(0, 0, 0, 0); |
| 2333 | path.lineTo(3, 0); |
| 2334 | path.close(); |
| 2335 | path.moveTo(0, 0); |
| 2336 | path.lineTo(0, 0); |
| 2337 | path.quadTo(1, 0, 0, 1); |
| 2338 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2339 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2340 | } |
| 2341 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2342 | static void testQuadratic2x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2343 | SkPath path; |
| 2344 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2345 | path.moveTo(0, 0); |
| 2346 | path.quadTo(0, 0, 0, 0); |
| 2347 | path.lineTo(3, 0); |
| 2348 | path.close(); |
| 2349 | path.moveTo(0, 0); |
| 2350 | path.lineTo(0, 0); |
| 2351 | path.quadTo(1, 0, 0, 1); |
| 2352 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2353 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2354 | } |
| 2355 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2356 | static void testQuadratic3(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2357 | SkPath path; |
| 2358 | path.moveTo(0, 0); |
| 2359 | path.quadTo(0, 0, 1, 0); |
| 2360 | path.lineTo(0, 2); |
| 2361 | path.close(); |
| 2362 | path.moveTo(0, 0); |
| 2363 | path.lineTo(0, 0); |
| 2364 | path.quadTo(1, 0, 0, 1); |
| 2365 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2366 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2367 | } |
| 2368 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2369 | static void testQuadratic3x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2370 | SkPath path; |
| 2371 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2372 | path.moveTo(0, 0); |
| 2373 | path.quadTo(0, 0, 1, 0); |
| 2374 | path.lineTo(0, 2); |
| 2375 | path.close(); |
| 2376 | path.moveTo(0, 0); |
| 2377 | path.lineTo(0, 0); |
| 2378 | path.quadTo(1, 0, 0, 1); |
| 2379 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2380 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2381 | } |
| 2382 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2383 | static void testQuadratic4(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2384 | SkPath path; |
| 2385 | path.moveTo(0, 0); |
| 2386 | path.quadTo(0, 0, 1, 0); |
| 2387 | path.lineTo(0, 2); |
| 2388 | path.close(); |
| 2389 | path.moveTo(0, 0); |
| 2390 | path.lineTo(0, 0); |
| 2391 | path.quadTo(1, 0, 0, 2); |
| 2392 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2393 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2394 | } |
| 2395 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2396 | static void testQuadratic4x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2397 | SkPath path; |
| 2398 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2399 | path.moveTo(0, 0); |
| 2400 | path.quadTo(0, 0, 1, 0); |
| 2401 | path.lineTo(0, 2); |
| 2402 | path.close(); |
| 2403 | path.moveTo(0, 0); |
| 2404 | path.lineTo(0, 0); |
| 2405 | path.quadTo(1, 0, 0, 2); |
| 2406 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2407 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2408 | } |
| 2409 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2410 | static void testQuadratic5(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2411 | SkPath path; |
| 2412 | path.moveTo(0, 0); |
| 2413 | path.quadTo(0, 0, 0, 0); |
| 2414 | path.lineTo(0, 1); |
| 2415 | path.close(); |
| 2416 | path.moveTo(0, 0); |
| 2417 | path.lineTo(1, 0); |
| 2418 | path.quadTo(0, 1, 0, 2); |
| 2419 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2420 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2421 | } |
| 2422 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2423 | static void testQuadratic6(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2424 | SkPath path; |
| 2425 | path.moveTo(0, 0); |
| 2426 | path.quadTo(0, 0, 1, 0); |
| 2427 | path.lineTo(2, 1); |
| 2428 | path.close(); |
| 2429 | path.moveTo(0, 0); |
| 2430 | path.lineTo(0, 0); |
| 2431 | path.quadTo(2, 0, 0, 1); |
| 2432 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2433 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2434 | } |
| 2435 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2436 | static void testQuadratic7(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2437 | SkPath path; |
| 2438 | path.moveTo(0, 0); |
| 2439 | path.quadTo(0, 0, 1, 0); |
| 2440 | path.lineTo(3, 1); |
| 2441 | path.close(); |
| 2442 | path.moveTo(0, 0); |
| 2443 | path.lineTo(0, 0); |
| 2444 | path.quadTo(3, 0, 1, 2); |
| 2445 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2446 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2447 | } |
| 2448 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2449 | static void testQuadratic8(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2450 | SkPath path; |
| 2451 | path.moveTo(0, 0); |
| 2452 | path.quadTo(0, 0, 1, 0); |
| 2453 | path.lineTo(0, 2); |
| 2454 | path.close(); |
| 2455 | path.moveTo(0, 0); |
| 2456 | path.lineTo(1, 0); |
| 2457 | path.quadTo(0, 1, 1, 2); |
| 2458 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2459 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2460 | } |
| 2461 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2462 | static void testQuadratic9(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2463 | SkPath path; |
| 2464 | path.moveTo(0, 0); |
| 2465 | path.quadTo(0, 0, 1, 0); |
| 2466 | path.lineTo(3, 1); |
| 2467 | path.close(); |
| 2468 | path.moveTo(0, 0); |
| 2469 | path.lineTo(1, 0); |
| 2470 | path.quadTo(1, 2, 3, 2); |
| 2471 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2472 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2473 | } |
| 2474 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2475 | static void testQuadratic14(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2476 | SkPath path; |
| 2477 | path.moveTo(0, 0); |
| 2478 | path.quadTo(0, 0, 1, 0); |
| 2479 | path.lineTo(3, 2); |
| 2480 | path.close(); |
| 2481 | path.moveTo(0, 0); |
| 2482 | path.lineTo(1, 0); |
| 2483 | path.quadTo(3, 2, 3, 3); |
| 2484 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2485 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2486 | } |
| 2487 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2488 | static void testQuadratic15(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2489 | SkPath path; |
| 2490 | path.moveTo(0, 0); |
| 2491 | path.quadTo(0, 0, 1, 0); |
| 2492 | path.lineTo(1, 3); |
| 2493 | path.close(); |
| 2494 | path.moveTo(1, 0); |
| 2495 | path.lineTo(0, 1); |
| 2496 | path.quadTo(1, 1, 0, 3); |
| 2497 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2498 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2499 | } |
| 2500 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2501 | static void testQuadratic17x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2502 | SkPath path; |
| 2503 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2504 | path.moveTo(0, 0); |
| 2505 | path.quadTo(0, 0, 3, 1); |
| 2506 | path.lineTo(0, 2); |
| 2507 | path.close(); |
| 2508 | path.moveTo(0, 0); |
| 2509 | path.lineTo(1, 0); |
| 2510 | path.quadTo(3, 1, 0, 2); |
| 2511 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2512 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2513 | } |
| 2514 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2515 | static void testQuadratic18(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2516 | SkPath path; |
| 2517 | path.moveTo(0, 0); |
| 2518 | path.quadTo(1, 0, 0, 1); |
| 2519 | path.lineTo(0, 1); |
| 2520 | path.close(); |
| 2521 | path.moveTo(0, 0); |
| 2522 | path.lineTo(0, 0); |
| 2523 | path.quadTo(1, 0, 1, 1); |
| 2524 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2525 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2526 | } |
| 2527 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2528 | static void testQuadratic19(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2529 | SkPath path; |
| 2530 | path.moveTo(0, 0); |
| 2531 | path.quadTo(1, 0, 0, 1); |
| 2532 | path.lineTo(0, 1); |
| 2533 | path.close(); |
| 2534 | path.moveTo(0, 0); |
| 2535 | path.lineTo(0, 0); |
| 2536 | path.quadTo(2, 0, 0, 1); |
| 2537 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2538 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2539 | } |
| 2540 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2541 | static void testQuadratic20(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2542 | SkPath path; |
| 2543 | path.moveTo(0, 0); |
| 2544 | path.quadTo(1, 0, 0, 1); |
| 2545 | path.lineTo(0, 1); |
| 2546 | path.close(); |
| 2547 | path.moveTo(0, 0); |
| 2548 | path.lineTo(0, 0); |
| 2549 | path.quadTo(1, 0, 0, 1); |
| 2550 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2551 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2552 | } |
| 2553 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2554 | static void testQuadratic21(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2555 | SkPath path; |
| 2556 | path.moveTo(0, 0); |
| 2557 | path.quadTo(1, 0, 0, 1); |
| 2558 | path.lineTo(0, 1); |
| 2559 | path.close(); |
| 2560 | path.moveTo(0, 0); |
| 2561 | path.lineTo(0, 0); |
| 2562 | path.quadTo(1, 0, 0, 2); |
| 2563 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2564 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2565 | } |
| 2566 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2567 | static void testQuadratic22(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2568 | SkPath path; |
| 2569 | path.moveTo(0, 0); |
| 2570 | path.quadTo(1, 0, 0, 1); |
| 2571 | path.lineTo(0, 1); |
| 2572 | path.close(); |
| 2573 | path.moveTo(0, 0); |
| 2574 | path.lineTo(0, 0); |
| 2575 | path.quadTo(0, 1, 2, 1); |
| 2576 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2577 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2578 | } |
| 2579 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2580 | static void testQuadratic23(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2581 | SkPath path; |
| 2582 | path.moveTo(0, 0); |
| 2583 | path.quadTo(1, 0, 0, 1); |
| 2584 | path.lineTo(0, 1); |
| 2585 | path.close(); |
| 2586 | path.moveTo(0, 0); |
| 2587 | path.lineTo(0, 0); |
| 2588 | path.quadTo(0, 2, 1, 2); |
| 2589 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2590 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2591 | } |
| 2592 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2593 | static void testQuadratic24(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2594 | SkPath path; |
| 2595 | path.moveTo(0, 0); |
| 2596 | path.quadTo(1, 0, 0, 1); |
| 2597 | path.lineTo(0, 1); |
| 2598 | path.close(); |
| 2599 | path.moveTo(0, 0); |
| 2600 | path.lineTo(1, 0); |
| 2601 | path.quadTo(2, 0, 0, 1); |
| 2602 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2603 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2604 | } |
| 2605 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2606 | static void testQuadratic25(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2607 | SkPath path; |
| 2608 | path.moveTo(0, 0); |
| 2609 | path.quadTo(1, 0, 1, 1); |
| 2610 | path.lineTo(1, 1); |
| 2611 | path.close(); |
| 2612 | path.moveTo(0, 0); |
| 2613 | path.lineTo(0, 0); |
| 2614 | path.quadTo(2, 1, 0, 2); |
| 2615 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2616 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2617 | } |
| 2618 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2619 | static void testQuadratic26(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2620 | SkPath path; |
| 2621 | path.moveTo(0, 0); |
| 2622 | path.quadTo(1, 0, 1, 1); |
| 2623 | path.lineTo(0, 2); |
| 2624 | path.close(); |
| 2625 | path.moveTo(0, 0); |
| 2626 | path.lineTo(0, 0); |
| 2627 | path.quadTo(1, 0, 0, 1); |
| 2628 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2629 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2630 | } |
| 2631 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2632 | static void testQuadratic27(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2633 | SkPath path; |
| 2634 | path.moveTo(0, 0); |
| 2635 | path.quadTo(1, 0, 1, 1); |
| 2636 | path.lineTo(2, 1); |
| 2637 | path.close(); |
| 2638 | path.moveTo(0, 0); |
| 2639 | path.lineTo(0, 0); |
| 2640 | path.quadTo(2, 1, 0, 2); |
| 2641 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2642 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2643 | } |
| 2644 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2645 | static void testQuadratic28(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2646 | SkPath path; |
| 2647 | path.moveTo(0, 0); |
| 2648 | path.quadTo(1, 0, 0, 1); |
| 2649 | path.lineTo(0, 1); |
| 2650 | path.close(); |
| 2651 | path.moveTo(0, 0); |
| 2652 | path.lineTo(0, 2); |
| 2653 | path.quadTo(1, 2, 0, 3); |
| 2654 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2655 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2656 | } |
| 2657 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2658 | static void testQuadratic29(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2659 | SkPath path; |
| 2660 | path.moveTo(0, 0); |
| 2661 | path.quadTo(1, 0, 2, 1); |
| 2662 | path.lineTo(0, 2); |
| 2663 | path.close(); |
| 2664 | path.moveTo(0, 0); |
| 2665 | path.lineTo(0, 0); |
| 2666 | path.quadTo(1, 0, 0, 1); |
| 2667 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2668 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2669 | } |
| 2670 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2671 | static void testQuadratic30(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2672 | SkPath path; |
| 2673 | path.moveTo(0, 0); |
| 2674 | path.quadTo(1, 0, 1, 2); |
| 2675 | path.lineTo(1, 2); |
| 2676 | path.close(); |
| 2677 | path.moveTo(0, 0); |
| 2678 | path.lineTo(1, 0); |
| 2679 | path.quadTo(0, 1, 1, 2); |
| 2680 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2681 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2682 | } |
| 2683 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2684 | static void testQuadratic31(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2685 | SkPath path; |
| 2686 | path.moveTo(0, 0); |
| 2687 | path.quadTo(1, 0, 1, 2); |
| 2688 | path.lineTo(1, 2); |
| 2689 | path.close(); |
| 2690 | path.moveTo(0, 0); |
| 2691 | path.lineTo(1, 0); |
| 2692 | path.quadTo(0, 1, 1, 3); |
| 2693 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2694 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2695 | } |
| 2696 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2697 | static void testQuadratic32(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2698 | SkPath path; |
| 2699 | path.moveTo(0, 0); |
| 2700 | path.quadTo(1, 0, 2, 3); |
| 2701 | path.lineTo(2, 3); |
| 2702 | path.close(); |
| 2703 | path.moveTo(0, 0); |
| 2704 | path.lineTo(0, 0); |
| 2705 | path.quadTo(3, 1, 0, 2); |
| 2706 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2707 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2708 | } |
| 2709 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2710 | static void testQuadratic33(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2711 | SkPath path; |
| 2712 | path.moveTo(0, 0); |
| 2713 | path.quadTo(2, 0, 0, 1); |
| 2714 | path.lineTo(0, 1); |
| 2715 | path.close(); |
| 2716 | path.moveTo(0, 0); |
| 2717 | path.lineTo(1, 1); |
| 2718 | path.quadTo(2, 1, 2, 2); |
| 2719 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2720 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2721 | } |
| 2722 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2723 | static void testQuadratic34(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2724 | SkPath path; |
| 2725 | path.moveTo(0, 0); |
| 2726 | path.quadTo(2, 0, 0, 1); |
| 2727 | path.lineTo(0, 1); |
| 2728 | path.close(); |
| 2729 | path.moveTo(1, 0); |
| 2730 | path.lineTo(1, 1); |
| 2731 | path.quadTo(2, 1, 1, 2); |
| 2732 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2733 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2734 | } |
| 2735 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2736 | static void testQuadratic35(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2737 | SkPath path; |
| 2738 | path.moveTo(0, 0); |
| 2739 | path.quadTo(0, 1, 1, 1); |
| 2740 | path.lineTo(1, 3); |
| 2741 | path.close(); |
| 2742 | path.moveTo(2, 0); |
| 2743 | path.lineTo(3, 0); |
| 2744 | path.quadTo(0, 1, 1, 1); |
| 2745 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2746 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2747 | } |
| 2748 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2749 | static void testQuadratic36(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2750 | SkPath path; |
| 2751 | path.moveTo(0, 0); |
| 2752 | path.quadTo(2, 1, 2, 3); |
| 2753 | path.lineTo(2, 3); |
| 2754 | path.close(); |
| 2755 | path.moveTo(3, 1); |
| 2756 | path.lineTo(1, 2); |
| 2757 | path.quadTo(3, 2, 1, 3); |
| 2758 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2759 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2760 | } |
| 2761 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2762 | static void testQuadratic37(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2763 | SkPath path; |
| 2764 | path.moveTo(0, 0); |
| 2765 | path.quadTo(0, 2, 1, 2); |
| 2766 | path.lineTo(1, 2); |
| 2767 | path.close(); |
| 2768 | path.moveTo(0, 0); |
| 2769 | path.lineTo(3, 1); |
| 2770 | path.quadTo(0, 2, 1, 2); |
| 2771 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2772 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2773 | } |
| 2774 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2775 | static void testQuadratic38(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2776 | SkPath path; |
| 2777 | path.moveTo(1, 0); |
| 2778 | path.quadTo(0, 1, 1, 1); |
| 2779 | path.lineTo(1, 1); |
| 2780 | path.close(); |
| 2781 | path.moveTo(1, 0); |
| 2782 | path.lineTo(1, 2); |
| 2783 | path.quadTo(2, 2, 1, 3); |
| 2784 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2785 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2786 | } |
| 2787 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2788 | static void testQuadratic51(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2789 | SkPath path; |
| 2790 | path.moveTo(369.863983f, 145.645813f); |
| 2791 | path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f); |
| 2792 | path.lineTo(369.863983f, 145.645813f); |
| 2793 | path.close(); |
| 2794 | path.moveTo(369.970581f, 137.94342f); |
| 2795 | path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f); |
| 2796 | path.lineTo(369.970581f, 137.94342f); |
| 2797 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2798 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2799 | } |
| 2800 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2801 | static void testQuadratic53(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2802 | SkPath path; |
| 2803 | path.moveTo(303.12088f, 141.299606f); |
| 2804 | path.lineTo(330.463562f, 217.659027f); |
| 2805 | path.lineTo(303.12088f, 141.299606f); |
| 2806 | path.close(); |
| 2807 | path.moveTo(371.919067f, 205.854996f); |
| 2808 | path.lineTo(326.236786f, 205.854996f); |
| 2809 | path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); |
| 2810 | path.lineTo(371.919067f, 205.854996f); |
| 2811 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2812 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2813 | } |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 2814 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2815 | static void testQuadratic55(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2816 | SkPath path; |
| 2817 | path.moveTo(303.12088f, 141.299606f); |
| 2818 | path.lineTo(330.463562f, 217.659027f); |
| 2819 | path.lineTo(358.606506f, 141.299606f); |
| 2820 | path.lineTo(303.12088f, 141.299606f); |
| 2821 | path.close(); |
| 2822 | path.moveTo(326.236786f, 205.854996f); |
| 2823 | path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); |
| 2824 | path.lineTo(326.236786f, 205.854996f); |
| 2825 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2826 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2827 | } |
| 2828 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2829 | static void testQuadratic56(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2830 | SkPath path; |
| 2831 | path.moveTo(366.608826f, 151.196014f); |
| 2832 | path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f); |
| 2833 | path.lineTo(354.009216f, 208.816208f); |
| 2834 | path.lineTo(393.291473f, 102.232819f); |
| 2835 | path.lineTo(359.978058f, 136.581512f); |
| 2836 | path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f); |
| 2837 | path.lineTo(364.390686f, 157.898193f); |
| 2838 | path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f); |
| 2839 | path.lineTo(350, 120); |
| 2840 | path.lineTo(366.608826f, 151.196014f); |
| 2841 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2842 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2843 | } |
| 2844 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2845 | static void testLine80(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2846 | SkPath path; |
| 2847 | path.moveTo(4, 0); |
| 2848 | path.lineTo(3, 7); |
| 2849 | path.lineTo(7, 5); |
| 2850 | path.lineTo(2, 2); |
| 2851 | path.close(); |
| 2852 | path.moveTo(0, 6); |
| 2853 | path.lineTo(6, 12); |
| 2854 | path.lineTo(8, 3); |
| 2855 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2856 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2857 | } |
| 2858 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2859 | static void testQuadratic58(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2860 | SkPath path; |
caryclark@google.com | 07e97fc | 2013-07-08 17:17:02 +0000 | [diff] [blame] | 2861 | path.moveTo(283.714233f, 240); |
| 2862 | path.lineTo(283.714233f, 141.299606f); |
| 2863 | path.lineTo(303.12088f, 141.299606f); |
| 2864 | path.lineTo(330.463562f, 217.659027f); |
| 2865 | path.lineTo(358.606506f, 141.299606f); |
| 2866 | path.lineTo(362.874634f, 159.705902f); |
| 2867 | path.lineTo(335.665344f, 233.397751f); |
| 2868 | path.lineTo(322.12738f, 233.397751f); |
| 2869 | path.lineTo(295.718353f, 159.505829f); |
| 2870 | path.lineTo(295.718353f, 240); |
| 2871 | path.lineTo(283.714233f, 240); |
| 2872 | path.close(); |
| 2873 | path.moveTo(322.935669f, 231.030273f); |
| 2874 | path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f); |
| 2875 | path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f); |
| 2876 | path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f); |
| 2877 | path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f); |
| 2878 | path.lineTo(371.919067f, 205.854996f); |
| 2879 | path.lineTo(326.236786f, 205.854996f); |
| 2880 | path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); |
| 2881 | path.lineTo(322.935669f, 231.030273f); |
| 2882 | path.close(); |
| 2883 | path.moveTo(326.837006f, 195.984955f); |
| 2884 | path.lineTo(358.78125f, 195.984955f); |
| 2885 | path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f); |
| 2886 | path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f); |
| 2887 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2888 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2889 | } |
| 2890 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2891 | static void testQuadratic59x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2892 | SkPath path; |
| 2893 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2894 | path.moveTo(0, 0); |
| 2895 | path.quadTo(0, 0, 0, 0); |
| 2896 | path.lineTo(2, 2); |
| 2897 | path.close(); |
| 2898 | path.moveTo(0, 0); |
| 2899 | path.lineTo(2, 0); |
| 2900 | path.quadTo(3, 1, 1, 2); |
| 2901 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2902 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2903 | } |
| 2904 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2905 | static void testQuadratic59(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2906 | SkPath path; |
| 2907 | path.setFillType(SkPath::kWinding_FillType); |
| 2908 | path.moveTo(0, 0); |
| 2909 | path.quadTo(0, 0, 0, 0); |
| 2910 | path.lineTo(2, 2); |
| 2911 | path.close(); |
| 2912 | path.moveTo(0, 0); |
| 2913 | path.lineTo(2, 0); |
| 2914 | path.quadTo(3, 1, 1, 2); |
| 2915 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2916 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2917 | } |
| 2918 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2919 | static void testQuadratic63(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2920 | SkPath path; |
| 2921 | path.moveTo(0, 0); |
| 2922 | path.quadTo(0, 0, 0, 0); |
| 2923 | path.lineTo(3, 2); |
| 2924 | path.close(); |
| 2925 | path.moveTo(1, 0); |
| 2926 | path.lineTo(2, 1); |
| 2927 | path.quadTo(2, 1, 2, 2); |
| 2928 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2929 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2930 | } |
| 2931 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2932 | static void testQuadratic64(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2933 | SkPath path; |
| 2934 | path.moveTo(0, 0); |
| 2935 | path.quadTo(0, 0, 0, 0); |
| 2936 | path.lineTo(2, 3); |
| 2937 | path.close(); |
| 2938 | path.moveTo(1, 2); |
| 2939 | path.lineTo(2, 2); |
| 2940 | path.quadTo(0, 3, 3, 3); |
| 2941 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2942 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2943 | } |
| 2944 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2945 | static void testQuadratic65(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2946 | SkPath path; |
| 2947 | path.moveTo(0, 0); |
| 2948 | path.quadTo(0, 0, 0, 0); |
| 2949 | path.lineTo(3, 2); |
| 2950 | path.close(); |
| 2951 | path.moveTo(2, 1); |
| 2952 | path.lineTo(2, 2); |
| 2953 | path.quadTo(0, 3, 1, 3); |
| 2954 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2955 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2956 | } |
| 2957 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2958 | static void testQuadratic67x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2959 | SkPath path; |
| 2960 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 2961 | path.moveTo(0, 0); |
| 2962 | path.quadTo(0, 0, 2, 1); |
| 2963 | path.lineTo(2, 2); |
| 2964 | path.close(); |
| 2965 | path.moveTo(0, 0); |
| 2966 | path.lineTo(2, 0); |
| 2967 | path.quadTo(1, 1, 3, 2); |
| 2968 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2969 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2970 | } |
| 2971 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2972 | static void testQuadratic68(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2973 | SkPath path; |
| 2974 | path.moveTo(0, 0); |
| 2975 | path.quadTo(1, 0, 0, 1); |
| 2976 | path.lineTo(1, 2); |
| 2977 | path.close(); |
| 2978 | path.moveTo(0, 0); |
| 2979 | path.lineTo(0, 0); |
| 2980 | path.quadTo(0, 1, 2, 1); |
| 2981 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2982 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2983 | } |
| 2984 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2985 | static void testQuadratic69(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2986 | SkPath path; |
| 2987 | path.moveTo(0, 0); |
| 2988 | path.quadTo(0, 0, 0, 1); |
| 2989 | path.lineTo(3, 2); |
| 2990 | path.close(); |
| 2991 | path.moveTo(2, 0); |
| 2992 | path.lineTo(1, 1); |
| 2993 | path.quadTo(3, 2, 2, 3); |
| 2994 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2995 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2996 | } |
| 2997 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 2998 | static void testQuadratic70x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 2999 | SkPath path; |
| 3000 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3001 | path.moveTo(0, 0); |
| 3002 | path.quadTo(1, 0, 0, 1); |
| 3003 | path.lineTo(1, 2); |
| 3004 | path.close(); |
| 3005 | path.moveTo(0, 0); |
| 3006 | path.lineTo(0, 0); |
| 3007 | path.quadTo(0, 1, 2, 1); |
| 3008 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3009 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3010 | } |
| 3011 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3012 | static void testQuadratic71(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3013 | SkPath path; |
| 3014 | path.moveTo(0, 0); |
| 3015 | path.quadTo(1, 0, 1, 1); |
| 3016 | path.lineTo(3, 2); |
| 3017 | path.close(); |
| 3018 | path.moveTo(0, 0); |
| 3019 | path.lineTo(0, 0); |
| 3020 | path.quadTo(1, 1, 3, 1); |
| 3021 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3022 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3023 | } |
| 3024 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3025 | static void testQuadratic72(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3026 | SkPath path; |
| 3027 | path.moveTo(0, 0); |
| 3028 | path.quadTo(1, 0, 1, 2); |
| 3029 | path.lineTo(1, 2); |
| 3030 | path.close(); |
| 3031 | path.moveTo(0, 0); |
| 3032 | path.lineTo(1, 0); |
| 3033 | path.quadTo(0, 1, 3, 2); |
| 3034 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3035 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3036 | } |
| 3037 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3038 | static void testQuadratic73(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3039 | SkPath path; |
| 3040 | path.moveTo(0, 0); |
| 3041 | path.quadTo(1, 0, 0, 3); |
| 3042 | path.lineTo(0, 3); |
| 3043 | path.close(); |
| 3044 | path.moveTo(0, 0); |
| 3045 | path.lineTo(1, 0); |
| 3046 | path.quadTo(0, 1, 1, 1); |
| 3047 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3048 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3049 | } |
| 3050 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3051 | static void testQuadratic74(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3052 | SkPath path; |
| 3053 | path.moveTo(0, 0); |
| 3054 | path.quadTo(1, 0, 1, 3); |
| 3055 | path.lineTo(1, 3); |
| 3056 | path.close(); |
| 3057 | path.moveTo(0, 0); |
| 3058 | path.lineTo(0, 1); |
| 3059 | path.quadTo(3, 2, 2, 3); |
| 3060 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3061 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3062 | } |
| 3063 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3064 | static void testQuadratic75(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3065 | SkPath path; |
| 3066 | path.moveTo(0, 0); |
| 3067 | path.quadTo(1, 0, 1, 3); |
| 3068 | path.lineTo(2, 3); |
| 3069 | path.close(); |
| 3070 | path.moveTo(0, 0); |
| 3071 | path.lineTo(0, 1); |
| 3072 | path.quadTo(3, 2, 2, 3); |
| 3073 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3074 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3075 | } |
| 3076 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3077 | static void testQuadratic76(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3078 | SkPath path; |
| 3079 | path.moveTo(0, 0); |
| 3080 | path.quadTo(0, 0, 0, 0); |
| 3081 | path.lineTo(2, 3); |
| 3082 | path.close(); |
| 3083 | path.moveTo(1, 0); |
| 3084 | path.lineTo(1, 2); |
| 3085 | path.quadTo(1, 2, 2, 2); |
| 3086 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3087 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3088 | } |
| 3089 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3090 | static void testQuadratic77(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3091 | SkPath path; |
| 3092 | path.moveTo(0, 0); |
| 3093 | path.quadTo(1, 0, 1, 1); |
| 3094 | path.lineTo(3, 1); |
| 3095 | path.close(); |
| 3096 | path.moveTo(0, 0); |
| 3097 | path.lineTo(1, 0); |
| 3098 | path.quadTo(0, 1, 3, 2); |
| 3099 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3100 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3101 | } |
| 3102 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3103 | static void testQuadratic78(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3104 | SkPath path; |
| 3105 | path.moveTo(0, 0); |
| 3106 | path.quadTo(1, 0, 1, 2); |
| 3107 | path.lineTo(3, 2); |
| 3108 | path.close(); |
| 3109 | path.moveTo(0, 0); |
| 3110 | path.lineTo(0, 0); |
| 3111 | path.quadTo(2, 1, 0, 2); |
| 3112 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3113 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3114 | } |
| 3115 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3116 | static void testQuadratic79(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3117 | SkPath path; |
| 3118 | path.moveTo(0, 0); |
| 3119 | path.quadTo(1, 0, 1, 2); |
| 3120 | path.lineTo(3, 2); |
| 3121 | path.close(); |
| 3122 | path.moveTo(0, 0); |
| 3123 | path.lineTo(1, 0); |
| 3124 | path.quadTo(0, 1, 3, 2); |
| 3125 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3126 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3127 | } |
| 3128 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3129 | static void testEight1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3130 | SkPath path; |
| 3131 | path.moveTo(0, 0); |
| 3132 | path.lineTo(2, 2); |
| 3133 | path.lineTo(0, 2); |
| 3134 | path.lineTo(2, 0); |
| 3135 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3136 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3137 | } |
| 3138 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3139 | static void testEight2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3140 | SkPath path; |
| 3141 | path.moveTo(0, 0); |
| 3142 | path.lineTo(2, 0); |
| 3143 | path.lineTo(0, 2); |
| 3144 | path.lineTo(2, 2); |
| 3145 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3146 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3147 | } |
| 3148 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3149 | static void testEight3(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3150 | SkPath path; |
| 3151 | path.moveTo(0, 0); |
| 3152 | path.lineTo(0, 2); |
| 3153 | path.lineTo(2, 0); |
| 3154 | path.lineTo(2, 2); |
| 3155 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3156 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3157 | } |
| 3158 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3159 | static void testEight4(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3160 | SkPath path; |
| 3161 | path.moveTo(0, 0); |
| 3162 | path.lineTo(2, 2); |
| 3163 | path.lineTo(2, 0); |
| 3164 | path.lineTo(0, 2); |
| 3165 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3166 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3167 | } |
| 3168 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3169 | static void testEight5(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3170 | SkPath path; |
| 3171 | path.moveTo(1, 0); |
| 3172 | path.lineTo(1, 2); |
| 3173 | path.lineTo(0, 2); |
| 3174 | path.lineTo(2, 0); |
| 3175 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3176 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3177 | } |
| 3178 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3179 | static void testEight6(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3180 | SkPath path; |
| 3181 | path.moveTo(1, 0); |
| 3182 | path.lineTo(2, 0); |
| 3183 | path.lineTo(0, 2); |
| 3184 | path.lineTo(1, 2); |
| 3185 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3186 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3187 | } |
| 3188 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3189 | static void testEight7(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3190 | SkPath path; |
| 3191 | path.moveTo(0, 0); |
| 3192 | path.lineTo(0, 1); |
| 3193 | path.lineTo(2, 1); |
| 3194 | path.lineTo(2, 2); |
| 3195 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3196 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3197 | } |
| 3198 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3199 | static void testEight8(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3200 | SkPath path; |
| 3201 | path.moveTo(0, 0); |
| 3202 | path.lineTo(2, 2); |
| 3203 | path.lineTo(2, 1); |
| 3204 | path.lineTo(0, 1); |
| 3205 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3206 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3207 | } |
| 3208 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3209 | static void testEight9(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3210 | SkPath path; |
| 3211 | path.moveTo(1, 0); |
| 3212 | path.lineTo(1, 2); |
| 3213 | path.lineTo(2, 1); |
| 3214 | path.lineTo(0, 1); |
| 3215 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3216 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3217 | } |
| 3218 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3219 | static void testEight10(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3220 | SkPath path; |
| 3221 | path.moveTo(1, 0); |
| 3222 | path.lineTo(0, 1); |
| 3223 | path.lineTo(2, 1); |
| 3224 | path.lineTo(1, 2); |
| 3225 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3226 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3227 | } |
| 3228 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3229 | static void testQuadratic80(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3230 | SkPath path; |
| 3231 | path.moveTo(0, 0); |
| 3232 | path.quadTo(1, 0, 2, 3); |
| 3233 | path.lineTo(2, 3); |
| 3234 | path.close(); |
| 3235 | path.moveTo(1, 0); |
| 3236 | path.lineTo(3, 0); |
| 3237 | path.quadTo(0, 1, 1, 1); |
| 3238 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3239 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3240 | } |
| 3241 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3242 | static void testQuadratic81(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3243 | SkPath path; |
| 3244 | path.moveTo(0, 0); |
| 3245 | path.quadTo(2, 0, 1, 1); |
| 3246 | path.lineTo(1, 1); |
| 3247 | path.close(); |
| 3248 | path.moveTo(0, 0); |
| 3249 | path.lineTo(0, 0); |
| 3250 | path.quadTo(2, 1, 0, 2); |
| 3251 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3252 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3253 | } |
| 3254 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3255 | static void testQuadratic82(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3256 | SkPath path; |
| 3257 | path.moveTo(0, 0); |
| 3258 | path.quadTo(2, 0, 1, 1); |
| 3259 | path.lineTo(0, 3); |
| 3260 | path.close(); |
| 3261 | path.moveTo(0, 0); |
| 3262 | path.lineTo(0, 0); |
| 3263 | path.quadTo(2, 1, 0, 2); |
| 3264 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3265 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3266 | } |
| 3267 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3268 | static void testQuadratic83(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3269 | SkPath path; |
| 3270 | path.moveTo(0, 0); |
| 3271 | path.quadTo(0, 0, 2, 0); |
| 3272 | path.lineTo(2, 2); |
| 3273 | path.close(); |
| 3274 | path.moveTo(0, 1); |
| 3275 | path.lineTo(0, 2); |
| 3276 | path.quadTo(2, 2, 1, 3); |
| 3277 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3278 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3279 | } |
| 3280 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3281 | static void testQuadratic84(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3282 | SkPath path; |
| 3283 | path.moveTo(0, 0); |
| 3284 | path.quadTo(2, 0, 1, 1); |
| 3285 | path.lineTo(2, 1); |
| 3286 | path.close(); |
| 3287 | path.moveTo(1, 0); |
| 3288 | path.lineTo(2, 0); |
| 3289 | path.quadTo(0, 1, 2, 2); |
| 3290 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3291 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3292 | } |
| 3293 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3294 | static void testQuadratic85(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3295 | SkPath path; |
| 3296 | path.moveTo(0, 0); |
| 3297 | path.quadTo(3, 0, 1, 1); |
| 3298 | path.lineTo(1, 1); |
| 3299 | path.close(); |
| 3300 | path.moveTo(1, 0); |
| 3301 | path.lineTo(3, 0); |
| 3302 | path.quadTo(0, 1, 1, 2); |
| 3303 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3304 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3305 | } |
| 3306 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3307 | static void testQuadratic86(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3308 | SkPath path; |
| 3309 | path.moveTo(0, 0); |
| 3310 | path.quadTo(0, 1, 1, 1); |
| 3311 | path.lineTo(2, 3); |
| 3312 | path.close(); |
| 3313 | path.moveTo(0, 0); |
| 3314 | path.lineTo(0, 0); |
| 3315 | path.quadTo(1, 1, 1, 3); |
| 3316 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3317 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3318 | } |
| 3319 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3320 | static void testQuadratic87(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3321 | SkPath path; |
| 3322 | path.moveTo(0, 0); |
| 3323 | path.quadTo(2, 1, 0, 2); |
| 3324 | path.lineTo(2, 3); |
| 3325 | path.close(); |
| 3326 | path.moveTo(0, 0); |
| 3327 | path.lineTo(1, 1); |
| 3328 | path.quadTo(0, 2, 3, 2); |
| 3329 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3330 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3331 | } |
| 3332 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3333 | static void testQuadratic88(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3334 | SkPath path; |
| 3335 | path.moveTo(0, 0); |
| 3336 | path.quadTo(2, 1, 0, 2); |
| 3337 | path.lineTo(2, 2); |
| 3338 | path.close(); |
| 3339 | path.moveTo(1, 0); |
| 3340 | path.lineTo(1, 1); |
| 3341 | path.quadTo(0, 2, 2, 2); |
| 3342 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3343 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3344 | } |
| 3345 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3346 | static void testQuadratic89x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3347 | SkPath path; |
| 3348 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3349 | path.moveTo(0, 0); |
| 3350 | path.quadTo(3, 1, 2, 2); |
| 3351 | path.lineTo(0, 3); |
| 3352 | path.close(); |
| 3353 | path.moveTo(0, 0); |
| 3354 | path.lineTo(2, 1); |
| 3355 | path.quadTo(3, 1, 3, 3); |
| 3356 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3357 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3358 | } |
| 3359 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3360 | static void testQuadratic90x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3361 | SkPath path; |
| 3362 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3363 | path.moveTo(0, 0); |
| 3364 | path.quadTo(3, 0, 2, 2); |
| 3365 | path.lineTo(1, 3); |
| 3366 | path.close(); |
| 3367 | path.moveTo(0, 0); |
| 3368 | path.lineTo(0, 1); |
| 3369 | path.quadTo(3, 2, 2, 3); |
| 3370 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3371 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3372 | } |
| 3373 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3374 | static void testQuadratic91(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3375 | SkPath path; |
| 3376 | path.moveTo(0, 0); |
| 3377 | path.quadTo(3, 2, 2, 3); |
| 3378 | path.lineTo(2, 3); |
| 3379 | path.close(); |
| 3380 | path.moveTo(0, 0); |
| 3381 | path.lineTo(1, 1); |
| 3382 | path.quadTo(2, 1, 2, 3); |
| 3383 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3384 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3385 | } |
| 3386 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3387 | static void testQuadratic92x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3388 | SkPath path; |
| 3389 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3390 | path.moveTo(1, 0); |
| 3391 | path.quadTo(3, 0, 2, 2); |
| 3392 | path.lineTo(2, 2); |
| 3393 | path.close(); |
| 3394 | path.moveTo(2, 0); |
| 3395 | path.lineTo(0, 1); |
| 3396 | path.quadTo(3, 2, 2, 3); |
| 3397 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3398 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3399 | } |
| 3400 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3401 | static void testLine82(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3402 | SkPath path; |
| 3403 | path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); |
| 3404 | path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 3405 | path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3406 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3407 | } |
| 3408 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3409 | static void testLine82a(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3410 | SkPath path; |
| 3411 | path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3412 | path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3413 | path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3414 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3415 | } |
| 3416 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3417 | static void testLine82b(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3418 | SkPath path; |
| 3419 | path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3420 | path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3421 | path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3422 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3423 | } |
| 3424 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3425 | static void testLine82c(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3426 | SkPath path; |
| 3427 | path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3428 | path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3429 | path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3430 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3431 | } |
| 3432 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3433 | static void testLine82d(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3434 | SkPath path; |
| 3435 | path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3436 | path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3437 | path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3438 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3439 | } |
| 3440 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3441 | static void testLine82e(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3442 | SkPath path; |
| 3443 | path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3444 | path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3445 | path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3446 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3447 | } |
| 3448 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3449 | static void testLine82f(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3450 | SkPath path; |
| 3451 | path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3452 | path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3453 | path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3454 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3455 | } |
| 3456 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3457 | static void testLine82g(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3458 | SkPath path; |
| 3459 | path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3460 | path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3461 | path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3462 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3463 | } |
| 3464 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3465 | static void testLine82h(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3466 | SkPath path; |
| 3467 | path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3468 | path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3469 | path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3470 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3471 | } |
| 3472 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3473 | static void testLine83(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3474 | SkPath path; |
| 3475 | path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction); |
| 3476 | path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction); |
| 3477 | path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3478 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3479 | } |
| 3480 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3481 | static void testLine84(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3482 | SkPath path; |
| 3483 | path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); |
| 3484 | path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); |
| 3485 | path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 3486 | path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3487 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3488 | } |
| 3489 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3490 | static void testLine84x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3491 | SkPath path; |
| 3492 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3493 | path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); |
| 3494 | path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction); |
| 3495 | path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction); |
| 3496 | path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3497 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3498 | } |
| 3499 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3500 | static void testLine85(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3501 | SkPath path; |
| 3502 | path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction); |
| 3503 | path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); |
| 3504 | path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); |
| 3505 | path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3506 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3507 | } |
| 3508 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3509 | static void testQuadralateral1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3510 | SkPath path; |
| 3511 | path.moveTo(0, 0); |
| 3512 | path.lineTo(0, 0); |
| 3513 | path.lineTo(0, 0); |
| 3514 | path.lineTo(3, 2); |
| 3515 | path.close(); |
| 3516 | path.moveTo(0, 0); |
| 3517 | path.lineTo(2, 1); |
| 3518 | path.lineTo(2, 2); |
| 3519 | path.lineTo(2, 3); |
| 3520 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3521 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3522 | } |
| 3523 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3524 | static void testCubic1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3525 | SkPath path; |
| 3526 | path.moveTo(0, 0); |
| 3527 | path.cubicTo(0, 1, 1, 1, 1, 0); |
| 3528 | path.close(); |
| 3529 | path.moveTo(1, 0); |
| 3530 | path.cubicTo(0, 0, 0, 1, 1, 1); |
| 3531 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3532 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3533 | } |
| 3534 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3535 | static void testQuadratic93(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3536 | SkPath path; |
| 3537 | path.moveTo(3, 0); |
| 3538 | path.quadTo(0, 1, 3, 2); |
| 3539 | path.lineTo(0, 3); |
| 3540 | path.close(); |
| 3541 | path.moveTo(1, 0); |
| 3542 | path.lineTo(2, 0); |
| 3543 | path.quadTo(1, 1, 2, 2); |
| 3544 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3545 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3546 | } |
| 3547 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3548 | static void testCubic2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3549 | SkPath path; |
| 3550 | path.moveTo(0,2); |
| 3551 | path.cubicTo(0,3, 2,1, 4,0); |
| 3552 | path.close(); |
| 3553 | path.moveTo(1,2); |
| 3554 | path.cubicTo(0,4, 2,0, 3,0); |
| 3555 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3556 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3557 | } |
| 3558 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3559 | static void testQuad1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3560 | SkPath path; |
| 3561 | path.moveTo(0,0); |
| 3562 | path.quadTo(0,0, 0,1); |
| 3563 | path.lineTo(1,1); |
| 3564 | path.close(); |
| 3565 | path.moveTo(0,0); |
| 3566 | path.quadTo(1,1, 0,2); |
| 3567 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3568 | testSimplify(reporter, path, filename); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3569 | } |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 3570 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3571 | static void testQuadralateral2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | e942bc3 | 2013-04-10 18:53:01 +0000 | [diff] [blame] | 3572 | SkPath path; |
| 3573 | path.moveTo(0, 0); |
| 3574 | path.lineTo(2, 2); |
| 3575 | path.lineTo(0, 3); |
| 3576 | path.lineTo(3, 3); |
| 3577 | path.close(); |
| 3578 | path.moveTo(2, 0); |
| 3579 | path.lineTo(3, 0); |
| 3580 | path.lineTo(0, 1); |
| 3581 | path.lineTo(1, 2); |
| 3582 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3583 | testSimplify(reporter, path, filename); |
caryclark@google.com | e942bc3 | 2013-04-10 18:53:01 +0000 | [diff] [blame] | 3584 | } |
| 3585 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3586 | static void testQuadratic94(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3587 | SkPath path; |
| 3588 | path.moveTo(0, 0); |
| 3589 | path.lineTo(8, 8); |
| 3590 | path.quadTo(8, 4, 4, 4); |
| 3591 | path.quadTo(4, 0, 0, 0); |
| 3592 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3593 | testSimplify(reporter, path, filename); |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3594 | } |
| 3595 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3596 | static void testQuadratic95(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3597 | SkPath path; |
| 3598 | path.moveTo(8, 8); |
| 3599 | path.lineTo(0, 0); |
| 3600 | path.quadTo(4, 0, 4, 4); |
| 3601 | path.quadTo(8, 4, 8, 8); |
| 3602 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3603 | testSimplify(reporter, path, filename); |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3604 | } |
| 3605 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3606 | static void testQuadratic96(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3607 | SkPath path; |
| 3608 | path.moveTo(8, 0); |
| 3609 | path.lineTo(0, 8); |
| 3610 | path.quadTo(0, 4, 4, 4); |
| 3611 | path.quadTo(4, 0, 8, 0); |
| 3612 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3613 | testSimplify(reporter, path, filename); |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3614 | } |
| 3615 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3616 | static void testQuadratic97(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3617 | SkPath path; |
| 3618 | path.moveTo(0, 8); |
| 3619 | path.lineTo(8, 0); |
| 3620 | path.quadTo(4, 0, 4, 4); |
| 3621 | path.quadTo(0, 4, 0, 8); |
| 3622 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3623 | testSimplify(reporter, path, filename); |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 3624 | } |
| 3625 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3626 | static void testTriangles1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 0361032 | 2013-04-18 15:58:21 +0000 | [diff] [blame] | 3627 | SkPath path; |
| 3628 | path.moveTo(0, 0); |
| 3629 | path.lineTo(1, 0); |
| 3630 | path.lineTo(3, 3); |
| 3631 | path.close(); |
| 3632 | path.moveTo(0, 0); |
| 3633 | path.lineTo(1, 2); |
| 3634 | path.lineTo(1, 1); |
| 3635 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3636 | testSimplify(reporter, path, filename); |
caryclark@google.com | 0361032 | 2013-04-18 15:58:21 +0000 | [diff] [blame] | 3637 | } |
| 3638 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3639 | static void testTriangles2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 0361032 | 2013-04-18 15:58:21 +0000 | [diff] [blame] | 3640 | SkPath path; |
| 3641 | path.moveTo(0, 0); |
| 3642 | path.lineTo(1, 0); |
| 3643 | path.lineTo(3, 3); |
| 3644 | path.close(); |
| 3645 | path.moveTo(1, 1); |
| 3646 | path.lineTo(2, 3); |
| 3647 | path.lineTo(1, 2); |
| 3648 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3649 | testSimplify(reporter, path, filename); |
caryclark@google.com | 0361032 | 2013-04-18 15:58:21 +0000 | [diff] [blame] | 3650 | } |
| 3651 | |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3652 | // A test for this case: |
caryclark@google.com | 66560ca | 2013-04-26 19:51:16 +0000 | [diff] [blame] | 3653 | // contourA has two segments that are coincident |
| 3654 | // contourB has two segments that are coincident in the same place |
| 3655 | // each ends up with +2/0 pairs for winding count |
| 3656 | // since logic in OpSegment::addTCoincident doesn't transfer count (only increments/decrements) |
| 3657 | // can this be resolved to +4/0 ? |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3658 | static void testAddTCoincident1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 66560ca | 2013-04-26 19:51:16 +0000 | [diff] [blame] | 3659 | SkPath path; |
| 3660 | path.moveTo(2, 0); |
| 3661 | path.lineTo(2, 2); |
| 3662 | path.lineTo(1, 1); |
| 3663 | path.lineTo(2, 0); |
| 3664 | path.lineTo(2, 2); |
| 3665 | path.lineTo(1, 1); |
| 3666 | path.close(); |
| 3667 | path.moveTo(2, 0); |
| 3668 | path.lineTo(2, 2); |
| 3669 | path.lineTo(3, 1); |
| 3670 | path.lineTo(2, 0); |
| 3671 | path.lineTo(2, 2); |
| 3672 | path.lineTo(3, 1); |
| 3673 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3674 | testSimplify(reporter, path, filename); |
caryclark@google.com | 66560ca | 2013-04-26 19:51:16 +0000 | [diff] [blame] | 3675 | } |
| 3676 | |
| 3677 | // test with implicit close |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3678 | static void testAddTCoincident2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 66560ca | 2013-04-26 19:51:16 +0000 | [diff] [blame] | 3679 | SkPath path; |
| 3680 | path.moveTo(2, 0); |
| 3681 | path.lineTo(2, 2); |
| 3682 | path.lineTo(1, 1); |
| 3683 | path.lineTo(2, 0); |
| 3684 | path.lineTo(2, 2); |
| 3685 | path.lineTo(1, 1); |
| 3686 | path.moveTo(2, 0); |
| 3687 | path.lineTo(2, 2); |
| 3688 | path.lineTo(3, 1); |
| 3689 | path.lineTo(2, 0); |
| 3690 | path.lineTo(2, 2); |
| 3691 | path.lineTo(3, 1); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3692 | testSimplify(reporter, path, filename); |
caryclark@google.com | 66560ca | 2013-04-26 19:51:16 +0000 | [diff] [blame] | 3693 | } |
| 3694 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3695 | static void testQuad2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3696 | SkPath path; |
| 3697 | path.moveTo(1, 0); |
| 3698 | path.quadTo(0, 1, 3, 2); |
| 3699 | path.lineTo(2, 3); |
| 3700 | path.close(); |
| 3701 | path.moveTo(0, 0); |
| 3702 | path.lineTo(1, 0); |
| 3703 | path.quadTo(0, 1, 1, 1); |
| 3704 | path.close(); |
| 3705 | } |
| 3706 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3707 | static void testQuad3(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3708 | SkPath path; |
| 3709 | path.moveTo(1, 0); |
| 3710 | path.quadTo(0, 1, 3, 2); |
| 3711 | path.lineTo(3, 3); |
| 3712 | path.close(); |
| 3713 | path.moveTo(0, 0); |
| 3714 | path.lineTo(1, 0); |
| 3715 | path.quadTo(0, 1, 1, 1); |
| 3716 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3717 | testSimplify(reporter, path, filename); |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3718 | } |
| 3719 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3720 | static void testQuad4(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3721 | SkPath path; |
| 3722 | path.moveTo(2, 0); |
| 3723 | path.quadTo(0, 1, 1, 1); |
| 3724 | path.lineTo(3, 3); |
| 3725 | path.close(); |
| 3726 | path.moveTo(0, 0); |
| 3727 | path.lineTo(2, 0); |
| 3728 | path.quadTo(0, 1, 2, 2); |
| 3729 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3730 | testSimplify(reporter, path, filename); |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3731 | } |
| 3732 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3733 | static void testQuad5(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3734 | SkPath path; |
| 3735 | path.moveTo(2, 0); |
| 3736 | path.quadTo(0, 1, 2, 2); |
| 3737 | path.lineTo(1, 3); |
| 3738 | path.close(); |
| 3739 | path.moveTo(0, 0); |
| 3740 | path.lineTo(2, 0); |
| 3741 | path.quadTo(0, 1, 1, 1); |
| 3742 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3743 | testSimplify(reporter, path, filename); |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3744 | } |
| 3745 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3746 | static void testQuad6(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3747 | SkPath path; |
| 3748 | path.moveTo(2, 0); |
| 3749 | path.quadTo(0, 1, 2, 2); |
| 3750 | path.lineTo(1, 3); |
| 3751 | path.close(); |
| 3752 | path.moveTo(1, 0); |
| 3753 | path.lineTo(2, 0); |
| 3754 | path.quadTo(0, 1, 1, 1); |
| 3755 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3756 | testSimplify(reporter, path, filename); |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3757 | } |
| 3758 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3759 | static void testQuad7(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3760 | SkPath path; |
| 3761 | path.moveTo(3, 0); |
| 3762 | path.quadTo(0, 1, 1, 1); |
| 3763 | path.lineTo(1, 3); |
| 3764 | path.close(); |
| 3765 | path.moveTo(1, 0); |
| 3766 | path.lineTo(3, 0); |
| 3767 | path.quadTo(0, 1, 1, 2); |
| 3768 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3769 | testSimplify(reporter, path, filename); |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 3770 | } |
| 3771 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3772 | static void testQuadLineIntersect1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | cffbcc3 | 2013-06-04 17:59:42 +0000 | [diff] [blame] | 3773 | SkPath path; |
| 3774 | path.moveTo(0, 0); |
| 3775 | path.quadTo(3, 1, 0, 3); |
| 3776 | path.lineTo(2, 3); |
| 3777 | path.close(); |
| 3778 | path.moveTo(2, 0); |
| 3779 | path.lineTo(0, 1); |
| 3780 | path.quadTo(3, 1, 0, 2); |
| 3781 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3782 | testSimplify(reporter, path, filename); |
caryclark@google.com | cffbcc3 | 2013-06-04 17:59:42 +0000 | [diff] [blame] | 3783 | } |
| 3784 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3785 | static void testQuadLineIntersect2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | cffbcc3 | 2013-06-04 17:59:42 +0000 | [diff] [blame] | 3786 | SkPath path; |
| 3787 | path.moveTo(0, 0); |
| 3788 | path.quadTo(3, 1, 0, 3); |
| 3789 | path.lineTo(0, 3); |
| 3790 | path.close(); |
| 3791 | path.moveTo(2, 0); |
| 3792 | path.lineTo(0, 1); |
| 3793 | path.quadTo(3, 1, 0, 2); |
| 3794 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3795 | testSimplify(reporter, path, filename); |
caryclark@google.com | cffbcc3 | 2013-06-04 17:59:42 +0000 | [diff] [blame] | 3796 | } |
| 3797 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3798 | static void testQuadLineIntersect3(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | cffbcc3 | 2013-06-04 17:59:42 +0000 | [diff] [blame] | 3799 | SkPath path; |
| 3800 | path.moveTo(0, 0); |
| 3801 | path.quadTo(3, 1, 0, 3); |
| 3802 | path.lineTo(1, 3); |
| 3803 | path.close(); |
| 3804 | path.moveTo(2, 0); |
| 3805 | path.lineTo(0, 1); |
| 3806 | path.quadTo(3, 1, 0, 2); |
| 3807 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3808 | testSimplify(reporter, path, filename); |
caryclark@google.com | cffbcc3 | 2013-06-04 17:59:42 +0000 | [diff] [blame] | 3809 | } |
| 3810 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3811 | static void skphealth_com76(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 07e97fc | 2013-07-08 17:17:02 +0000 | [diff] [blame] | 3812 | SkPath path; |
| 3813 | path.setFillType(SkPath::kWinding_FillType); |
| 3814 | path.moveTo(708.099182f, 7.09919119f); |
| 3815 | path.lineTo(708.099182f, 7.09920025f); |
| 3816 | path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); |
| 3817 | path.lineTo(704.000000f, 33.0000000f); |
| 3818 | path.lineTo(705.000000f, 33.0000000f); |
| 3819 | path.lineTo(705.000000f, 17.0000000f); |
| 3820 | path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f); |
| 3821 | path.lineTo(708.099182f, 7.09919119f); |
| 3822 | path.close(); |
| 3823 | path.moveTo(704.000000f, 3.00000000f); |
| 3824 | path.lineTo(704.000000f, 33.0000000f); |
| 3825 | path.lineTo(705.000000f, 33.0000000f); |
| 3826 | path.lineTo(719.500000f, 3.00000000f); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3827 | testSimplify(reporter, path, filename); |
caryclark@google.com | 07e97fc | 2013-07-08 17:17:02 +0000 | [diff] [blame] | 3828 | } |
| 3829 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3830 | static void tooCloseTest(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3831 | SkPath path; |
| 3832 | path.moveTo(0, 0); |
| 3833 | path.lineTo(1, 1); |
| 3834 | path.lineTo(1,-1); |
| 3835 | path.close(); |
| 3836 | path.moveTo(0, 0); |
| 3837 | path.lineTo(1,-2); |
| 3838 | path.lineTo(1, 2); |
| 3839 | path.lineTo(2, 0); |
| 3840 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3841 | testSimplify(reporter, path, filename); |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3842 | } |
| 3843 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3844 | static void testRect1(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3845 | SkPath path; |
| 3846 | path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); |
| 3847 | path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction); |
| 3848 | path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 3849 | path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3850 | testSimplify(reporter, path, filename); |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3851 | } |
| 3852 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3853 | static void testRect2(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3854 | SkPath path; |
| 3855 | path.setFillType(SkPath::kWinding_FillType); |
| 3856 | path.moveTo(0, 0); |
| 3857 | path.lineTo(60, 0); |
| 3858 | path.lineTo(60, 60); |
| 3859 | path.lineTo(0, 60); |
| 3860 | path.close(); |
| 3861 | path.moveTo(30, 20); |
| 3862 | path.lineTo(30, 50); |
| 3863 | path.lineTo(50, 50); |
| 3864 | path.lineTo(50, 20); |
| 3865 | path.close(); |
| 3866 | path.moveTo(24, 20); |
| 3867 | path.lineTo(24, 30); |
| 3868 | path.lineTo(36, 30); |
| 3869 | path.lineTo(36, 20); |
| 3870 | path.close(); |
| 3871 | path.moveTo(32, 24); |
| 3872 | path.lineTo(32, 41); |
| 3873 | path.lineTo(36, 41); |
| 3874 | path.lineTo(36, 24); |
| 3875 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3876 | testSimplify(reporter, path, filename); |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3877 | } |
| 3878 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3879 | static void testTriangles3x(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3880 | SkPath path; |
| 3881 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3882 | path.moveTo(1, 0); |
| 3883 | path.quadTo(0, 1, 3, 2); |
| 3884 | path.lineTo(1, 3); |
| 3885 | path.close(); |
| 3886 | path.moveTo(0, 0); |
| 3887 | path.lineTo(1, 1); |
| 3888 | path.quadTo(2, 1, 0, 2); |
| 3889 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3890 | testSimplify(reporter, path, filename); |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3891 | } |
| 3892 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3893 | static void testQuad8(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3894 | SkPath path; |
| 3895 | path.moveTo(3, 0); |
| 3896 | path.quadTo(0, 1, 3, 2); |
| 3897 | path.lineTo(0, 3); |
| 3898 | path.close(); |
| 3899 | path.moveTo(1, 0); |
| 3900 | path.lineTo(3, 0); |
| 3901 | path.quadTo(1, 1, 2, 2); |
| 3902 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3903 | testSimplify(reporter, path, filename); |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 3904 | } |
| 3905 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3906 | static void testTriangles4x(skiatest::Reporter* reporter, const char* filename) { |
skia.committer@gmail.com | b0a0589 | 2013-10-03 07:01:37 +0000 | [diff] [blame] | 3907 | SkPath path; |
| 3908 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3909 | path.moveTo(0, 0); |
| 3910 | path.quadTo(2, 0, 0, 3); |
| 3911 | path.lineTo(2, 3); |
| 3912 | path.close(); |
| 3913 | path.moveTo(0, 0); |
| 3914 | path.lineTo(0, 1); |
| 3915 | path.quadTo(3, 2, 2, 3); |
| 3916 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3917 | testSimplify(reporter, path, filename); |
caryclark@google.com | 7eaa53d | 2013-10-02 14:49:34 +0000 | [diff] [blame] | 3918 | } |
| 3919 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3920 | static void testQuad9(skiatest::Reporter* reporter, const char* filename) { |
commit-bot@chromium.org | 866f4e3 | 2013-11-21 17:04:29 +0000 | [diff] [blame] | 3921 | SkPath path; |
| 3922 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3923 | path.moveTo(1, 0); |
| 3924 | path.quadTo(0, 1, 3, 2); |
| 3925 | path.lineTo(1, 3); |
| 3926 | path.close(); |
| 3927 | path.moveTo(1, 0); |
| 3928 | path.lineTo(1, 1); |
| 3929 | path.quadTo(2, 1, 1, 3); |
| 3930 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3931 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 866f4e3 | 2013-11-21 17:04:29 +0000 | [diff] [blame] | 3932 | } |
| 3933 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3934 | static void testQuad10(skiatest::Reporter* reporter, const char* filename) { |
commit-bot@chromium.org | 866f4e3 | 2013-11-21 17:04:29 +0000 | [diff] [blame] | 3935 | SkPath path; |
| 3936 | path.moveTo(1, 0); |
| 3937 | path.quadTo(0, 1, 3, 2); |
| 3938 | path.lineTo(3, 3); |
| 3939 | path.close(); |
| 3940 | path.moveTo(1, 0); |
| 3941 | path.lineTo(2, 0); |
| 3942 | path.quadTo(2, 3, 3, 3); |
| 3943 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3944 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 866f4e3 | 2013-11-21 17:04:29 +0000 | [diff] [blame] | 3945 | } |
| 3946 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3947 | static void testQuad11(skiatest::Reporter* reporter, const char* filename) { |
caryclark@google.com | 28d219c | 2013-11-25 13:39:12 +0000 | [diff] [blame] | 3948 | SkPath path; |
skia.committer@gmail.com | ec18ce7 | 2013-11-26 07:02:21 +0000 | [diff] [blame] | 3949 | path.moveTo(2, 0); |
| 3950 | path.quadTo(0, 1, 1, 2); |
| 3951 | path.lineTo(1, 2); |
| 3952 | path.close(); |
| 3953 | path.moveTo(0, 0); |
| 3954 | path.lineTo(1, 1); |
| 3955 | path.quadTo(1, 3, 3, 3); |
| 3956 | path.close(); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3957 | testSimplify(reporter, path, filename); |
skia.committer@gmail.com | ec18ce7 | 2013-11-26 07:02:21 +0000 | [diff] [blame] | 3958 | } |
caryclark@google.com | 28d219c | 2013-11-25 13:39:12 +0000 | [diff] [blame] | 3959 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 3960 | static void testQuad12(skiatest::Reporter* reporter, const char* filename) { |
| 3961 | SkPath path; |
| 3962 | path.moveTo(0, 0); |
| 3963 | path.quadTo(0, 0, 0, 0); |
| 3964 | path.lineTo(0, 1); |
| 3965 | path.close(); |
| 3966 | path.moveTo(0, 0); |
| 3967 | path.lineTo(0, 0); |
| 3968 | path.quadTo(1, 0, 0, 1); |
| 3969 | path.close(); |
| 3970 | testSimplify(reporter, path, filename); |
| 3971 | } |
| 3972 | |
| 3973 | static void testQuadralateral3(skiatest::Reporter* reporter, const char* filename) { |
| 3974 | SkPath path; |
| 3975 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 3976 | path.moveTo(0, 0); |
| 3977 | path.lineTo(0, 0); |
| 3978 | path.lineTo(0, 0); |
| 3979 | path.lineTo(1, 0); |
| 3980 | path.close(); |
| 3981 | path.moveTo(0, 0); |
| 3982 | path.lineTo(0, 0); |
| 3983 | path.lineTo(1, 0); |
| 3984 | path.lineTo(0, 1); |
| 3985 | path.close(); |
| 3986 | testSimplify(reporter, path, filename); |
| 3987 | } |
| 3988 | |
| 3989 | |
| 3990 | static void testDegenerate5(skiatest::Reporter* reporter, const char* filename) { |
| 3991 | SkPath path; |
| 3992 | path.moveTo(0, 0); |
| 3993 | path.lineTo(0, 0); |
| 3994 | path.lineTo(1, 0); |
| 3995 | path.close(); |
| 3996 | path.moveTo(0, 0); |
| 3997 | path.lineTo(1, 0); |
| 3998 | path.lineTo(0, 1); |
| 3999 | path.close(); |
| 4000 | testSimplify(reporter, path, filename); |
| 4001 | } |
| 4002 | |
| 4003 | static void testQuadralateral4(skiatest::Reporter* reporter, const char* filename) { |
| 4004 | SkPath path; |
| 4005 | path.moveTo(0, 0); |
| 4006 | path.lineTo(0, 0); |
| 4007 | path.lineTo(0, 0); |
| 4008 | path.lineTo(3, 1); |
| 4009 | path.close(); |
| 4010 | path.moveTo(0, 0); |
| 4011 | path.lineTo(0, 0); |
| 4012 | path.lineTo(0, 1); |
| 4013 | path.lineTo(3, 1); |
| 4014 | path.close(); |
| 4015 | testSimplify(reporter, path, filename); |
| 4016 | } |
| 4017 | |
| 4018 | static void testDegenerates1(skiatest::Reporter* reporter, const char* filename) { |
| 4019 | SkPath path; |
| 4020 | path.moveTo(0, 0); |
| 4021 | path.quadTo(0, 0, 1, 1); |
| 4022 | path.lineTo(2, 3); |
| 4023 | path.close(); |
| 4024 | path.moveTo(0, 0); |
| 4025 | path.lineTo(0, 0); |
| 4026 | path.quadTo(3, 2, 2, 3); |
| 4027 | path.close(); |
| 4028 | testSimplify(reporter, path, filename); |
| 4029 | } |
| 4030 | |
| 4031 | static void testQuad13(skiatest::Reporter* reporter, const char* filename) { |
| 4032 | SkPath path; |
| 4033 | path.moveTo(0, 0); |
| 4034 | path.quadTo(0, 0, 1, 1); |
| 4035 | path.lineTo(2, 3); |
| 4036 | path.close(); |
| 4037 | path.moveTo(0, 0); |
| 4038 | path.lineTo(0, 0); |
| 4039 | path.quadTo(3, 2, 2, 3); |
| 4040 | path.close(); |
| 4041 | testSimplify(reporter, path, filename); |
| 4042 | } |
| 4043 | |
| 4044 | static void testQuad14(skiatest::Reporter* reporter, const char* filename) { |
| 4045 | SkPath path; |
| 4046 | path.setFillType(SkPath::kWinding_FillType); |
| 4047 | path.moveTo(0, 0); |
| 4048 | path.quadTo(0, 0, 1, 1); |
| 4049 | path.lineTo(1, 2); |
| 4050 | path.close(); |
| 4051 | path.moveTo(0, 0); |
| 4052 | path.lineTo(0, 0); |
| 4053 | path.quadTo(3, 1, 1, 3); |
| 4054 | path.close(); |
| 4055 | testSimplify(reporter, path, filename); |
| 4056 | } |
| 4057 | |
| 4058 | static void testQuad15(skiatest::Reporter* reporter, const char* filename) { |
| 4059 | SkPath path; |
| 4060 | path.moveTo(0, 0); |
| 4061 | path.quadTo(0, 0, 1, 1); |
| 4062 | path.lineTo(1, 3); |
| 4063 | path.close(); |
| 4064 | path.moveTo(0, 0); |
| 4065 | path.lineTo(0, 0); |
| 4066 | path.quadTo(2, 0, 1, 3); |
| 4067 | path.close(); |
| 4068 | testSimplify(reporter, path, filename); |
| 4069 | } |
| 4070 | |
| 4071 | static void testQuads16(skiatest::Reporter* reporter, const char* filename) { |
| 4072 | SkPath path; |
| 4073 | path.moveTo(0, 0); |
| 4074 | path.quadTo(0, 0, 1, 1); |
| 4075 | path.lineTo(3, 2); |
| 4076 | path.close(); |
| 4077 | path.moveTo(0, 0); |
| 4078 | path.lineTo(0, 0); |
| 4079 | path.quadTo(0, 1, 3, 2); |
| 4080 | path.close(); |
| 4081 | testSimplify(reporter, path, filename); |
| 4082 | } |
| 4083 | |
| 4084 | static void testQuads17(skiatest::Reporter* reporter, const char* filename) { |
| 4085 | SkPath path; |
| 4086 | path.moveTo(0, 0); |
| 4087 | path.quadTo(0, 0, 1, 1); |
| 4088 | path.lineTo(3, 2); |
| 4089 | path.close(); |
| 4090 | path.moveTo(0, 0); |
| 4091 | path.lineTo(0, 0); |
| 4092 | path.quadTo(0, 2, 3, 2); |
| 4093 | path.close(); |
| 4094 | testSimplify(reporter, path, filename); |
| 4095 | } |
| 4096 | |
| 4097 | static void testQuads18(skiatest::Reporter* reporter, const char* filename) { |
| 4098 | SkPath path; |
| 4099 | path.moveTo(0, 0); |
| 4100 | path.quadTo(0, 0, 1, 1); |
| 4101 | path.lineTo(3, 2); |
| 4102 | path.close(); |
| 4103 | path.moveTo(0, 0); |
| 4104 | path.lineTo(0, 0); |
| 4105 | path.quadTo(1, 2, 3, 2); |
| 4106 | path.close(); |
| 4107 | testSimplify(reporter, path, filename); |
| 4108 | } |
| 4109 | |
| 4110 | static void testQuads19(skiatest::Reporter* reporter, const char* filename) { |
| 4111 | SkPath path; |
| 4112 | path.moveTo(0, 0); |
| 4113 | path.quadTo(0, 0, 2, 1); |
| 4114 | path.lineTo(1, 2); |
| 4115 | path.close(); |
| 4116 | path.moveTo(0, 0); |
| 4117 | path.lineTo(0, 0); |
| 4118 | path.quadTo(2, 1, 1, 2); |
| 4119 | path.close(); |
| 4120 | testSimplify(reporter, path, filename); |
| 4121 | } |
| 4122 | |
| 4123 | static void testQuads20(skiatest::Reporter* reporter, const char* filename) { |
| 4124 | SkPath path; |
| 4125 | path.moveTo(0, 0); |
| 4126 | path.quadTo(0, 0, 2, 1); |
| 4127 | path.lineTo(1, 3); |
| 4128 | path.close(); |
| 4129 | path.moveTo(0, 0); |
| 4130 | path.lineTo(0, 0); |
| 4131 | path.quadTo(2, 1, 1, 3); |
| 4132 | path.close(); |
| 4133 | testSimplify(reporter, path, filename); |
| 4134 | } |
| 4135 | |
| 4136 | static void testQuads21(skiatest::Reporter* reporter, const char* filename) { |
| 4137 | SkPath path; |
| 4138 | path.moveTo(0, 0); |
| 4139 | path.quadTo(0, 0, 1, 1); |
| 4140 | path.lineTo(2, 1); |
| 4141 | path.close(); |
| 4142 | path.moveTo(0, 0); |
| 4143 | path.lineTo(0, 0); |
| 4144 | path.quadTo(3, 0, 2, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4145 | path.close(); |
| 4146 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4147 | } |
| 4148 | |
| 4149 | static void testQuads22(skiatest::Reporter* reporter, const char* filename) { |
| 4150 | SkPath path; |
| 4151 | path.moveTo(0, 0); |
| 4152 | path.quadTo(0, 0, 2, 0); |
| 4153 | path.lineTo(1, 1); |
| 4154 | path.close(); |
| 4155 | path.moveTo(0, 0); |
| 4156 | path.lineTo(0, 0); |
| 4157 | path.quadTo(0, 1, 3, 2); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4158 | path.close(); |
| 4159 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4160 | } |
| 4161 | |
| 4162 | static void testQuads23(skiatest::Reporter* reporter, const char* filename) { |
| 4163 | SkPath path; |
| 4164 | path.moveTo(0, 0); |
| 4165 | path.quadTo(0, 0, 1, 0); |
| 4166 | path.lineTo(1, 1); |
| 4167 | path.close(); |
| 4168 | path.moveTo(0, 0); |
| 4169 | path.lineTo(0, 0); |
| 4170 | path.quadTo(0, 1, 3, 2); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4171 | path.close(); |
| 4172 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4173 | } |
| 4174 | |
| 4175 | static void testQuads24(skiatest::Reporter* reporter, const char* filename) { |
| 4176 | SkPath path; |
| 4177 | path.moveTo(0, 0); |
| 4178 | path.quadTo(0, 0, 0, 1); |
| 4179 | path.lineTo(1, 2); |
| 4180 | path.close(); |
| 4181 | path.moveTo(0, 1); |
| 4182 | path.lineTo(0, 1); |
| 4183 | path.quadTo(0, 2, 3, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4184 | path.close(); |
| 4185 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4186 | } |
| 4187 | |
| 4188 | static void testQuads25(skiatest::Reporter* reporter, const char* filename) { |
| 4189 | SkPath path; |
| 4190 | path.moveTo(0, 0); |
| 4191 | path.quadTo(0, 0, 0, 1); |
| 4192 | path.lineTo(2, 1); |
| 4193 | path.close(); |
| 4194 | path.moveTo(0, 0); |
| 4195 | path.lineTo(0, 0); |
| 4196 | path.quadTo(3, 0, 2, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4197 | path.close(); |
| 4198 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4199 | } |
| 4200 | |
| 4201 | static void testQuads26(skiatest::Reporter* reporter, const char* filename) { |
| 4202 | SkPath path; |
| 4203 | path.moveTo(0, 0); |
| 4204 | path.quadTo(0, 0, 3, 0); |
| 4205 | path.lineTo(1, 1); |
| 4206 | path.close(); |
| 4207 | path.moveTo(0, 0); |
| 4208 | path.lineTo(0, 0); |
| 4209 | path.quadTo(0, 1, 3, 2); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4210 | path.close(); |
| 4211 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4212 | } |
| 4213 | |
| 4214 | static void testQuads27(skiatest::Reporter* reporter, const char* filename) { |
| 4215 | SkPath path; |
| 4216 | path.moveTo(0, 0); |
| 4217 | path.quadTo(0, 0, 2, 0); |
| 4218 | path.lineTo(2, 1); |
| 4219 | path.close(); |
| 4220 | path.moveTo(2, 0); |
| 4221 | path.lineTo(2, 0); |
| 4222 | path.quadTo(3, 0, 1, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4223 | path.close(); |
| 4224 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4225 | } |
| 4226 | |
| 4227 | static void testQuads28(skiatest::Reporter* reporter, const char* filename) { |
| 4228 | SkPath path; |
| 4229 | path.moveTo(0, 0); |
| 4230 | path.quadTo(0, 0, 0, 1); |
| 4231 | path.lineTo(2, 2); |
| 4232 | path.close(); |
| 4233 | path.moveTo(0, 0); |
| 4234 | path.lineTo(0, 0); |
| 4235 | path.quadTo(3, 0, 2, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4236 | path.close(); |
| 4237 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4238 | } |
| 4239 | |
| 4240 | static void testQuads29(skiatest::Reporter* reporter, const char* filename) { |
| 4241 | SkPath path; |
| 4242 | path.moveTo(0, 0); |
| 4243 | path.quadTo(0, 0, 3, 0); |
| 4244 | path.lineTo(2, 1); |
| 4245 | path.close(); |
| 4246 | path.moveTo(3, 0); |
| 4247 | path.lineTo(3, 0); |
| 4248 | path.quadTo(3, 1, 0, 2); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4249 | path.close(); |
| 4250 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4251 | } |
| 4252 | |
| 4253 | static void testQuads30(skiatest::Reporter* reporter, const char* filename) { |
| 4254 | SkPath path; |
| 4255 | path.moveTo(0, 0); |
| 4256 | |
| 4257 | path.quadTo(0, 0, 2, 0); |
| 4258 | path.lineTo(2, 2); |
| 4259 | path.close(); |
| 4260 | path.moveTo(2, 0); |
| 4261 | path.lineTo(2, 0); |
| 4262 | path.quadTo(3, 2, 1, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4263 | path.close(); |
| 4264 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4265 | } |
| 4266 | |
| 4267 | static void testQuads31(skiatest::Reporter* reporter, const char* filename) { |
| 4268 | SkPath path; |
| 4269 | path.moveTo(0, 0); |
| 4270 | path.quadTo(0, 0, 2, 1); |
| 4271 | path.lineTo(1, 3); |
| 4272 | path.close(); |
| 4273 | path.moveTo(3, 0); |
| 4274 | path.lineTo(0, 1); |
| 4275 | |
| 4276 | path.quadTo(2, 1, 1, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4277 | path.close(); |
| 4278 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4279 | } |
| 4280 | |
| 4281 | static void testQuads32(skiatest::Reporter* reporter, const char* filename) { |
| 4282 | SkPath path; |
| 4283 | path.moveTo(0, 0); |
| 4284 | path.quadTo(0, 0, 1, 1); |
| 4285 | path.lineTo(1, 2); |
| 4286 | path.close(); |
| 4287 | path.moveTo(1, 1); |
| 4288 | path.lineTo(1, 1); |
| 4289 | path.quadTo(3, 1, 0, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4290 | path.close(); |
| 4291 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4292 | } |
| 4293 | |
| 4294 | static void testQuads33(skiatest::Reporter* reporter, const char* filename) { |
| 4295 | SkPath path; |
| 4296 | path.moveTo(0, 0); |
| 4297 | path.quadTo(0, 0, 1, 1); |
| 4298 | path.lineTo(2, 1); |
| 4299 | path.close(); |
| 4300 | path.moveTo(0, 0); |
| 4301 | path.lineTo(0, 0); |
| 4302 | path.quadTo(3, 0, 2, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4303 | path.close(); |
| 4304 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4305 | } |
| 4306 | |
| 4307 | static void testQuads34(skiatest::Reporter* reporter, const char* filename) { |
| 4308 | SkPath path; |
| 4309 | path.moveTo(0, 0); |
| 4310 | path.quadTo(0, 0, 1, 0); |
| 4311 | path.lineTo(2, 1); |
| 4312 | path.close(); |
| 4313 | path.moveTo(1, 0); |
| 4314 | path.lineTo(1, 0); |
| 4315 | path.quadTo(2, 0, 3, 3); |
skia.committer@gmail.com | a1ed7ae | 2014-04-15 03:04:18 +0000 | [diff] [blame] | 4316 | path.close(); |
| 4317 | testSimplify(reporter, path, filename); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4318 | } |
| 4319 | |
| 4320 | static void testQuads35(skiatest::Reporter* reporter, const char* filename) { |
| 4321 | SkPath path; |
| 4322 | path.moveTo(0, 0); |
| 4323 | path.quadTo(0, 0, 1, 0); |
| 4324 | path.lineTo(1, 2); |
| 4325 | path.close(); |
| 4326 | path.moveTo(1, 0); |
| 4327 | path.lineTo(1, 0); |
| 4328 | path.quadTo(3, 1, 0, 3); |
| 4329 | path.close(); |
| 4330 | testSimplify(reporter, path, filename); |
| 4331 | } |
| 4332 | |
| 4333 | static void testQuads36(skiatest::Reporter* reporter, const char* filename) { |
| 4334 | SkPath path; |
| 4335 | path.moveTo(1, 0); |
| 4336 | path.quadTo(2, 0, 1, 2); |
| 4337 | path.lineTo(2, 2); |
| 4338 | path.close(); |
| 4339 | path.moveTo(1, 0); |
| 4340 | path.lineTo(1, 0); |
| 4341 | path.quadTo(3, 0, 2, 3); |
| 4342 | path.close(); |
| 4343 | testSimplify(reporter, path, filename); |
| 4344 | } |
| 4345 | |
| 4346 | static void testQuads37(skiatest::Reporter* reporter, const char* filename) { |
| 4347 | SkPath path; |
| 4348 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 4349 | path.moveTo(1, 0); |
| 4350 | path.quadTo(2, 0, 1, 2); |
| 4351 | path.lineTo(2, 2); |
| 4352 | path.close(); |
| 4353 | path.moveTo(1, 0); |
| 4354 | path.lineTo(1, 0); |
| 4355 | path.quadTo(3, 0, 2, 3); |
| 4356 | path.close(); |
| 4357 | testSimplify(reporter, path, filename); |
| 4358 | } |
| 4359 | |
| 4360 | static void testQuads38(skiatest::Reporter* reporter, const char* filename) { |
| 4361 | SkPath path; |
| 4362 | path.moveTo(1, 0); |
| 4363 | path.quadTo(3, 0, 0, 2); |
| 4364 | path.lineTo(3, 2); |
| 4365 | path.close(); |
| 4366 | path.moveTo(1, 0); |
| 4367 | path.lineTo(1, 0); |
| 4368 | path.quadTo(2, 1, 3, 1); |
| 4369 | path.close(); |
| 4370 | testSimplify(reporter, path, filename); |
| 4371 | } |
| 4372 | |
| 4373 | static void testQuads39(skiatest::Reporter* reporter, const char* filename) { |
| 4374 | SkPath path; |
| 4375 | path.moveTo(1, 0); |
| 4376 | path.quadTo(3, 0, 0, 3); |
| 4377 | path.lineTo(0, 3); |
| 4378 | path.close(); |
| 4379 | path.moveTo(1, 1); |
| 4380 | path.lineTo(0, 2); |
| 4381 | path.quadTo(1, 2, 0, 3); |
| 4382 | path.close(); |
| 4383 | testSimplify(reporter, path, filename); |
| 4384 | } |
| 4385 | static void testQuads40(skiatest::Reporter* reporter, const char* filename) { |
| 4386 | SkPath path; |
| 4387 | path.moveTo(1, 0); |
| 4388 | path.quadTo(3, 0, 3, 3); |
| 4389 | path.lineTo(3, 3); |
| 4390 | path.close(); |
| 4391 | path.moveTo(2, 1); |
| 4392 | path.lineTo(2, 2); |
| 4393 | path.quadTo(3, 2, 3, 3); |
| 4394 | path.close(); |
| 4395 | testSimplify(reporter, path, filename); |
| 4396 | } |
| 4397 | |
| 4398 | static void testQuads41(skiatest::Reporter* reporter, const char* filename) { |
| 4399 | SkPath path; |
| 4400 | path.moveTo(0, 0); |
| 4401 | path.quadTo(0, 0, 1, 0); |
| 4402 | path.lineTo(2, 1); |
| 4403 | path.close(); |
| 4404 | path.moveTo(0, 0); |
| 4405 | path.lineTo(0, 0); |
| 4406 | path.quadTo(0, 1, 1, 2); |
| 4407 | path.close(); |
| 4408 | testSimplify(reporter, path, filename); |
| 4409 | } |
| 4410 | |
| 4411 | |
| 4412 | static void testQuads54(skiatest::Reporter* reporter, const char* filename) { |
| 4413 | SkPath path; |
| 4414 | path.moveTo(1, 0); |
| 4415 | path.quadTo(2, 0, 1, 1); |
| 4416 | path.lineTo(3, 1); |
| 4417 | path.close(); |
| 4418 | path.moveTo(2, 0); |
| 4419 | path.lineTo(1, 1); |
| 4420 | path.quadTo(1, 1, 2, 3); |
| 4421 | path.close(); |
| 4422 | testSimplify(reporter, path, filename); |
| 4423 | } |
| 4424 | static void testQuads53(skiatest::Reporter* reporter, const char* filename) { |
| 4425 | SkPath path; |
| 4426 | path.moveTo(1, 0); |
| 4427 | path.quadTo(2, 0, 1, 1); |
| 4428 | path.lineTo(3, 1); |
| 4429 | path.close(); |
| 4430 | path.moveTo(2, 0); |
| 4431 | path.lineTo(1, 1); |
| 4432 | path.quadTo(2, 3, 2, 3); |
| 4433 | path.close(); |
| 4434 | testSimplify(reporter, path, filename); |
| 4435 | } |
| 4436 | static void testQuads52(skiatest::Reporter* reporter, const char* filename) { |
| 4437 | SkPath path; |
| 4438 | path.moveTo(1, 0); |
| 4439 | path.quadTo(2, 0, 1, 1); |
| 4440 | path.lineTo(3, 1); |
| 4441 | path.close(); |
| 4442 | path.moveTo(2, 0); |
| 4443 | path.lineTo(1, 1); |
| 4444 | path.quadTo(2, 3, 3, 3); |
| 4445 | path.close(); |
| 4446 | testSimplify(reporter, path, filename); |
| 4447 | } |
| 4448 | static void testQuads51(skiatest::Reporter* reporter, const char* filename) { |
| 4449 | SkPath path; |
| 4450 | path.moveTo(2, 0); |
| 4451 | path.quadTo(3, 0, 2, 1); |
| 4452 | path.lineTo(3, 2); |
| 4453 | path.close(); |
| 4454 | path.moveTo(3, 0); |
| 4455 | path.lineTo(3, 1); |
| 4456 | path.quadTo(3, 1, 1, 2); |
| 4457 | path.close(); |
| 4458 | testSimplify(reporter, path, filename); |
| 4459 | } |
| 4460 | static void testQuads50(skiatest::Reporter* reporter, const char* filename) { |
| 4461 | SkPath path; |
| 4462 | path.moveTo(2, 0); |
| 4463 | path.quadTo(3, 0, 2, 1); |
| 4464 | path.lineTo(3, 2); |
| 4465 | path.close(); |
| 4466 | path.moveTo(3, 0); |
| 4467 | path.lineTo(3, 1); |
| 4468 | path.quadTo(1, 2, 1, 2); |
| 4469 | path.close(); |
| 4470 | testSimplify(reporter, path, filename); |
| 4471 | } |
| 4472 | static void testQuads49(skiatest::Reporter* reporter, const char* filename) { |
| 4473 | SkPath path; |
| 4474 | path.moveTo(2, 0); |
| 4475 | path.quadTo(3, 0, 2, 1); |
| 4476 | path.lineTo(3, 2); |
| 4477 | path.close(); |
| 4478 | path.moveTo(3, 0); |
| 4479 | path.lineTo(2, 2); |
| 4480 | path.quadTo(2, 2, 0, 3); |
| 4481 | path.close(); |
| 4482 | testSimplify(reporter, path, filename); |
| 4483 | } |
| 4484 | static void testQuads48(skiatest::Reporter* reporter, const char* filename) { |
| 4485 | SkPath path; |
| 4486 | path.moveTo(2, 0); |
| 4487 | path.quadTo(3, 0, 2, 1); |
| 4488 | path.lineTo(3, 2); |
| 4489 | path.close(); |
| 4490 | path.moveTo(3, 0); |
| 4491 | path.lineTo(2, 2); |
| 4492 | path.quadTo(3, 2, 0, 3); |
| 4493 | path.close(); |
| 4494 | testSimplify(reporter, path, filename); |
| 4495 | } |
| 4496 | static void testQuads47(skiatest::Reporter* reporter, const char* filename) { |
| 4497 | SkPath path; |
| 4498 | path.moveTo(2, 0); |
| 4499 | path.quadTo(3, 0, 2, 1); |
| 4500 | path.lineTo(3, 2); |
| 4501 | path.close(); |
| 4502 | path.moveTo(3, 0); |
| 4503 | path.lineTo(2, 2); |
| 4504 | path.quadTo(0, 3, 0, 3); |
| 4505 | path.close(); |
| 4506 | testSimplify(reporter, path, filename); |
| 4507 | } |
| 4508 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 4509 | static void testQuads46x(skiatest::Reporter* reporter, const char* filename) { |
| 4510 | SkPath path; |
| 4511 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 4512 | path.moveTo(2, 0); |
| 4513 | path.quadTo(0, 1, 3, 2); |
| 4514 | path.lineTo(1, 3); |
| 4515 | path.close(); |
| 4516 | path.moveTo(0, 0); |
| 4517 | path.lineTo(1, 1); |
| 4518 | path.quadTo(3, 2, 1, 3); |
| 4519 | path.close(); |
| 4520 | testSimplify(reporter, path, filename); |
| 4521 | } |
| 4522 | |
| 4523 | static void testQuads45(skiatest::Reporter* reporter, const char* filename) { |
| 4524 | SkPath path; |
| 4525 | path.moveTo(2, 0); |
| 4526 | path.quadTo(3, 2, 3, 3); |
| 4527 | path.lineTo(3, 3); |
| 4528 | path.close(); |
| 4529 | path.moveTo(0, 0); |
| 4530 | path.lineTo(0, 2); |
| 4531 | path.quadTo(3, 2, 3, 3); |
| 4532 | path.close(); |
| 4533 | testSimplify(reporter, path, filename); |
| 4534 | } |
| 4535 | |
| 4536 | static void testQuads44(skiatest::Reporter* reporter, const char* filename) { |
| 4537 | SkPath path; |
| 4538 | path.moveTo(2, 0); |
| 4539 | path.quadTo(3, 2, 3, 3); |
| 4540 | path.lineTo(3, 3); |
| 4541 | path.close(); |
| 4542 | path.moveTo(1, 0); |
| 4543 | path.lineTo(0, 2); |
| 4544 | path.quadTo(3, 2, 3, 3); |
| 4545 | path.close(); |
| 4546 | testSimplify(reporter, path, filename); |
| 4547 | } |
| 4548 | |
| 4549 | static void testQuads43(skiatest::Reporter* reporter, const char* filename) { |
| 4550 | SkPath path; |
| 4551 | path.moveTo(2, 0); |
| 4552 | path.quadTo(2, 3, 3, 3); |
| 4553 | path.lineTo(3, 3); |
| 4554 | path.close(); |
| 4555 | path.moveTo(0, 2); |
| 4556 | path.lineTo(0, 2); |
| 4557 | path.quadTo(2, 3, 3, 3); |
| 4558 | path.close(); |
| 4559 | testSimplify(reporter, path, filename); |
| 4560 | } |
| 4561 | |
| 4562 | static void testQuads42(skiatest::Reporter* reporter, const char* filename) { |
| 4563 | SkPath path; |
| 4564 | path.moveTo(2, 0); |
| 4565 | path.quadTo(3, 2, 3, 3); |
| 4566 | path.lineTo(3, 3); |
| 4567 | path.close(); |
| 4568 | path.moveTo(2, 0); |
| 4569 | path.lineTo(0, 2); |
| 4570 | path.quadTo(3, 2, 3, 3); |
| 4571 | path.close(); |
| 4572 | testSimplify(reporter, path, filename); |
| 4573 | } |
| 4574 | |
| 4575 | static void testQuads56(skiatest::Reporter* reporter, const char* filename) { |
| 4576 | SkPath path; |
| 4577 | path.moveTo(2, 0); |
| 4578 | path.quadTo(3, 1, 0, 2); |
| 4579 | path.lineTo(3, 2); |
| 4580 | path.close(); |
| 4581 | path.moveTo(3, 0); |
| 4582 | path.lineTo(2, 1); |
| 4583 | path.quadTo(2, 1, 3, 3); |
| 4584 | path.close(); |
| 4585 | testSimplify(reporter, path, filename); |
| 4586 | } |
| 4587 | |
| 4588 | static void testQuads57(skiatest::Reporter* reporter, const char* filename) { |
| 4589 | SkPath path; |
| 4590 | path.moveTo(1, 0); |
| 4591 | path.quadTo(3, 0, 3, 1); |
| 4592 | path.lineTo(2, 2); |
| 4593 | path.close(); |
| 4594 | path.moveTo(2, 0); |
| 4595 | path.lineTo(3, 1); |
| 4596 | path.quadTo(2, 2, 3, 2); |
| 4597 | path.close(); |
| 4598 | testSimplify(reporter, path, filename); |
| 4599 | } |
| 4600 | |
| 4601 | static void testQuads58(skiatest::Reporter* reporter, const char* filename) { |
| 4602 | SkPath path; |
| 4603 | path.moveTo(1, 0); |
| 4604 | path.quadTo(3, 0, 3, 1); |
| 4605 | path.lineTo(1, 3); |
| 4606 | path.close(); |
| 4607 | path.moveTo(2, 0); |
| 4608 | path.lineTo(3, 1); |
| 4609 | path.quadTo(2, 2, 3, 2); |
| 4610 | path.close(); |
| 4611 | testSimplify(reporter, path, filename); |
| 4612 | } |
| 4613 | |
| 4614 | static void testQuads59(skiatest::Reporter* reporter, const char* filename) { |
| 4615 | SkPath path; |
| 4616 | path.moveTo(3, 0); |
| 4617 | path.quadTo(3, 1, 3, 1); |
| 4618 | path.lineTo(2, 2); |
| 4619 | path.close(); |
| 4620 | path.moveTo(2, 0); |
| 4621 | path.lineTo(3, 1); |
| 4622 | path.quadTo(2, 2, 3, 2); |
| 4623 | path.close(); |
| 4624 | testSimplify(reporter, path, filename); |
| 4625 | } |
| 4626 | |
| 4627 | static void testQuads60(skiatest::Reporter* reporter, const char* filename) { |
| 4628 | SkPath path; |
| 4629 | path.moveTo(2, 1); |
| 4630 | path.quadTo(0, 2, 3, 2); |
| 4631 | path.lineTo(2, 3); |
| 4632 | path.close(); |
| 4633 | path.moveTo(0, 0); |
| 4634 | path.lineTo(2, 0); |
| 4635 | path.quadTo(1, 1, 2, 2); |
| 4636 | path.close(); |
| 4637 | testSimplify(reporter, path, filename); |
| 4638 | } |
| 4639 | |
| 4640 | static void testQuads61(skiatest::Reporter* reporter, const char* filename) { |
| 4641 | SkPath path; |
| 4642 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 4643 | path.moveTo(0, 0); |
| 4644 | path.quadTo(0, 0, 2, 0); |
| 4645 | path.lineTo(1, 1); |
| 4646 | path.close(); |
| 4647 | path.moveTo(0, 0); |
| 4648 | path.lineTo(0, 0); |
| 4649 | path.quadTo(1, 0, 2, 2); |
| 4650 | path.close(); |
| 4651 | testSimplify(reporter, path, filename); |
| 4652 | } |
| 4653 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4654 | static void testQuadralateral10(skiatest::Reporter* reporter, const char* filename) { |
| 4655 | SkPath path; |
| 4656 | path.setFillType(SkPath::kWinding_FillType); |
| 4657 | path.moveTo(0, 0); |
| 4658 | path.lineTo(0, 0); |
| 4659 | path.lineTo(0, 0); |
| 4660 | path.lineTo(2, 2); |
| 4661 | path.close(); |
| 4662 | path.moveTo(1, 0); |
| 4663 | path.lineTo(1, 1); |
| 4664 | path.lineTo(2, 2); |
| 4665 | path.lineTo(1, 3); |
| 4666 | path.close(); |
| 4667 | testSimplify(reporter, path, filename); |
| 4668 | } |
| 4669 | |
caryclark | 19eb3b2 | 2014-07-18 05:08:14 -0700 | [diff] [blame] | 4670 | static void testRect3(skiatest::Reporter* reporter, const char* filename) { |
| 4671 | SkPath path; |
| 4672 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 4673 | path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); |
| 4674 | path.addRect(10, 30, 40, 30, SkPath::kCCW_Direction); |
| 4675 | path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); |
| 4676 | path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
| 4677 | testSimplify(reporter, path, filename); |
| 4678 | } |
| 4679 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4680 | static void testRect4(skiatest::Reporter* reporter, const char* filename) { |
| 4681 | SkPath path; |
| 4682 | path.setFillType(SkPath::kEvenOdd_FillType); |
| 4683 | path.addRect(0, 0, 30, 60, SkPath::kCCW_Direction); |
| 4684 | path.addRect(10, 0, 40, 30, SkPath::kCCW_Direction); |
| 4685 | path.addRect(20, 0, 30, 40, SkPath::kCCW_Direction); |
| 4686 | path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); |
| 4687 | testSimplify(reporter, path, filename); |
| 4688 | } |
| 4689 | |
| 4690 | static void testQuads62(skiatest::Reporter* reporter, const char* filename) { |
| 4691 | SkPath path; |
| 4692 | path.moveTo(3, 2); |
| 4693 | path.quadTo(1, 3, 3, 3); |
| 4694 | path.lineTo(3, 3); |
| 4695 | path.close(); |
| 4696 | path.moveTo(0, 0); |
| 4697 | path.lineTo(2, 0); |
| 4698 | path.quadTo(1, 3, 3, 3); |
| 4699 | path.close(); |
| 4700 | testSimplify(reporter, path, filename); |
| 4701 | } |
| 4702 | |
| 4703 | static void testQuads63(skiatest::Reporter* reporter,const char* filename) { |
| 4704 | SkPath path; |
| 4705 | path.moveTo(3, 0); |
| 4706 | path.quadTo(0, 1, 1, 2); |
| 4707 | path.lineTo(3, 3); |
| 4708 | path.close(); |
| 4709 | path.moveTo(0, 0); |
| 4710 | path.lineTo(1, 1); |
| 4711 | path.quadTo(0, 2, 3, 3); |
| 4712 | path.close(); |
| 4713 | testSimplify(reporter, path, filename); |
| 4714 | } |
| 4715 | |
| 4716 | static void testQuads64(skiatest::Reporter* reporter,const char* filename) { |
| 4717 | SkPath path; |
| 4718 | path.moveTo(3, 0); |
| 4719 | path.quadTo(0, 1, 1, 2); |
| 4720 | path.lineTo(2, 2); |
| 4721 | path.close(); |
| 4722 | path.moveTo(1, 0); |
| 4723 | path.lineTo(1, 1); |
| 4724 | path.quadTo(0, 2, 3, 3); |
| 4725 | path.close(); |
| 4726 | testSimplify(reporter, path, filename); |
| 4727 | } |
| 4728 | |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4729 | static void testTriangle1(skiatest::Reporter* reporter,const char* filename) { |
| 4730 | SkPath path; |
| 4731 | path.moveTo(0, 0); |
| 4732 | path.lineTo(1, 0); |
| 4733 | path.lineTo(2, 3); |
| 4734 | path.close(); |
| 4735 | path.moveTo(0, 0); |
| 4736 | path.lineTo(1, 2); |
| 4737 | path.lineTo(1, 0); |
| 4738 | path.close(); |
| 4739 | testSimplify(reporter, path, filename); |
| 4740 | } |
| 4741 | |
| 4742 | static void testTriangle2(skiatest::Reporter* reporter,const char* filename) { |
| 4743 | SkPath path; |
| 4744 | path.moveTo(0, 0); |
| 4745 | path.lineTo(1, 0); |
| 4746 | path.lineTo(0, 1); |
| 4747 | path.close(); |
| 4748 | path.moveTo(2, 0); |
| 4749 | path.lineTo(0, 2); |
| 4750 | path.lineTo(2, 2); |
| 4751 | path.close(); |
| 4752 | testSimplify(reporter, path, filename); |
| 4753 | } |
| 4754 | |
caryclark | bca19f7 | 2015-05-13 08:23:48 -0700 | [diff] [blame] | 4755 | static void testArc(skiatest::Reporter* reporter,const char* filename) { |
| 4756 | SkRect r = SkRect::MakeWH(150, 100); |
| 4757 | SkPath path; |
| 4758 | path.arcTo(r, 0, 0.0025f, false); |
| 4759 | testSimplify(reporter, path, filename); |
| 4760 | } |
| 4761 | |
caryclark | fba9da7 | 2015-05-14 14:18:13 -0700 | [diff] [blame] | 4762 | static void testIssue3838(skiatest::Reporter* reporter,const char* filename) { |
| 4763 | SkPath path; |
| 4764 | path.moveTo(220, 170); |
| 4765 | path.lineTo(200, 170); |
| 4766 | path.lineTo(200, 190); |
| 4767 | path.lineTo(180, 190); |
| 4768 | path.lineTo(180, 210); |
| 4769 | path.lineTo(200, 210); |
| 4770 | path.lineTo(200, 250); |
| 4771 | path.lineTo(260, 250); |
| 4772 | path.lineTo(260, 190); |
| 4773 | path.lineTo(220, 190); |
| 4774 | path.lineTo(220, 170); |
| 4775 | path.close(); |
| 4776 | path.moveTo(220, 210); |
| 4777 | path.lineTo(220, 230); |
| 4778 | path.lineTo(240, 230); |
| 4779 | path.lineTo(240, 210); |
| 4780 | path.lineTo(220, 210); |
| 4781 | path.close(); |
| 4782 | testSimplify(reporter, path, filename); |
| 4783 | } |
| 4784 | |
caryclark | 4e1a4c9 | 2015-05-18 12:56:57 -0700 | [diff] [blame] | 4785 | static void testIssue3838_3(skiatest::Reporter* reporter,const char* filename) { |
| 4786 | SkPath path; |
| 4787 | path.moveTo(40, 10); |
| 4788 | path.lineTo(60, 10); |
| 4789 | path.lineTo(60, 30); |
| 4790 | path.lineTo(40, 30); |
| 4791 | path.lineTo(40, 10); |
| 4792 | path.moveTo(41, 11); |
| 4793 | path.lineTo(41, 29); |
| 4794 | path.lineTo(59, 29); |
| 4795 | path.lineTo(59, 11); |
| 4796 | path.lineTo(41, 11); |
| 4797 | testSimplify(reporter, path, filename); |
| 4798 | } |
| 4799 | |
caryclark | 27c8eb8 | 2015-07-06 11:38:33 -0700 | [diff] [blame] | 4800 | static void testQuads65(skiatest::Reporter* reporter,const char* filename) { |
| 4801 | SkPath path; |
| 4802 | path.moveTo(1, 2); |
| 4803 | path.quadTo(3, 2, 0, 3); |
| 4804 | path.lineTo(1, 3); |
| 4805 | path.close(); |
| 4806 | path.moveTo(1, 0); |
| 4807 | path.lineTo(1, 2); |
| 4808 | path.quadTo(3, 2, 1, 3); |
| 4809 | path.close(); |
| 4810 | testSimplify(reporter, path, filename); |
| 4811 | } |
| 4812 | |
caryclark | d434972 | 2015-07-23 12:40:22 -0700 | [diff] [blame] | 4813 | static void fuzz864a(skiatest::Reporter* reporter,const char* filename) { |
| 4814 | SkPath path; |
| 4815 | path.moveTo(10, 90); |
| 4816 | path.lineTo(10, 90); |
| 4817 | path.lineTo(10, 30); |
| 4818 | path.lineTo(10, 30); |
| 4819 | path.lineTo(10, 90); |
| 4820 | path.close(); |
| 4821 | path.moveTo(10, 90); |
| 4822 | path.lineTo(10, 90); |
| 4823 | path.lineTo(10, 30); |
| 4824 | path.lineTo(10, 30); |
| 4825 | path.lineTo(10, 90); |
| 4826 | path.close(); |
| 4827 | path.moveTo(10, 90); |
| 4828 | path.lineTo(110, 90); |
| 4829 | path.lineTo(110, 30); |
| 4830 | path.lineTo(10, 30); |
| 4831 | path.lineTo(10, 90); |
| 4832 | path.close(); |
| 4833 | path.moveTo(10, 30); |
| 4834 | path.lineTo(32678, 30); |
| 4835 | path.lineTo(32678, 30); |
| 4836 | path.lineTo(10, 30); |
| 4837 | path.close(); |
| 4838 | path.moveTo(10, 3.35545e+07f); |
| 4839 | path.lineTo(110, 3.35545e+07f); |
| 4840 | path.lineTo(110, 30); |
| 4841 | path.lineTo(10, 30); |
| 4842 | path.lineTo(10, 3.35545e+07f); |
| 4843 | path.close(); |
| 4844 | path.moveTo(10, 315); |
| 4845 | path.lineTo(110, 315); |
| 4846 | path.lineTo(110, 255); |
| 4847 | path.lineTo(10, 255); |
| 4848 | path.lineTo(10, 315); |
| 4849 | path.close(); |
| 4850 | path.moveTo(0, 60); |
| 4851 | path.lineTo(100, 60); |
| 4852 | path.lineTo(100, 0); |
| 4853 | path.lineTo(0, 0); |
| 4854 | path.lineTo(0, 60); |
| 4855 | path.close(); |
| 4856 | path.moveTo(10, 90); |
| 4857 | path.lineTo(110, 90); |
| 4858 | path.lineTo(110, 30); |
| 4859 | path.lineTo(10, 30); |
| 4860 | path.lineTo(10, 90); |
| 4861 | path.close(); |
| 4862 | path.moveTo(10, 3.35545e+07f); |
| 4863 | path.lineTo(110, 3.35545e+07f); |
| 4864 | path.lineTo(110, 30); |
| 4865 | path.lineTo(10, 30); |
| 4866 | path.lineTo(10, 3.35545e+07f); |
| 4867 | path.close(); |
| 4868 | path.moveTo(10, 90); |
| 4869 | path.lineTo(110, 90); |
| 4870 | path.lineTo(110, 30); |
| 4871 | path.lineTo(10, 30); |
| 4872 | path.lineTo(10, 90); |
| 4873 | path.close(); |
| 4874 | testSimplify(reporter, path, filename); |
| 4875 | } |
| 4876 | |
caryclark | bb13433 | 2015-07-28 05:12:19 -0700 | [diff] [blame] | 4877 | static void cr514118(skiatest::Reporter* reporter,const char* filename) { |
| 4878 | SkPath path; |
| 4879 | path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50 |
| 4880 | path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f |
| 4881 | path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f |
| 4882 | path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f |
| 4883 | path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f |
| 4884 | path.close(); |
| 4885 | path.moveTo(SkBits2Float(0x42c80133), SkBits2Float(0x42480000)); // 100.002f, 50 |
| 4886 | path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x00000000), SkBits2Float(0x42480267), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.002f, 0, 50.0023f, 0, 0.707107f |
| 4887 | path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x00000000), SkBits2Float(0x3b19b530), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 0, 0.00234539f, 50, 0.707107f |
| 4888 | path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x42c80000), SkBits2Float(0x42480267), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 100, 50.0023f, 100, 0.707107f |
| 4889 | path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x42c80000), SkBits2Float(0x42c80133), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.002f, 100, 100.002f, 50, 0.707107f |
| 4890 | path.close(); |
| 4891 | testSimplify(reporter, path, filename); |
| 4892 | } |
| 4893 | |
caryclark | ef2e4ac | 2015-09-23 18:07:51 -0700 | [diff] [blame] | 4894 | static void fuzz994s_11(skiatest::Reporter* reporter, const char* filename) { |
| 4895 | SkPath path; |
| 4896 | path.setFillType((SkPath::FillType) 0); |
| 4897 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4898 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4899 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4900 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4901 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4902 | path.close(); |
| 4903 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4904 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4905 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4906 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4907 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4908 | path.close(); |
| 4909 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4910 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90 |
| 4911 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 |
| 4912 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4913 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4914 | path.close(); |
| 4915 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4916 | path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30 |
| 4917 | path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30 |
| 4918 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4919 | path.close(); |
| 4920 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f |
| 4921 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f |
| 4922 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 |
| 4923 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4924 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f |
| 4925 | path.close(); |
| 4926 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315 |
| 4927 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x439d8000)); // 110, 315 |
| 4928 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x437f0000)); // 110, 255 |
| 4929 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x437f0000)); // 10, 255 |
| 4930 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315 |
| 4931 | path.close(); |
| 4932 | path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60 |
| 4933 | path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x42700000)); // 100, 60 |
| 4934 | path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000)); // 100, 0 |
| 4935 | path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 4936 | path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60 |
| 4937 | path.close(); |
| 4938 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4939 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90 |
| 4940 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 |
| 4941 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4942 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4943 | path.close(); |
| 4944 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f |
| 4945 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f |
| 4946 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 |
| 4947 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4948 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f |
| 4949 | path.close(); |
| 4950 | path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4951 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90 |
| 4952 | path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 |
| 4953 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 |
| 4954 | path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 |
| 4955 | path.close(); |
| 4956 | |
| 4957 | testSimplify(reporter, path, filename); |
| 4958 | } |
| 4959 | |
| 4960 | static void fuzz994s_3414(skiatest::Reporter* reporter, const char* filename) { |
| 4961 | SkPath path; |
| 4962 | path.setFillType((SkPath::FillType) 0); |
| 4963 | path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50 |
| 4964 | path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f |
| 4965 | path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f |
| 4966 | path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f |
| 4967 | path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f |
| 4968 | path.close(); |
| 4969 | path.moveTo(SkBits2Float(0x42c84964), SkBits2Float(0x42480000)); // 100.143f, 50 |
| 4970 | path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x00000000), SkBits2Float(0x424892c8), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.143f, 0, 50.1433f, 0, 0.707107f |
| 4971 | path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x00000000), SkBits2Float(0x3e12c788), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.143339f, 0, 0.143339f, 50, 0.707107f |
| 4972 | path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x42c80000), SkBits2Float(0x424892c8), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.143339f, 100, 50.1433f, 100, 0.707107f |
| 4973 | path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x42c80000), SkBits2Float(0x42c84964), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.143f, 100, 100.143f, 50, 0.707107f |
| 4974 | path.close(); |
| 4975 | path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50 |
| 4976 | path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f |
| 4977 | path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f |
| 4978 | path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f |
| 4979 | path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f |
| 4980 | path.close(); |
| 4981 | path.moveTo(SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000)); // 3.35549e+07f, 51 |
| 4982 | path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0xcbffffe5), SkBits2Float(0x43d6e720), SkBits2Float(0xcbffffe5), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, -3.35544e+07f, 429.806f, -3.35544e+07f, 0.707107f |
| 4983 | path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0xcbffffe5), SkBits2Float(0xcbffff28), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, -3.35544e+07f, -3.3554e+07f, 51, 0.707107f |
| 4984 | path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0x4c00000c), SkBits2Float(0x43d6e720), SkBits2Float(0x4c00000c), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, 3.35545e+07f, 429.806f, 3.35545e+07f, 0.707107f |
| 4985 | path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0x4c00000c), SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, 3.35545e+07f, 3.35549e+07f, 51, 0.707107f |
| 4986 | path.close(); |
| 4987 | path.moveTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42480000)); // 478.806f, 50 |
| 4988 | path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x00000000), SkBits2Float(0x43d66720), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 478.806f, 0, 428.806f, 0, 0.707107f |
| 4989 | path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x00000000), SkBits2Float(0x43bd6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 378.806f, 0, 378.806f, 50, 0.707107f |
| 4990 | path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x42c80000), SkBits2Float(0x43d66720), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 378.806f, 100, 428.806f, 100, 0.707107f |
| 4991 | path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42c80000), SkBits2Float(0x43ef6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 478.806f, 100, 478.806f, 50, 0.707107f |
| 4992 | path.close(); |
| 4993 | |
| 4994 | testSimplify(reporter, path, filename); |
| 4995 | } |
| 4996 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 4997 | static void fuzz_twister(skiatest::Reporter* reporter, const char* filename) { |
| 4998 | SkPath path; |
| 4999 | path.setFillType((SkPath::FillType) 0); |
| 5000 | path.moveTo(0, 600); |
| 5001 | path.lineTo(3.35544e+07f, 600); |
| 5002 | path.lineTo(3.35544e+07f, 0); |
| 5003 | path.lineTo(0, 0); |
| 5004 | path.lineTo(0, 600); |
| 5005 | path.close(); |
| 5006 | path.moveTo(63, 600); |
| 5007 | path.lineTo(3.35545e+07f, 600); |
| 5008 | path.lineTo(3.35545e+07f, 0); |
| 5009 | path.lineTo(63, 0); |
| 5010 | path.lineTo(63, 600); |
| 5011 | path.close(); |
| 5012 | path.moveTo(93, 600); |
| 5013 | path.lineTo(3.35545e+07f, 600); |
| 5014 | path.lineTo(3.35545e+07f, 0); |
| 5015 | path.lineTo(93, 0); |
| 5016 | path.lineTo(93, 600); |
| 5017 | path.close(); |
| 5018 | path.moveTo(123, 600); |
| 5019 | path.lineTo(3.35546e+07f, 600); |
| 5020 | path.lineTo(3.35546e+07f, 0); |
| 5021 | path.lineTo(123, 0); |
| 5022 | path.lineTo(123, 600); |
| 5023 | path.close(); |
| 5024 | testSimplify(reporter, path, filename); |
| 5025 | } |
| 5026 | |
caryclark | 1c9ce61 | 2015-11-20 14:06:28 -0800 | [diff] [blame] | 5027 | static void fuzz_twister2(skiatest::Reporter* reporter, const char* filename) { |
| 5028 | SkPath path; |
| 5029 | |
| 5030 | path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600 |
| 5031 | path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x44160000)); // 3.35544e+07f, 600 |
| 5032 | path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x00000000)); // 3.35544e+07f, 0 |
| 5033 | path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 5034 | path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600 |
| 5035 | path.close(); |
| 5036 | |
| 5037 | path.moveTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0 |
| 5038 | path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 |
| 5039 | path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 |
| 5040 | path.lineTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0 |
| 5041 | path.close(); |
| 5042 | |
| 5043 | path.moveTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0 |
| 5044 | path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 |
| 5045 | path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 |
| 5046 | path.lineTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0 |
| 5047 | path.close(); |
| 5048 | |
| 5049 | path.moveTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0 |
| 5050 | path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0 |
| 5051 | path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0 |
| 5052 | path.lineTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0 |
| 5053 | path.close(); |
| 5054 | |
| 5055 | REPORTER_ASSERT(reporter, !Simplify(path, &path)); |
| 5056 | } |
| 5057 | |
caryclark | a3375e4 | 2015-12-07 12:18:02 -0800 | [diff] [blame] | 5058 | static void fuzz_59(skiatest::Reporter* reporter, const char* filename) { |
| 5059 | SkPath path; |
| 5060 | path.moveTo(SkBits2Float(0x430c0000), SkBits2Float(0xce58f41c)); // 140, -9.09969e+08f |
| 5061 | path.lineTo(SkBits2Float(0x43480000), SkBits2Float(0xce58f419)); // 200, -9.09969e+08f |
| 5062 | path.lineTo(SkBits2Float(0x42200000), SkBits2Float(0xce58f41b)); // 40, -9.09969e+08f |
| 5063 | path.lineTo(SkBits2Float(0x43700000), SkBits2Float(0xce58f41b)); // 240, -9.09969e+08f |
| 5064 | path.lineTo(SkBits2Float(0x428c0000), SkBits2Float(0xce58f419)); // 70, -9.09969e+08f |
| 5065 | path.lineTo(SkBits2Float(0x430c0000), SkBits2Float(0xce58f41c)); // 140, -9.09969e+08f |
| 5066 | path.close(); |
| 5067 | REPORTER_ASSERT(reporter, !Simplify(path, &path)); |
| 5068 | } |
| 5069 | |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 5070 | static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 5071 | static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 5072 | static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5073 | |
| 5074 | static TestDesc tests[] = { |
caryclark | a3375e4 | 2015-12-07 12:18:02 -0800 | [diff] [blame] | 5075 | TEST(fuzz_59), |
caryclark | 1c9ce61 | 2015-11-20 14:06:28 -0800 | [diff] [blame] | 5076 | TEST(fuzz_twister2), |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 5077 | TEST(fuzz_twister), |
caryclark | ef2e4ac | 2015-09-23 18:07:51 -0700 | [diff] [blame] | 5078 | TEST(fuzz994s_3414), |
| 5079 | TEST(fuzz994s_11), |
caryclark | bb13433 | 2015-07-28 05:12:19 -0700 | [diff] [blame] | 5080 | TEST(cr514118), |
caryclark | d434972 | 2015-07-23 12:40:22 -0700 | [diff] [blame] | 5081 | TEST(fuzz864a), |
caryclark | 27c8eb8 | 2015-07-06 11:38:33 -0700 | [diff] [blame] | 5082 | TEST(testQuads65), |
caryclark | 4e1a4c9 | 2015-05-18 12:56:57 -0700 | [diff] [blame] | 5083 | TEST(testIssue3838_3), |
caryclark | fba9da7 | 2015-05-14 14:18:13 -0700 | [diff] [blame] | 5084 | TEST(testIssue3838), |
caryclark | bca19f7 | 2015-05-13 08:23:48 -0700 | [diff] [blame] | 5085 | TEST(testArc), |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 5086 | TEST(testTriangle2), |
| 5087 | TEST(testTriangle1), |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 5088 | TEST(testQuads64), |
| 5089 | TEST(testQuads63), |
| 5090 | TEST(testQuads62), |
| 5091 | TEST(testRect4), |
caryclark | 19eb3b2 | 2014-07-18 05:08:14 -0700 | [diff] [blame] | 5092 | TEST(testRect3), |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 5093 | TEST(testQuadralateral10), |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 5094 | TEST(testQuads61), |
| 5095 | TEST(testQuads60), |
| 5096 | TEST(testQuads59), |
| 5097 | TEST(testQuads58), |
| 5098 | TEST(testQuads57), |
| 5099 | TEST(testQuads56), |
| 5100 | TEST(testQuads54), |
| 5101 | TEST(testQuads53), |
| 5102 | TEST(testQuads52), |
| 5103 | TEST(testQuads51), |
| 5104 | TEST(testQuads50), |
| 5105 | TEST(testQuads49), |
| 5106 | TEST(testQuads48), |
| 5107 | TEST(testQuads47), |
| 5108 | TEST(testQuads46x), |
| 5109 | TEST(testQuads45), |
| 5110 | TEST(testQuads44), |
| 5111 | TEST(testQuads43), |
| 5112 | TEST(testQuads42), |
| 5113 | TEST(testQuads41), |
| 5114 | TEST(testQuads36), |
| 5115 | TEST(testQuads37), |
| 5116 | TEST(testQuads38), |
| 5117 | TEST(testQuads39), |
| 5118 | TEST(testQuads40), |
| 5119 | TEST(testQuads16), |
| 5120 | TEST(testQuads17), |
| 5121 | TEST(testQuads18), |
| 5122 | TEST(testQuads19), |
| 5123 | TEST(testQuads20), |
| 5124 | TEST(testQuads21), |
| 5125 | TEST(testQuads22), |
| 5126 | TEST(testQuads23), |
| 5127 | TEST(testQuads24), |
| 5128 | TEST(testQuads25), |
| 5129 | TEST(testQuads26), |
| 5130 | TEST(testQuads27), |
| 5131 | TEST(testQuads28), |
| 5132 | TEST(testQuads29), |
| 5133 | TEST(testQuads30), |
| 5134 | TEST(testQuads31), |
| 5135 | TEST(testQuads32), |
| 5136 | TEST(testQuads33), |
| 5137 | TEST(testQuads34), |
| 5138 | TEST(testQuads35), |
| 5139 | TEST(testDegenerates1), |
| 5140 | TEST(testQuad13), |
| 5141 | TEST(testQuad14), |
| 5142 | TEST(testQuad15), |
| 5143 | TEST(testQuadratic56), |
| 5144 | TEST(testQuadralateral4), |
| 5145 | TEST(testQuadralateral3), |
| 5146 | TEST(testDegenerate5), |
| 5147 | TEST(testQuad12), |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 5148 | TEST(testQuadratic51), |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 5149 | TEST(testQuad8), |
caryclark@google.com | 28d219c | 2013-11-25 13:39:12 +0000 | [diff] [blame] | 5150 | TEST(testQuad11), |
commit-bot@chromium.org | 866f4e3 | 2013-11-21 17:04:29 +0000 | [diff] [blame] | 5151 | TEST(testQuad10), |
| 5152 | TEST(testQuad9), |
caryclark@google.com | 7eaa53d | 2013-10-02 14:49:34 +0000 | [diff] [blame] | 5153 | TEST(testTriangles4x), |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 5154 | TEST(testTriangles3x), |
| 5155 | TEST(testRect2), |
| 5156 | TEST(testRect1), |
| 5157 | TEST(tooCloseTest), |
caryclark@google.com | 07e97fc | 2013-07-08 17:17:02 +0000 | [diff] [blame] | 5158 | TEST(skphealth_com76), |
caryclark@google.com | cffbcc3 | 2013-06-04 17:59:42 +0000 | [diff] [blame] | 5159 | TEST(testQuadLineIntersect1), |
| 5160 | TEST(testQuadLineIntersect2), |
| 5161 | TEST(testQuadLineIntersect3), |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 5162 | TEST(testQuad7), |
| 5163 | TEST(testQuad6), |
| 5164 | TEST(testQuad5), |
| 5165 | TEST(testQuad4), |
| 5166 | TEST(testQuad3), |
| 5167 | TEST(testQuad2), |
caryclark@google.com | 66560ca | 2013-04-26 19:51:16 +0000 | [diff] [blame] | 5168 | TEST(testAddTCoincident2), |
| 5169 | TEST(testAddTCoincident1), |
caryclark@google.com | 0361032 | 2013-04-18 15:58:21 +0000 | [diff] [blame] | 5170 | TEST(testTriangles2), |
| 5171 | TEST(testTriangles1), |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 5172 | TEST(testQuadratic97), |
| 5173 | TEST(testQuadratic96), |
| 5174 | TEST(testQuadratic95), |
| 5175 | TEST(testQuadratic94), |
caryclark@google.com | e942bc3 | 2013-04-10 18:53:01 +0000 | [diff] [blame] | 5176 | TEST(testQuadralateral2), |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 5177 | TEST(testQuad1), |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5178 | TEST(testCubic2), |
| 5179 | TEST(testCubic1), |
| 5180 | TEST(testQuadralateral1), |
| 5181 | TEST(testLine85), |
| 5182 | TEST(testLine84), |
| 5183 | TEST(testLine84x), |
| 5184 | TEST(testLine83), |
| 5185 | TEST(testLine82h), |
| 5186 | TEST(testLine82g), |
| 5187 | TEST(testLine82f), |
| 5188 | TEST(testLine82e), |
| 5189 | TEST(testLine82d), |
| 5190 | TEST(testLine82c), |
| 5191 | TEST(testLine82b), |
| 5192 | TEST(testLine82a), |
| 5193 | TEST(testLine82), |
| 5194 | TEST(testQuadratic93), |
| 5195 | TEST(testQuadratic92x), |
| 5196 | TEST(testQuadratic91), |
| 5197 | TEST(testQuadratic90x), |
| 5198 | TEST(testQuadratic89x), |
| 5199 | TEST(testQuadratic88), |
| 5200 | TEST(testQuadratic87), |
| 5201 | TEST(testQuadratic86), |
| 5202 | TEST(testQuadratic85), |
| 5203 | TEST(testQuadratic84), |
| 5204 | TEST(testQuadratic83), |
| 5205 | TEST(testQuadratic82), |
| 5206 | TEST(testQuadratic81), |
| 5207 | TEST(testQuadratic80), |
| 5208 | TEST(testEight1), |
| 5209 | TEST(testEight2), |
| 5210 | TEST(testEight3), |
| 5211 | TEST(testEight4), |
| 5212 | TEST(testEight5), |
| 5213 | TEST(testEight6), |
| 5214 | TEST(testEight7), |
| 5215 | TEST(testEight8), |
| 5216 | TEST(testEight9), |
| 5217 | TEST(testEight10), |
| 5218 | TEST(testQuadratic79), |
| 5219 | TEST(testQuadratic78), |
| 5220 | TEST(testQuadratic77), |
| 5221 | TEST(testQuadratic76), |
| 5222 | TEST(testQuadratic75), |
| 5223 | TEST(testQuadratic74), |
| 5224 | TEST(testQuadratic73), |
| 5225 | TEST(testQuadratic72), |
| 5226 | TEST(testQuadratic71), |
| 5227 | TEST(testQuadratic70x), |
| 5228 | TEST(testQuadratic69), |
| 5229 | TEST(testQuadratic68), |
| 5230 | TEST(testQuadratic67x), |
| 5231 | TEST(testQuadratic65), |
| 5232 | TEST(testQuadratic64), |
| 5233 | TEST(testQuadratic63), |
| 5234 | TEST(testLine1a), |
| 5235 | TEST(testLine1ax), |
| 5236 | TEST(testQuadratic59), |
| 5237 | TEST(testQuadratic59x), |
| 5238 | TEST(testQuadratic58), |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5239 | TEST(testQuadratic55), |
| 5240 | TEST(testQuadratic53), |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5241 | TEST(testQuadratic38), |
| 5242 | TEST(testQuadratic37), |
| 5243 | TEST(testQuadratic36), |
| 5244 | TEST(testQuadratic35), |
| 5245 | TEST(testQuadratic34), |
| 5246 | TEST(testQuadratic33), |
| 5247 | TEST(testQuadratic32), |
| 5248 | TEST(testQuadratic31), |
| 5249 | TEST(testQuadratic30), |
| 5250 | TEST(testQuadratic29), |
| 5251 | TEST(testQuadratic28), |
| 5252 | TEST(testQuadratic27), |
| 5253 | TEST(testQuadratic26), |
| 5254 | TEST(testQuadratic25), |
| 5255 | TEST(testQuadratic24), |
| 5256 | TEST(testQuadratic23), |
| 5257 | TEST(testQuadratic22), |
| 5258 | TEST(testQuadratic21), |
| 5259 | TEST(testQuadratic20), |
| 5260 | TEST(testQuadratic19), |
| 5261 | TEST(testQuadratic18), |
| 5262 | TEST(testQuadratic17x), |
| 5263 | TEST(testQuadratic15), |
| 5264 | TEST(testQuadratic14), |
| 5265 | TEST(testQuadratic9), |
| 5266 | TEST(testQuadratic8), |
| 5267 | TEST(testQuadratic7), |
| 5268 | TEST(testQuadratic6), |
| 5269 | TEST(testQuadratic5), |
| 5270 | TEST(testQuadratic4x), |
| 5271 | TEST(testQuadratic3x), |
| 5272 | TEST(testQuadratic2x), |
| 5273 | TEST(testQuadratic1x), |
| 5274 | TEST(testQuadratic4), |
| 5275 | TEST(testQuadratic3), |
| 5276 | TEST(testQuadratic2), |
| 5277 | TEST(testQuadratic1), |
| 5278 | TEST(testLine4ax), |
| 5279 | TEST(testLine3aax), |
| 5280 | TEST(testLine2ax), |
| 5281 | TEST(testLine1ax), |
| 5282 | TEST(testQuadralateral9x), |
| 5283 | TEST(testQuadralateral8x), |
| 5284 | TEST(testQuadralateral7x), |
| 5285 | TEST(testQuadralateral6x), |
| 5286 | TEST(testQuadralateral6ax), |
| 5287 | TEST(testQuadralateral9), |
| 5288 | TEST(testQuadralateral8), |
| 5289 | TEST(testQuadralateral7), |
| 5290 | TEST(testQuadralateral6), |
| 5291 | TEST(testQuadralateral6a), |
| 5292 | TEST(testFauxQuadralateral6dx), |
| 5293 | TEST(testFauxQuadralateral6cx), |
| 5294 | TEST(testFauxQuadralateral6bx), |
| 5295 | TEST(testFauxQuadralateral6ax), |
| 5296 | TEST(testFauxQuadralateral6x), |
| 5297 | TEST(testFauxQuadralateral6d), |
| 5298 | TEST(testFauxQuadralateral6c), |
| 5299 | TEST(testFauxQuadralateral6b), |
| 5300 | TEST(testFauxQuadralateral6a), |
| 5301 | TEST(testFauxQuadralateral6), |
| 5302 | TEST(testQuadralateral5x), |
| 5303 | TEST(testQuadralateral5), |
| 5304 | TEST(testNondegenerate4x), |
| 5305 | TEST(testNondegenerate3x), |
| 5306 | TEST(testNondegenerate2x), |
| 5307 | TEST(testNondegenerate1x), |
| 5308 | TEST(testNondegenerate4), |
| 5309 | TEST(testNondegenerate3), |
| 5310 | TEST(testNondegenerate2), |
| 5311 | TEST(testNondegenerate1), |
| 5312 | TEST(testDegenerate4x), |
| 5313 | TEST(testDegenerate3x), |
| 5314 | TEST(testDegenerate2x), |
| 5315 | TEST(testDegenerate1x), |
| 5316 | TEST(testDegenerate4), |
| 5317 | TEST(testDegenerate3), |
| 5318 | TEST(testDegenerate2), |
| 5319 | TEST(testDegenerate1), |
| 5320 | TEST(testLine79x), |
| 5321 | TEST(testLine78x), |
| 5322 | TEST(testLine77x), |
| 5323 | TEST(testLine76x), |
| 5324 | TEST(testLine75x), |
| 5325 | TEST(testLine74x), |
| 5326 | TEST(testLine73x), |
| 5327 | TEST(testLine72x), |
| 5328 | TEST(testLine71x), |
| 5329 | TEST(testLine70x), |
| 5330 | TEST(testLine69x), |
| 5331 | TEST(testLine68hx), |
| 5332 | TEST(testLine68gx), |
| 5333 | TEST(testLine68fx), |
| 5334 | TEST(testLine68ex), |
| 5335 | TEST(testLine68dx), |
| 5336 | TEST(testLine68cx), |
| 5337 | TEST(testLine68bx), |
| 5338 | TEST(testLine68ax), |
| 5339 | TEST(testLine67x), |
| 5340 | TEST(testLine66x), |
| 5341 | TEST(testLine65x), |
| 5342 | TEST(testLine64x), |
| 5343 | TEST(testLine63x), |
| 5344 | TEST(testLine62x), |
| 5345 | TEST(testLine61x), |
| 5346 | TEST(testLine60x), |
| 5347 | TEST(testLine59x), |
| 5348 | TEST(testLine58x), |
| 5349 | TEST(testLine57x), |
| 5350 | TEST(testLine56x), |
| 5351 | TEST(testLine55x), |
| 5352 | TEST(testLine54x), |
| 5353 | TEST(testLine53x), |
| 5354 | TEST(testLine52x), |
| 5355 | TEST(testLine51x), |
| 5356 | TEST(testLine50x), |
| 5357 | TEST(testLine49x), |
| 5358 | TEST(testLine48x), |
| 5359 | TEST(testLine47x), |
| 5360 | TEST(testLine46x), |
| 5361 | TEST(testLine45x), |
| 5362 | TEST(testLine44x), |
| 5363 | TEST(testLine43x), |
| 5364 | TEST(testLine42x), |
| 5365 | TEST(testLine41x), |
| 5366 | TEST(testLine40x), |
| 5367 | TEST(testLine38x), |
| 5368 | TEST(testLine37x), |
| 5369 | TEST(testLine36x), |
| 5370 | TEST(testLine35x), |
| 5371 | TEST(testLine34x), |
| 5372 | TEST(testLine33x), |
| 5373 | TEST(testLine32x), |
| 5374 | TEST(testLine31x), |
| 5375 | TEST(testLine30x), |
| 5376 | TEST(testLine29x), |
| 5377 | TEST(testLine28x), |
| 5378 | TEST(testLine27x), |
| 5379 | TEST(testLine26x), |
| 5380 | TEST(testLine25x), |
| 5381 | TEST(testLine24ax), |
| 5382 | TEST(testLine24x), |
| 5383 | TEST(testLine23x), |
| 5384 | TEST(testLine22x), |
| 5385 | TEST(testLine21x), |
| 5386 | TEST(testLine20x), |
| 5387 | TEST(testLine19x), |
| 5388 | TEST(testLine18x), |
| 5389 | TEST(testLine17x), |
| 5390 | TEST(testLine16x), |
| 5391 | TEST(testLine15x), |
| 5392 | TEST(testLine14x), |
| 5393 | TEST(testLine13x), |
| 5394 | TEST(testLine12x), |
| 5395 | TEST(testLine11x), |
| 5396 | TEST(testLine10ax), |
| 5397 | TEST(testLine10x), |
| 5398 | TEST(testLine9x), |
| 5399 | TEST(testLine8x), |
| 5400 | TEST(testLine7bx), |
| 5401 | TEST(testLine7ax), |
| 5402 | TEST(testLine7x), |
| 5403 | TEST(testLine6x), |
| 5404 | TEST(testLine5x), |
| 5405 | TEST(testLine4x), |
| 5406 | TEST(testLine3bx), |
| 5407 | TEST(testLine3ax), |
| 5408 | TEST(testLine3x), |
| 5409 | TEST(testLine2x), |
| 5410 | TEST(testLine1x), |
| 5411 | TEST(testLine81), |
| 5412 | TEST(testLine80), |
| 5413 | TEST(testLine79), |
| 5414 | TEST(testLine78), |
| 5415 | TEST(testLine77), |
| 5416 | TEST(testLine76), |
| 5417 | TEST(testLine75), |
| 5418 | TEST(testLine74), |
| 5419 | TEST(testLine73), |
| 5420 | TEST(testLine72), |
| 5421 | TEST(testLine71), |
| 5422 | TEST(testLine70), |
| 5423 | TEST(testLine69), |
| 5424 | TEST(testLine68h), |
| 5425 | TEST(testLine68g), |
| 5426 | TEST(testLine68f), |
| 5427 | TEST(testLine68e), |
| 5428 | TEST(testLine68d), |
| 5429 | TEST(testLine68c), |
| 5430 | TEST(testLine68b), |
| 5431 | TEST(testLine68a), |
| 5432 | TEST(testLine67), |
| 5433 | TEST(testLine66), |
| 5434 | TEST(testLine65), |
| 5435 | TEST(testLine64), |
| 5436 | TEST(testLine63), |
| 5437 | TEST(testLine62), |
| 5438 | TEST(testLine61), |
| 5439 | TEST(testLine60), |
| 5440 | TEST(testLine59), |
| 5441 | TEST(testLine58), |
| 5442 | TEST(testLine57), |
| 5443 | TEST(testLine56), |
| 5444 | TEST(testLine55), |
| 5445 | TEST(testLine54), |
| 5446 | TEST(testLine53), |
| 5447 | TEST(testLine52), |
| 5448 | TEST(testLine51), |
| 5449 | TEST(testLine50), |
| 5450 | TEST(testLine49), |
| 5451 | TEST(testLine48), |
| 5452 | TEST(testLine47), |
| 5453 | TEST(testLine46), |
| 5454 | TEST(testLine45), |
| 5455 | TEST(testLine44), |
| 5456 | TEST(testLine43), |
| 5457 | TEST(testLine42), |
| 5458 | TEST(testLine41), |
| 5459 | TEST(testLine40), |
| 5460 | TEST(testLine38), |
| 5461 | TEST(testLine37), |
| 5462 | TEST(testLine36), |
| 5463 | TEST(testLine35), |
| 5464 | TEST(testLine34), |
| 5465 | TEST(testLine33), |
| 5466 | TEST(testLine32), |
| 5467 | TEST(testLine31), |
| 5468 | TEST(testLine30), |
| 5469 | TEST(testLine29), |
| 5470 | TEST(testLine28), |
| 5471 | TEST(testLine27), |
| 5472 | TEST(testLine26), |
| 5473 | TEST(testLine25), |
| 5474 | TEST(testLine24a), |
| 5475 | TEST(testLine24), |
| 5476 | TEST(testLine23), |
| 5477 | TEST(testLine22), |
| 5478 | TEST(testLine21), |
| 5479 | TEST(testLine20), |
| 5480 | TEST(testLine19), |
| 5481 | TEST(testLine18), |
| 5482 | TEST(testLine17), |
| 5483 | TEST(testLine16), |
| 5484 | TEST(testLine15), |
| 5485 | TEST(testLine14), |
| 5486 | TEST(testLine13), |
| 5487 | TEST(testLine12), |
| 5488 | TEST(testLine11), |
| 5489 | TEST(testLine10a), |
| 5490 | TEST(testLine10), |
| 5491 | TEST(testLine9), |
| 5492 | TEST(testLine8), |
| 5493 | TEST(testLine7b), |
| 5494 | TEST(testLine7a), |
| 5495 | TEST(testLine7), |
| 5496 | TEST(testLine6), |
| 5497 | TEST(testLine5), |
| 5498 | TEST(testLine4), |
| 5499 | TEST(testLine3b), |
| 5500 | TEST(testLine3a), |
| 5501 | TEST(testLine3), |
| 5502 | TEST(testLine2), |
| 5503 | TEST(testLine1), |
| 5504 | }; |
| 5505 | |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 5506 | static const size_t testCount = SK_ARRAY_COUNT(tests); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5507 | |
| 5508 | static TestDesc subTests[] = { |
caryclark | ef2e4ac | 2015-09-23 18:07:51 -0700 | [diff] [blame] | 5509 | TEST(fuzz994s_3414), |
| 5510 | TEST(fuzz994s_11), |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5511 | }; |
| 5512 | |
caryclark@google.com | ad65a3e | 2013-04-15 19:13:59 +0000 | [diff] [blame] | 5513 | static const size_t subTestCount = SK_ARRAY_COUNT(subTests); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5514 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 5515 | static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0; |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5516 | |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 5517 | static bool runSubTests = false; |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5518 | static bool runSubTestsFirst = false; |
caryclark@google.com | 4fdbb22 | 2013-07-23 15:27:41 +0000 | [diff] [blame] | 5519 | static bool runReverse = false; |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5520 | |
tfarina@chromium.org | 78e7b4e | 2014-01-02 21:45:03 +0000 | [diff] [blame] | 5521 | DEF_TEST(PathOpsSimplify, reporter) { |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 5522 | if (runSubTests && runSubTestsFirst) { |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 5523 | RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5524 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 5525 | RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runReverse); |
commit-bot@chromium.org | 4431e77 | 2014-04-14 17:08:59 +0000 | [diff] [blame] | 5526 | if (runSubTests && !runSubTestsFirst) { |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 5527 | RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse); |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5528 | } |
caryclark@google.com | 818b0cc | 2013-04-08 11:50:46 +0000 | [diff] [blame] | 5529 | } |