| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #include "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
| 8 | 8 |
| 9 #define TEST(name) { name, #name } | 9 #define TEST(name) { name, #name } |
| 10 | 10 |
| 11 static void testLine1(skiatest::Reporter* reporter) { | 11 static void testLine1(skiatest::Reporter* reporter, const char* filename) { |
| 12 SkPath path; | 12 SkPath path; |
| 13 path.moveTo(2,0); | 13 path.moveTo(2,0); |
| 14 path.lineTo(1,1); | 14 path.lineTo(1,1); |
| 15 path.lineTo(0,0); | 15 path.lineTo(0,0); |
| 16 path.close(); | 16 path.close(); |
| 17 testSimplify(reporter, path); | 17 testSimplify(reporter, path, filename); |
| 18 } | 18 } |
| 19 | 19 |
| 20 static void testLine1x(skiatest::Reporter* reporter) { | 20 static void testLine1x(skiatest::Reporter* reporter, const char* filename) { |
| 21 SkPath path; | 21 SkPath path; |
| 22 path.setFillType(SkPath::kEvenOdd_FillType); | 22 path.setFillType(SkPath::kEvenOdd_FillType); |
| 23 path.moveTo(2,0); | 23 path.moveTo(2,0); |
| 24 path.lineTo(1,1); | 24 path.lineTo(1,1); |
| 25 path.lineTo(0,0); | 25 path.lineTo(0,0); |
| 26 path.close(); | 26 path.close(); |
| 27 testSimplify(reporter, path); | 27 testSimplify(reporter, path, filename); |
| 28 } | 28 } |
| 29 | 29 |
| 30 static void addInnerCWTriangle(SkPath& path) { | 30 static void addInnerCWTriangle(SkPath& path) { |
| 31 path.moveTo(3,0); | 31 path.moveTo(3,0); |
| 32 path.lineTo(4,1); | 32 path.lineTo(4,1); |
| 33 path.lineTo(2,1); | 33 path.lineTo(2,1); |
| 34 path.close(); | 34 path.close(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 static void addInnerCCWTriangle(SkPath& path) { | 37 static void addInnerCCWTriangle(SkPath& path) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 48 path.close(); | 48 path.close(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 static void addOuterCCWTriangle(SkPath& path) { | 51 static void addOuterCCWTriangle(SkPath& path) { |
| 52 path.moveTo(3,0); | 52 path.moveTo(3,0); |
| 53 path.lineTo(0,2); | 53 path.lineTo(0,2); |
| 54 path.lineTo(6,2); | 54 path.lineTo(6,2); |
| 55 path.close(); | 55 path.close(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 static void testLine2(skiatest::Reporter* reporter) { | 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) { |
| 59 SkPath path; | 66 SkPath path; |
| 60 path.setFillType(SkPath::kEvenOdd_FillType); | 67 path.setFillType(SkPath::kEvenOdd_FillType); |
| 61 addInnerCWTriangle(path); | 68 addInnerCWTriangle(path); |
| 62 addOuterCWTriangle(path); | 69 addOuterCWTriangle(path); |
| 63 testSimplify(reporter, path); | 70 testSimplify(reporter, path, filename); |
| 64 } | 71 } |
| 65 | 72 |
| 66 static void testLine2x(skiatest::Reporter* reporter) { | 73 static void testLine3(skiatest::Reporter* reporter, const char* filename) { |
| 67 SkPath path; | 74 SkPath path; |
| 68 path.setFillType(SkPath::kEvenOdd_FillType); | 75 addInnerCCWTriangle(path); |
| 69 addInnerCWTriangle(path); | |
| 70 addOuterCWTriangle(path); | 76 addOuterCWTriangle(path); |
| 71 testSimplify(reporter, path); | 77 testSimplify(reporter, path, filename); |
| 72 } | 78 } |
| 73 | 79 |
| 74 static void testLine3(skiatest::Reporter* reporter) { | 80 static void testLine3x(skiatest::Reporter* reporter, const char* filename) { |
| 75 SkPath path; | 81 SkPath path; |
| 76 path.setFillType(SkPath::kEvenOdd_FillType); | 82 path.setFillType(SkPath::kEvenOdd_FillType); |
| 77 addInnerCCWTriangle(path); | 83 addInnerCCWTriangle(path); |
| 78 addOuterCWTriangle(path); | 84 addOuterCWTriangle(path); |
| 79 testSimplify(reporter, path); | 85 testSimplify(reporter, path, filename); |
| 80 } | 86 } |
| 81 | 87 |
| 82 static void testLine3x(skiatest::Reporter* reporter) { | 88 static void testLine3a(skiatest::Reporter* reporter, const char* filename) { |
| 83 SkPath path; | |
| 84 path.setFillType(SkPath::kEvenOdd_FillType); | |
| 85 addInnerCCWTriangle(path); | |
| 86 addOuterCWTriangle(path); | |
| 87 testSimplify(reporter, path); | |
| 88 } | |
| 89 | |
| 90 static void testLine3a(skiatest::Reporter* reporter) { | |
| 91 SkPath path; | 89 SkPath path; |
| 92 addInnerCWTriangle(path); | 90 addInnerCWTriangle(path); |
| 93 addOuterCCWTriangle(path); | 91 addOuterCCWTriangle(path); |
| 94 testSimplify(reporter, path); | 92 testSimplify(reporter, path, filename); |
| 95 } | 93 } |
| 96 | 94 |
| 97 static void testLine3ax(skiatest::Reporter* reporter) { | 95 static void testLine3ax(skiatest::Reporter* reporter, const char* filename) { |
| 98 SkPath path; | 96 SkPath path; |
| 99 path.setFillType(SkPath::kEvenOdd_FillType); | 97 path.setFillType(SkPath::kEvenOdd_FillType); |
| 100 addInnerCWTriangle(path); | 98 addInnerCWTriangle(path); |
| 101 addOuterCCWTriangle(path); | 99 addOuterCCWTriangle(path); |
| 102 testSimplify(reporter, path); | 100 testSimplify(reporter, path, filename); |
| 103 } | 101 } |
| 104 | 102 |
| 105 static void testLine3b(skiatest::Reporter* reporter) { | 103 static void testLine3b(skiatest::Reporter* reporter, const char* filename) { |
| 106 SkPath path; | 104 SkPath path; |
| 107 addInnerCCWTriangle(path); | 105 addInnerCCWTriangle(path); |
| 108 addOuterCCWTriangle(path); | 106 addOuterCCWTriangle(path); |
| 109 testSimplify(reporter, path); | 107 testSimplify(reporter, path, filename); |
| 110 } | 108 } |
| 111 | 109 |
| 112 static void testLine3bx(skiatest::Reporter* reporter) { | 110 static void testLine3bx(skiatest::Reporter* reporter, const char* filename) { |
| 113 SkPath path; | 111 SkPath path; |
| 114 path.setFillType(SkPath::kEvenOdd_FillType); | 112 path.setFillType(SkPath::kEvenOdd_FillType); |
| 115 addInnerCCWTriangle(path); | 113 addInnerCCWTriangle(path); |
| 116 addOuterCCWTriangle(path); | 114 addOuterCCWTriangle(path); |
| 117 testSimplify(reporter, path); | 115 testSimplify(reporter, path, filename); |
| 118 } | 116 } |
| 119 | 117 |
| 120 static void testLine4(skiatest::Reporter* reporter) { | 118 static void testLine4(skiatest::Reporter* reporter, const char* filename) { |
| 121 SkPath path; | 119 SkPath path; |
| 122 addOuterCCWTriangle(path); | 120 addOuterCCWTriangle(path); |
| 123 addOuterCWTriangle(path); | 121 addOuterCWTriangle(path); |
| 124 testSimplify(reporter, path); | 122 testSimplify(reporter, path, filename); |
| 125 } | 123 } |
| 126 | 124 |
| 127 static void testLine4x(skiatest::Reporter* reporter) { | 125 static void testLine4x(skiatest::Reporter* reporter, const char* filename) { |
| 128 SkPath path; | 126 SkPath path; |
| 129 path.setFillType(SkPath::kEvenOdd_FillType); | 127 path.setFillType(SkPath::kEvenOdd_FillType); |
| 130 addOuterCCWTriangle(path); | 128 addOuterCCWTriangle(path); |
| 131 addOuterCWTriangle(path); | 129 addOuterCWTriangle(path); |
| 132 testSimplify(reporter, path); | 130 testSimplify(reporter, path, filename); |
| 133 } | 131 } |
| 134 | 132 |
| 135 static void testLine5(skiatest::Reporter* reporter) { | 133 static void testLine5(skiatest::Reporter* reporter, const char* filename) { |
| 136 SkPath path; | 134 SkPath path; |
| 137 addOuterCWTriangle(path); | 135 addOuterCWTriangle(path); |
| 138 addOuterCWTriangle(path); | 136 addOuterCWTriangle(path); |
| 139 testSimplify(reporter, path); | 137 testSimplify(reporter, path, filename); |
| 140 } | 138 } |
| 141 | 139 |
| 142 static void testLine5x(skiatest::Reporter* reporter) { | 140 static void testLine5x(skiatest::Reporter* reporter, const char* filename) { |
| 143 SkPath path; | 141 SkPath path; |
| 144 path.setFillType(SkPath::kEvenOdd_FillType); | 142 path.setFillType(SkPath::kEvenOdd_FillType); |
| 145 addOuterCWTriangle(path); | 143 addOuterCWTriangle(path); |
| 146 addOuterCWTriangle(path); | 144 addOuterCWTriangle(path); |
| 147 testSimplify(reporter, path); | 145 testSimplify(reporter, path, filename); |
| 148 } | 146 } |
| 149 | 147 |
| 150 static void testLine6(skiatest::Reporter* reporter) { | 148 static void testLine6(skiatest::Reporter* reporter, const char* filename) { |
| 151 SkPath path; | 149 SkPath path; |
| 152 path.moveTo(0,0); | 150 path.moveTo(0,0); |
| 153 path.lineTo(4,0); | 151 path.lineTo(4,0); |
| 154 path.lineTo(2,2); | 152 path.lineTo(2,2); |
| 155 path.close(); | 153 path.close(); |
| 156 path.moveTo(2,0); | 154 path.moveTo(2,0); |
| 157 path.lineTo(6,0); | 155 path.lineTo(6,0); |
| 158 path.lineTo(4,2); | 156 path.lineTo(4,2); |
| 159 path.close(); | 157 path.close(); |
| 160 testSimplify(reporter, path); | 158 testSimplify(reporter, path, filename); |
| 161 } | 159 } |
| 162 | 160 |
| 163 static void testLine6x(skiatest::Reporter* reporter) { | 161 static void testLine6x(skiatest::Reporter* reporter, const char* filename) { |
| 164 SkPath path; | 162 SkPath path; |
| 165 path.setFillType(SkPath::kEvenOdd_FillType); | 163 path.setFillType(SkPath::kEvenOdd_FillType); |
| 166 path.moveTo(0,0); | 164 path.moveTo(0,0); |
| 167 path.lineTo(4,0); | 165 path.lineTo(4,0); |
| 168 path.lineTo(2,2); | 166 path.lineTo(2,2); |
| 169 path.close(); | 167 path.close(); |
| 170 path.moveTo(2,0); | 168 path.moveTo(2,0); |
| 171 path.lineTo(6,0); | 169 path.lineTo(6,0); |
| 172 path.lineTo(4,2); | 170 path.lineTo(4,2); |
| 173 path.close(); | 171 path.close(); |
| 174 testSimplify(reporter, path); | 172 testSimplify(reporter, path, filename); |
| 175 } | 173 } |
| 176 | 174 |
| 177 static void testLine7(skiatest::Reporter* reporter) { | 175 static void testLine7(skiatest::Reporter* reporter, const char* filename) { |
| 178 SkPath path; | 176 SkPath path; |
| 179 path.moveTo(0,0); | 177 path.moveTo(0,0); |
| 180 path.lineTo(4,0); | 178 path.lineTo(4,0); |
| 181 path.lineTo(2,2); | 179 path.lineTo(2,2); |
| 182 path.close(); | 180 path.close(); |
| 183 path.moveTo(6,0); | 181 path.moveTo(6,0); |
| 184 path.lineTo(2,0); | 182 path.lineTo(2,0); |
| 185 path.lineTo(4,2); | 183 path.lineTo(4,2); |
| 186 path.close(); | 184 path.close(); |
| 187 testSimplify(reporter, path); | 185 testSimplify(reporter, path, filename); |
| 188 } | 186 } |
| 189 | 187 |
| 190 static void testLine7x(skiatest::Reporter* reporter) { | 188 static void testLine7x(skiatest::Reporter* reporter, const char* filename) { |
| 191 SkPath path; | 189 SkPath path; |
| 192 path.setFillType(SkPath::kEvenOdd_FillType); | 190 path.setFillType(SkPath::kEvenOdd_FillType); |
| 193 path.moveTo(0,0); | 191 path.moveTo(0,0); |
| 194 path.lineTo(4,0); | 192 path.lineTo(4,0); |
| 195 path.lineTo(2,2); | 193 path.lineTo(2,2); |
| 196 path.close(); | 194 path.close(); |
| 197 path.moveTo(6,0); | 195 path.moveTo(6,0); |
| 198 path.lineTo(2,0); | 196 path.lineTo(2,0); |
| 199 path.lineTo(4,2); | 197 path.lineTo(4,2); |
| 200 path.close(); | 198 path.close(); |
| 201 testSimplify(reporter, path); | 199 testSimplify(reporter, path, filename); |
| 202 } | 200 } |
| 203 | 201 |
| 204 static void testLine7a(skiatest::Reporter* reporter) { | 202 static void testLine7a(skiatest::Reporter* reporter, const char* filename) { |
| 205 SkPath path; | 203 SkPath path; |
| 206 path.moveTo(0,0); | 204 path.moveTo(0,0); |
| 207 path.lineTo(4,0); | 205 path.lineTo(4,0); |
| 208 path.lineTo(2,2); | 206 path.lineTo(2,2); |
| 209 path.close(); | 207 path.close(); |
| 210 testSimplify(reporter, path); | 208 testSimplify(reporter, path, filename); |
| 211 } | 209 } |
| 212 | 210 |
| 213 static void testLine7ax(skiatest::Reporter* reporter) { | 211 static void testLine7ax(skiatest::Reporter* reporter, const char* filename) { |
| 214 SkPath path; | 212 SkPath path; |
| 215 path.setFillType(SkPath::kEvenOdd_FillType); | 213 path.setFillType(SkPath::kEvenOdd_FillType); |
| 216 path.moveTo(0,0); | 214 path.moveTo(0,0); |
| 217 path.lineTo(4,0); | 215 path.lineTo(4,0); |
| 218 path.lineTo(2,2); | 216 path.lineTo(2,2); |
| 219 path.close(); | 217 path.close(); |
| 220 testSimplify(reporter, path); | 218 testSimplify(reporter, path, filename); |
| 221 } | 219 } |
| 222 | 220 |
| 223 static void testLine7b(skiatest::Reporter* reporter) { | 221 static void testLine7b(skiatest::Reporter* reporter, const char* filename) { |
| 224 SkPath path; | 222 SkPath path; |
| 225 path.moveTo(0,0); | 223 path.moveTo(0,0); |
| 226 path.lineTo(4,0); | 224 path.lineTo(4,0); |
| 227 path.close(); | 225 path.close(); |
| 228 path.moveTo(6,0); | 226 path.moveTo(6,0); |
| 229 path.lineTo(2,0); | 227 path.lineTo(2,0); |
| 230 path.lineTo(4,2); | 228 path.lineTo(4,2); |
| 231 path.close(); | 229 path.close(); |
| 232 testSimplify(reporter, path); | 230 testSimplify(reporter, path, filename); |
| 233 } | 231 } |
| 234 | 232 |
| 235 static void testLine7bx(skiatest::Reporter* reporter) { | 233 static void testLine7bx(skiatest::Reporter* reporter, const char* filename) { |
| 236 SkPath path; | 234 SkPath path; |
| 237 path.setFillType(SkPath::kEvenOdd_FillType); | 235 path.setFillType(SkPath::kEvenOdd_FillType); |
| 238 path.moveTo(0,0); | 236 path.moveTo(0,0); |
| 239 path.lineTo(4,0); | 237 path.lineTo(4,0); |
| 240 path.close(); | 238 path.close(); |
| 241 path.moveTo(6,0); | 239 path.moveTo(6,0); |
| 242 path.lineTo(2,0); | 240 path.lineTo(2,0); |
| 243 path.lineTo(4,2); | 241 path.lineTo(4,2); |
| 244 path.close(); | 242 path.close(); |
| 245 testSimplify(reporter, path); | 243 testSimplify(reporter, path, filename); |
| 246 } | 244 } |
| 247 | 245 |
| 248 static void testLine8(skiatest::Reporter* reporter) { | 246 static void testLine8(skiatest::Reporter* reporter, const char* filename) { |
| 249 SkPath path; | 247 SkPath path; |
| 250 path.moveTo(0,4); | 248 path.moveTo(0,4); |
| 251 path.lineTo(4,4); | 249 path.lineTo(4,4); |
| 252 path.lineTo(2,2); | 250 path.lineTo(2,2); |
| 253 path.close(); | 251 path.close(); |
| 254 path.moveTo(2,4); | 252 path.moveTo(2,4); |
| 255 path.lineTo(6,4); | 253 path.lineTo(6,4); |
| 256 path.lineTo(4,2); | 254 path.lineTo(4,2); |
| 257 path.close(); | 255 path.close(); |
| 258 testSimplify(reporter, path); | 256 testSimplify(reporter, path, filename); |
| 259 } | 257 } |
| 260 | 258 |
| 261 static void testLine8x(skiatest::Reporter* reporter) { | 259 static void testLine8x(skiatest::Reporter* reporter, const char* filename) { |
| 262 SkPath path; | 260 SkPath path; |
| 263 path.setFillType(SkPath::kEvenOdd_FillType); | 261 path.setFillType(SkPath::kEvenOdd_FillType); |
| 264 path.moveTo(0,4); | 262 path.moveTo(0,4); |
| 265 path.lineTo(4,4); | 263 path.lineTo(4,4); |
| 266 path.lineTo(2,2); | 264 path.lineTo(2,2); |
| 267 path.close(); | 265 path.close(); |
| 268 path.moveTo(2,4); | 266 path.moveTo(2,4); |
| 269 path.lineTo(6,4); | 267 path.lineTo(6,4); |
| 270 path.lineTo(4,2); | 268 path.lineTo(4,2); |
| 271 path.close(); | 269 path.close(); |
| 272 testSimplify(reporter, path); | 270 testSimplify(reporter, path, filename); |
| 273 } | 271 } |
| 274 | 272 |
| 275 static void testLine9(skiatest::Reporter* reporter) { | 273 static void testLine9(skiatest::Reporter* reporter, const char* filename) { |
| 276 SkPath path; | 274 SkPath path; |
| 277 path.moveTo(0,4); | 275 path.moveTo(0,4); |
| 278 path.lineTo(4,4); | 276 path.lineTo(4,4); |
| 279 path.lineTo(2,2); | 277 path.lineTo(2,2); |
| 280 path.close(); | 278 path.close(); |
| 281 path.moveTo(6,4); | 279 path.moveTo(6,4); |
| 282 path.lineTo(2,4); | 280 path.lineTo(2,4); |
| 283 path.lineTo(4,2); | 281 path.lineTo(4,2); |
| 284 path.close(); | 282 path.close(); |
| 285 testSimplify(reporter, path); | 283 testSimplify(reporter, path, filename); |
| 286 } | 284 } |
| 287 | 285 |
| 288 static void testLine9x(skiatest::Reporter* reporter) { | 286 static void testLine9x(skiatest::Reporter* reporter, const char* filename) { |
| 289 SkPath path; | 287 SkPath path; |
| 290 path.setFillType(SkPath::kEvenOdd_FillType); | 288 path.setFillType(SkPath::kEvenOdd_FillType); |
| 291 path.moveTo(0,4); | 289 path.moveTo(0,4); |
| 292 path.lineTo(4,4); | 290 path.lineTo(4,4); |
| 293 path.lineTo(2,2); | 291 path.lineTo(2,2); |
| 294 path.close(); | 292 path.close(); |
| 295 path.moveTo(6,4); | 293 path.moveTo(6,4); |
| 296 path.lineTo(2,4); | 294 path.lineTo(2,4); |
| 297 path.lineTo(4,2); | 295 path.lineTo(4,2); |
| 298 path.close(); | 296 path.close(); |
| 299 testSimplify(reporter, path); | 297 testSimplify(reporter, path, filename); |
| 300 } | 298 } |
| 301 | 299 |
| 302 static void testLine10(skiatest::Reporter* reporter) { | 300 static void testLine10(skiatest::Reporter* reporter, const char* filename) { |
| 303 SkPath path; | 301 SkPath path; |
| 304 path.moveTo(0,4); | 302 path.moveTo(0,4); |
| 305 path.lineTo(4,4); | 303 path.lineTo(4,4); |
| 306 path.lineTo(2,2); | 304 path.lineTo(2,2); |
| 307 path.close(); | 305 path.close(); |
| 308 path.moveTo(2,1); | 306 path.moveTo(2,1); |
| 309 path.lineTo(3,4); | 307 path.lineTo(3,4); |
| 310 path.lineTo(6,1); | 308 path.lineTo(6,1); |
| 311 path.close(); | 309 path.close(); |
| 312 testSimplify(reporter, path); | 310 testSimplify(reporter, path, filename); |
| 313 } | 311 } |
| 314 | 312 |
| 315 static void testLine10x(skiatest::Reporter* reporter) { | 313 static void testLine10x(skiatest::Reporter* reporter, const char* filename) { |
| 316 SkPath path; | 314 SkPath path; |
| 317 path.setFillType(SkPath::kEvenOdd_FillType); | 315 path.setFillType(SkPath::kEvenOdd_FillType); |
| 318 path.moveTo(0,4); | 316 path.moveTo(0,4); |
| 319 path.lineTo(4,4); | 317 path.lineTo(4,4); |
| 320 path.lineTo(2,2); | 318 path.lineTo(2,2); |
| 321 path.close(); | 319 path.close(); |
| 322 path.moveTo(2,1); | 320 path.moveTo(2,1); |
| 323 path.lineTo(3,4); | 321 path.lineTo(3,4); |
| 324 path.lineTo(6,1); | 322 path.lineTo(6,1); |
| 325 path.close(); | 323 path.close(); |
| 326 testSimplify(reporter, path); | 324 testSimplify(reporter, path, filename); |
| 327 } | 325 } |
| 328 | 326 |
| 329 static void testLine10a(skiatest::Reporter* reporter) { | 327 static void testLine10a(skiatest::Reporter* reporter, const char* filename) { |
| 330 SkPath path; | 328 SkPath path; |
| 331 path.moveTo(0,4); | 329 path.moveTo(0,4); |
| 332 path.lineTo(8,4); | 330 path.lineTo(8,4); |
| 333 path.lineTo(4,0); | 331 path.lineTo(4,0); |
| 334 path.close(); | 332 path.close(); |
| 335 path.moveTo(2,2); | 333 path.moveTo(2,2); |
| 336 path.lineTo(3,3); | 334 path.lineTo(3,3); |
| 337 path.lineTo(4,2); | 335 path.lineTo(4,2); |
| 338 path.close(); | 336 path.close(); |
| 339 testSimplify(reporter, path); | 337 testSimplify(reporter, path, filename); |
| 340 } | 338 } |
| 341 | 339 |
| 342 static void testLine10ax(skiatest::Reporter* reporter) { | 340 static void testLine10ax(skiatest::Reporter* reporter, const char* filename) { |
| 343 SkPath path; | 341 SkPath path; |
| 344 path.setFillType(SkPath::kEvenOdd_FillType); | 342 path.setFillType(SkPath::kEvenOdd_FillType); |
| 345 path.moveTo(0,4); | 343 path.moveTo(0,4); |
| 346 path.lineTo(8,4); | 344 path.lineTo(8,4); |
| 347 path.lineTo(4,0); | 345 path.lineTo(4,0); |
| 348 path.close(); | 346 path.close(); |
| 349 path.moveTo(2,2); | 347 path.moveTo(2,2); |
| 350 path.lineTo(3,3); | 348 path.lineTo(3,3); |
| 351 path.lineTo(4,2); | 349 path.lineTo(4,2); |
| 352 path.close(); | 350 path.close(); |
| 353 testSimplify(reporter, path); | 351 testSimplify(reporter, path, filename); |
| 354 } | 352 } |
| 355 | 353 |
| 356 static void addCWContainer(SkPath& path) { | 354 static void addCWContainer(SkPath& path) { |
| 357 path.moveTo(6,4); | 355 path.moveTo(6,4); |
| 358 path.lineTo(0,4); | 356 path.lineTo(0,4); |
| 359 path.lineTo(3,1); | 357 path.lineTo(3,1); |
| 360 path.close(); | 358 path.close(); |
| 361 } | 359 } |
| 362 | 360 |
| 363 static void addCCWContainer(SkPath& path) { | 361 static void addCCWContainer(SkPath& path) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 374 path.close(); | 372 path.close(); |
| 375 } | 373 } |
| 376 | 374 |
| 377 static void addCCWContents(SkPath& path) { | 375 static void addCCWContents(SkPath& path) { |
| 378 path.moveTo(3,2); | 376 path.moveTo(3,2); |
| 379 path.lineTo(2,3); | 377 path.lineTo(2,3); |
| 380 path.lineTo(4,3); | 378 path.lineTo(4,3); |
| 381 path.close(); | 379 path.close(); |
| 382 } | 380 } |
| 383 | 381 |
| 384 static void testLine11(skiatest::Reporter* reporter) { | 382 static void testLine11(skiatest::Reporter* reporter, const char* filename) { |
| 385 SkPath path; | 383 SkPath path; |
| 386 addCWContainer(path); | 384 addCWContainer(path); |
| 387 addCWContents(path); | 385 addCWContents(path); |
| 388 testSimplify(reporter, path); | 386 testSimplify(reporter, path, filename); |
| 389 } | 387 } |
| 390 | 388 |
| 391 static void testLine11x(skiatest::Reporter* reporter) { | 389 static void testLine11x(skiatest::Reporter* reporter, const char* filename) { |
| 392 SkPath path; | 390 SkPath path; |
| 393 path.setFillType(SkPath::kEvenOdd_FillType); | 391 path.setFillType(SkPath::kEvenOdd_FillType); |
| 394 addCWContainer(path); | 392 addCWContainer(path); |
| 395 addCWContents(path); | 393 addCWContents(path); |
| 396 testSimplify(reporter, path); | 394 testSimplify(reporter, path, filename); |
| 397 } | 395 } |
| 398 | 396 |
| 399 static void testLine12(skiatest::Reporter* reporter) { | 397 static void testLine12(skiatest::Reporter* reporter, const char* filename) { |
| 400 SkPath path; | 398 SkPath path; |
| 401 addCCWContainer(path); | 399 addCCWContainer(path); |
| 402 addCWContents(path); | 400 addCWContents(path); |
| 403 testSimplify(reporter, path); | 401 testSimplify(reporter, path, filename); |
| 404 } | 402 } |
| 405 | 403 |
| 406 static void testLine12x(skiatest::Reporter* reporter) { | 404 static void testLine12x(skiatest::Reporter* reporter, const char* filename) { |
| 407 SkPath path; | 405 SkPath path; |
| 408 path.setFillType(SkPath::kEvenOdd_FillType); | 406 path.setFillType(SkPath::kEvenOdd_FillType); |
| 409 addCCWContainer(path); | 407 addCCWContainer(path); |
| 410 addCWContents(path); | 408 addCWContents(path); |
| 411 testSimplify(reporter, path); | 409 testSimplify(reporter, path, filename); |
| 412 } | 410 } |
| 413 | 411 |
| 414 static void testLine13(skiatest::Reporter* reporter) { | 412 static void testLine13(skiatest::Reporter* reporter, const char* filename) { |
| 415 SkPath path; | 413 SkPath path; |
| 416 addCWContainer(path); | 414 addCWContainer(path); |
| 417 addCCWContents(path); | 415 addCCWContents(path); |
| 418 testSimplify(reporter, path); | 416 testSimplify(reporter, path, filename); |
| 419 } | 417 } |
| 420 | 418 |
| 421 static void testLine13x(skiatest::Reporter* reporter) { | 419 static void testLine13x(skiatest::Reporter* reporter, const char* filename) { |
| 422 SkPath path; | 420 SkPath path; |
| 423 path.setFillType(SkPath::kEvenOdd_FillType); | 421 path.setFillType(SkPath::kEvenOdd_FillType); |
| 424 addCWContainer(path); | 422 addCWContainer(path); |
| 425 addCCWContents(path); | 423 addCCWContents(path); |
| 426 testSimplify(reporter, path); | 424 testSimplify(reporter, path, filename); |
| 427 } | 425 } |
| 428 | 426 |
| 429 static void testLine14(skiatest::Reporter* reporter) { | 427 static void testLine14(skiatest::Reporter* reporter, const char* filename) { |
| 430 SkPath path; | 428 SkPath path; |
| 431 addCCWContainer(path); | 429 addCCWContainer(path); |
| 432 addCCWContents(path); | 430 addCCWContents(path); |
| 433 testSimplify(reporter, path); | 431 testSimplify(reporter, path, filename); |
| 434 } | 432 } |
| 435 | 433 |
| 436 static void testLine14x(skiatest::Reporter* reporter) { | 434 static void testLine14x(skiatest::Reporter* reporter, const char* filename) { |
| 437 SkPath path; | 435 SkPath path; |
| 438 path.setFillType(SkPath::kEvenOdd_FillType); | 436 path.setFillType(SkPath::kEvenOdd_FillType); |
| 439 addCCWContainer(path); | 437 addCCWContainer(path); |
| 440 addCCWContents(path); | 438 addCCWContents(path); |
| 441 testSimplify(reporter, path); | 439 testSimplify(reporter, path, filename); |
| 442 } | 440 } |
| 443 | 441 |
| 444 static void testLine15(skiatest::Reporter* reporter) { | 442 static void testLine15(skiatest::Reporter* reporter, const char* filename) { |
| 445 SkPath path; | 443 SkPath path; |
| 446 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 444 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 447 testSimplify(reporter, path); | 445 testSimplify(reporter, path, filename); |
| 448 } | 446 } |
| 449 | 447 |
| 450 static void testLine15x(skiatest::Reporter* reporter) { | 448 static void testLine15x(skiatest::Reporter* reporter, const char* filename) { |
| 451 SkPath path; | 449 SkPath path; |
| 452 path.setFillType(SkPath::kEvenOdd_FillType); | 450 path.setFillType(SkPath::kEvenOdd_FillType); |
| 453 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 451 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 454 testSimplify(reporter, path); | 452 testSimplify(reporter, path, filename); |
| 455 } | 453 } |
| 456 | 454 |
| 457 static void testLine16(skiatest::Reporter* reporter) { | 455 static void testLine16(skiatest::Reporter* reporter, const char* filename) { |
| 458 SkPath path; | 456 SkPath path; |
| 459 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 457 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 460 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); | 458 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
| 461 testSimplify(reporter, path); | 459 testSimplify(reporter, path, filename); |
| 462 } | 460 } |
| 463 | 461 |
| 464 static void testLine16x(skiatest::Reporter* reporter) { | 462 static void testLine16x(skiatest::Reporter* reporter, const char* filename) { |
| 465 SkPath path; | 463 SkPath path; |
| 466 path.setFillType(SkPath::kEvenOdd_FillType); | 464 path.setFillType(SkPath::kEvenOdd_FillType); |
| 467 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 465 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 468 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); | 466 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
| 469 testSimplify(reporter, path); | 467 testSimplify(reporter, path, filename); |
| 470 } | 468 } |
| 471 | 469 |
| 472 static void testLine17(skiatest::Reporter* reporter) { | 470 static void testLine17(skiatest::Reporter* reporter, const char* filename) { |
| 473 SkPath path; | 471 SkPath path; |
| 474 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 472 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 475 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 473 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 476 testSimplify(reporter, path); | 474 testSimplify(reporter, path, filename); |
| 477 } | 475 } |
| 478 | 476 |
| 479 static void testLine17x(skiatest::Reporter* reporter) { | 477 static void testLine17x(skiatest::Reporter* reporter, const char* filename) { |
| 480 SkPath path; | 478 SkPath path; |
| 481 path.setFillType(SkPath::kEvenOdd_FillType); | 479 path.setFillType(SkPath::kEvenOdd_FillType); |
| 482 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 480 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 483 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 481 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 484 testSimplify(reporter, path); | 482 testSimplify(reporter, path, filename); |
| 485 } | 483 } |
| 486 | 484 |
| 487 static void testLine18(skiatest::Reporter* reporter) { | 485 static void testLine18(skiatest::Reporter* reporter, const char* filename) { |
| 488 SkPath path; | 486 SkPath path; |
| 489 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 487 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 490 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); | 488 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); |
| 491 testSimplify(reporter, path); | 489 testSimplify(reporter, path, filename); |
| 492 } | 490 } |
| 493 | 491 |
| 494 static void testLine18x(skiatest::Reporter* reporter) { | 492 static void testLine18x(skiatest::Reporter* reporter, const char* filename) { |
| 495 SkPath path; | 493 SkPath path; |
| 496 path.setFillType(SkPath::kEvenOdd_FillType); | 494 path.setFillType(SkPath::kEvenOdd_FillType); |
| 497 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 495 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 498 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); | 496 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); |
| 499 testSimplify(reporter, path); | 497 testSimplify(reporter, path, filename); |
| 500 } | 498 } |
| 501 | 499 |
| 502 static void testLine19(skiatest::Reporter* reporter) { | 500 static void testLine19(skiatest::Reporter* reporter, const char* filename) { |
| 503 SkPath path; | 501 SkPath path; |
| 504 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 502 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 505 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); | 503 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); |
| 506 testSimplify(reporter, path); | 504 testSimplify(reporter, path, filename); |
| 507 } | 505 } |
| 508 | 506 |
| 509 static void testLine19x(skiatest::Reporter* reporter) { | 507 static void testLine19x(skiatest::Reporter* reporter, const char* filename) { |
| 510 SkPath path; | 508 SkPath path; |
| 511 path.setFillType(SkPath::kEvenOdd_FillType); | 509 path.setFillType(SkPath::kEvenOdd_FillType); |
| 512 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 510 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 513 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); | 511 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); |
| 514 testSimplify(reporter, path); | 512 testSimplify(reporter, path, filename); |
| 515 } | 513 } |
| 516 | 514 |
| 517 static void testLine20(skiatest::Reporter* reporter) { | 515 static void testLine20(skiatest::Reporter* reporter, const char* filename) { |
| 518 SkPath path; | 516 SkPath path; |
| 519 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 517 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 520 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); | 518 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
| 521 testSimplify(reporter, path); | 519 testSimplify(reporter, path, filename); |
| 522 } | 520 } |
| 523 | 521 |
| 524 static void testLine20x(skiatest::Reporter* reporter) { | 522 static void testLine20x(skiatest::Reporter* reporter, const char* filename) { |
| 525 SkPath path; | 523 SkPath path; |
| 526 path.setFillType(SkPath::kEvenOdd_FillType); | 524 path.setFillType(SkPath::kEvenOdd_FillType); |
| 527 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 525 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 528 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); | 526 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
| 529 testSimplify(reporter, path); | 527 testSimplify(reporter, path, filename); |
| 530 } | 528 } |
| 531 | 529 |
| 532 static void testLine21(skiatest::Reporter* reporter) { | 530 static void testLine21(skiatest::Reporter* reporter, const char* filename) { |
| 533 SkPath path; | 531 SkPath path; |
| 534 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 532 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 535 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); | 533 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); |
| 536 testSimplify(reporter, path); | 534 testSimplify(reporter, path, filename); |
| 537 } | 535 } |
| 538 | 536 |
| 539 static void testLine21x(skiatest::Reporter* reporter) { | 537 static void testLine21x(skiatest::Reporter* reporter, const char* filename) { |
| 540 SkPath path; | 538 SkPath path; |
| 541 path.setFillType(SkPath::kEvenOdd_FillType); | 539 path.setFillType(SkPath::kEvenOdd_FillType); |
| 542 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 540 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 543 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); | 541 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); |
| 544 testSimplify(reporter, path); | 542 testSimplify(reporter, path, filename); |
| 545 } | 543 } |
| 546 | 544 |
| 547 static void testLine22(skiatest::Reporter* reporter) { | 545 static void testLine22(skiatest::Reporter* reporter, const char* filename) { |
| 548 SkPath path; | 546 SkPath path; |
| 549 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 547 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 550 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 548 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 551 testSimplify(reporter, path); | 549 testSimplify(reporter, path, filename); |
| 552 } | 550 } |
| 553 | 551 |
| 554 static void testLine22x(skiatest::Reporter* reporter) { | 552 static void testLine22x(skiatest::Reporter* reporter, const char* filename) { |
| 555 SkPath path; | 553 SkPath path; |
| 556 path.setFillType(SkPath::kEvenOdd_FillType); | 554 path.setFillType(SkPath::kEvenOdd_FillType); |
| 557 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 555 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 558 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 556 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 559 testSimplify(reporter, path); | 557 testSimplify(reporter, path, filename); |
| 560 } | 558 } |
| 561 | 559 |
| 562 static void testLine23(skiatest::Reporter* reporter) { | 560 static void testLine23(skiatest::Reporter* reporter, const char* filename) { |
| 563 SkPath path; | 561 SkPath path; |
| 564 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 562 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 565 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); | 563 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
| 566 testSimplify(reporter, path); | 564 testSimplify(reporter, path, filename); |
| 567 } | 565 } |
| 568 | 566 |
| 569 static void testLine23x(skiatest::Reporter* reporter) { | 567 static void testLine23x(skiatest::Reporter* reporter, const char* filename) { |
| 570 SkPath path; | 568 SkPath path; |
| 571 path.setFillType(SkPath::kEvenOdd_FillType); | 569 path.setFillType(SkPath::kEvenOdd_FillType); |
| 572 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 570 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 573 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); | 571 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
| 574 testSimplify(reporter, path); | 572 testSimplify(reporter, path, filename); |
| 575 } | 573 } |
| 576 | 574 |
| 577 static void testLine24a(skiatest::Reporter* reporter) { | 575 static void testLine24a(skiatest::Reporter* reporter, const char* filename) { |
| 578 SkPath path; | 576 SkPath path; |
| 579 path.moveTo(2,0); | 577 path.moveTo(2,0); |
| 580 path.lineTo(4,4); | 578 path.lineTo(4,4); |
| 581 path.lineTo(0,4); | 579 path.lineTo(0,4); |
| 582 path.close(); | 580 path.close(); |
| 583 path.moveTo(2,0); | 581 path.moveTo(2,0); |
| 584 path.lineTo(1,2); | 582 path.lineTo(1,2); |
| 585 path.lineTo(2,2); | 583 path.lineTo(2,2); |
| 586 path.close(); | 584 path.close(); |
| 587 testSimplify(reporter, path); | 585 testSimplify(reporter, path, filename); |
| 588 } | 586 } |
| 589 | 587 |
| 590 static void testLine24ax(skiatest::Reporter* reporter) { | 588 static void testLine24ax(skiatest::Reporter* reporter, const char* filename) { |
| 591 SkPath path; | 589 SkPath path; |
| 592 path.setFillType(SkPath::kEvenOdd_FillType); | 590 path.setFillType(SkPath::kEvenOdd_FillType); |
| 593 path.moveTo(2,0); | 591 path.moveTo(2,0); |
| 594 path.lineTo(4,4); | 592 path.lineTo(4,4); |
| 595 path.lineTo(0,4); | 593 path.lineTo(0,4); |
| 596 path.close(); | 594 path.close(); |
| 597 path.moveTo(2,0); | 595 path.moveTo(2,0); |
| 598 path.lineTo(1,2); | 596 path.lineTo(1,2); |
| 599 path.lineTo(2,2); | 597 path.lineTo(2,2); |
| 600 path.close(); | 598 path.close(); |
| 601 testSimplify(reporter, path); | 599 testSimplify(reporter, path, filename); |
| 602 } | 600 } |
| 603 | 601 |
| 604 static void testLine24(skiatest::Reporter* reporter) { | 602 static void testLine24(skiatest::Reporter* reporter, const char* filename) { |
| 605 SkPath path; | 603 SkPath path; |
| 606 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 604 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 607 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 605 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 608 testSimplify(reporter, path); | 606 testSimplify(reporter, path, filename); |
| 609 } | 607 } |
| 610 | 608 |
| 611 static void testLine24x(skiatest::Reporter* reporter) { | 609 static void testLine24x(skiatest::Reporter* reporter, const char* filename) { |
| 612 SkPath path; | 610 SkPath path; |
| 613 path.setFillType(SkPath::kEvenOdd_FillType); | 611 path.setFillType(SkPath::kEvenOdd_FillType); |
| 614 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 612 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 615 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 613 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 616 testSimplify(reporter, path); | 614 testSimplify(reporter, path, filename); |
| 617 } | 615 } |
| 618 | 616 |
| 619 static void testLine25(skiatest::Reporter* reporter) { | 617 static void testLine25(skiatest::Reporter* reporter, const char* filename) { |
| 620 SkPath path; | 618 SkPath path; |
| 621 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 619 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 622 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); | 620 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
| 623 testSimplify(reporter, path); | 621 testSimplify(reporter, path, filename); |
| 624 } | 622 } |
| 625 | 623 |
| 626 static void testLine25x(skiatest::Reporter* reporter) { | 624 static void testLine25x(skiatest::Reporter* reporter, const char* filename) { |
| 627 SkPath path; | 625 SkPath path; |
| 628 path.setFillType(SkPath::kEvenOdd_FillType); | 626 path.setFillType(SkPath::kEvenOdd_FillType); |
| 629 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 627 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 630 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); | 628 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
| 631 testSimplify(reporter, path); | 629 testSimplify(reporter, path, filename); |
| 632 } | 630 } |
| 633 | 631 |
| 634 static void testLine26(skiatest::Reporter* reporter) { | 632 static void testLine26(skiatest::Reporter* reporter, const char* filename) { |
| 635 SkPath path; | 633 SkPath path; |
| 636 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 634 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 637 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); | 635 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
| 638 testSimplify(reporter, path); | 636 testSimplify(reporter, path, filename); |
| 639 } | 637 } |
| 640 | 638 |
| 641 static void testLine26x(skiatest::Reporter* reporter) { | 639 static void testLine26x(skiatest::Reporter* reporter, const char* filename) { |
| 642 SkPath path; | 640 SkPath path; |
| 643 path.setFillType(SkPath::kEvenOdd_FillType); | 641 path.setFillType(SkPath::kEvenOdd_FillType); |
| 644 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 642 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 645 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); | 643 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); |
| 646 testSimplify(reporter, path); | 644 testSimplify(reporter, path, filename); |
| 647 } | 645 } |
| 648 | 646 |
| 649 static void testLine27(skiatest::Reporter* reporter) { | 647 static void testLine27(skiatest::Reporter* reporter, const char* filename) { |
| 650 SkPath path; | 648 SkPath path; |
| 651 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 649 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 652 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); | 650 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); |
| 653 testSimplify(reporter, path); | 651 testSimplify(reporter, path, filename); |
| 654 } | 652 } |
| 655 | 653 |
| 656 static void testLine27x(skiatest::Reporter* reporter) { | 654 static void testLine27x(skiatest::Reporter* reporter, const char* filename) { |
| 657 SkPath path; | 655 SkPath path; |
| 658 path.setFillType(SkPath::kEvenOdd_FillType); | 656 path.setFillType(SkPath::kEvenOdd_FillType); |
| 659 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 657 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 660 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); | 658 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); |
| 661 testSimplify(reporter, path); | 659 testSimplify(reporter, path, filename); |
| 662 } | 660 } |
| 663 | 661 |
| 664 static void testLine28(skiatest::Reporter* reporter) { | 662 static void testLine28(skiatest::Reporter* reporter, const char* filename) { |
| 665 SkPath path; | 663 SkPath path; |
| 666 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 664 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 667 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 665 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 668 testSimplify(reporter, path); | 666 testSimplify(reporter, path, filename); |
| 669 } | 667 } |
| 670 | 668 |
| 671 static void testLine28x(skiatest::Reporter* reporter) { | 669 static void testLine28x(skiatest::Reporter* reporter, const char* filename) { |
| 672 SkPath path; | 670 SkPath path; |
| 673 path.setFillType(SkPath::kEvenOdd_FillType); | 671 path.setFillType(SkPath::kEvenOdd_FillType); |
| 674 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 672 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 675 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 673 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 676 testSimplify(reporter, path); | 674 testSimplify(reporter, path, filename); |
| 677 } | 675 } |
| 678 | 676 |
| 679 static void testLine29(skiatest::Reporter* reporter) { | 677 static void testLine29(skiatest::Reporter* reporter, const char* filename) { |
| 680 SkPath path; | 678 SkPath path; |
| 681 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 679 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 682 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); | 680 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
| 683 testSimplify(reporter, path); | 681 testSimplify(reporter, path, filename); |
| 684 } | 682 } |
| 685 | 683 |
| 686 static void testLine29x(skiatest::Reporter* reporter) { | 684 static void testLine29x(skiatest::Reporter* reporter, const char* filename) { |
| 687 SkPath path; | 685 SkPath path; |
| 688 path.setFillType(SkPath::kEvenOdd_FillType); | 686 path.setFillType(SkPath::kEvenOdd_FillType); |
| 689 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); | 687 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); |
| 690 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); | 688 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
| 691 testSimplify(reporter, path); | 689 testSimplify(reporter, path, filename); |
| 692 } | 690 } |
| 693 | 691 |
| 694 static void testLine30(skiatest::Reporter* reporter) { | 692 static void testLine30(skiatest::Reporter* reporter, const char* filename) { |
| 695 SkPath path; | 693 SkPath path; |
| 696 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 694 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 697 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 695 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 698 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); | 696 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); |
| 699 testSimplify(reporter, path); | 697 testSimplify(reporter, path, filename); |
| 700 } | 698 } |
| 701 | 699 |
| 702 static void testLine30x(skiatest::Reporter* reporter) { | 700 static void testLine30x(skiatest::Reporter* reporter, const char* filename) { |
| 703 SkPath path; | 701 SkPath path; |
| 704 path.setFillType(SkPath::kEvenOdd_FillType); | 702 path.setFillType(SkPath::kEvenOdd_FillType); |
| 705 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 703 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 706 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 704 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 707 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); | 705 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); |
| 708 testSimplify(reporter, path); | 706 testSimplify(reporter, path, filename); |
| 709 } | 707 } |
| 710 | 708 |
| 711 static void testLine31(skiatest::Reporter* reporter) { | 709 static void testLine31(skiatest::Reporter* reporter, const char* filename) { |
| 712 SkPath path; | 710 SkPath path; |
| 713 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 711 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 714 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 712 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 715 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); | 713 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
| 716 testSimplify(reporter, path); | 714 testSimplify(reporter, path, filename); |
| 717 } | 715 } |
| 718 | 716 |
| 719 static void testLine31x(skiatest::Reporter* reporter) { | 717 static void testLine31x(skiatest::Reporter* reporter, const char* filename) { |
| 720 SkPath path; | 718 SkPath path; |
| 721 path.setFillType(SkPath::kEvenOdd_FillType); | 719 path.setFillType(SkPath::kEvenOdd_FillType); |
| 722 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 720 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 723 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 721 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 724 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); | 722 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); |
| 725 testSimplify(reporter, path); | 723 testSimplify(reporter, path, filename); |
| 726 } | 724 } |
| 727 | 725 |
| 728 static void testLine32(skiatest::Reporter* reporter) { | 726 static void testLine32(skiatest::Reporter* reporter, const char* filename) { |
| 729 SkPath path; | 727 SkPath path; |
| 730 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 728 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 731 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 729 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 732 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 730 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 733 testSimplify(reporter, path); | 731 testSimplify(reporter, path, filename); |
| 734 } | 732 } |
| 735 | 733 |
| 736 static void testLine32x(skiatest::Reporter* reporter) { | 734 static void testLine32x(skiatest::Reporter* reporter, const char* filename) { |
| 737 SkPath path; | 735 SkPath path; |
| 738 path.setFillType(SkPath::kEvenOdd_FillType); | 736 path.setFillType(SkPath::kEvenOdd_FillType); |
| 739 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 737 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 740 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 738 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 741 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 739 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 742 testSimplify(reporter, path); | 740 testSimplify(reporter, path, filename); |
| 743 } | 741 } |
| 744 | 742 |
| 745 static void testLine33(skiatest::Reporter* reporter) { | 743 static void testLine33(skiatest::Reporter* reporter, const char* filename) { |
| 746 SkPath path; | 744 SkPath path; |
| 747 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 745 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 748 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 746 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 749 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 747 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 750 testSimplify(reporter, path); | 748 testSimplify(reporter, path, filename); |
| 751 } | 749 } |
| 752 | 750 |
| 753 static void testLine33x(skiatest::Reporter* reporter) { | 751 static void testLine33x(skiatest::Reporter* reporter, const char* filename) { |
| 754 SkPath path; | 752 SkPath path; |
| 755 path.setFillType(SkPath::kEvenOdd_FillType); | 753 path.setFillType(SkPath::kEvenOdd_FillType); |
| 756 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 754 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 757 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 755 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 758 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 756 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 759 testSimplify(reporter, path); | 757 testSimplify(reporter, path, filename); |
| 760 } | 758 } |
| 761 | 759 |
| 762 static void testLine34(skiatest::Reporter* reporter) { | 760 static void testLine34(skiatest::Reporter* reporter, const char* filename) { |
| 763 SkPath path; | 761 SkPath path; |
| 764 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 762 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 765 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 763 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 766 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 764 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 767 testSimplify(reporter, path); | 765 testSimplify(reporter, path, filename); |
| 768 } | 766 } |
| 769 | 767 |
| 770 static void testLine34x(skiatest::Reporter* reporter) { | 768 static void testLine34x(skiatest::Reporter* reporter, const char* filename) { |
| 771 SkPath path; | 769 SkPath path; |
| 772 path.setFillType(SkPath::kEvenOdd_FillType); | 770 path.setFillType(SkPath::kEvenOdd_FillType); |
| 773 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 771 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 774 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 772 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 775 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 773 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 776 testSimplify(reporter, path); | 774 testSimplify(reporter, path, filename); |
| 777 } | 775 } |
| 778 | 776 |
| 779 static void testLine35(skiatest::Reporter* reporter) { | 777 static void testLine35(skiatest::Reporter* reporter, const char* filename) { |
| 780 SkPath path; | 778 SkPath path; |
| 781 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 779 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 782 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); | 780 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 783 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 781 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 784 testSimplify(reporter, path); | 782 testSimplify(reporter, path, filename); |
| 785 } | 783 } |
| 786 | 784 |
| 787 static void testLine35x(skiatest::Reporter* reporter) { | 785 static void testLine35x(skiatest::Reporter* reporter, const char* filename) { |
| 788 SkPath path; | 786 SkPath path; |
| 789 path.setFillType(SkPath::kEvenOdd_FillType); | 787 path.setFillType(SkPath::kEvenOdd_FillType); |
| 790 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 788 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 791 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); | 789 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 792 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 790 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 793 testSimplify(reporter, path); | 791 testSimplify(reporter, path, filename); |
| 794 } | 792 } |
| 795 | 793 |
| 796 static void testLine36(skiatest::Reporter* reporter) { | 794 static void testLine36(skiatest::Reporter* reporter, const char* filename) { |
| 797 SkPath path; | 795 SkPath path; |
| 798 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); | 796 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 799 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); | 797 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 800 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 798 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 801 testSimplify(reporter, path); | 799 testSimplify(reporter, path, filename); |
| 802 } | 800 } |
| 803 | 801 |
| 804 static void testLine36x(skiatest::Reporter* reporter) { | 802 static void testLine36x(skiatest::Reporter* reporter, const char* filename) { |
| 805 SkPath path; | 803 SkPath path; |
| 806 path.setFillType(SkPath::kEvenOdd_FillType); | 804 path.setFillType(SkPath::kEvenOdd_FillType); |
| 807 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); | 805 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 808 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); | 806 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 809 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 807 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 810 testSimplify(reporter, path); | 808 testSimplify(reporter, path, filename); |
| 811 } | 809 } |
| 812 | 810 |
| 813 static void testLine37(skiatest::Reporter* reporter) { | 811 static void testLine37(skiatest::Reporter* reporter, const char* filename) { |
| 814 SkPath path; | 812 SkPath path; |
| 815 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); | 813 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 816 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); | 814 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 817 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 815 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 818 testSimplify(reporter, path); | 816 testSimplify(reporter, path, filename); |
| 819 } | 817 } |
| 820 | 818 |
| 821 static void testLine37x(skiatest::Reporter* reporter) { | 819 static void testLine37x(skiatest::Reporter* reporter, const char* filename) { |
| 822 SkPath path; | 820 SkPath path; |
| 823 path.setFillType(SkPath::kEvenOdd_FillType); | 821 path.setFillType(SkPath::kEvenOdd_FillType); |
| 824 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); | 822 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 825 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); | 823 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 826 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 824 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 827 testSimplify(reporter, path); | 825 testSimplify(reporter, path, filename); |
| 828 } | 826 } |
| 829 | 827 |
| 830 static void testLine38(skiatest::Reporter* reporter) { | 828 static void testLine38(skiatest::Reporter* reporter, const char* filename) { |
| 831 SkPath path; | 829 SkPath path; |
| 832 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 830 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 833 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); | 831 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 834 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); | 832 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
| 835 testSimplify(reporter, path); | 833 testSimplify(reporter, path, filename); |
| 836 } | 834 } |
| 837 | 835 |
| 838 static void testLine38x(skiatest::Reporter* reporter) { | 836 static void testLine38x(skiatest::Reporter* reporter, const char* filename) { |
| 839 SkPath path; | 837 SkPath path; |
| 840 path.setFillType(SkPath::kEvenOdd_FillType); | 838 path.setFillType(SkPath::kEvenOdd_FillType); |
| 841 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 839 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 842 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); | 840 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); |
| 843 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); | 841 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); |
| 844 testSimplify(reporter, path); | 842 testSimplify(reporter, path, filename); |
| 845 } | 843 } |
| 846 | 844 |
| 847 static void testLine40(skiatest::Reporter* reporter) { | 845 static void testLine40(skiatest::Reporter* reporter, const char* filename) { |
| 848 SkPath path; | 846 SkPath path; |
| 849 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 847 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 850 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); | 848 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); |
| 851 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 849 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 852 testSimplify(reporter, path); | 850 testSimplify(reporter, path, filename); |
| 853 } | 851 } |
| 854 | 852 |
| 855 static void testLine40x(skiatest::Reporter* reporter) { | 853 static void testLine40x(skiatest::Reporter* reporter, const char* filename) { |
| 856 SkPath path; | 854 SkPath path; |
| 857 path.setFillType(SkPath::kEvenOdd_FillType); | 855 path.setFillType(SkPath::kEvenOdd_FillType); |
| 858 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 856 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 859 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); | 857 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); |
| 860 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); | 858 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); |
| 861 testSimplify(reporter, path); | 859 testSimplify(reporter, path, filename); |
| 862 } | 860 } |
| 863 | 861 |
| 864 static void testLine41(skiatest::Reporter* reporter) { | 862 static void testLine41(skiatest::Reporter* reporter, const char* filename) { |
| 865 SkPath path; | 863 SkPath path; |
| 866 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 864 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 867 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); | 865 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 868 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); | 866 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
| 869 testSimplify(reporter, path); | 867 testSimplify(reporter, path, filename); |
| 870 } | 868 } |
| 871 | 869 |
| 872 static void testLine41x(skiatest::Reporter* reporter) { | 870 static void testLine41x(skiatest::Reporter* reporter, const char* filename) { |
| 873 SkPath path; | 871 SkPath path; |
| 874 path.setFillType(SkPath::kEvenOdd_FillType); | 872 path.setFillType(SkPath::kEvenOdd_FillType); |
| 875 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 873 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 876 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); | 874 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); |
| 877 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); | 875 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); |
| 878 testSimplify(reporter, path); | 876 testSimplify(reporter, path, filename); |
| 879 } | 877 } |
| 880 | 878 |
| 881 static void testLine42(skiatest::Reporter* reporter) { | 879 static void testLine42(skiatest::Reporter* reporter, const char* filename) { |
| 882 SkPath path; | 880 SkPath path; |
| 883 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 881 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 884 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 882 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 885 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); | 883 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); |
| 886 testSimplify(reporter, path); | 884 testSimplify(reporter, path, filename); |
| 887 } | 885 } |
| 888 | 886 |
| 889 static void testLine42x(skiatest::Reporter* reporter) { | 887 static void testLine42x(skiatest::Reporter* reporter, const char* filename) { |
| 890 SkPath path; | 888 SkPath path; |
| 891 path.setFillType(SkPath::kEvenOdd_FillType); | 889 path.setFillType(SkPath::kEvenOdd_FillType); |
| 892 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 890 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 893 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 891 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 894 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); | 892 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); |
| 895 testSimplify(reporter, path); | 893 testSimplify(reporter, path, filename); |
| 896 } | 894 } |
| 897 | 895 |
| 898 static void testLine43(skiatest::Reporter* reporter) { | 896 static void testLine43(skiatest::Reporter* reporter, const char* filename) { |
| 899 SkPath path; | 897 SkPath path; |
| 900 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 898 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 901 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); | 899 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); |
| 902 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 900 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 903 testSimplify(reporter, path); | 901 testSimplify(reporter, path, filename); |
| 904 } | 902 } |
| 905 | 903 |
| 906 static void testLine43x(skiatest::Reporter* reporter) { | 904 static void testLine43x(skiatest::Reporter* reporter, const char* filename) { |
| 907 SkPath path; | 905 SkPath path; |
| 908 path.setFillType(SkPath::kEvenOdd_FillType); | 906 path.setFillType(SkPath::kEvenOdd_FillType); |
| 909 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 907 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 910 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); | 908 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); |
| 911 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 909 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 912 testSimplify(reporter, path); | 910 testSimplify(reporter, path, filename); |
| 913 } | 911 } |
| 914 | 912 |
| 915 static void testLine44(skiatest::Reporter* reporter) { | 913 static void testLine44(skiatest::Reporter* reporter, const char* filename) { |
| 916 SkPath path; | 914 SkPath path; |
| 917 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 915 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 918 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); | 916 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 919 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); | 917 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); |
| 920 testSimplify(reporter, path); | 918 testSimplify(reporter, path, filename); |
| 921 } | 919 } |
| 922 | 920 |
| 923 static void testLine44x(skiatest::Reporter* reporter) { | 921 static void testLine44x(skiatest::Reporter* reporter, const char* filename) { |
| 924 SkPath path; | 922 SkPath path; |
| 925 path.setFillType(SkPath::kEvenOdd_FillType); | 923 path.setFillType(SkPath::kEvenOdd_FillType); |
| 926 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 924 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 927 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); | 925 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 928 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); | 926 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); |
| 929 testSimplify(reporter, path); | 927 testSimplify(reporter, path, filename); |
| 930 } | 928 } |
| 931 | 929 |
| 932 static void testLine45(skiatest::Reporter* reporter) { | 930 static void testLine45(skiatest::Reporter* reporter, const char* filename) { |
| 933 SkPath path; | 931 SkPath path; |
| 934 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 932 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 935 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); | 933 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 936 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); | 934 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
| 937 testSimplify(reporter, path); | 935 testSimplify(reporter, path, filename); |
| 938 } | 936 } |
| 939 | 937 |
| 940 static void testLine45x(skiatest::Reporter* reporter) { | 938 static void testLine45x(skiatest::Reporter* reporter, const char* filename) { |
| 941 SkPath path; | 939 SkPath path; |
| 942 path.setFillType(SkPath::kEvenOdd_FillType); | 940 path.setFillType(SkPath::kEvenOdd_FillType); |
| 943 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 941 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 944 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); | 942 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); |
| 945 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); | 943 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
| 946 testSimplify(reporter, path); | 944 testSimplify(reporter, path, filename); |
| 947 } | 945 } |
| 948 | 946 |
| 949 static void testLine46(skiatest::Reporter* reporter) { | 947 static void testLine46(skiatest::Reporter* reporter, const char* filename) { |
| 950 SkPath path; | 948 SkPath path; |
| 951 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 949 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 952 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); | 950 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 953 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); | 951 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
| 954 testSimplify(reporter, path); | 952 testSimplify(reporter, path, filename); |
| 955 } | 953 } |
| 956 | 954 |
| 957 static void testLine46x(skiatest::Reporter* reporter) { | 955 static void testLine46x(skiatest::Reporter* reporter, const char* filename) { |
| 958 SkPath path; | 956 SkPath path; |
| 959 path.setFillType(SkPath::kEvenOdd_FillType); | 957 path.setFillType(SkPath::kEvenOdd_FillType); |
| 960 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 958 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 961 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); | 959 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 962 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); | 960 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); |
| 963 testSimplify(reporter, path); | 961 testSimplify(reporter, path, filename); |
| 964 } | 962 } |
| 965 | 963 |
| 966 static void testLine47(skiatest::Reporter* reporter) { | 964 static void testLine47(skiatest::Reporter* reporter, const char* filename) { |
| 967 SkPath path; | 965 SkPath path; |
| 968 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 966 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 969 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 967 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 970 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); | 968 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
| 971 testSimplify(reporter, path); | 969 testSimplify(reporter, path, filename); |
| 972 } | 970 } |
| 973 | 971 |
| 974 static void testLine47x(skiatest::Reporter* reporter) { | 972 static void testLine47x(skiatest::Reporter* reporter, const char* filename) { |
| 975 SkPath path; | 973 SkPath path; |
| 976 path.setFillType(SkPath::kEvenOdd_FillType); | 974 path.setFillType(SkPath::kEvenOdd_FillType); |
| 977 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 975 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 978 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 976 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 979 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); | 977 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
| 980 testSimplify(reporter, path); | 978 testSimplify(reporter, path, filename); |
| 981 } | 979 } |
| 982 | 980 |
| 983 static void testLine48(skiatest::Reporter* reporter) { | 981 static void testLine48(skiatest::Reporter* reporter, const char* filename) { |
| 984 SkPath path; | 982 SkPath path; |
| 985 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 983 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 986 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 984 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 987 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); | 985 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
| 988 testSimplify(reporter, path); | 986 testSimplify(reporter, path, filename); |
| 989 } | 987 } |
| 990 | 988 |
| 991 static void testLine48x(skiatest::Reporter* reporter) { | 989 static void testLine48x(skiatest::Reporter* reporter, const char* filename) { |
| 992 SkPath path; | 990 SkPath path; |
| 993 path.setFillType(SkPath::kEvenOdd_FillType); | 991 path.setFillType(SkPath::kEvenOdd_FillType); |
| 994 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 992 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 995 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); | 993 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); |
| 996 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); | 994 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
| 997 testSimplify(reporter, path); | 995 testSimplify(reporter, path, filename); |
| 998 } | 996 } |
| 999 | 997 |
| 1000 static void testLine49(skiatest::Reporter* reporter) { | 998 static void testLine49(skiatest::Reporter* reporter, const char* filename) { |
| 1001 SkPath path; | 999 SkPath path; |
| 1002 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1000 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1003 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 1001 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 1004 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 1002 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 1005 testSimplify(reporter, path); | 1003 testSimplify(reporter, path, filename); |
| 1006 } | 1004 } |
| 1007 | 1005 |
| 1008 static void testLine49x(skiatest::Reporter* reporter) { | 1006 static void testLine49x(skiatest::Reporter* reporter, const char* filename) { |
| 1009 SkPath path; | 1007 SkPath path; |
| 1010 path.setFillType(SkPath::kEvenOdd_FillType); | 1008 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1011 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1009 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1012 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 1010 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 1013 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); | 1011 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); |
| 1014 testSimplify(reporter, path); | 1012 testSimplify(reporter, path, filename); |
| 1015 } | 1013 } |
| 1016 | 1014 |
| 1017 static void testLine50(skiatest::Reporter* reporter) { | 1015 static void testLine50(skiatest::Reporter* reporter, const char* filename) { |
| 1018 SkPath path; | 1016 SkPath path; |
| 1019 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); | 1017 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1020 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); | 1018 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
| 1021 testSimplify(reporter, path); | 1019 testSimplify(reporter, path, filename); |
| 1022 } | 1020 } |
| 1023 | 1021 |
| 1024 static void testLine50x(skiatest::Reporter* reporter) { | 1022 static void testLine50x(skiatest::Reporter* reporter, const char* filename) { |
| 1025 SkPath path; | 1023 SkPath path; |
| 1026 path.setFillType(SkPath::kEvenOdd_FillType); | 1024 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1027 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); | 1025 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1028 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); | 1026 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
| 1029 testSimplify(reporter, path); | 1027 testSimplify(reporter, path, filename); |
| 1030 } | 1028 } |
| 1031 | 1029 |
| 1032 static void testLine51(skiatest::Reporter* reporter) { | 1030 static void testLine51(skiatest::Reporter* reporter, const char* filename) { |
| 1033 SkPath path; | 1031 SkPath path; |
| 1034 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1032 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1035 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 1033 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1036 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); | 1034 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
| 1037 testSimplify(reporter, path); | 1035 testSimplify(reporter, path, filename); |
| 1038 } | 1036 } |
| 1039 | 1037 |
| 1040 static void testLine51x(skiatest::Reporter* reporter) { | 1038 static void testLine51x(skiatest::Reporter* reporter, const char* filename) { |
| 1041 SkPath path; | 1039 SkPath path; |
| 1042 path.setFillType(SkPath::kEvenOdd_FillType); | 1040 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1043 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1041 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1044 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 1042 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1045 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); | 1043 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
| 1046 testSimplify(reporter, path); | 1044 testSimplify(reporter, path, filename); |
| 1047 } | 1045 } |
| 1048 | 1046 |
| 1049 static void testLine52(skiatest::Reporter* reporter) { | 1047 static void testLine52(skiatest::Reporter* reporter, const char* filename) { |
| 1050 SkPath path; | 1048 SkPath path; |
| 1051 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); | 1049 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1052 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); | 1050 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
| 1053 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); | 1051 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
| 1054 testSimplify(reporter, path); | 1052 testSimplify(reporter, path, filename); |
| 1055 } | 1053 } |
| 1056 | 1054 |
| 1057 static void testLine52x(skiatest::Reporter* reporter) { | 1055 static void testLine52x(skiatest::Reporter* reporter, const char* filename) { |
| 1058 SkPath path; | 1056 SkPath path; |
| 1059 path.setFillType(SkPath::kEvenOdd_FillType); | 1057 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1060 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); | 1058 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1061 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); | 1059 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
| 1062 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); | 1060 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
| 1063 testSimplify(reporter, path); | 1061 testSimplify(reporter, path, filename); |
| 1064 } | 1062 } |
| 1065 | 1063 |
| 1066 static void testLine53(skiatest::Reporter* reporter) { | 1064 static void testLine53(skiatest::Reporter* reporter, const char* filename) { |
| 1067 SkPath path; | 1065 SkPath path; |
| 1068 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); | 1066 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1069 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); | 1067 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
| 1070 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); | 1068 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
| 1071 testSimplify(reporter, path); | 1069 testSimplify(reporter, path, filename); |
| 1072 } | 1070 } |
| 1073 | 1071 |
| 1074 static void testLine53x(skiatest::Reporter* reporter) { | 1072 static void testLine53x(skiatest::Reporter* reporter, const char* filename) { |
| 1075 SkPath path; | 1073 SkPath path; |
| 1076 path.setFillType(SkPath::kEvenOdd_FillType); | 1074 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1077 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); | 1075 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 1078 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); | 1076 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
| 1079 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); | 1077 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
| 1080 testSimplify(reporter, path); | 1078 testSimplify(reporter, path, filename); |
| 1081 } | 1079 } |
| 1082 | 1080 |
| 1083 static void testLine54(skiatest::Reporter* reporter) { | 1081 static void testLine54(skiatest::Reporter* reporter, const char* filename) { |
| 1084 SkPath path; | 1082 SkPath path; |
| 1085 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1083 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1086 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); | 1084 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 1087 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); | 1085 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); |
| 1088 testSimplify(reporter, path); | 1086 testSimplify(reporter, path, filename); |
| 1089 } | 1087 } |
| 1090 | 1088 |
| 1091 static void testLine54x(skiatest::Reporter* reporter) { | 1089 static void testLine54x(skiatest::Reporter* reporter, const char* filename) { |
| 1092 SkPath path; | 1090 SkPath path; |
| 1093 path.setFillType(SkPath::kEvenOdd_FillType); | 1091 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1094 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1092 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1095 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); | 1093 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); |
| 1096 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); | 1094 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); |
| 1097 testSimplify(reporter, path); | 1095 testSimplify(reporter, path, filename); |
| 1098 } | 1096 } |
| 1099 | 1097 |
| 1100 static void testLine55(skiatest::Reporter* reporter) { | 1098 static void testLine55(skiatest::Reporter* reporter, const char* filename) { |
| 1101 SkPath path; | 1099 SkPath path; |
| 1102 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1100 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1103 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); | 1101 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); |
| 1104 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); | 1102 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
| 1105 testSimplify(reporter, path); | 1103 testSimplify(reporter, path, filename); |
| 1106 } | 1104 } |
| 1107 | 1105 |
| 1108 static void testLine55x(skiatest::Reporter* reporter) { | 1106 static void testLine55x(skiatest::Reporter* reporter, const char* filename) { |
| 1109 SkPath path; | 1107 SkPath path; |
| 1110 path.setFillType(SkPath::kEvenOdd_FillType); | 1108 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1111 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1109 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1112 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); | 1110 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); |
| 1113 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); | 1111 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
| 1114 testSimplify(reporter, path); | 1112 testSimplify(reporter, path, filename); |
| 1115 } | 1113 } |
| 1116 | 1114 |
| 1117 static void testLine56(skiatest::Reporter* reporter) { | 1115 static void testLine56(skiatest::Reporter* reporter, const char* filename) { |
| 1118 SkPath path; | 1116 SkPath path; |
| 1119 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); | 1117 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1120 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); | 1118 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); |
| 1121 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1119 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1122 testSimplify(reporter, path); | 1120 testSimplify(reporter, path, filename); |
| 1123 } | 1121 } |
| 1124 | 1122 |
| 1125 static void testLine56x(skiatest::Reporter* reporter) { | 1123 static void testLine56x(skiatest::Reporter* reporter, const char* filename) { |
| 1126 SkPath path; | 1124 SkPath path; |
| 1127 path.setFillType(SkPath::kEvenOdd_FillType); | 1125 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1128 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); | 1126 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1129 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); | 1127 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); |
| 1130 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1128 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1131 testSimplify(reporter, path); | 1129 testSimplify(reporter, path, filename); |
| 1132 } | 1130 } |
| 1133 | 1131 |
| 1134 static void testLine57(skiatest::Reporter* reporter) { | 1132 static void testLine57(skiatest::Reporter* reporter, const char* filename) { |
| 1135 SkPath path; | 1133 SkPath path; |
| 1136 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); | 1134 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1137 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); | 1135 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); |
| 1138 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1136 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1139 testSimplify(reporter, path); | 1137 testSimplify(reporter, path, filename); |
| 1140 } | 1138 } |
| 1141 | 1139 |
| 1142 static void testLine57x(skiatest::Reporter* reporter) { | 1140 static void testLine57x(skiatest::Reporter* reporter, const char* filename) { |
| 1143 SkPath path; | 1141 SkPath path; |
| 1144 path.setFillType(SkPath::kEvenOdd_FillType); | 1142 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1145 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); | 1143 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1146 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); | 1144 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); |
| 1147 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1145 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1148 testSimplify(reporter, path); | 1146 testSimplify(reporter, path, filename); |
| 1149 } | 1147 } |
| 1150 | 1148 |
| 1151 static void testLine58(skiatest::Reporter* reporter) { | 1149 static void testLine58(skiatest::Reporter* reporter, const char* filename) { |
| 1152 SkPath path; | 1150 SkPath path; |
| 1153 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1151 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1154 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); | 1152 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); |
| 1155 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); | 1153 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); |
| 1156 testSimplify(reporter, path); | 1154 testSimplify(reporter, path, filename); |
| 1157 } | 1155 } |
| 1158 | 1156 |
| 1159 static void testLine58x(skiatest::Reporter* reporter) { | 1157 static void testLine58x(skiatest::Reporter* reporter, const char* filename) { |
| 1160 SkPath path; | 1158 SkPath path; |
| 1161 path.setFillType(SkPath::kEvenOdd_FillType); | 1159 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1162 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1160 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1163 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); | 1161 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); |
| 1164 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); | 1162 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); |
| 1165 testSimplify(reporter, path); | 1163 testSimplify(reporter, path, filename); |
| 1166 } | 1164 } |
| 1167 | 1165 |
| 1168 static void testLine59(skiatest::Reporter* reporter) { | 1166 static void testLine59(skiatest::Reporter* reporter, const char* filename) { |
| 1169 SkPath path; | 1167 SkPath path; |
| 1170 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1168 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1171 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); | 1169 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); |
| 1172 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); | 1170 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
| 1173 testSimplify(reporter, path); | 1171 testSimplify(reporter, path, filename); |
| 1174 } | 1172 } |
| 1175 | 1173 |
| 1176 static void testLine59x(skiatest::Reporter* reporter) { | 1174 static void testLine59x(skiatest::Reporter* reporter, const char* filename) { |
| 1177 SkPath path; | 1175 SkPath path; |
| 1178 path.setFillType(SkPath::kEvenOdd_FillType); | 1176 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1179 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1177 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1180 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); | 1178 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); |
| 1181 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); | 1179 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); |
| 1182 testSimplify(reporter, path); | 1180 testSimplify(reporter, path, filename); |
| 1183 } | 1181 } |
| 1184 | 1182 |
| 1185 static void testLine60(skiatest::Reporter* reporter) { | 1183 static void testLine60(skiatest::Reporter* reporter, const char* filename) { |
| 1186 SkPath path; | 1184 SkPath path; |
| 1187 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1185 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1188 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); | 1186 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); |
| 1189 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); | 1187 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
| 1190 testSimplify(reporter, path); | 1188 testSimplify(reporter, path, filename); |
| 1191 } | 1189 } |
| 1192 | 1190 |
| 1193 static void testLine60x(skiatest::Reporter* reporter) { | 1191 static void testLine60x(skiatest::Reporter* reporter, const char* filename) { |
| 1194 SkPath path; | 1192 SkPath path; |
| 1195 path.setFillType(SkPath::kEvenOdd_FillType); | 1193 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1196 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1194 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1197 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); | 1195 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); |
| 1198 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); | 1196 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
| 1199 testSimplify(reporter, path); | 1197 testSimplify(reporter, path, filename); |
| 1200 } | 1198 } |
| 1201 | 1199 |
| 1202 static void testLine61(skiatest::Reporter* reporter) { | 1200 static void testLine61(skiatest::Reporter* reporter, const char* filename) { |
| 1203 SkPath path; | 1201 SkPath path; |
| 1204 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1202 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1205 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); | 1203 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); |
| 1206 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1204 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1207 testSimplify(reporter, path); | 1205 testSimplify(reporter, path, filename); |
| 1208 } | 1206 } |
| 1209 | 1207 |
| 1210 static void testLine61x(skiatest::Reporter* reporter) { | 1208 static void testLine61x(skiatest::Reporter* reporter, const char* filename) { |
| 1211 SkPath path; | 1209 SkPath path; |
| 1212 path.setFillType(SkPath::kEvenOdd_FillType); | 1210 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1213 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1211 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1214 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); | 1212 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); |
| 1215 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1213 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1216 testSimplify(reporter, path); | 1214 testSimplify(reporter, path, filename); |
| 1217 } | 1215 } |
| 1218 | 1216 |
| 1219 static void testLine62(skiatest::Reporter* reporter) { | 1217 static void testLine62(skiatest::Reporter* reporter, const char* filename) { |
| 1220 SkPath path; | 1218 SkPath path; |
| 1221 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1219 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1222 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1220 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1223 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 1221 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1224 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); | 1222 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
| 1225 testSimplify(reporter, path); | 1223 testSimplify(reporter, path, filename); |
| 1226 } | 1224 } |
| 1227 | 1225 |
| 1228 static void testLine62x(skiatest::Reporter* reporter) { | 1226 static void testLine62x(skiatest::Reporter* reporter, const char* filename) { |
| 1229 SkPath path; | 1227 SkPath path; |
| 1230 path.setFillType(SkPath::kEvenOdd_FillType); | 1228 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1231 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1229 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1232 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1230 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1233 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 1231 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 1234 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); | 1232 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
| 1235 testSimplify(reporter, path); | 1233 testSimplify(reporter, path, filename); |
| 1236 } | 1234 } |
| 1237 | 1235 |
| 1238 static void testLine63(skiatest::Reporter* reporter) { | 1236 static void testLine63(skiatest::Reporter* reporter, const char* filename) { |
| 1239 SkPath path; | 1237 SkPath path; |
| 1240 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1238 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1241 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); | 1239 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 1242 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); | 1240 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); |
| 1243 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 1241 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 1244 testSimplify(reporter, path); | 1242 testSimplify(reporter, path, filename); |
| 1245 } | 1243 } |
| 1246 | 1244 |
| 1247 static void testLine63x(skiatest::Reporter* reporter) { | 1245 static void testLine63x(skiatest::Reporter* reporter, const char* filename) { |
| 1248 SkPath path; | 1246 SkPath path; |
| 1249 path.setFillType(SkPath::kEvenOdd_FillType); | 1247 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1250 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1248 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1251 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); | 1249 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); |
| 1252 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); | 1250 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); |
| 1253 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 1251 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 1254 testSimplify(reporter, path); | 1252 testSimplify(reporter, path, filename); |
| 1255 } | 1253 } |
| 1256 | 1254 |
| 1257 static void testLine64(skiatest::Reporter* reporter) { | 1255 static void testLine64(skiatest::Reporter* reporter, const char* filename) { |
| 1258 SkPath path; | 1256 SkPath path; |
| 1259 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1257 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1260 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 1258 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1261 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); | 1259 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); |
| 1262 testSimplify(reporter, path); | 1260 testSimplify(reporter, path, filename); |
| 1263 } | 1261 } |
| 1264 | 1262 |
| 1265 static void testLine64x(skiatest::Reporter* reporter) { | 1263 static void testLine64x(skiatest::Reporter* reporter, const char* filename) { |
| 1266 SkPath path; | 1264 SkPath path; |
| 1267 path.setFillType(SkPath::kEvenOdd_FillType); | 1265 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1268 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1266 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1269 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 1267 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1270 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); | 1268 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); |
| 1271 testSimplify(reporter, path); | 1269 testSimplify(reporter, path, filename); |
| 1272 } | 1270 } |
| 1273 | 1271 |
| 1274 static void testLine65(skiatest::Reporter* reporter) { | 1272 static void testLine65(skiatest::Reporter* reporter, const char* filename) { |
| 1275 SkPath path; | 1273 SkPath path; |
| 1276 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1274 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1277 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 1275 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 1278 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); | 1276 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 1279 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); | 1277 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
| 1280 testSimplify(reporter, path); | 1278 testSimplify(reporter, path, filename); |
| 1281 } | 1279 } |
| 1282 | 1280 |
| 1283 static void testLine65x(skiatest::Reporter* reporter) { | 1281 static void testLine65x(skiatest::Reporter* reporter, const char* filename) { |
| 1284 SkPath path; | 1282 SkPath path; |
| 1285 path.setFillType(SkPath::kEvenOdd_FillType); | 1283 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1286 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1284 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1287 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); | 1285 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); |
| 1288 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); | 1286 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); |
| 1289 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); | 1287 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
| 1290 testSimplify(reporter, path); | 1288 testSimplify(reporter, path, filename); |
| 1291 } | 1289 } |
| 1292 | 1290 |
| 1293 static void testLine66(skiatest::Reporter* reporter) { | 1291 static void testLine66(skiatest::Reporter* reporter, const char* filename) { |
| 1294 SkPath path; | 1292 SkPath path; |
| 1295 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1293 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1296 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); | 1294 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1297 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); | 1295 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
| 1298 testSimplify(reporter, path); | 1296 testSimplify(reporter, path, filename); |
| 1299 } | 1297 } |
| 1300 | 1298 |
| 1301 static void testLine66x(skiatest::Reporter* reporter) { | 1299 static void testLine66x(skiatest::Reporter* reporter, const char* filename) { |
| 1302 SkPath path; | 1300 SkPath path; |
| 1303 path.setFillType(SkPath::kEvenOdd_FillType); | 1301 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1304 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1302 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1305 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); | 1303 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); |
| 1306 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); | 1304 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); |
| 1307 testSimplify(reporter, path); | 1305 testSimplify(reporter, path, filename); |
| 1308 } | 1306 } |
| 1309 | 1307 |
| 1310 static void testLine67(skiatest::Reporter* reporter) { | 1308 static void testLine67(skiatest::Reporter* reporter, const char* filename) { |
| 1311 SkPath path; | 1309 SkPath path; |
| 1312 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1310 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1313 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 1311 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1314 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); | 1312 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
| 1315 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); | 1313 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
| 1316 testSimplify(reporter, path); | 1314 testSimplify(reporter, path, filename); |
| 1317 } | 1315 } |
| 1318 | 1316 |
| 1319 static void testLine67x(skiatest::Reporter* reporter) { | 1317 static void testLine67x(skiatest::Reporter* reporter, const char* filename) { |
| 1320 SkPath path; | 1318 SkPath path; |
| 1321 path.setFillType(SkPath::kEvenOdd_FillType); | 1319 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1322 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1320 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1323 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 1321 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1324 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); | 1322 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); |
| 1325 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); | 1323 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); |
| 1326 testSimplify(reporter, path); | 1324 testSimplify(reporter, path, filename); |
| 1327 } | 1325 } |
| 1328 | 1326 |
| 1329 static void testLine68a(skiatest::Reporter* reporter) { | 1327 static void testLine68a(skiatest::Reporter* reporter, const char* filename) { |
| 1330 SkPath path; | 1328 SkPath path; |
| 1331 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1329 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1332 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); | 1330 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1333 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); | 1331 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
| 1334 testSimplify(reporter, path); | 1332 testSimplify(reporter, path, filename); |
| 1335 } | 1333 } |
| 1336 | 1334 |
| 1337 static void testLine68ax(skiatest::Reporter* reporter) { | 1335 static void testLine68ax(skiatest::Reporter* reporter, const char* filename) { |
| 1338 SkPath path; | 1336 SkPath path; |
| 1339 path.setFillType(SkPath::kEvenOdd_FillType); | 1337 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1340 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1338 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1341 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); | 1339 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1342 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); | 1340 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
| 1343 testSimplify(reporter, path); | 1341 testSimplify(reporter, path, filename); |
| 1344 } | 1342 } |
| 1345 | 1343 |
| 1346 static void testLine68b(skiatest::Reporter* reporter) { | 1344 static void testLine68b(skiatest::Reporter* reporter, const char* filename) { |
| 1347 SkPath path; | 1345 SkPath path; |
| 1348 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1346 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1349 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1347 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1350 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1348 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1351 testSimplify(reporter, path); | 1349 testSimplify(reporter, path, filename); |
| 1352 } | 1350 } |
| 1353 | 1351 |
| 1354 static void testLine68bx(skiatest::Reporter* reporter) { | 1352 static void testLine68bx(skiatest::Reporter* reporter, const char* filename) { |
| 1355 SkPath path; | 1353 SkPath path; |
| 1356 path.setFillType(SkPath::kEvenOdd_FillType); | 1354 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1357 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1355 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1358 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1356 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1359 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1357 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1360 testSimplify(reporter, path); | 1358 testSimplify(reporter, path, filename); |
| 1361 } | 1359 } |
| 1362 | 1360 |
| 1363 static void testLine68c(skiatest::Reporter* reporter) { | 1361 static void testLine68c(skiatest::Reporter* reporter, const char* filename) { |
| 1364 SkPath path; | 1362 SkPath path; |
| 1365 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); | 1363 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1366 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); | 1364 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1367 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); | 1365 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
| 1368 testSimplify(reporter, path); | 1366 testSimplify(reporter, path, filename); |
| 1369 } | 1367 } |
| 1370 | 1368 |
| 1371 static void testLine68cx(skiatest::Reporter* reporter) { | 1369 static void testLine68cx(skiatest::Reporter* reporter, const char* filename) { |
| 1372 SkPath path; | 1370 SkPath path; |
| 1373 path.setFillType(SkPath::kEvenOdd_FillType); | 1371 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1374 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); | 1372 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1375 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); | 1373 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); |
| 1376 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); | 1374 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
| 1377 testSimplify(reporter, path); | 1375 testSimplify(reporter, path, filename); |
| 1378 } | 1376 } |
| 1379 | 1377 |
| 1380 static void testLine68d(skiatest::Reporter* reporter) { | 1378 static void testLine68d(skiatest::Reporter* reporter, const char* filename) { |
| 1381 SkPath path; | 1379 SkPath path; |
| 1382 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); | 1380 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1383 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1381 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1384 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); | 1382 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
| 1385 testSimplify(reporter, path); | 1383 testSimplify(reporter, path, filename); |
| 1386 } | 1384 } |
| 1387 | 1385 |
| 1388 static void testLine68dx(skiatest::Reporter* reporter) { | 1386 static void testLine68dx(skiatest::Reporter* reporter, const char* filename) { |
| 1389 SkPath path; | 1387 SkPath path; |
| 1390 path.setFillType(SkPath::kEvenOdd_FillType); | 1388 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1391 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); | 1389 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); |
| 1392 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1390 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1393 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); | 1391 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); |
| 1394 testSimplify(reporter, path); | 1392 testSimplify(reporter, path, filename); |
| 1395 } | 1393 } |
| 1396 | 1394 |
| 1397 static void testLine68e(skiatest::Reporter* reporter) { | 1395 static void testLine68e(skiatest::Reporter* reporter, const char* filename) { |
| 1398 SkPath path; | 1396 SkPath path; |
| 1399 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1397 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1400 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1398 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1401 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1399 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1402 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1400 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1403 testSimplify(reporter, path); | 1401 testSimplify(reporter, path, filename); |
| 1404 } | 1402 } |
| 1405 | 1403 |
| 1406 static void testLine68ex(skiatest::Reporter* reporter) { | 1404 static void testLine68ex(skiatest::Reporter* reporter, const char* filename) { |
| 1407 SkPath path; | 1405 SkPath path; |
| 1408 path.setFillType(SkPath::kEvenOdd_FillType); | 1406 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1409 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1407 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1410 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1408 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1411 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1409 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1412 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1410 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1413 testSimplify(reporter, path); | 1411 testSimplify(reporter, path, filename); |
| 1414 } | 1412 } |
| 1415 | 1413 |
| 1416 static void testLine68f(skiatest::Reporter* reporter) { | 1414 static void testLine68f(skiatest::Reporter* reporter, const char* filename) { |
| 1417 SkPath path; | 1415 SkPath path; |
| 1418 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1416 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1419 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1417 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1420 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1418 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1421 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1419 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1422 testSimplify(reporter, path); | 1420 testSimplify(reporter, path, filename); |
| 1423 } | 1421 } |
| 1424 | 1422 |
| 1425 static void testLine68fx(skiatest::Reporter* reporter) { | 1423 static void testLine68fx(skiatest::Reporter* reporter, const char* filename) { |
| 1426 SkPath path; | 1424 SkPath path; |
| 1427 path.setFillType(SkPath::kEvenOdd_FillType); | 1425 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1428 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1426 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1429 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1427 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1430 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1428 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1431 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1429 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1432 testSimplify(reporter, path); | 1430 testSimplify(reporter, path, filename); |
| 1433 } | 1431 } |
| 1434 | 1432 |
| 1435 static void testLine68g(skiatest::Reporter* reporter) { | 1433 static void testLine68g(skiatest::Reporter* reporter, const char* filename) { |
| 1436 SkPath path; | 1434 SkPath path; |
| 1437 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1435 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1438 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1436 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1439 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1437 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1440 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1438 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1441 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1439 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1442 testSimplify(reporter, path); | 1440 testSimplify(reporter, path, filename); |
| 1443 } | 1441 } |
| 1444 | 1442 |
| 1445 static void testLine68gx(skiatest::Reporter* reporter) { | 1443 static void testLine68gx(skiatest::Reporter* reporter, const char* filename) { |
| 1446 SkPath path; | 1444 SkPath path; |
| 1447 path.setFillType(SkPath::kEvenOdd_FillType); | 1445 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1448 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1446 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1449 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1447 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1450 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1448 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1451 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1449 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1452 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1450 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1453 testSimplify(reporter, path); | 1451 testSimplify(reporter, path, filename); |
| 1454 } | 1452 } |
| 1455 | 1453 |
| 1456 static void testLine68h(skiatest::Reporter* reporter) { | 1454 static void testLine68h(skiatest::Reporter* reporter, const char* filename) { |
| 1457 SkPath path; | 1455 SkPath path; |
| 1458 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1456 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1459 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1457 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1460 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1458 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1461 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1459 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1462 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1460 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1463 testSimplify(reporter, path); | 1461 testSimplify(reporter, path, filename); |
| 1464 } | 1462 } |
| 1465 | 1463 |
| 1466 static void testLine68hx(skiatest::Reporter* reporter) { | 1464 static void testLine68hx(skiatest::Reporter* reporter, const char* filename) { |
| 1467 SkPath path; | 1465 SkPath path; |
| 1468 path.setFillType(SkPath::kEvenOdd_FillType); | 1466 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1469 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); | 1467 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); |
| 1470 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1468 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1471 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1469 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1472 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); | 1470 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); |
| 1473 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); | 1471 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); |
| 1474 testSimplify(reporter, path); | 1472 testSimplify(reporter, path, filename); |
| 1475 } | 1473 } |
| 1476 | 1474 |
| 1477 static void testLine69(skiatest::Reporter* reporter) { | 1475 static void testLine69(skiatest::Reporter* reporter, const char* filename) { |
| 1478 SkPath path; | 1476 SkPath path; |
| 1479 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); | 1477 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1480 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); | 1478 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1481 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); | 1479 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
| 1482 testSimplify(reporter, path); | 1480 testSimplify(reporter, path, filename); |
| 1483 } | 1481 } |
| 1484 | 1482 |
| 1485 static void testLine69x(skiatest::Reporter* reporter) { | 1483 static void testLine69x(skiatest::Reporter* reporter, const char* filename) { |
| 1486 SkPath path; | 1484 SkPath path; |
| 1487 path.setFillType(SkPath::kEvenOdd_FillType); | 1485 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1488 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); | 1486 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 1489 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); | 1487 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1490 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); | 1488 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
| 1491 testSimplify(reporter, path); | 1489 testSimplify(reporter, path, filename); |
| 1492 } | 1490 } |
| 1493 | 1491 |
| 1494 static void testLine70(skiatest::Reporter* reporter) { | 1492 static void testLine70(skiatest::Reporter* reporter, const char* filename) { |
| 1495 SkPath path; | 1493 SkPath path; |
| 1496 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1494 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1497 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); | 1495 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); |
| 1498 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); | 1496 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
| 1499 testSimplify(reporter, path); | 1497 testSimplify(reporter, path, filename); |
| 1500 } | 1498 } |
| 1501 | 1499 |
| 1502 static void testLine70x(skiatest::Reporter* reporter) { | 1500 static void testLine70x(skiatest::Reporter* reporter, const char* filename) { |
| 1503 SkPath path; | 1501 SkPath path; |
| 1504 path.setFillType(SkPath::kEvenOdd_FillType); | 1502 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1505 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1503 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1506 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); | 1504 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); |
| 1507 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); | 1505 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); |
| 1508 testSimplify(reporter, path); | 1506 testSimplify(reporter, path, filename); |
| 1509 } | 1507 } |
| 1510 | 1508 |
| 1511 static void testLine71(skiatest::Reporter* reporter) { | 1509 static void testLine71(skiatest::Reporter* reporter, const char* filename) { |
| 1512 SkPath path; | 1510 SkPath path; |
| 1513 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1511 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1514 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); | 1512 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); |
| 1515 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); | 1513 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
| 1516 testSimplify(reporter, path); | 1514 testSimplify(reporter, path, filename); |
| 1517 } | 1515 } |
| 1518 | 1516 |
| 1519 static void testLine71x(skiatest::Reporter* reporter) { | 1517 static void testLine71x(skiatest::Reporter* reporter, const char* filename) { |
| 1520 SkPath path; | 1518 SkPath path; |
| 1521 path.setFillType(SkPath::kEvenOdd_FillType); | 1519 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1522 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); | 1520 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); |
| 1523 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); | 1521 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); |
| 1524 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); | 1522 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); |
| 1525 testSimplify(reporter, path); | 1523 testSimplify(reporter, path, filename); |
| 1526 } | 1524 } |
| 1527 | 1525 |
| 1528 static void testLine72(skiatest::Reporter* reporter) { | 1526 static void testLine72(skiatest::Reporter* reporter, const char* filename) { |
| 1529 SkPath path; | 1527 SkPath path; |
| 1530 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1528 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1531 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 1529 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1532 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); | 1530 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
| 1533 testSimplify(reporter, path); | 1531 testSimplify(reporter, path, filename); |
| 1534 } | 1532 } |
| 1535 | 1533 |
| 1536 static void testLine72x(skiatest::Reporter* reporter) { | 1534 static void testLine72x(skiatest::Reporter* reporter, const char* filename) { |
| 1537 SkPath path; | 1535 SkPath path; |
| 1538 path.setFillType(SkPath::kEvenOdd_FillType); | 1536 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1539 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1537 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1540 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); | 1538 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); |
| 1541 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); | 1539 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); |
| 1542 testSimplify(reporter, path); | 1540 testSimplify(reporter, path, filename); |
| 1543 } | 1541 } |
| 1544 | 1542 |
| 1545 static void testLine73(skiatest::Reporter* reporter) { | 1543 static void testLine73(skiatest::Reporter* reporter, const char* filename) { |
| 1546 SkPath path; | 1544 SkPath path; |
| 1547 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1545 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1548 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); | 1546 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); |
| 1549 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); | 1547 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1550 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); | 1548 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
| 1551 testSimplify(reporter, path); | 1549 testSimplify(reporter, path, filename); |
| 1552 } | 1550 } |
| 1553 | 1551 |
| 1554 static void testLine73x(skiatest::Reporter* reporter) { | 1552 static void testLine73x(skiatest::Reporter* reporter, const char* filename) { |
| 1555 SkPath path; | 1553 SkPath path; |
| 1556 path.setFillType(SkPath::kEvenOdd_FillType); | 1554 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1557 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1555 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1558 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); | 1556 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); |
| 1559 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); | 1557 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 1560 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); | 1558 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); |
| 1561 testSimplify(reporter, path); | 1559 testSimplify(reporter, path, filename); |
| 1562 } | 1560 } |
| 1563 | 1561 |
| 1564 static void testLine74(skiatest::Reporter* reporter) { | 1562 static void testLine74(skiatest::Reporter* reporter, const char* filename) { |
| 1565 SkPath path; | 1563 SkPath path; |
| 1566 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); | 1564 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); |
| 1567 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); | 1565 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1568 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); | 1566 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); |
| 1569 testSimplify(reporter, path); | 1567 testSimplify(reporter, path, filename); |
| 1570 } | 1568 } |
| 1571 | 1569 |
| 1572 static void testLine74x(skiatest::Reporter* reporter) { | 1570 static void testLine74x(skiatest::Reporter* reporter, const char* filename) { |
| 1573 SkPath path; | 1571 SkPath path; |
| 1574 path.setFillType(SkPath::kEvenOdd_FillType); | 1572 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1575 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); | 1573 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); |
| 1576 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); | 1574 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1577 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); | 1575 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); |
| 1578 testSimplify(reporter, path); | 1576 testSimplify(reporter, path, filename); |
| 1579 } | 1577 } |
| 1580 | 1578 |
| 1581 static void testLine75(skiatest::Reporter* reporter) { | 1579 static void testLine75(skiatest::Reporter* reporter, const char* filename) { |
| 1582 SkPath path; | 1580 SkPath path; |
| 1583 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1581 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1584 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); | 1582 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); |
| 1585 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); | 1583 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); |
| 1586 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1584 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1587 testSimplify(reporter, path); | 1585 testSimplify(reporter, path, filename); |
| 1588 } | 1586 } |
| 1589 | 1587 |
| 1590 static void testLine75x(skiatest::Reporter* reporter) { | 1588 static void testLine75x(skiatest::Reporter* reporter, const char* filename) { |
| 1591 SkPath path; | 1589 SkPath path; |
| 1592 path.setFillType(SkPath::kEvenOdd_FillType); | 1590 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1593 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); | 1591 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); |
| 1594 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); | 1592 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); |
| 1595 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); | 1593 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); |
| 1596 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 1594 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 1597 testSimplify(reporter, path); | 1595 testSimplify(reporter, path, filename); |
| 1598 } | 1596 } |
| 1599 | 1597 |
| 1600 static void testLine76(skiatest::Reporter* reporter) { | 1598 static void testLine76(skiatest::Reporter* reporter, const char* filename) { |
| 1601 SkPath path; | 1599 SkPath path; |
| 1602 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); | 1600 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); |
| 1603 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); | 1601 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); |
| 1604 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); | 1602 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1605 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); | 1603 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
| 1606 testSimplify(reporter, path); | 1604 testSimplify(reporter, path, filename); |
| 1607 } | 1605 } |
| 1608 | 1606 |
| 1609 static void testLine76x(skiatest::Reporter* reporter) { | 1607 static void testLine76x(skiatest::Reporter* reporter, const char* filename) { |
| 1610 SkPath path; | 1608 SkPath path; |
| 1611 path.setFillType(SkPath::kEvenOdd_FillType); | 1609 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1612 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); | 1610 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); |
| 1613 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); | 1611 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); |
| 1614 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); | 1612 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 1615 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); | 1613 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); |
| 1616 testSimplify(reporter, path); | 1614 testSimplify(reporter, path, filename); |
| 1617 } | 1615 } |
| 1618 | 1616 |
| 1619 static void testLine77(skiatest::Reporter* reporter) { | 1617 static void testLine77(skiatest::Reporter* reporter, const char* filename) { |
| 1620 SkPath path; | 1618 SkPath path; |
| 1621 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); | 1619 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1622 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); | 1620 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); |
| 1623 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); | 1621 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); |
| 1624 testSimplify(reporter, path); | 1622 testSimplify(reporter, path, filename); |
| 1625 } | 1623 } |
| 1626 | 1624 |
| 1627 static void testLine77x(skiatest::Reporter* reporter) { | 1625 static void testLine77x(skiatest::Reporter* reporter, const char* filename) { |
| 1628 SkPath path; | 1626 SkPath path; |
| 1629 path.setFillType(SkPath::kEvenOdd_FillType); | 1627 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1630 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); | 1628 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); |
| 1631 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); | 1629 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); |
| 1632 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); | 1630 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); |
| 1633 testSimplify(reporter, path); | 1631 testSimplify(reporter, path, filename); |
| 1634 } | 1632 } |
| 1635 | 1633 |
| 1636 static void testLine78(skiatest::Reporter* reporter) { | 1634 static void testLine78(skiatest::Reporter* reporter, const char* filename) { |
| 1637 SkPath path; | 1635 SkPath path; |
| 1638 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); | 1636 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); |
| 1639 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); | 1637 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); |
| 1640 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); | 1638 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); |
| 1641 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); | 1639 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); |
| 1642 testSimplify(reporter, path); | 1640 testSimplify(reporter, path, filename); |
| 1643 } | 1641 } |
| 1644 | 1642 |
| 1645 static void testLine78x(skiatest::Reporter* reporter) { | 1643 static void testLine78x(skiatest::Reporter* reporter, const char* filename) { |
| 1646 SkPath path; | 1644 SkPath path; |
| 1647 path.setFillType(SkPath::kEvenOdd_FillType); | 1645 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1648 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); | 1646 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); |
| 1649 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); | 1647 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); |
| 1650 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); | 1648 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); |
| 1651 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); | 1649 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); |
| 1652 testSimplify(reporter, path); | 1650 testSimplify(reporter, path, filename); |
| 1653 } | 1651 } |
| 1654 | 1652 |
| 1655 static void testLine79(skiatest::Reporter* reporter) { | 1653 static void testLine79(skiatest::Reporter* reporter, const char* filename) { |
| 1656 SkPath path; | 1654 SkPath path; |
| 1657 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); | 1655 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); |
| 1658 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); | 1656 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); |
| 1659 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); | 1657 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); |
| 1660 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 1658 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 1661 testSimplify(reporter, path); | 1659 testSimplify(reporter, path, filename); |
| 1662 } | 1660 } |
| 1663 | 1661 |
| 1664 static void testLine79x(skiatest::Reporter* reporter) { | 1662 static void testLine79x(skiatest::Reporter* reporter, const char* filename) { |
| 1665 SkPath path; | 1663 SkPath path; |
| 1666 path.setFillType(SkPath::kEvenOdd_FillType); | 1664 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1667 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); | 1665 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); |
| 1668 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); | 1666 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); |
| 1669 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); | 1667 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); |
| 1670 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 1668 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 1671 testSimplify(reporter, path); | 1669 testSimplify(reporter, path, filename); |
| 1672 } | 1670 } |
| 1673 | 1671 |
| 1674 static void testLine81(skiatest::Reporter* reporter) { | 1672 static void testLine81(skiatest::Reporter* reporter, const char* filename) { |
| 1675 SkPath path; | 1673 SkPath path; |
| 1676 path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction); | 1674 path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction); |
| 1677 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 1675 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 1678 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 1676 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 1679 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 1677 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 1680 path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction); | 1678 path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction); |
| 1681 testSimplify(reporter, path); | 1679 testSimplify(reporter, path, filename); |
| 1682 } | 1680 } |
| 1683 | 1681 |
| 1684 static void testDegenerate1(skiatest::Reporter* reporter) { | 1682 static void testDegenerate1(skiatest::Reporter* reporter, const char* filename)
{ |
| 1685 SkPath path; | 1683 SkPath path; |
| 1686 path.moveTo(0, 0); | 1684 path.moveTo(0, 0); |
| 1687 path.lineTo(0, 0); | 1685 path.lineTo(0, 0); |
| 1688 path.lineTo(2, 0); | 1686 path.lineTo(2, 0); |
| 1689 path.close(); | 1687 path.close(); |
| 1690 path.moveTo(0, 0); | 1688 path.moveTo(0, 0); |
| 1691 path.lineTo(1, 0); | 1689 path.lineTo(1, 0); |
| 1692 path.lineTo(2, 0); | 1690 path.lineTo(2, 0); |
| 1693 path.close(); | 1691 path.close(); |
| 1694 testSimplify(reporter, path); | 1692 testSimplify(reporter, path, filename); |
| 1695 } | 1693 } |
| 1696 | 1694 |
| 1697 static void testDegenerate1x(skiatest::Reporter* reporter) { | 1695 static void testDegenerate1x(skiatest::Reporter* reporter, const char* filename)
{ |
| 1698 SkPath path; | 1696 SkPath path; |
| 1699 path.setFillType(SkPath::kEvenOdd_FillType); | 1697 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1700 path.moveTo(0, 0); | 1698 path.moveTo(0, 0); |
| 1701 path.lineTo(0, 0); | 1699 path.lineTo(0, 0); |
| 1702 path.lineTo(2, 0); | 1700 path.lineTo(2, 0); |
| 1703 path.close(); | 1701 path.close(); |
| 1704 path.moveTo(0, 0); | 1702 path.moveTo(0, 0); |
| 1705 path.lineTo(1, 0); | 1703 path.lineTo(1, 0); |
| 1706 path.lineTo(2, 0); | 1704 path.lineTo(2, 0); |
| 1707 path.close(); | 1705 path.close(); |
| 1708 testSimplify(reporter, path); | 1706 testSimplify(reporter, path, filename); |
| 1709 } | 1707 } |
| 1710 | 1708 |
| 1711 static void testDegenerate2(skiatest::Reporter* reporter) { | 1709 static void testDegenerate2(skiatest::Reporter* reporter, const char* filename)
{ |
| 1712 SkPath path; | 1710 SkPath path; |
| 1713 path.moveTo(0, 0); | 1711 path.moveTo(0, 0); |
| 1714 path.lineTo(0, 0); | 1712 path.lineTo(0, 0); |
| 1715 path.lineTo(0, 0); | 1713 path.lineTo(0, 0); |
| 1716 path.close(); | 1714 path.close(); |
| 1717 path.moveTo(0, 0); | 1715 path.moveTo(0, 0); |
| 1718 path.lineTo(1, 0); | 1716 path.lineTo(1, 0); |
| 1719 path.lineTo(0, 1); | 1717 path.lineTo(0, 1); |
| 1720 path.close(); | 1718 path.close(); |
| 1721 testSimplify(reporter, path); | 1719 testSimplify(reporter, path, filename); |
| 1722 } | 1720 } |
| 1723 | 1721 |
| 1724 static void testDegenerate2x(skiatest::Reporter* reporter) { | 1722 static void testDegenerate2x(skiatest::Reporter* reporter, const char* filename)
{ |
| 1725 SkPath path; | 1723 SkPath path; |
| 1726 path.setFillType(SkPath::kEvenOdd_FillType); | 1724 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1727 path.moveTo(0, 0); | 1725 path.moveTo(0, 0); |
| 1728 path.lineTo(0, 0); | 1726 path.lineTo(0, 0); |
| 1729 path.lineTo(0, 0); | 1727 path.lineTo(0, 0); |
| 1730 path.close(); | 1728 path.close(); |
| 1731 path.moveTo(0, 0); | 1729 path.moveTo(0, 0); |
| 1732 path.lineTo(1, 0); | 1730 path.lineTo(1, 0); |
| 1733 path.lineTo(0, 1); | 1731 path.lineTo(0, 1); |
| 1734 path.close(); | 1732 path.close(); |
| 1735 testSimplify(reporter, path); | 1733 testSimplify(reporter, path, filename); |
| 1736 } | 1734 } |
| 1737 | 1735 |
| 1738 static void testDegenerate3(skiatest::Reporter* reporter) { | 1736 static void testDegenerate3(skiatest::Reporter* reporter, const char* filename)
{ |
| 1739 SkPath path; | 1737 SkPath path; |
| 1740 path.moveTo(0, 0); | 1738 path.moveTo(0, 0); |
| 1741 path.lineTo(2, 0); | 1739 path.lineTo(2, 0); |
| 1742 path.lineTo(1, 0); | 1740 path.lineTo(1, 0); |
| 1743 path.close(); | 1741 path.close(); |
| 1744 path.moveTo(0, 0); | 1742 path.moveTo(0, 0); |
| 1745 path.lineTo(0, 0); | 1743 path.lineTo(0, 0); |
| 1746 path.lineTo(3, 0); | 1744 path.lineTo(3, 0); |
| 1747 path.close(); | 1745 path.close(); |
| 1748 testSimplify(reporter, path); | 1746 testSimplify(reporter, path, filename); |
| 1749 } | 1747 } |
| 1750 | 1748 |
| 1751 static void testDegenerate3x(skiatest::Reporter* reporter) { | 1749 static void testDegenerate3x(skiatest::Reporter* reporter, const char* filename)
{ |
| 1752 SkPath path; | 1750 SkPath path; |
| 1753 path.setFillType(SkPath::kEvenOdd_FillType); | 1751 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1754 path.moveTo(0, 0); | 1752 path.moveTo(0, 0); |
| 1755 path.lineTo(2, 0); | 1753 path.lineTo(2, 0); |
| 1756 path.lineTo(1, 0); | 1754 path.lineTo(1, 0); |
| 1757 path.close(); | 1755 path.close(); |
| 1758 path.moveTo(0, 0); | 1756 path.moveTo(0, 0); |
| 1759 path.lineTo(0, 0); | 1757 path.lineTo(0, 0); |
| 1760 path.lineTo(3, 0); | 1758 path.lineTo(3, 0); |
| 1761 path.close(); | 1759 path.close(); |
| 1762 testSimplify(reporter, path); | 1760 testSimplify(reporter, path, filename); |
| 1763 } | 1761 } |
| 1764 | 1762 |
| 1765 static void testDegenerate4(skiatest::Reporter* reporter) { | 1763 static void testDegenerate4(skiatest::Reporter* reporter, const char* filename)
{ |
| 1766 SkPath path; | 1764 SkPath path; |
| 1767 path.moveTo(0, 0); | 1765 path.moveTo(0, 0); |
| 1768 path.lineTo(1, 0); | 1766 path.lineTo(1, 0); |
| 1769 path.lineTo(1, 3); | 1767 path.lineTo(1, 3); |
| 1770 path.close(); | 1768 path.close(); |
| 1771 path.moveTo(1, 0); | 1769 path.moveTo(1, 0); |
| 1772 path.lineTo(1, 1); | 1770 path.lineTo(1, 1); |
| 1773 path.lineTo(1, 2); | 1771 path.lineTo(1, 2); |
| 1774 path.close(); | 1772 path.close(); |
| 1775 testSimplify(reporter, path); | 1773 testSimplify(reporter, path, filename); |
| 1776 } | 1774 } |
| 1777 | 1775 |
| 1778 static void testDegenerate4x(skiatest::Reporter* reporter) { | 1776 static void testDegenerate4x(skiatest::Reporter* reporter, const char* filename)
{ |
| 1779 SkPath path; | 1777 SkPath path; |
| 1780 path.setFillType(SkPath::kEvenOdd_FillType); | 1778 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1781 path.moveTo(0, 0); | 1779 path.moveTo(0, 0); |
| 1782 path.lineTo(1, 0); | 1780 path.lineTo(1, 0); |
| 1783 path.lineTo(1, 3); | 1781 path.lineTo(1, 3); |
| 1784 path.close(); | 1782 path.close(); |
| 1785 path.moveTo(1, 0); | 1783 path.moveTo(1, 0); |
| 1786 path.lineTo(1, 1); | 1784 path.lineTo(1, 1); |
| 1787 path.lineTo(1, 2); | 1785 path.lineTo(1, 2); |
| 1788 path.close(); | 1786 path.close(); |
| 1789 testSimplify(reporter, path); | 1787 testSimplify(reporter, path, filename); |
| 1790 } | 1788 } |
| 1791 | 1789 |
| 1792 static void testNondegenerate1(skiatest::Reporter* reporter) { | 1790 static void testNondegenerate1(skiatest::Reporter* reporter, const char* filenam
e) { |
| 1793 SkPath path; | 1791 SkPath path; |
| 1794 path.moveTo(0, 0); | 1792 path.moveTo(0, 0); |
| 1795 path.lineTo(3, 0); | 1793 path.lineTo(3, 0); |
| 1796 path.lineTo(1, 3); | 1794 path.lineTo(1, 3); |
| 1797 path.close(); | 1795 path.close(); |
| 1798 path.moveTo(1, 1); | 1796 path.moveTo(1, 1); |
| 1799 path.lineTo(2, 1); | 1797 path.lineTo(2, 1); |
| 1800 path.lineTo(1, 2); | 1798 path.lineTo(1, 2); |
| 1801 path.close(); | 1799 path.close(); |
| 1802 testSimplify(reporter, path); | 1800 testSimplify(reporter, path, filename); |
| 1803 } | 1801 } |
| 1804 | 1802 |
| 1805 static void testNondegenerate1x(skiatest::Reporter* reporter) { | 1803 static void testNondegenerate1x(skiatest::Reporter* reporter, const char* filena
me) { |
| 1806 SkPath path; | 1804 SkPath path; |
| 1807 path.setFillType(SkPath::kEvenOdd_FillType); | 1805 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1808 path.moveTo(0, 0); | 1806 path.moveTo(0, 0); |
| 1809 path.lineTo(3, 0); | 1807 path.lineTo(3, 0); |
| 1810 path.lineTo(1, 3); | 1808 path.lineTo(1, 3); |
| 1811 path.close(); | 1809 path.close(); |
| 1812 path.moveTo(1, 1); | 1810 path.moveTo(1, 1); |
| 1813 path.lineTo(2, 1); | 1811 path.lineTo(2, 1); |
| 1814 path.lineTo(1, 2); | 1812 path.lineTo(1, 2); |
| 1815 path.close(); | 1813 path.close(); |
| 1816 testSimplify(reporter, path); | 1814 testSimplify(reporter, path, filename); |
| 1817 } | 1815 } |
| 1818 | 1816 |
| 1819 static void testNondegenerate2(skiatest::Reporter* reporter) { | 1817 static void testNondegenerate2(skiatest::Reporter* reporter, const char* filenam
e) { |
| 1820 SkPath path; | 1818 SkPath path; |
| 1821 path.moveTo(1, 0); | 1819 path.moveTo(1, 0); |
| 1822 path.lineTo(0, 1); | 1820 path.lineTo(0, 1); |
| 1823 path.lineTo(1, 1); | 1821 path.lineTo(1, 1); |
| 1824 path.close(); | 1822 path.close(); |
| 1825 path.moveTo(0, 2); | 1823 path.moveTo(0, 2); |
| 1826 path.lineTo(0, 3); | 1824 path.lineTo(0, 3); |
| 1827 path.lineTo(1, 2); | 1825 path.lineTo(1, 2); |
| 1828 path.close(); | 1826 path.close(); |
| 1829 testSimplify(reporter, path); | 1827 testSimplify(reporter, path, filename); |
| 1830 } | 1828 } |
| 1831 | 1829 |
| 1832 static void testNondegenerate2x(skiatest::Reporter* reporter) { | 1830 static void testNondegenerate2x(skiatest::Reporter* reporter, const char* filena
me) { |
| 1833 SkPath path; | 1831 SkPath path; |
| 1834 path.setFillType(SkPath::kEvenOdd_FillType); | 1832 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1835 path.moveTo(1, 0); | 1833 path.moveTo(1, 0); |
| 1836 path.lineTo(0, 1); | 1834 path.lineTo(0, 1); |
| 1837 path.lineTo(1, 1); | 1835 path.lineTo(1, 1); |
| 1838 path.close(); | 1836 path.close(); |
| 1839 path.moveTo(0, 2); | 1837 path.moveTo(0, 2); |
| 1840 path.lineTo(0, 3); | 1838 path.lineTo(0, 3); |
| 1841 path.lineTo(1, 2); | 1839 path.lineTo(1, 2); |
| 1842 path.close(); | 1840 path.close(); |
| 1843 testSimplify(reporter, path); | 1841 testSimplify(reporter, path, filename); |
| 1844 } | 1842 } |
| 1845 | 1843 |
| 1846 static void testNondegenerate3(skiatest::Reporter* reporter) { | 1844 static void testNondegenerate3(skiatest::Reporter* reporter, const char* filenam
e) { |
| 1847 SkPath path; | 1845 SkPath path; |
| 1848 path.moveTo(0, 0); | 1846 path.moveTo(0, 0); |
| 1849 path.lineTo(1, 0); | 1847 path.lineTo(1, 0); |
| 1850 path.lineTo(2, 1); | 1848 path.lineTo(2, 1); |
| 1851 path.close(); | 1849 path.close(); |
| 1852 path.moveTo(0, 1); | 1850 path.moveTo(0, 1); |
| 1853 path.lineTo(1, 1); | 1851 path.lineTo(1, 1); |
| 1854 path.lineTo(0, 2); | 1852 path.lineTo(0, 2); |
| 1855 path.close(); | 1853 path.close(); |
| 1856 testSimplify(reporter, path); | 1854 testSimplify(reporter, path, filename); |
| 1857 } | 1855 } |
| 1858 | 1856 |
| 1859 static void testNondegenerate3x(skiatest::Reporter* reporter) { | 1857 static void testNondegenerate3x(skiatest::Reporter* reporter, const char* filena
me) { |
| 1860 SkPath path; | 1858 SkPath path; |
| 1861 path.setFillType(SkPath::kEvenOdd_FillType); | 1859 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1862 path.moveTo(0, 0); | 1860 path.moveTo(0, 0); |
| 1863 path.lineTo(1, 0); | 1861 path.lineTo(1, 0); |
| 1864 path.lineTo(2, 1); | 1862 path.lineTo(2, 1); |
| 1865 path.close(); | 1863 path.close(); |
| 1866 path.moveTo(0, 1); | 1864 path.moveTo(0, 1); |
| 1867 path.lineTo(1, 1); | 1865 path.lineTo(1, 1); |
| 1868 path.lineTo(0, 2); | 1866 path.lineTo(0, 2); |
| 1869 path.close(); | 1867 path.close(); |
| 1870 testSimplify(reporter, path); | 1868 testSimplify(reporter, path, filename); |
| 1871 } | 1869 } |
| 1872 | 1870 |
| 1873 static void testNondegenerate4(skiatest::Reporter* reporter) { | 1871 static void testNondegenerate4(skiatest::Reporter* reporter, const char* filenam
e) { |
| 1874 SkPath path; | 1872 SkPath path; |
| 1875 path.moveTo(1, 0); | 1873 path.moveTo(1, 0); |
| 1876 path.lineTo(0, 1); | 1874 path.lineTo(0, 1); |
| 1877 path.lineTo(1, 2); | 1875 path.lineTo(1, 2); |
| 1878 path.close(); | 1876 path.close(); |
| 1879 path.moveTo(0, 2); | 1877 path.moveTo(0, 2); |
| 1880 path.lineTo(0, 3); | 1878 path.lineTo(0, 3); |
| 1881 path.lineTo(1, 3); | 1879 path.lineTo(1, 3); |
| 1882 path.close(); | 1880 path.close(); |
| 1883 testSimplify(reporter, path); | 1881 testSimplify(reporter, path, filename); |
| 1884 } | 1882 } |
| 1885 | 1883 |
| 1886 static void testNondegenerate4x(skiatest::Reporter* reporter) { | 1884 static void testNondegenerate4x(skiatest::Reporter* reporter, const char* filena
me) { |
| 1887 SkPath path; | 1885 SkPath path; |
| 1888 path.setFillType(SkPath::kEvenOdd_FillType); | 1886 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1889 path.moveTo(1, 0); | 1887 path.moveTo(1, 0); |
| 1890 path.lineTo(0, 1); | 1888 path.lineTo(0, 1); |
| 1891 path.lineTo(1, 2); | 1889 path.lineTo(1, 2); |
| 1892 path.close(); | 1890 path.close(); |
| 1893 path.moveTo(0, 2); | 1891 path.moveTo(0, 2); |
| 1894 path.lineTo(0, 3); | 1892 path.lineTo(0, 3); |
| 1895 path.lineTo(1, 3); | 1893 path.lineTo(1, 3); |
| 1896 path.close(); | 1894 path.close(); |
| 1897 testSimplify(reporter, path); | 1895 testSimplify(reporter, path, filename); |
| 1898 } | 1896 } |
| 1899 | 1897 |
| 1900 static void testQuadralateral5(skiatest::Reporter* reporter) { | 1898 static void testQuadralateral5(skiatest::Reporter* reporter, const char* filenam
e) { |
| 1901 SkPath path; | 1899 SkPath path; |
| 1902 path.moveTo(0, 0); | 1900 path.moveTo(0, 0); |
| 1903 path.lineTo(0, 0); | 1901 path.lineTo(0, 0); |
| 1904 path.lineTo(1, 0); | 1902 path.lineTo(1, 0); |
| 1905 path.lineTo(1, 1); | 1903 path.lineTo(1, 1); |
| 1906 path.close(); | 1904 path.close(); |
| 1907 path.moveTo(0, 0); | 1905 path.moveTo(0, 0); |
| 1908 path.lineTo(2, 2); | 1906 path.lineTo(2, 2); |
| 1909 path.lineTo(3, 2); | 1907 path.lineTo(3, 2); |
| 1910 path.lineTo(3, 3); | 1908 path.lineTo(3, 3); |
| 1911 path.close(); | 1909 path.close(); |
| 1912 testSimplify(reporter, path); | 1910 testSimplify(reporter, path, filename); |
| 1913 } | 1911 } |
| 1914 | 1912 |
| 1915 static void testQuadralateral5x(skiatest::Reporter* reporter) { | 1913 static void testQuadralateral5x(skiatest::Reporter* reporter, const char* filena
me) { |
| 1916 SkPath path; | 1914 SkPath path; |
| 1917 path.setFillType(SkPath::kEvenOdd_FillType); | 1915 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1918 path.moveTo(0, 0); | 1916 path.moveTo(0, 0); |
| 1919 path.lineTo(0, 0); | 1917 path.lineTo(0, 0); |
| 1920 path.lineTo(1, 0); | 1918 path.lineTo(1, 0); |
| 1921 path.lineTo(1, 1); | 1919 path.lineTo(1, 1); |
| 1922 path.close(); | 1920 path.close(); |
| 1923 path.moveTo(0, 0); | 1921 path.moveTo(0, 0); |
| 1924 path.lineTo(2, 2); | 1922 path.lineTo(2, 2); |
| 1925 path.lineTo(3, 2); | 1923 path.lineTo(3, 2); |
| 1926 path.lineTo(3, 3); | 1924 path.lineTo(3, 3); |
| 1927 path.close(); | 1925 path.close(); |
| 1928 testSimplify(reporter, path); | 1926 testSimplify(reporter, path, filename); |
| 1929 } | 1927 } |
| 1930 | 1928 |
| 1931 static void testQuadralateral6(skiatest::Reporter* reporter) { | 1929 static void testQuadralateral6(skiatest::Reporter* reporter, const char* filenam
e) { |
| 1932 SkPath path; | 1930 SkPath path; |
| 1933 path.moveTo(0, 0); | 1931 path.moveTo(0, 0); |
| 1934 path.lineTo(0, 0); | 1932 path.lineTo(0, 0); |
| 1935 path.lineTo(1, 0); | 1933 path.lineTo(1, 0); |
| 1936 path.lineTo(1, 1); | 1934 path.lineTo(1, 1); |
| 1937 path.close(); | 1935 path.close(); |
| 1938 path.moveTo(1, 0); | 1936 path.moveTo(1, 0); |
| 1939 path.lineTo(2, 0); | 1937 path.lineTo(2, 0); |
| 1940 path.lineTo(0, 2); | 1938 path.lineTo(0, 2); |
| 1941 path.lineTo(2, 2); | 1939 path.lineTo(2, 2); |
| 1942 path.close(); | 1940 path.close(); |
| 1943 testSimplify(reporter, path); | 1941 testSimplify(reporter, path, filename); |
| 1944 } | 1942 } |
| 1945 | 1943 |
| 1946 static void testQuadralateral6x(skiatest::Reporter* reporter) { | 1944 static void testQuadralateral6x(skiatest::Reporter* reporter, const char* filena
me) { |
| 1947 SkPath path; | 1945 SkPath path; |
| 1948 path.setFillType(SkPath::kEvenOdd_FillType); | 1946 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1949 path.moveTo(0, 0); | 1947 path.moveTo(0, 0); |
| 1950 path.lineTo(0, 0); | 1948 path.lineTo(0, 0); |
| 1951 path.lineTo(1, 0); | 1949 path.lineTo(1, 0); |
| 1952 path.lineTo(1, 1); | 1950 path.lineTo(1, 1); |
| 1953 path.close(); | 1951 path.close(); |
| 1954 path.moveTo(1, 0); | 1952 path.moveTo(1, 0); |
| 1955 path.lineTo(2, 0); | 1953 path.lineTo(2, 0); |
| 1956 path.lineTo(0, 2); | 1954 path.lineTo(0, 2); |
| 1957 path.lineTo(2, 2); | 1955 path.lineTo(2, 2); |
| 1958 path.close(); | 1956 path.close(); |
| 1959 testSimplify(reporter, path); | 1957 testSimplify(reporter, path, filename); |
| 1960 } | 1958 } |
| 1961 | 1959 |
| 1962 static void testFauxQuadralateral6(skiatest::Reporter* reporter) { | 1960 static void testFauxQuadralateral6(skiatest::Reporter* reporter, const char* fil
ename) { |
| 1963 SkPath path; | 1961 SkPath path; |
| 1964 path.moveTo(0, 0); | 1962 path.moveTo(0, 0); |
| 1965 path.lineTo(1, 0); | 1963 path.lineTo(1, 0); |
| 1966 path.lineTo(1, 1); | 1964 path.lineTo(1, 1); |
| 1967 path.close(); | 1965 path.close(); |
| 1968 path.moveTo(1, 0); | 1966 path.moveTo(1, 0); |
| 1969 path.lineTo(2, 0); | 1967 path.lineTo(2, 0); |
| 1970 path.lineTo(1 + 1.0f/3, 2.0f/3); | 1968 path.lineTo(1 + 1.0f/3, 2.0f/3); |
| 1971 path.close(); | 1969 path.close(); |
| 1972 path.moveTo(1 + 1.0f/3, 2.0f/3); | 1970 path.moveTo(1 + 1.0f/3, 2.0f/3); |
| 1973 path.lineTo(0, 2); | 1971 path.lineTo(0, 2); |
| 1974 path.lineTo(2, 2); | 1972 path.lineTo(2, 2); |
| 1975 path.close(); | 1973 path.close(); |
| 1976 testSimplify(reporter, path); | 1974 testSimplify(reporter, path, filename); |
| 1977 } | 1975 } |
| 1978 | 1976 |
| 1979 static void testFauxQuadralateral6x(skiatest::Reporter* reporter) { | 1977 static void testFauxQuadralateral6x(skiatest::Reporter* reporter, const char* fi
lename) { |
| 1980 SkPath path; | 1978 SkPath path; |
| 1981 path.setFillType(SkPath::kEvenOdd_FillType); | 1979 path.setFillType(SkPath::kEvenOdd_FillType); |
| 1982 path.moveTo(0, 0); | 1980 path.moveTo(0, 0); |
| 1983 path.lineTo(1, 0); | 1981 path.lineTo(1, 0); |
| 1984 path.lineTo(1, 1); | 1982 path.lineTo(1, 1); |
| 1985 path.close(); | 1983 path.close(); |
| 1986 path.moveTo(1, 0); | 1984 path.moveTo(1, 0); |
| 1987 path.lineTo(2, 0); | 1985 path.lineTo(2, 0); |
| 1988 path.lineTo(1 + 1.0f/3, 2.0f/3); | 1986 path.lineTo(1 + 1.0f/3, 2.0f/3); |
| 1989 path.close(); | 1987 path.close(); |
| 1990 path.moveTo(1 + 1.0f/3, 2.0f/3); | 1988 path.moveTo(1 + 1.0f/3, 2.0f/3); |
| 1991 path.lineTo(0, 2); | 1989 path.lineTo(0, 2); |
| 1992 path.lineTo(2, 2); | 1990 path.lineTo(2, 2); |
| 1993 path.close(); | 1991 path.close(); |
| 1994 testSimplify(reporter, path); | 1992 testSimplify(reporter, path, filename); |
| 1995 } | 1993 } |
| 1996 | 1994 |
| 1997 static void testFauxQuadralateral6a(skiatest::Reporter* reporter) { | 1995 static void testFauxQuadralateral6a(skiatest::Reporter* reporter, const char* fi
lename) { |
| 1998 SkPath path; | 1996 SkPath path; |
| 1999 path.moveTo(0, 0); | 1997 path.moveTo(0, 0); |
| 2000 path.lineTo(3, 0); | 1998 path.lineTo(3, 0); |
| 2001 path.lineTo(3, 3); | 1999 path.lineTo(3, 3); |
| 2002 path.close(); | 2000 path.close(); |
| 2003 path.moveTo(3, 0); | 2001 path.moveTo(3, 0); |
| 2004 path.lineTo(6, 0); | 2002 path.lineTo(6, 0); |
| 2005 path.lineTo(4, 2); | 2003 path.lineTo(4, 2); |
| 2006 path.close(); | 2004 path.close(); |
| 2007 path.moveTo(4, 2); | 2005 path.moveTo(4, 2); |
| 2008 path.lineTo(0, 6); | 2006 path.lineTo(0, 6); |
| 2009 path.lineTo(6, 6); | 2007 path.lineTo(6, 6); |
| 2010 path.close(); | 2008 path.close(); |
| 2011 testSimplify(reporter, path); | 2009 testSimplify(reporter, path, filename); |
| 2012 } | 2010 } |
| 2013 | 2011 |
| 2014 static void testFauxQuadralateral6ax(skiatest::Reporter* reporter) { | 2012 static void testFauxQuadralateral6ax(skiatest::Reporter* reporter, const char* f
ilename) { |
| 2015 SkPath path; | 2013 SkPath path; |
| 2016 path.setFillType(SkPath::kEvenOdd_FillType); | 2014 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2017 path.moveTo(0, 0); | 2015 path.moveTo(0, 0); |
| 2018 path.lineTo(3, 0); | 2016 path.lineTo(3, 0); |
| 2019 path.lineTo(3, 3); | 2017 path.lineTo(3, 3); |
| 2020 path.close(); | 2018 path.close(); |
| 2021 path.moveTo(3, 0); | 2019 path.moveTo(3, 0); |
| 2022 path.lineTo(6, 0); | 2020 path.lineTo(6, 0); |
| 2023 path.lineTo(4, 2); | 2021 path.lineTo(4, 2); |
| 2024 path.close(); | 2022 path.close(); |
| 2025 path.moveTo(4, 2); | 2023 path.moveTo(4, 2); |
| 2026 path.lineTo(0, 6); | 2024 path.lineTo(0, 6); |
| 2027 path.lineTo(6, 6); | 2025 path.lineTo(6, 6); |
| 2028 path.close(); | 2026 path.close(); |
| 2029 testSimplify(reporter, path); | 2027 testSimplify(reporter, path, filename); |
| 2030 } | 2028 } |
| 2031 | 2029 |
| 2032 static void testFauxQuadralateral6b(skiatest::Reporter* reporter) { | 2030 static void testFauxQuadralateral6b(skiatest::Reporter* reporter, const char* fi
lename) { |
| 2033 SkPath path; | 2031 SkPath path; |
| 2034 path.moveTo(0, 0); | 2032 path.moveTo(0, 0); |
| 2035 path.lineTo(3, 0); | 2033 path.lineTo(3, 0); |
| 2036 path.lineTo(3, 3); | 2034 path.lineTo(3, 3); |
| 2037 path.close(); | 2035 path.close(); |
| 2038 path.moveTo(3, 0); | 2036 path.moveTo(3, 0); |
| 2039 path.lineTo(6, 0); | 2037 path.lineTo(6, 0); |
| 2040 path.lineTo(4, 2); | 2038 path.lineTo(4, 2); |
| 2041 path.close(); | 2039 path.close(); |
| 2042 path.moveTo(4, 2); | 2040 path.moveTo(4, 2); |
| 2043 path.lineTo(6, 6); | 2041 path.lineTo(6, 6); |
| 2044 path.lineTo(0, 6); | 2042 path.lineTo(0, 6); |
| 2045 path.close(); | 2043 path.close(); |
| 2046 testSimplify(reporter, path); | 2044 testSimplify(reporter, path, filename); |
| 2047 } | 2045 } |
| 2048 | 2046 |
| 2049 static void testFauxQuadralateral6bx(skiatest::Reporter* reporter) { | 2047 static void testFauxQuadralateral6bx(skiatest::Reporter* reporter, const char* f
ilename) { |
| 2050 SkPath path; | 2048 SkPath path; |
| 2051 path.setFillType(SkPath::kEvenOdd_FillType); | 2049 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2052 path.moveTo(0, 0); | 2050 path.moveTo(0, 0); |
| 2053 path.lineTo(3, 0); | 2051 path.lineTo(3, 0); |
| 2054 path.lineTo(3, 3); | 2052 path.lineTo(3, 3); |
| 2055 path.close(); | 2053 path.close(); |
| 2056 path.moveTo(3, 0); | 2054 path.moveTo(3, 0); |
| 2057 path.lineTo(6, 0); | 2055 path.lineTo(6, 0); |
| 2058 path.lineTo(4, 2); | 2056 path.lineTo(4, 2); |
| 2059 path.close(); | 2057 path.close(); |
| 2060 path.moveTo(4, 2); | 2058 path.moveTo(4, 2); |
| 2061 path.lineTo(6, 6); | 2059 path.lineTo(6, 6); |
| 2062 path.lineTo(0, 6); | 2060 path.lineTo(0, 6); |
| 2063 path.close(); | 2061 path.close(); |
| 2064 testSimplify(reporter, path); | 2062 testSimplify(reporter, path, filename); |
| 2065 } | 2063 } |
| 2066 | 2064 |
| 2067 static void testFauxQuadralateral6c(skiatest::Reporter* reporter) { | 2065 static void testFauxQuadralateral6c(skiatest::Reporter* reporter, const char* fi
lename) { |
| 2068 SkPath path; | 2066 SkPath path; |
| 2069 path.moveTo(0, 0); | 2067 path.moveTo(0, 0); |
| 2070 path.lineTo(3, 3); | 2068 path.lineTo(3, 3); |
| 2071 path.lineTo(3, 0); | 2069 path.lineTo(3, 0); |
| 2072 path.close(); | 2070 path.close(); |
| 2073 path.moveTo(3, 0); | 2071 path.moveTo(3, 0); |
| 2074 path.lineTo(6, 0); | 2072 path.lineTo(6, 0); |
| 2075 path.lineTo(4, 2); | 2073 path.lineTo(4, 2); |
| 2076 path.close(); | 2074 path.close(); |
| 2077 path.moveTo(4, 2); | 2075 path.moveTo(4, 2); |
| 2078 path.lineTo(0, 6); | 2076 path.lineTo(0, 6); |
| 2079 path.lineTo(6, 6); | 2077 path.lineTo(6, 6); |
| 2080 path.close(); | 2078 path.close(); |
| 2081 testSimplify(reporter, path); | 2079 testSimplify(reporter, path, filename); |
| 2082 } | 2080 } |
| 2083 | 2081 |
| 2084 static void testFauxQuadralateral6cx(skiatest::Reporter* reporter) { | 2082 static void testFauxQuadralateral6cx(skiatest::Reporter* reporter, const char* f
ilename) { |
| 2085 SkPath path; | 2083 SkPath path; |
| 2086 path.setFillType(SkPath::kEvenOdd_FillType); | 2084 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2087 path.moveTo(0, 0); | 2085 path.moveTo(0, 0); |
| 2088 path.lineTo(3, 3); | 2086 path.lineTo(3, 3); |
| 2089 path.lineTo(3, 0); | 2087 path.lineTo(3, 0); |
| 2090 path.close(); | 2088 path.close(); |
| 2091 path.moveTo(3, 0); | 2089 path.moveTo(3, 0); |
| 2092 path.lineTo(6, 0); | 2090 path.lineTo(6, 0); |
| 2093 path.lineTo(4, 2); | 2091 path.lineTo(4, 2); |
| 2094 path.close(); | 2092 path.close(); |
| 2095 path.moveTo(4, 2); | 2093 path.moveTo(4, 2); |
| 2096 path.lineTo(0, 6); | 2094 path.lineTo(0, 6); |
| 2097 path.lineTo(6, 6); | 2095 path.lineTo(6, 6); |
| 2098 path.close(); | 2096 path.close(); |
| 2099 testSimplify(reporter, path); | 2097 testSimplify(reporter, path, filename); |
| 2100 } | 2098 } |
| 2101 | 2099 |
| 2102 static void testFauxQuadralateral6d(skiatest::Reporter* reporter) { | 2100 static void testFauxQuadralateral6d(skiatest::Reporter* reporter, const char* fi
lename) { |
| 2103 SkPath path; | 2101 SkPath path; |
| 2104 path.moveTo(0, 0); | 2102 path.moveTo(0, 0); |
| 2105 path.lineTo(3, 3); | 2103 path.lineTo(3, 3); |
| 2106 path.lineTo(3, 0); | 2104 path.lineTo(3, 0); |
| 2107 path.close(); | 2105 path.close(); |
| 2108 path.moveTo(3, 0); | 2106 path.moveTo(3, 0); |
| 2109 path.lineTo(6, 0); | 2107 path.lineTo(6, 0); |
| 2110 path.lineTo(4, 2); | 2108 path.lineTo(4, 2); |
| 2111 path.close(); | 2109 path.close(); |
| 2112 path.moveTo(4, 2); | 2110 path.moveTo(4, 2); |
| 2113 path.lineTo(6, 6); | 2111 path.lineTo(6, 6); |
| 2114 path.lineTo(0, 6); | 2112 path.lineTo(0, 6); |
| 2115 path.close(); | 2113 path.close(); |
| 2116 testSimplify(reporter, path); | 2114 testSimplify(reporter, path, filename); |
| 2117 } | 2115 } |
| 2118 | 2116 |
| 2119 static void testFauxQuadralateral6dx(skiatest::Reporter* reporter) { | 2117 static void testFauxQuadralateral6dx(skiatest::Reporter* reporter, const char* f
ilename) { |
| 2120 SkPath path; | 2118 SkPath path; |
| 2121 path.setFillType(SkPath::kEvenOdd_FillType); | 2119 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2122 path.moveTo(0, 0); | 2120 path.moveTo(0, 0); |
| 2123 path.lineTo(3, 3); | 2121 path.lineTo(3, 3); |
| 2124 path.lineTo(3, 0); | 2122 path.lineTo(3, 0); |
| 2125 path.close(); | 2123 path.close(); |
| 2126 path.moveTo(3, 0); | 2124 path.moveTo(3, 0); |
| 2127 path.lineTo(6, 0); | 2125 path.lineTo(6, 0); |
| 2128 path.lineTo(4, 2); | 2126 path.lineTo(4, 2); |
| 2129 path.close(); | 2127 path.close(); |
| 2130 path.moveTo(4, 2); | 2128 path.moveTo(4, 2); |
| 2131 path.lineTo(6, 6); | 2129 path.lineTo(6, 6); |
| 2132 path.lineTo(0, 6); | 2130 path.lineTo(0, 6); |
| 2133 path.close(); | 2131 path.close(); |
| 2134 testSimplify(reporter, path); | 2132 testSimplify(reporter, path, filename); |
| 2135 } | 2133 } |
| 2136 | 2134 |
| 2137 static void testQuadralateral6a(skiatest::Reporter* reporter) { | 2135 static void testQuadralateral6a(skiatest::Reporter* reporter, const char* filena
me) { |
| 2138 SkPath path; | 2136 SkPath path; |
| 2139 path.moveTo(0, 0); | 2137 path.moveTo(0, 0); |
| 2140 path.lineTo(0, 0); | 2138 path.lineTo(0, 0); |
| 2141 path.lineTo(3, 0); | 2139 path.lineTo(3, 0); |
| 2142 path.lineTo(3, 3); | 2140 path.lineTo(3, 3); |
| 2143 path.close(); | 2141 path.close(); |
| 2144 path.moveTo(3, 0); | 2142 path.moveTo(3, 0); |
| 2145 path.lineTo(6, 0); | 2143 path.lineTo(6, 0); |
| 2146 path.lineTo(0, 6); | 2144 path.lineTo(0, 6); |
| 2147 path.lineTo(6, 6); | 2145 path.lineTo(6, 6); |
| 2148 path.close(); | 2146 path.close(); |
| 2149 testSimplify(reporter, path); | 2147 testSimplify(reporter, path, filename); |
| 2150 } | 2148 } |
| 2151 | 2149 |
| 2152 static void testQuadralateral6ax(skiatest::Reporter* reporter) { | 2150 static void testQuadralateral6ax(skiatest::Reporter* reporter, const char* filen
ame) { |
| 2153 SkPath path; | 2151 SkPath path; |
| 2154 path.setFillType(SkPath::kEvenOdd_FillType); | 2152 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2155 path.moveTo(0, 0); | 2153 path.moveTo(0, 0); |
| 2156 path.lineTo(0, 0); | 2154 path.lineTo(0, 0); |
| 2157 path.lineTo(3, 0); | 2155 path.lineTo(3, 0); |
| 2158 path.lineTo(3, 3); | 2156 path.lineTo(3, 3); |
| 2159 path.close(); | 2157 path.close(); |
| 2160 path.moveTo(3, 0); | 2158 path.moveTo(3, 0); |
| 2161 path.lineTo(6, 0); | 2159 path.lineTo(6, 0); |
| 2162 path.lineTo(0, 6); | 2160 path.lineTo(0, 6); |
| 2163 path.lineTo(6, 6); | 2161 path.lineTo(6, 6); |
| 2164 path.close(); | 2162 path.close(); |
| 2165 testSimplify(reporter, path); | 2163 testSimplify(reporter, path, filename); |
| 2166 } | 2164 } |
| 2167 | 2165 |
| 2168 static void testQuadralateral7(skiatest::Reporter* reporter) { | 2166 static void testQuadralateral7(skiatest::Reporter* reporter, const char* filenam
e) { |
| 2169 SkPath path; | 2167 SkPath path; |
| 2170 path.moveTo(0, 0); | 2168 path.moveTo(0, 0); |
| 2171 path.lineTo(0, 0); | 2169 path.lineTo(0, 0); |
| 2172 path.lineTo(1, 0); | 2170 path.lineTo(1, 0); |
| 2173 path.lineTo(2, 1); | 2171 path.lineTo(2, 1); |
| 2174 path.close(); | 2172 path.close(); |
| 2175 path.moveTo(1, 0); | 2173 path.moveTo(1, 0); |
| 2176 path.lineTo(1, 1); | 2174 path.lineTo(1, 1); |
| 2177 path.lineTo(2, 2); | 2175 path.lineTo(2, 2); |
| 2178 path.lineTo(1, 3); | 2176 path.lineTo(1, 3); |
| 2179 path.close(); | 2177 path.close(); |
| 2180 testSimplify(reporter, path); | 2178 testSimplify(reporter, path, filename); |
| 2181 } | 2179 } |
| 2182 | 2180 |
| 2183 static void testQuadralateral7x(skiatest::Reporter* reporter) { | 2181 static void testQuadralateral7x(skiatest::Reporter* reporter, const char* filena
me) { |
| 2184 SkPath path; | 2182 SkPath path; |
| 2185 path.setFillType(SkPath::kEvenOdd_FillType); | 2183 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2186 path.moveTo(0, 0); | 2184 path.moveTo(0, 0); |
| 2187 path.lineTo(0, 0); | 2185 path.lineTo(0, 0); |
| 2188 path.lineTo(1, 0); | 2186 path.lineTo(1, 0); |
| 2189 path.lineTo(2, 1); | 2187 path.lineTo(2, 1); |
| 2190 path.close(); | 2188 path.close(); |
| 2191 path.moveTo(1, 0); | 2189 path.moveTo(1, 0); |
| 2192 path.lineTo(1, 1); | 2190 path.lineTo(1, 1); |
| 2193 path.lineTo(2, 2); | 2191 path.lineTo(2, 2); |
| 2194 path.lineTo(1, 3); | 2192 path.lineTo(1, 3); |
| 2195 path.close(); | 2193 path.close(); |
| 2196 testSimplify(reporter, path); | 2194 testSimplify(reporter, path, filename); |
| 2197 } | 2195 } |
| 2198 | 2196 |
| 2199 static void testQuadralateral8(skiatest::Reporter* reporter) { | 2197 static void testQuadralateral8(skiatest::Reporter* reporter, const char* filenam
e) { |
| 2200 SkPath path; | 2198 SkPath path; |
| 2201 path.moveTo(0, 0); | 2199 path.moveTo(0, 0); |
| 2202 path.lineTo(3, 1); | 2200 path.lineTo(3, 1); |
| 2203 path.lineTo(1, 3); | 2201 path.lineTo(1, 3); |
| 2204 path.lineTo(3, 3); | 2202 path.lineTo(3, 3); |
| 2205 path.close(); | 2203 path.close(); |
| 2206 path.moveTo(2, 1); | 2204 path.moveTo(2, 1); |
| 2207 path.lineTo(0, 2); | 2205 path.lineTo(0, 2); |
| 2208 path.lineTo(3, 2); | 2206 path.lineTo(3, 2); |
| 2209 path.lineTo(2, 3); | 2207 path.lineTo(2, 3); |
| 2210 path.close(); | 2208 path.close(); |
| 2211 testSimplify(reporter, path); | 2209 testSimplify(reporter, path, filename); |
| 2212 } | 2210 } |
| 2213 | 2211 |
| 2214 static void testQuadralateral8x(skiatest::Reporter* reporter) { | 2212 static void testQuadralateral8x(skiatest::Reporter* reporter, const char* filena
me) { |
| 2215 SkPath path; | 2213 SkPath path; |
| 2216 path.setFillType(SkPath::kEvenOdd_FillType); | 2214 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2217 path.moveTo(0, 0); | 2215 path.moveTo(0, 0); |
| 2218 path.lineTo(3, 1); | 2216 path.lineTo(3, 1); |
| 2219 path.lineTo(1, 3); | 2217 path.lineTo(1, 3); |
| 2220 path.lineTo(3, 3); | 2218 path.lineTo(3, 3); |
| 2221 path.close(); | 2219 path.close(); |
| 2222 path.moveTo(2, 1); | 2220 path.moveTo(2, 1); |
| 2223 path.lineTo(0, 2); | 2221 path.lineTo(0, 2); |
| 2224 path.lineTo(3, 2); | 2222 path.lineTo(3, 2); |
| 2225 path.lineTo(2, 3); | 2223 path.lineTo(2, 3); |
| 2226 path.close(); | 2224 path.close(); |
| 2227 testSimplify(reporter, path); | 2225 testSimplify(reporter, path, filename); |
| 2228 } | 2226 } |
| 2229 | 2227 |
| 2230 static void testQuadralateral9(skiatest::Reporter* reporter) { | 2228 static void testQuadralateral9(skiatest::Reporter* reporter, const char* filenam
e) { |
| 2231 SkPath path; | 2229 SkPath path; |
| 2232 path.moveTo(0, 0); | 2230 path.moveTo(0, 0); |
| 2233 path.lineTo(1, 0); | 2231 path.lineTo(1, 0); |
| 2234 path.lineTo(1, 2); | 2232 path.lineTo(1, 2); |
| 2235 path.lineTo(2, 2); | 2233 path.lineTo(2, 2); |
| 2236 path.close(); | 2234 path.close(); |
| 2237 path.moveTo(1, 1); | 2235 path.moveTo(1, 1); |
| 2238 path.lineTo(2, 1); | 2236 path.lineTo(2, 1); |
| 2239 path.lineTo(1, 3); | 2237 path.lineTo(1, 3); |
| 2240 path.lineTo(2, 3); | 2238 path.lineTo(2, 3); |
| 2241 path.close(); | 2239 path.close(); |
| 2242 testSimplify(reporter, path); | 2240 testSimplify(reporter, path, filename); |
| 2243 } | 2241 } |
| 2244 | 2242 |
| 2245 static void testQuadralateral9x(skiatest::Reporter* reporter) { | 2243 static void testQuadralateral9x(skiatest::Reporter* reporter, const char* filena
me) { |
| 2246 SkPath path; | 2244 SkPath path; |
| 2247 path.setFillType(SkPath::kEvenOdd_FillType); | 2245 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2248 path.moveTo(0, 0); | 2246 path.moveTo(0, 0); |
| 2249 path.lineTo(1, 0); | 2247 path.lineTo(1, 0); |
| 2250 path.lineTo(1, 2); | 2248 path.lineTo(1, 2); |
| 2251 path.lineTo(2, 2); | 2249 path.lineTo(2, 2); |
| 2252 path.close(); | 2250 path.close(); |
| 2253 path.moveTo(1, 1); | 2251 path.moveTo(1, 1); |
| 2254 path.lineTo(2, 1); | 2252 path.lineTo(2, 1); |
| 2255 path.lineTo(1, 3); | 2253 path.lineTo(1, 3); |
| 2256 path.lineTo(2, 3); | 2254 path.lineTo(2, 3); |
| 2257 path.close(); | 2255 path.close(); |
| 2258 testSimplify(reporter, path); | 2256 testSimplify(reporter, path, filename); |
| 2259 } | 2257 } |
| 2260 | 2258 |
| 2261 static void testLine1a(skiatest::Reporter* reporter) { | 2259 static void testLine1a(skiatest::Reporter* reporter, const char* filename) { |
| 2262 SkPath path; | 2260 SkPath path; |
| 2263 path.setFillType(SkPath::kWinding_FillType); | 2261 path.setFillType(SkPath::kWinding_FillType); |
| 2264 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 2262 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 2265 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); | 2263 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); |
| 2266 testSimplify(reporter, path); | 2264 testSimplify(reporter, path, filename); |
| 2267 } | 2265 } |
| 2268 | 2266 |
| 2269 static void testLine1ax(skiatest::Reporter* reporter) { | 2267 static void testLine1ax(skiatest::Reporter* reporter, const char* filename) { |
| 2270 SkPath path; | 2268 SkPath path; |
| 2271 path.setFillType(SkPath::kEvenOdd_FillType); | 2269 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2272 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); | 2270 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); |
| 2273 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); | 2271 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); |
| 2274 testSimplify(reporter, path); | 2272 testSimplify(reporter, path, filename); |
| 2275 } | 2273 } |
| 2276 | 2274 |
| 2277 static void testLine2ax(skiatest::Reporter* reporter) { | 2275 static void testLine2ax(skiatest::Reporter* reporter, const char* filename) { |
| 2278 SkPath path; | 2276 SkPath path; |
| 2279 path.setFillType(SkPath::kEvenOdd_FillType); | 2277 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2280 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); | 2278 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); |
| 2281 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); | 2279 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); |
| 2282 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); | 2280 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); |
| 2283 testSimplify(reporter, path); | 2281 testSimplify(reporter, path, filename); |
| 2284 } | 2282 } |
| 2285 | 2283 |
| 2286 static void testLine3aax(skiatest::Reporter* reporter) { | 2284 static void testLine3aax(skiatest::Reporter* reporter, const char* filename) { |
| 2287 SkPath path; | 2285 SkPath path; |
| 2288 path.setFillType(SkPath::kEvenOdd_FillType); | 2286 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2289 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); | 2287 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 2290 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); | 2288 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); |
| 2291 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 2289 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 2292 testSimplify(reporter, path); | 2290 testSimplify(reporter, path, filename); |
| 2293 } | 2291 } |
| 2294 | 2292 |
| 2295 static void testLine4ax(skiatest::Reporter* reporter) { | 2293 static void testLine4ax(skiatest::Reporter* reporter, const char* filename) { |
| 2296 SkPath path; | 2294 SkPath path; |
| 2297 path.setFillType(SkPath::kEvenOdd_FillType); | 2295 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2298 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); | 2296 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); |
| 2299 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); | 2297 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 2300 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); | 2298 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); |
| 2301 testSimplify(reporter, path); | 2299 testSimplify(reporter, path, filename); |
| 2302 } | 2300 } |
| 2303 | 2301 |
| 2304 static void testQuadratic1(skiatest::Reporter* reporter) { | 2302 static void testQuadratic1(skiatest::Reporter* reporter, const char* filename) { |
| 2305 SkPath path; | 2303 SkPath path; |
| 2306 path.moveTo(0, 0); | 2304 path.moveTo(0, 0); |
| 2307 path.quadTo(0, 0, 0, 0); | 2305 path.quadTo(0, 0, 0, 0); |
| 2308 path.lineTo(1, 0); | 2306 path.lineTo(1, 0); |
| 2309 path.close(); | 2307 path.close(); |
| 2310 path.moveTo(0, 0); | 2308 path.moveTo(0, 0); |
| 2311 path.lineTo(0, 0); | 2309 path.lineTo(0, 0); |
| 2312 path.quadTo(0, 0, 0, 0); | 2310 path.quadTo(0, 0, 0, 0); |
| 2313 path.close(); | 2311 path.close(); |
| 2314 testSimplify(reporter, path); | 2312 testSimplify(reporter, path, filename); |
| 2315 } | 2313 } |
| 2316 | 2314 |
| 2317 static void testQuadratic1x(skiatest::Reporter* reporter) { | 2315 static void testQuadratic1x(skiatest::Reporter* reporter, const char* filename)
{ |
| 2318 SkPath path; | 2316 SkPath path; |
| 2319 path.setFillType(SkPath::kEvenOdd_FillType); | 2317 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2320 path.moveTo(0, 0); | 2318 path.moveTo(0, 0); |
| 2321 path.quadTo(0, 0, 0, 0); | 2319 path.quadTo(0, 0, 0, 0); |
| 2322 path.lineTo(1, 0); | 2320 path.lineTo(1, 0); |
| 2323 path.close(); | 2321 path.close(); |
| 2324 path.moveTo(0, 0); | 2322 path.moveTo(0, 0); |
| 2325 path.lineTo(0, 0); | 2323 path.lineTo(0, 0); |
| 2326 path.quadTo(0, 0, 0, 0); | 2324 path.quadTo(0, 0, 0, 0); |
| 2327 path.close(); | 2325 path.close(); |
| 2328 testSimplify(reporter, path); | 2326 testSimplify(reporter, path, filename); |
| 2329 } | 2327 } |
| 2330 | 2328 |
| 2331 static void testQuadratic2(skiatest::Reporter* reporter) { | 2329 static void testQuadratic2(skiatest::Reporter* reporter, const char* filename) { |
| 2332 SkPath path; | 2330 SkPath path; |
| 2333 path.moveTo(0, 0); | 2331 path.moveTo(0, 0); |
| 2334 path.quadTo(0, 0, 0, 0); | 2332 path.quadTo(0, 0, 0, 0); |
| 2335 path.lineTo(3, 0); | 2333 path.lineTo(3, 0); |
| 2336 path.close(); | 2334 path.close(); |
| 2337 path.moveTo(0, 0); | 2335 path.moveTo(0, 0); |
| 2338 path.lineTo(0, 0); | 2336 path.lineTo(0, 0); |
| 2339 path.quadTo(1, 0, 0, 1); | 2337 path.quadTo(1, 0, 0, 1); |
| 2340 path.close(); | 2338 path.close(); |
| 2341 testSimplify(reporter, path); | 2339 testSimplify(reporter, path, filename); |
| 2342 } | 2340 } |
| 2343 | 2341 |
| 2344 static void testQuadratic2x(skiatest::Reporter* reporter) { | 2342 static void testQuadratic2x(skiatest::Reporter* reporter, const char* filename)
{ |
| 2345 SkPath path; | 2343 SkPath path; |
| 2346 path.setFillType(SkPath::kEvenOdd_FillType); | 2344 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2347 path.moveTo(0, 0); | 2345 path.moveTo(0, 0); |
| 2348 path.quadTo(0, 0, 0, 0); | 2346 path.quadTo(0, 0, 0, 0); |
| 2349 path.lineTo(3, 0); | 2347 path.lineTo(3, 0); |
| 2350 path.close(); | 2348 path.close(); |
| 2351 path.moveTo(0, 0); | 2349 path.moveTo(0, 0); |
| 2352 path.lineTo(0, 0); | 2350 path.lineTo(0, 0); |
| 2353 path.quadTo(1, 0, 0, 1); | 2351 path.quadTo(1, 0, 0, 1); |
| 2354 path.close(); | 2352 path.close(); |
| 2355 testSimplify(reporter, path); | 2353 testSimplify(reporter, path, filename); |
| 2356 } | 2354 } |
| 2357 | 2355 |
| 2358 static void testQuadratic3(skiatest::Reporter* reporter) { | 2356 static void testQuadratic3(skiatest::Reporter* reporter, const char* filename) { |
| 2359 SkPath path; | 2357 SkPath path; |
| 2360 path.moveTo(0, 0); | 2358 path.moveTo(0, 0); |
| 2361 path.quadTo(0, 0, 1, 0); | 2359 path.quadTo(0, 0, 1, 0); |
| 2362 path.lineTo(0, 2); | 2360 path.lineTo(0, 2); |
| 2363 path.close(); | 2361 path.close(); |
| 2364 path.moveTo(0, 0); | 2362 path.moveTo(0, 0); |
| 2365 path.lineTo(0, 0); | 2363 path.lineTo(0, 0); |
| 2366 path.quadTo(1, 0, 0, 1); | 2364 path.quadTo(1, 0, 0, 1); |
| 2367 path.close(); | 2365 path.close(); |
| 2368 testSimplify(reporter, path); | 2366 testSimplify(reporter, path, filename); |
| 2369 } | 2367 } |
| 2370 | 2368 |
| 2371 static void testQuadratic3x(skiatest::Reporter* reporter) { | 2369 static void testQuadratic3x(skiatest::Reporter* reporter, const char* filename)
{ |
| 2372 SkPath path; | 2370 SkPath path; |
| 2373 path.setFillType(SkPath::kEvenOdd_FillType); | 2371 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2374 path.moveTo(0, 0); | 2372 path.moveTo(0, 0); |
| 2375 path.quadTo(0, 0, 1, 0); | 2373 path.quadTo(0, 0, 1, 0); |
| 2376 path.lineTo(0, 2); | 2374 path.lineTo(0, 2); |
| 2377 path.close(); | 2375 path.close(); |
| 2378 path.moveTo(0, 0); | 2376 path.moveTo(0, 0); |
| 2379 path.lineTo(0, 0); | 2377 path.lineTo(0, 0); |
| 2380 path.quadTo(1, 0, 0, 1); | 2378 path.quadTo(1, 0, 0, 1); |
| 2381 path.close(); | 2379 path.close(); |
| 2382 testSimplify(reporter, path); | 2380 testSimplify(reporter, path, filename); |
| 2383 } | 2381 } |
| 2384 | 2382 |
| 2385 static void testQuadratic4(skiatest::Reporter* reporter) { | 2383 static void testQuadratic4(skiatest::Reporter* reporter, const char* filename) { |
| 2386 SkPath path; | 2384 SkPath path; |
| 2387 path.moveTo(0, 0); | 2385 path.moveTo(0, 0); |
| 2388 path.quadTo(0, 0, 1, 0); | 2386 path.quadTo(0, 0, 1, 0); |
| 2389 path.lineTo(0, 2); | 2387 path.lineTo(0, 2); |
| 2390 path.close(); | 2388 path.close(); |
| 2391 path.moveTo(0, 0); | 2389 path.moveTo(0, 0); |
| 2392 path.lineTo(0, 0); | 2390 path.lineTo(0, 0); |
| 2393 path.quadTo(1, 0, 0, 2); | 2391 path.quadTo(1, 0, 0, 2); |
| 2394 path.close(); | 2392 path.close(); |
| 2395 testSimplify(reporter, path); | 2393 testSimplify(reporter, path, filename); |
| 2396 } | 2394 } |
| 2397 | 2395 |
| 2398 static void testQuadratic4x(skiatest::Reporter* reporter) { | 2396 static void testQuadratic4x(skiatest::Reporter* reporter, const char* filename)
{ |
| 2399 SkPath path; | 2397 SkPath path; |
| 2400 path.setFillType(SkPath::kEvenOdd_FillType); | 2398 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2401 path.moveTo(0, 0); | 2399 path.moveTo(0, 0); |
| 2402 path.quadTo(0, 0, 1, 0); | 2400 path.quadTo(0, 0, 1, 0); |
| 2403 path.lineTo(0, 2); | 2401 path.lineTo(0, 2); |
| 2404 path.close(); | 2402 path.close(); |
| 2405 path.moveTo(0, 0); | 2403 path.moveTo(0, 0); |
| 2406 path.lineTo(0, 0); | 2404 path.lineTo(0, 0); |
| 2407 path.quadTo(1, 0, 0, 2); | 2405 path.quadTo(1, 0, 0, 2); |
| 2408 path.close(); | 2406 path.close(); |
| 2409 testSimplify(reporter, path); | 2407 testSimplify(reporter, path, filename); |
| 2410 } | 2408 } |
| 2411 | 2409 |
| 2412 static void testQuadratic5(skiatest::Reporter* reporter) { | 2410 static void testQuadratic5(skiatest::Reporter* reporter, const char* filename) { |
| 2413 SkPath path; | 2411 SkPath path; |
| 2414 path.moveTo(0, 0); | 2412 path.moveTo(0, 0); |
| 2415 path.quadTo(0, 0, 0, 0); | 2413 path.quadTo(0, 0, 0, 0); |
| 2416 path.lineTo(0, 1); | 2414 path.lineTo(0, 1); |
| 2417 path.close(); | 2415 path.close(); |
| 2418 path.moveTo(0, 0); | 2416 path.moveTo(0, 0); |
| 2419 path.lineTo(1, 0); | 2417 path.lineTo(1, 0); |
| 2420 path.quadTo(0, 1, 0, 2); | 2418 path.quadTo(0, 1, 0, 2); |
| 2421 path.close(); | 2419 path.close(); |
| 2422 testSimplify(reporter, path); | 2420 testSimplify(reporter, path, filename); |
| 2423 } | 2421 } |
| 2424 | 2422 |
| 2425 static void testQuadratic6(skiatest::Reporter* reporter) { | 2423 static void testQuadratic6(skiatest::Reporter* reporter, const char* filename) { |
| 2426 SkPath path; | 2424 SkPath path; |
| 2427 path.moveTo(0, 0); | 2425 path.moveTo(0, 0); |
| 2428 path.quadTo(0, 0, 1, 0); | 2426 path.quadTo(0, 0, 1, 0); |
| 2429 path.lineTo(2, 1); | 2427 path.lineTo(2, 1); |
| 2430 path.close(); | 2428 path.close(); |
| 2431 path.moveTo(0, 0); | 2429 path.moveTo(0, 0); |
| 2432 path.lineTo(0, 0); | 2430 path.lineTo(0, 0); |
| 2433 path.quadTo(2, 0, 0, 1); | 2431 path.quadTo(2, 0, 0, 1); |
| 2434 path.close(); | 2432 path.close(); |
| 2435 testSimplify(reporter, path); | 2433 testSimplify(reporter, path, filename); |
| 2436 } | 2434 } |
| 2437 | 2435 |
| 2438 static void testQuadratic7(skiatest::Reporter* reporter) { | 2436 static void testQuadratic7(skiatest::Reporter* reporter, const char* filename) { |
| 2439 SkPath path; | 2437 SkPath path; |
| 2440 path.moveTo(0, 0); | 2438 path.moveTo(0, 0); |
| 2441 path.quadTo(0, 0, 1, 0); | 2439 path.quadTo(0, 0, 1, 0); |
| 2442 path.lineTo(3, 1); | 2440 path.lineTo(3, 1); |
| 2443 path.close(); | 2441 path.close(); |
| 2444 path.moveTo(0, 0); | 2442 path.moveTo(0, 0); |
| 2445 path.lineTo(0, 0); | 2443 path.lineTo(0, 0); |
| 2446 path.quadTo(3, 0, 1, 2); | 2444 path.quadTo(3, 0, 1, 2); |
| 2447 path.close(); | 2445 path.close(); |
| 2448 testSimplify(reporter, path); | 2446 testSimplify(reporter, path, filename); |
| 2449 } | 2447 } |
| 2450 | 2448 |
| 2451 static void testQuadratic8(skiatest::Reporter* reporter) { | 2449 static void testQuadratic8(skiatest::Reporter* reporter, const char* filename) { |
| 2452 SkPath path; | 2450 SkPath path; |
| 2453 path.moveTo(0, 0); | 2451 path.moveTo(0, 0); |
| 2454 path.quadTo(0, 0, 1, 0); | 2452 path.quadTo(0, 0, 1, 0); |
| 2455 path.lineTo(0, 2); | 2453 path.lineTo(0, 2); |
| 2456 path.close(); | 2454 path.close(); |
| 2457 path.moveTo(0, 0); | 2455 path.moveTo(0, 0); |
| 2458 path.lineTo(1, 0); | 2456 path.lineTo(1, 0); |
| 2459 path.quadTo(0, 1, 1, 2); | 2457 path.quadTo(0, 1, 1, 2); |
| 2460 path.close(); | 2458 path.close(); |
| 2461 testSimplify(reporter, path); | 2459 testSimplify(reporter, path, filename); |
| 2462 } | 2460 } |
| 2463 | 2461 |
| 2464 static void testQuadratic9(skiatest::Reporter* reporter) { | 2462 static void testQuadratic9(skiatest::Reporter* reporter, const char* filename) { |
| 2465 SkPath path; | 2463 SkPath path; |
| 2466 path.moveTo(0, 0); | 2464 path.moveTo(0, 0); |
| 2467 path.quadTo(0, 0, 1, 0); | 2465 path.quadTo(0, 0, 1, 0); |
| 2468 path.lineTo(3, 1); | 2466 path.lineTo(3, 1); |
| 2469 path.close(); | 2467 path.close(); |
| 2470 path.moveTo(0, 0); | 2468 path.moveTo(0, 0); |
| 2471 path.lineTo(1, 0); | 2469 path.lineTo(1, 0); |
| 2472 path.quadTo(1, 2, 3, 2); | 2470 path.quadTo(1, 2, 3, 2); |
| 2473 path.close(); | 2471 path.close(); |
| 2474 testSimplify(reporter, path); | 2472 testSimplify(reporter, path, filename); |
| 2475 } | 2473 } |
| 2476 | 2474 |
| 2477 static void testQuadratic14(skiatest::Reporter* reporter) { | 2475 static void testQuadratic14(skiatest::Reporter* reporter, const char* filename)
{ |
| 2478 SkPath path; | 2476 SkPath path; |
| 2479 path.moveTo(0, 0); | 2477 path.moveTo(0, 0); |
| 2480 path.quadTo(0, 0, 1, 0); | 2478 path.quadTo(0, 0, 1, 0); |
| 2481 path.lineTo(3, 2); | 2479 path.lineTo(3, 2); |
| 2482 path.close(); | 2480 path.close(); |
| 2483 path.moveTo(0, 0); | 2481 path.moveTo(0, 0); |
| 2484 path.lineTo(1, 0); | 2482 path.lineTo(1, 0); |
| 2485 path.quadTo(3, 2, 3, 3); | 2483 path.quadTo(3, 2, 3, 3); |
| 2486 path.close(); | 2484 path.close(); |
| 2487 testSimplify(reporter, path); | 2485 testSimplify(reporter, path, filename); |
| 2488 } | 2486 } |
| 2489 | 2487 |
| 2490 static void testQuadratic15(skiatest::Reporter* reporter) { | 2488 static void testQuadratic15(skiatest::Reporter* reporter, const char* filename)
{ |
| 2491 SkPath path; | 2489 SkPath path; |
| 2492 path.moveTo(0, 0); | 2490 path.moveTo(0, 0); |
| 2493 path.quadTo(0, 0, 1, 0); | 2491 path.quadTo(0, 0, 1, 0); |
| 2494 path.lineTo(1, 3); | 2492 path.lineTo(1, 3); |
| 2495 path.close(); | 2493 path.close(); |
| 2496 path.moveTo(1, 0); | 2494 path.moveTo(1, 0); |
| 2497 path.lineTo(0, 1); | 2495 path.lineTo(0, 1); |
| 2498 path.quadTo(1, 1, 0, 3); | 2496 path.quadTo(1, 1, 0, 3); |
| 2499 path.close(); | 2497 path.close(); |
| 2500 testSimplify(reporter, path); | 2498 testSimplify(reporter, path, filename); |
| 2501 } | 2499 } |
| 2502 | 2500 |
| 2503 static void testQuadratic17x(skiatest::Reporter* reporter) { | 2501 static void testQuadratic17x(skiatest::Reporter* reporter, const char* filename)
{ |
| 2504 SkPath path; | 2502 SkPath path; |
| 2505 path.setFillType(SkPath::kEvenOdd_FillType); | 2503 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2506 path.moveTo(0, 0); | 2504 path.moveTo(0, 0); |
| 2507 path.quadTo(0, 0, 3, 1); | 2505 path.quadTo(0, 0, 3, 1); |
| 2508 path.lineTo(0, 2); | 2506 path.lineTo(0, 2); |
| 2509 path.close(); | 2507 path.close(); |
| 2510 path.moveTo(0, 0); | 2508 path.moveTo(0, 0); |
| 2511 path.lineTo(1, 0); | 2509 path.lineTo(1, 0); |
| 2512 path.quadTo(3, 1, 0, 2); | 2510 path.quadTo(3, 1, 0, 2); |
| 2513 path.close(); | 2511 path.close(); |
| 2514 testSimplify(reporter, path); | 2512 testSimplify(reporter, path, filename); |
| 2515 } | 2513 } |
| 2516 | 2514 |
| 2517 static void testQuadratic18(skiatest::Reporter* reporter) { | 2515 static void testQuadratic18(skiatest::Reporter* reporter, const char* filename)
{ |
| 2518 SkPath path; | 2516 SkPath path; |
| 2519 path.moveTo(0, 0); | 2517 path.moveTo(0, 0); |
| 2520 path.quadTo(1, 0, 0, 1); | 2518 path.quadTo(1, 0, 0, 1); |
| 2521 path.lineTo(0, 1); | 2519 path.lineTo(0, 1); |
| 2522 path.close(); | 2520 path.close(); |
| 2523 path.moveTo(0, 0); | 2521 path.moveTo(0, 0); |
| 2524 path.lineTo(0, 0); | 2522 path.lineTo(0, 0); |
| 2525 path.quadTo(1, 0, 1, 1); | 2523 path.quadTo(1, 0, 1, 1); |
| 2526 path.close(); | 2524 path.close(); |
| 2527 testSimplify(reporter, path); | 2525 testSimplify(reporter, path, filename); |
| 2528 } | 2526 } |
| 2529 | 2527 |
| 2530 static void testQuadratic19(skiatest::Reporter* reporter) { | 2528 static void testQuadratic19(skiatest::Reporter* reporter, const char* filename)
{ |
| 2531 SkPath path; | 2529 SkPath path; |
| 2532 path.moveTo(0, 0); | 2530 path.moveTo(0, 0); |
| 2533 path.quadTo(1, 0, 0, 1); | 2531 path.quadTo(1, 0, 0, 1); |
| 2534 path.lineTo(0, 1); | 2532 path.lineTo(0, 1); |
| 2535 path.close(); | 2533 path.close(); |
| 2536 path.moveTo(0, 0); | 2534 path.moveTo(0, 0); |
| 2537 path.lineTo(0, 0); | 2535 path.lineTo(0, 0); |
| 2538 path.quadTo(2, 0, 0, 1); | 2536 path.quadTo(2, 0, 0, 1); |
| 2539 path.close(); | 2537 path.close(); |
| 2540 testSimplify(reporter, path); | 2538 testSimplify(reporter, path, filename); |
| 2541 } | 2539 } |
| 2542 | 2540 |
| 2543 static void testQuadratic20(skiatest::Reporter* reporter) { | 2541 static void testQuadratic20(skiatest::Reporter* reporter, const char* filename)
{ |
| 2544 SkPath path; | 2542 SkPath path; |
| 2545 path.moveTo(0, 0); | 2543 path.moveTo(0, 0); |
| 2546 path.quadTo(1, 0, 0, 1); | 2544 path.quadTo(1, 0, 0, 1); |
| 2547 path.lineTo(0, 1); | 2545 path.lineTo(0, 1); |
| 2548 path.close(); | 2546 path.close(); |
| 2549 path.moveTo(0, 0); | 2547 path.moveTo(0, 0); |
| 2550 path.lineTo(0, 0); | 2548 path.lineTo(0, 0); |
| 2551 path.quadTo(1, 0, 0, 1); | 2549 path.quadTo(1, 0, 0, 1); |
| 2552 path.close(); | 2550 path.close(); |
| 2553 testSimplify(reporter, path); | 2551 testSimplify(reporter, path, filename); |
| 2554 } | 2552 } |
| 2555 | 2553 |
| 2556 static void testQuadratic21(skiatest::Reporter* reporter) { | 2554 static void testQuadratic21(skiatest::Reporter* reporter, const char* filename)
{ |
| 2557 SkPath path; | 2555 SkPath path; |
| 2558 path.moveTo(0, 0); | 2556 path.moveTo(0, 0); |
| 2559 path.quadTo(1, 0, 0, 1); | 2557 path.quadTo(1, 0, 0, 1); |
| 2560 path.lineTo(0, 1); | 2558 path.lineTo(0, 1); |
| 2561 path.close(); | 2559 path.close(); |
| 2562 path.moveTo(0, 0); | 2560 path.moveTo(0, 0); |
| 2563 path.lineTo(0, 0); | 2561 path.lineTo(0, 0); |
| 2564 path.quadTo(1, 0, 0, 2); | 2562 path.quadTo(1, 0, 0, 2); |
| 2565 path.close(); | 2563 path.close(); |
| 2566 testSimplify(reporter, path); | 2564 testSimplify(reporter, path, filename); |
| 2567 } | 2565 } |
| 2568 | 2566 |
| 2569 static void testQuadratic22(skiatest::Reporter* reporter) { | 2567 static void testQuadratic22(skiatest::Reporter* reporter, const char* filename)
{ |
| 2570 SkPath path; | 2568 SkPath path; |
| 2571 path.moveTo(0, 0); | 2569 path.moveTo(0, 0); |
| 2572 path.quadTo(1, 0, 0, 1); | 2570 path.quadTo(1, 0, 0, 1); |
| 2573 path.lineTo(0, 1); | 2571 path.lineTo(0, 1); |
| 2574 path.close(); | 2572 path.close(); |
| 2575 path.moveTo(0, 0); | 2573 path.moveTo(0, 0); |
| 2576 path.lineTo(0, 0); | 2574 path.lineTo(0, 0); |
| 2577 path.quadTo(0, 1, 2, 1); | 2575 path.quadTo(0, 1, 2, 1); |
| 2578 path.close(); | 2576 path.close(); |
| 2579 testSimplify(reporter, path); | 2577 testSimplify(reporter, path, filename); |
| 2580 } | 2578 } |
| 2581 | 2579 |
| 2582 static void testQuadratic23(skiatest::Reporter* reporter) { | 2580 static void testQuadratic23(skiatest::Reporter* reporter, const char* filename)
{ |
| 2583 SkPath path; | 2581 SkPath path; |
| 2584 path.moveTo(0, 0); | 2582 path.moveTo(0, 0); |
| 2585 path.quadTo(1, 0, 0, 1); | 2583 path.quadTo(1, 0, 0, 1); |
| 2586 path.lineTo(0, 1); | 2584 path.lineTo(0, 1); |
| 2587 path.close(); | 2585 path.close(); |
| 2588 path.moveTo(0, 0); | 2586 path.moveTo(0, 0); |
| 2589 path.lineTo(0, 0); | 2587 path.lineTo(0, 0); |
| 2590 path.quadTo(0, 2, 1, 2); | 2588 path.quadTo(0, 2, 1, 2); |
| 2591 path.close(); | 2589 path.close(); |
| 2592 testSimplify(reporter, path); | 2590 testSimplify(reporter, path, filename); |
| 2593 } | 2591 } |
| 2594 | 2592 |
| 2595 static void testQuadratic24(skiatest::Reporter* reporter) { | 2593 static void testQuadratic24(skiatest::Reporter* reporter, const char* filename)
{ |
| 2596 SkPath path; | 2594 SkPath path; |
| 2597 path.moveTo(0, 0); | 2595 path.moveTo(0, 0); |
| 2598 path.quadTo(1, 0, 0, 1); | 2596 path.quadTo(1, 0, 0, 1); |
| 2599 path.lineTo(0, 1); | 2597 path.lineTo(0, 1); |
| 2600 path.close(); | 2598 path.close(); |
| 2601 path.moveTo(0, 0); | 2599 path.moveTo(0, 0); |
| 2602 path.lineTo(1, 0); | 2600 path.lineTo(1, 0); |
| 2603 path.quadTo(2, 0, 0, 1); | 2601 path.quadTo(2, 0, 0, 1); |
| 2604 path.close(); | 2602 path.close(); |
| 2605 testSimplify(reporter, path); | 2603 testSimplify(reporter, path, filename); |
| 2606 } | 2604 } |
| 2607 | 2605 |
| 2608 static void testQuadratic25(skiatest::Reporter* reporter) { | 2606 static void testQuadratic25(skiatest::Reporter* reporter, const char* filename)
{ |
| 2609 SkPath path; | 2607 SkPath path; |
| 2610 path.moveTo(0, 0); | 2608 path.moveTo(0, 0); |
| 2611 path.quadTo(1, 0, 1, 1); | 2609 path.quadTo(1, 0, 1, 1); |
| 2612 path.lineTo(1, 1); | 2610 path.lineTo(1, 1); |
| 2613 path.close(); | 2611 path.close(); |
| 2614 path.moveTo(0, 0); | 2612 path.moveTo(0, 0); |
| 2615 path.lineTo(0, 0); | 2613 path.lineTo(0, 0); |
| 2616 path.quadTo(2, 1, 0, 2); | 2614 path.quadTo(2, 1, 0, 2); |
| 2617 path.close(); | 2615 path.close(); |
| 2618 testSimplify(reporter, path); | 2616 testSimplify(reporter, path, filename); |
| 2619 } | 2617 } |
| 2620 | 2618 |
| 2621 static void testQuadratic26(skiatest::Reporter* reporter) { | 2619 static void testQuadratic26(skiatest::Reporter* reporter, const char* filename)
{ |
| 2622 SkPath path; | 2620 SkPath path; |
| 2623 path.moveTo(0, 0); | 2621 path.moveTo(0, 0); |
| 2624 path.quadTo(1, 0, 1, 1); | 2622 path.quadTo(1, 0, 1, 1); |
| 2625 path.lineTo(0, 2); | 2623 path.lineTo(0, 2); |
| 2626 path.close(); | 2624 path.close(); |
| 2627 path.moveTo(0, 0); | 2625 path.moveTo(0, 0); |
| 2628 path.lineTo(0, 0); | 2626 path.lineTo(0, 0); |
| 2629 path.quadTo(1, 0, 0, 1); | 2627 path.quadTo(1, 0, 0, 1); |
| 2630 path.close(); | 2628 path.close(); |
| 2631 testSimplify(reporter, path); | 2629 testSimplify(reporter, path, filename); |
| 2632 } | 2630 } |
| 2633 | 2631 |
| 2634 static void testQuadratic27(skiatest::Reporter* reporter) { | 2632 static void testQuadratic27(skiatest::Reporter* reporter, const char* filename)
{ |
| 2635 SkPath path; | 2633 SkPath path; |
| 2636 path.moveTo(0, 0); | 2634 path.moveTo(0, 0); |
| 2637 path.quadTo(1, 0, 1, 1); | 2635 path.quadTo(1, 0, 1, 1); |
| 2638 path.lineTo(2, 1); | 2636 path.lineTo(2, 1); |
| 2639 path.close(); | 2637 path.close(); |
| 2640 path.moveTo(0, 0); | 2638 path.moveTo(0, 0); |
| 2641 path.lineTo(0, 0); | 2639 path.lineTo(0, 0); |
| 2642 path.quadTo(2, 1, 0, 2); | 2640 path.quadTo(2, 1, 0, 2); |
| 2643 path.close(); | 2641 path.close(); |
| 2644 testSimplify(reporter, path); | 2642 testSimplify(reporter, path, filename); |
| 2645 } | 2643 } |
| 2646 | 2644 |
| 2647 static void testQuadratic28(skiatest::Reporter* reporter) { | 2645 static void testQuadratic28(skiatest::Reporter* reporter, const char* filename)
{ |
| 2648 SkPath path; | 2646 SkPath path; |
| 2649 path.moveTo(0, 0); | 2647 path.moveTo(0, 0); |
| 2650 path.quadTo(1, 0, 0, 1); | 2648 path.quadTo(1, 0, 0, 1); |
| 2651 path.lineTo(0, 1); | 2649 path.lineTo(0, 1); |
| 2652 path.close(); | 2650 path.close(); |
| 2653 path.moveTo(0, 0); | 2651 path.moveTo(0, 0); |
| 2654 path.lineTo(0, 2); | 2652 path.lineTo(0, 2); |
| 2655 path.quadTo(1, 2, 0, 3); | 2653 path.quadTo(1, 2, 0, 3); |
| 2656 path.close(); | 2654 path.close(); |
| 2657 testSimplify(reporter, path); | 2655 testSimplify(reporter, path, filename); |
| 2658 } | 2656 } |
| 2659 | 2657 |
| 2660 static void testQuadratic29(skiatest::Reporter* reporter) { | 2658 static void testQuadratic29(skiatest::Reporter* reporter, const char* filename)
{ |
| 2661 SkPath path; | 2659 SkPath path; |
| 2662 path.moveTo(0, 0); | 2660 path.moveTo(0, 0); |
| 2663 path.quadTo(1, 0, 2, 1); | 2661 path.quadTo(1, 0, 2, 1); |
| 2664 path.lineTo(0, 2); | 2662 path.lineTo(0, 2); |
| 2665 path.close(); | 2663 path.close(); |
| 2666 path.moveTo(0, 0); | 2664 path.moveTo(0, 0); |
| 2667 path.lineTo(0, 0); | 2665 path.lineTo(0, 0); |
| 2668 path.quadTo(1, 0, 0, 1); | 2666 path.quadTo(1, 0, 0, 1); |
| 2669 path.close(); | 2667 path.close(); |
| 2670 testSimplify(reporter, path); | 2668 testSimplify(reporter, path, filename); |
| 2671 } | 2669 } |
| 2672 | 2670 |
| 2673 static void testQuadratic30(skiatest::Reporter* reporter) { | 2671 static void testQuadratic30(skiatest::Reporter* reporter, const char* filename)
{ |
| 2674 SkPath path; | 2672 SkPath path; |
| 2675 path.moveTo(0, 0); | 2673 path.moveTo(0, 0); |
| 2676 path.quadTo(1, 0, 1, 2); | 2674 path.quadTo(1, 0, 1, 2); |
| 2677 path.lineTo(1, 2); | 2675 path.lineTo(1, 2); |
| 2678 path.close(); | 2676 path.close(); |
| 2679 path.moveTo(0, 0); | 2677 path.moveTo(0, 0); |
| 2680 path.lineTo(1, 0); | 2678 path.lineTo(1, 0); |
| 2681 path.quadTo(0, 1, 1, 2); | 2679 path.quadTo(0, 1, 1, 2); |
| 2682 path.close(); | 2680 path.close(); |
| 2683 testSimplify(reporter, path); | 2681 testSimplify(reporter, path, filename); |
| 2684 } | 2682 } |
| 2685 | 2683 |
| 2686 static void testQuadratic31(skiatest::Reporter* reporter) { | 2684 static void testQuadratic31(skiatest::Reporter* reporter, const char* filename)
{ |
| 2687 SkPath path; | 2685 SkPath path; |
| 2688 path.moveTo(0, 0); | 2686 path.moveTo(0, 0); |
| 2689 path.quadTo(1, 0, 1, 2); | 2687 path.quadTo(1, 0, 1, 2); |
| 2690 path.lineTo(1, 2); | 2688 path.lineTo(1, 2); |
| 2691 path.close(); | 2689 path.close(); |
| 2692 path.moveTo(0, 0); | 2690 path.moveTo(0, 0); |
| 2693 path.lineTo(1, 0); | 2691 path.lineTo(1, 0); |
| 2694 path.quadTo(0, 1, 1, 3); | 2692 path.quadTo(0, 1, 1, 3); |
| 2695 path.close(); | 2693 path.close(); |
| 2696 testSimplify(reporter, path); | 2694 testSimplify(reporter, path, filename); |
| 2697 } | 2695 } |
| 2698 | 2696 |
| 2699 static void testQuadratic32(skiatest::Reporter* reporter) { | 2697 static void testQuadratic32(skiatest::Reporter* reporter, const char* filename)
{ |
| 2700 SkPath path; | 2698 SkPath path; |
| 2701 path.moveTo(0, 0); | 2699 path.moveTo(0, 0); |
| 2702 path.quadTo(1, 0, 2, 3); | 2700 path.quadTo(1, 0, 2, 3); |
| 2703 path.lineTo(2, 3); | 2701 path.lineTo(2, 3); |
| 2704 path.close(); | 2702 path.close(); |
| 2705 path.moveTo(0, 0); | 2703 path.moveTo(0, 0); |
| 2706 path.lineTo(0, 0); | 2704 path.lineTo(0, 0); |
| 2707 path.quadTo(3, 1, 0, 2); | 2705 path.quadTo(3, 1, 0, 2); |
| 2708 path.close(); | 2706 path.close(); |
| 2709 testSimplify(reporter, path); | 2707 testSimplify(reporter, path, filename); |
| 2710 } | 2708 } |
| 2711 | 2709 |
| 2712 static void testQuadratic33(skiatest::Reporter* reporter) { | 2710 static void testQuadratic33(skiatest::Reporter* reporter, const char* filename)
{ |
| 2713 SkPath path; | 2711 SkPath path; |
| 2714 path.moveTo(0, 0); | 2712 path.moveTo(0, 0); |
| 2715 path.quadTo(2, 0, 0, 1); | 2713 path.quadTo(2, 0, 0, 1); |
| 2716 path.lineTo(0, 1); | 2714 path.lineTo(0, 1); |
| 2717 path.close(); | 2715 path.close(); |
| 2718 path.moveTo(0, 0); | 2716 path.moveTo(0, 0); |
| 2719 path.lineTo(1, 1); | 2717 path.lineTo(1, 1); |
| 2720 path.quadTo(2, 1, 2, 2); | 2718 path.quadTo(2, 1, 2, 2); |
| 2721 path.close(); | 2719 path.close(); |
| 2722 testSimplify(reporter, path); | 2720 testSimplify(reporter, path, filename); |
| 2723 } | 2721 } |
| 2724 | 2722 |
| 2725 static void testQuadratic34(skiatest::Reporter* reporter) { | 2723 static void testQuadratic34(skiatest::Reporter* reporter, const char* filename)
{ |
| 2726 SkPath path; | 2724 SkPath path; |
| 2727 path.moveTo(0, 0); | 2725 path.moveTo(0, 0); |
| 2728 path.quadTo(2, 0, 0, 1); | 2726 path.quadTo(2, 0, 0, 1); |
| 2729 path.lineTo(0, 1); | 2727 path.lineTo(0, 1); |
| 2730 path.close(); | 2728 path.close(); |
| 2731 path.moveTo(1, 0); | 2729 path.moveTo(1, 0); |
| 2732 path.lineTo(1, 1); | 2730 path.lineTo(1, 1); |
| 2733 path.quadTo(2, 1, 1, 2); | 2731 path.quadTo(2, 1, 1, 2); |
| 2734 path.close(); | 2732 path.close(); |
| 2735 testSimplify(reporter, path); | 2733 testSimplify(reporter, path, filename); |
| 2736 } | 2734 } |
| 2737 | 2735 |
| 2738 static void testQuadratic35(skiatest::Reporter* reporter) { | 2736 static void testQuadratic35(skiatest::Reporter* reporter, const char* filename)
{ |
| 2739 SkPath path; | 2737 SkPath path; |
| 2740 path.moveTo(0, 0); | 2738 path.moveTo(0, 0); |
| 2741 path.quadTo(0, 1, 1, 1); | 2739 path.quadTo(0, 1, 1, 1); |
| 2742 path.lineTo(1, 3); | 2740 path.lineTo(1, 3); |
| 2743 path.close(); | 2741 path.close(); |
| 2744 path.moveTo(2, 0); | 2742 path.moveTo(2, 0); |
| 2745 path.lineTo(3, 0); | 2743 path.lineTo(3, 0); |
| 2746 path.quadTo(0, 1, 1, 1); | 2744 path.quadTo(0, 1, 1, 1); |
| 2747 path.close(); | 2745 path.close(); |
| 2748 testSimplify(reporter, path); | 2746 testSimplify(reporter, path, filename); |
| 2749 } | 2747 } |
| 2750 | 2748 |
| 2751 static void testQuadratic36(skiatest::Reporter* reporter) { | 2749 static void testQuadratic36(skiatest::Reporter* reporter, const char* filename)
{ |
| 2752 SkPath path; | 2750 SkPath path; |
| 2753 path.moveTo(0, 0); | 2751 path.moveTo(0, 0); |
| 2754 path.quadTo(2, 1, 2, 3); | 2752 path.quadTo(2, 1, 2, 3); |
| 2755 path.lineTo(2, 3); | 2753 path.lineTo(2, 3); |
| 2756 path.close(); | 2754 path.close(); |
| 2757 path.moveTo(3, 1); | 2755 path.moveTo(3, 1); |
| 2758 path.lineTo(1, 2); | 2756 path.lineTo(1, 2); |
| 2759 path.quadTo(3, 2, 1, 3); | 2757 path.quadTo(3, 2, 1, 3); |
| 2760 path.close(); | 2758 path.close(); |
| 2761 testSimplify(reporter, path); | 2759 testSimplify(reporter, path, filename); |
| 2762 } | 2760 } |
| 2763 | 2761 |
| 2764 static void testQuadratic37(skiatest::Reporter* reporter) { | 2762 static void testQuadratic37(skiatest::Reporter* reporter, const char* filename)
{ |
| 2765 SkPath path; | 2763 SkPath path; |
| 2766 path.moveTo(0, 0); | 2764 path.moveTo(0, 0); |
| 2767 path.quadTo(0, 2, 1, 2); | 2765 path.quadTo(0, 2, 1, 2); |
| 2768 path.lineTo(1, 2); | 2766 path.lineTo(1, 2); |
| 2769 path.close(); | 2767 path.close(); |
| 2770 path.moveTo(0, 0); | 2768 path.moveTo(0, 0); |
| 2771 path.lineTo(3, 1); | 2769 path.lineTo(3, 1); |
| 2772 path.quadTo(0, 2, 1, 2); | 2770 path.quadTo(0, 2, 1, 2); |
| 2773 path.close(); | 2771 path.close(); |
| 2774 testSimplify(reporter, path); | 2772 testSimplify(reporter, path, filename); |
| 2775 } | 2773 } |
| 2776 | 2774 |
| 2777 static void testQuadratic38(skiatest::Reporter* reporter) { | 2775 static void testQuadratic38(skiatest::Reporter* reporter, const char* filename)
{ |
| 2778 SkPath path; | 2776 SkPath path; |
| 2779 path.moveTo(1, 0); | 2777 path.moveTo(1, 0); |
| 2780 path.quadTo(0, 1, 1, 1); | 2778 path.quadTo(0, 1, 1, 1); |
| 2781 path.lineTo(1, 1); | 2779 path.lineTo(1, 1); |
| 2782 path.close(); | 2780 path.close(); |
| 2783 path.moveTo(1, 0); | 2781 path.moveTo(1, 0); |
| 2784 path.lineTo(1, 2); | 2782 path.lineTo(1, 2); |
| 2785 path.quadTo(2, 2, 1, 3); | 2783 path.quadTo(2, 2, 1, 3); |
| 2786 path.close(); | 2784 path.close(); |
| 2787 testSimplify(reporter, path); | 2785 testSimplify(reporter, path, filename); |
| 2788 } | 2786 } |
| 2789 | 2787 |
| 2790 static void testQuadratic51(skiatest::Reporter* reporter) { | 2788 static void testQuadratic51(skiatest::Reporter* reporter, const char* filename)
{ |
| 2791 SkPath path; | 2789 SkPath path; |
| 2792 path.moveTo(369.863983f, 145.645813f); | 2790 path.moveTo(369.863983f, 145.645813f); |
| 2793 path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f); | 2791 path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f); |
| 2794 path.lineTo(369.863983f, 145.645813f); | 2792 path.lineTo(369.863983f, 145.645813f); |
| 2795 path.close(); | 2793 path.close(); |
| 2796 path.moveTo(369.970581f, 137.94342f); | 2794 path.moveTo(369.970581f, 137.94342f); |
| 2797 path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f); | 2795 path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f); |
| 2798 path.lineTo(369.970581f, 137.94342f); | 2796 path.lineTo(369.970581f, 137.94342f); |
| 2799 path.close(); | 2797 path.close(); |
| 2800 testSimplify(reporter, path); | 2798 testSimplify(reporter, path, filename); |
| 2801 } | 2799 } |
| 2802 | 2800 |
| 2803 static void testQuadratic53(skiatest::Reporter* reporter) { | 2801 static void testQuadratic53(skiatest::Reporter* reporter, const char* filename)
{ |
| 2804 SkPath path; | 2802 SkPath path; |
| 2805 path.moveTo(303.12088f, 141.299606f); | 2803 path.moveTo(303.12088f, 141.299606f); |
| 2806 path.lineTo(330.463562f, 217.659027f); | 2804 path.lineTo(330.463562f, 217.659027f); |
| 2807 path.lineTo(303.12088f, 141.299606f); | 2805 path.lineTo(303.12088f, 141.299606f); |
| 2808 path.close(); | 2806 path.close(); |
| 2809 path.moveTo(371.919067f, 205.854996f); | 2807 path.moveTo(371.919067f, 205.854996f); |
| 2810 path.lineTo(326.236786f, 205.854996f); | 2808 path.lineTo(326.236786f, 205.854996f); |
| 2811 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); | 2809 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); |
| 2812 path.lineTo(371.919067f, 205.854996f); | 2810 path.lineTo(371.919067f, 205.854996f); |
| 2813 path.close(); | 2811 path.close(); |
| 2814 testSimplify(reporter, path); | 2812 testSimplify(reporter, path, filename); |
| 2815 } | 2813 } |
| 2816 | 2814 |
| 2817 static void testQuadratic55(skiatest::Reporter* reporter) { | 2815 static void testQuadratic55(skiatest::Reporter* reporter, const char* filename)
{ |
| 2818 SkPath path; | 2816 SkPath path; |
| 2819 path.moveTo(303.12088f, 141.299606f); | 2817 path.moveTo(303.12088f, 141.299606f); |
| 2820 path.lineTo(330.463562f, 217.659027f); | 2818 path.lineTo(330.463562f, 217.659027f); |
| 2821 path.lineTo(358.606506f, 141.299606f); | 2819 path.lineTo(358.606506f, 141.299606f); |
| 2822 path.lineTo(303.12088f, 141.299606f); | 2820 path.lineTo(303.12088f, 141.299606f); |
| 2823 path.close(); | 2821 path.close(); |
| 2824 path.moveTo(326.236786f, 205.854996f); | 2822 path.moveTo(326.236786f, 205.854996f); |
| 2825 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); | 2823 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); |
| 2826 path.lineTo(326.236786f, 205.854996f); | 2824 path.lineTo(326.236786f, 205.854996f); |
| 2827 path.close(); | 2825 path.close(); |
| 2828 testSimplify(reporter, path); | 2826 testSimplify(reporter, path, filename); |
| 2829 } | 2827 } |
| 2830 | 2828 |
| 2831 static void testQuadratic56(skiatest::Reporter* reporter) { | 2829 static void testQuadratic56(skiatest::Reporter* reporter, const char* filename)
{ |
| 2832 SkPath path; | 2830 SkPath path; |
| 2833 path.moveTo(366.608826f, 151.196014f); | 2831 path.moveTo(366.608826f, 151.196014f); |
| 2834 path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f); | 2832 path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f); |
| 2835 path.lineTo(354.009216f, 208.816208f); | 2833 path.lineTo(354.009216f, 208.816208f); |
| 2836 path.lineTo(393.291473f, 102.232819f); | 2834 path.lineTo(393.291473f, 102.232819f); |
| 2837 path.lineTo(359.978058f, 136.581512f); | 2835 path.lineTo(359.978058f, 136.581512f); |
| 2838 path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f); | 2836 path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f); |
| 2839 path.lineTo(364.390686f, 157.898193f); | 2837 path.lineTo(364.390686f, 157.898193f); |
| 2840 path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f); | 2838 path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f); |
| 2841 path.lineTo(350, 120); | 2839 path.lineTo(350, 120); |
| 2842 path.lineTo(366.608826f, 151.196014f); | 2840 path.lineTo(366.608826f, 151.196014f); |
| 2843 path.close(); | 2841 path.close(); |
| 2844 testSimplify(reporter, path); | 2842 testSimplify(reporter, path, filename); |
| 2845 } | 2843 } |
| 2846 | 2844 |
| 2847 static void testLine80(skiatest::Reporter* reporter) { | 2845 static void testLine80(skiatest::Reporter* reporter, const char* filename) { |
| 2848 SkPath path; | 2846 SkPath path; |
| 2849 path.moveTo(4, 0); | 2847 path.moveTo(4, 0); |
| 2850 path.lineTo(3, 7); | 2848 path.lineTo(3, 7); |
| 2851 path.lineTo(7, 5); | 2849 path.lineTo(7, 5); |
| 2852 path.lineTo(2, 2); | 2850 path.lineTo(2, 2); |
| 2853 path.close(); | 2851 path.close(); |
| 2854 path.moveTo(0, 6); | 2852 path.moveTo(0, 6); |
| 2855 path.lineTo(6, 12); | 2853 path.lineTo(6, 12); |
| 2856 path.lineTo(8, 3); | 2854 path.lineTo(8, 3); |
| 2857 path.close(); | 2855 path.close(); |
| 2858 testSimplify(reporter, path); | 2856 testSimplify(reporter, path, filename); |
| 2859 } | 2857 } |
| 2860 | 2858 |
| 2861 static void testQuadratic58(skiatest::Reporter* reporter) { | 2859 static void testQuadratic58(skiatest::Reporter* reporter, const char* filename)
{ |
| 2862 SkPath path; | 2860 SkPath path; |
| 2863 path.moveTo(283.714233f, 240); | 2861 path.moveTo(283.714233f, 240); |
| 2864 path.lineTo(283.714233f, 141.299606f); | 2862 path.lineTo(283.714233f, 141.299606f); |
| 2865 path.lineTo(303.12088f, 141.299606f); | 2863 path.lineTo(303.12088f, 141.299606f); |
| 2866 path.lineTo(330.463562f, 217.659027f); | 2864 path.lineTo(330.463562f, 217.659027f); |
| 2867 path.lineTo(358.606506f, 141.299606f); | 2865 path.lineTo(358.606506f, 141.299606f); |
| 2868 path.lineTo(362.874634f, 159.705902f); | 2866 path.lineTo(362.874634f, 159.705902f); |
| 2869 path.lineTo(335.665344f, 233.397751f); | 2867 path.lineTo(335.665344f, 233.397751f); |
| 2870 path.lineTo(322.12738f, 233.397751f); | 2868 path.lineTo(322.12738f, 233.397751f); |
| 2871 path.lineTo(295.718353f, 159.505829f); | 2869 path.lineTo(295.718353f, 159.505829f); |
| 2872 path.lineTo(295.718353f, 240); | 2870 path.lineTo(295.718353f, 240); |
| 2873 path.lineTo(283.714233f, 240); | 2871 path.lineTo(283.714233f, 240); |
| 2874 path.close(); | 2872 path.close(); |
| 2875 path.moveTo(322.935669f, 231.030273f); | 2873 path.moveTo(322.935669f, 231.030273f); |
| 2876 path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f); | 2874 path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f); |
| 2877 path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f); | 2875 path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f); |
| 2878 path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f); | 2876 path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f); |
| 2879 path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f); | 2877 path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f); |
| 2880 path.lineTo(371.919067f, 205.854996f); | 2878 path.lineTo(371.919067f, 205.854996f); |
| 2881 path.lineTo(326.236786f, 205.854996f); | 2879 path.lineTo(326.236786f, 205.854996f); |
| 2882 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); | 2880 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); |
| 2883 path.lineTo(322.935669f, 231.030273f); | 2881 path.lineTo(322.935669f, 231.030273f); |
| 2884 path.close(); | 2882 path.close(); |
| 2885 path.moveTo(326.837006f, 195.984955f); | 2883 path.moveTo(326.837006f, 195.984955f); |
| 2886 path.lineTo(358.78125f, 195.984955f); | 2884 path.lineTo(358.78125f, 195.984955f); |
| 2887 path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f); | 2885 path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f); |
| 2888 path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f); | 2886 path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f); |
| 2889 path.close(); | 2887 path.close(); |
| 2890 testSimplify(reporter, path); | 2888 testSimplify(reporter, path, filename); |
| 2891 } | 2889 } |
| 2892 | 2890 |
| 2893 static void testQuadratic59x(skiatest::Reporter* reporter) { | 2891 static void testQuadratic59x(skiatest::Reporter* reporter, const char* filename)
{ |
| 2894 SkPath path; | 2892 SkPath path; |
| 2895 path.setFillType(SkPath::kEvenOdd_FillType); | 2893 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2896 path.moveTo(0, 0); | 2894 path.moveTo(0, 0); |
| 2897 path.quadTo(0, 0, 0, 0); | 2895 path.quadTo(0, 0, 0, 0); |
| 2898 path.lineTo(2, 2); | 2896 path.lineTo(2, 2); |
| 2899 path.close(); | 2897 path.close(); |
| 2900 path.moveTo(0, 0); | 2898 path.moveTo(0, 0); |
| 2901 path.lineTo(2, 0); | 2899 path.lineTo(2, 0); |
| 2902 path.quadTo(3, 1, 1, 2); | 2900 path.quadTo(3, 1, 1, 2); |
| 2903 path.close(); | 2901 path.close(); |
| 2904 testSimplify(reporter, path); | 2902 testSimplify(reporter, path, filename); |
| 2905 } | 2903 } |
| 2906 | 2904 |
| 2907 static void testQuadratic59(skiatest::Reporter* reporter) { | 2905 static void testQuadratic59(skiatest::Reporter* reporter, const char* filename)
{ |
| 2908 SkPath path; | 2906 SkPath path; |
| 2909 path.setFillType(SkPath::kWinding_FillType); | 2907 path.setFillType(SkPath::kWinding_FillType); |
| 2910 path.moveTo(0, 0); | 2908 path.moveTo(0, 0); |
| 2911 path.quadTo(0, 0, 0, 0); | 2909 path.quadTo(0, 0, 0, 0); |
| 2912 path.lineTo(2, 2); | 2910 path.lineTo(2, 2); |
| 2913 path.close(); | 2911 path.close(); |
| 2914 path.moveTo(0, 0); | 2912 path.moveTo(0, 0); |
| 2915 path.lineTo(2, 0); | 2913 path.lineTo(2, 0); |
| 2916 path.quadTo(3, 1, 1, 2); | 2914 path.quadTo(3, 1, 1, 2); |
| 2917 path.close(); | 2915 path.close(); |
| 2918 testSimplify(reporter, path); | 2916 testSimplify(reporter, path, filename); |
| 2919 } | 2917 } |
| 2920 | 2918 |
| 2921 static void testQuadratic63(skiatest::Reporter* reporter) { | 2919 static void testQuadratic63(skiatest::Reporter* reporter, const char* filename)
{ |
| 2922 SkPath path; | 2920 SkPath path; |
| 2923 path.moveTo(0, 0); | 2921 path.moveTo(0, 0); |
| 2924 path.quadTo(0, 0, 0, 0); | 2922 path.quadTo(0, 0, 0, 0); |
| 2925 path.lineTo(3, 2); | 2923 path.lineTo(3, 2); |
| 2926 path.close(); | 2924 path.close(); |
| 2927 path.moveTo(1, 0); | 2925 path.moveTo(1, 0); |
| 2928 path.lineTo(2, 1); | 2926 path.lineTo(2, 1); |
| 2929 path.quadTo(2, 1, 2, 2); | 2927 path.quadTo(2, 1, 2, 2); |
| 2930 path.close(); | 2928 path.close(); |
| 2931 testSimplify(reporter, path); | 2929 testSimplify(reporter, path, filename); |
| 2932 } | 2930 } |
| 2933 | 2931 |
| 2934 static void testQuadratic64(skiatest::Reporter* reporter) { | 2932 static void testQuadratic64(skiatest::Reporter* reporter, const char* filename)
{ |
| 2935 SkPath path; | 2933 SkPath path; |
| 2936 path.moveTo(0, 0); | 2934 path.moveTo(0, 0); |
| 2937 path.quadTo(0, 0, 0, 0); | 2935 path.quadTo(0, 0, 0, 0); |
| 2938 path.lineTo(2, 3); | 2936 path.lineTo(2, 3); |
| 2939 path.close(); | 2937 path.close(); |
| 2940 path.moveTo(1, 2); | 2938 path.moveTo(1, 2); |
| 2941 path.lineTo(2, 2); | 2939 path.lineTo(2, 2); |
| 2942 path.quadTo(0, 3, 3, 3); | 2940 path.quadTo(0, 3, 3, 3); |
| 2943 path.close(); | 2941 path.close(); |
| 2944 testSimplify(reporter, path); | 2942 testSimplify(reporter, path, filename); |
| 2945 } | 2943 } |
| 2946 | 2944 |
| 2947 static void testQuadratic65(skiatest::Reporter* reporter) { | 2945 static void testQuadratic65(skiatest::Reporter* reporter, const char* filename)
{ |
| 2948 SkPath path; | 2946 SkPath path; |
| 2949 path.moveTo(0, 0); | 2947 path.moveTo(0, 0); |
| 2950 path.quadTo(0, 0, 0, 0); | 2948 path.quadTo(0, 0, 0, 0); |
| 2951 path.lineTo(3, 2); | 2949 path.lineTo(3, 2); |
| 2952 path.close(); | 2950 path.close(); |
| 2953 path.moveTo(2, 1); | 2951 path.moveTo(2, 1); |
| 2954 path.lineTo(2, 2); | 2952 path.lineTo(2, 2); |
| 2955 path.quadTo(0, 3, 1, 3); | 2953 path.quadTo(0, 3, 1, 3); |
| 2956 path.close(); | 2954 path.close(); |
| 2957 testSimplify(reporter, path); | 2955 testSimplify(reporter, path, filename); |
| 2958 } | 2956 } |
| 2959 | 2957 |
| 2960 static void testQuadratic67x(skiatest::Reporter* reporter) { | 2958 static void testQuadratic67x(skiatest::Reporter* reporter, const char* filename)
{ |
| 2961 SkPath path; | 2959 SkPath path; |
| 2962 path.setFillType(SkPath::kEvenOdd_FillType); | 2960 path.setFillType(SkPath::kEvenOdd_FillType); |
| 2963 path.moveTo(0, 0); | 2961 path.moveTo(0, 0); |
| 2964 path.quadTo(0, 0, 2, 1); | 2962 path.quadTo(0, 0, 2, 1); |
| 2965 path.lineTo(2, 2); | 2963 path.lineTo(2, 2); |
| 2966 path.close(); | 2964 path.close(); |
| 2967 path.moveTo(0, 0); | 2965 path.moveTo(0, 0); |
| 2968 path.lineTo(2, 0); | 2966 path.lineTo(2, 0); |
| 2969 path.quadTo(1, 1, 3, 2); | 2967 path.quadTo(1, 1, 3, 2); |
| 2970 path.close(); | 2968 path.close(); |
| 2971 testSimplify(reporter, path); | 2969 testSimplify(reporter, path, filename); |
| 2972 } | 2970 } |
| 2973 | 2971 |
| 2974 static void testQuadratic68(skiatest::Reporter* reporter) { | 2972 static void testQuadratic68(skiatest::Reporter* reporter, const char* filename)
{ |
| 2975 SkPath path; | 2973 SkPath path; |
| 2976 path.moveTo(0, 0); | 2974 path.moveTo(0, 0); |
| 2977 path.quadTo(1, 0, 0, 1); | 2975 path.quadTo(1, 0, 0, 1); |
| 2978 path.lineTo(1, 2); | 2976 path.lineTo(1, 2); |
| 2979 path.close(); | 2977 path.close(); |
| 2980 path.moveTo(0, 0); | 2978 path.moveTo(0, 0); |
| 2981 path.lineTo(0, 0); | 2979 path.lineTo(0, 0); |
| 2982 path.quadTo(0, 1, 2, 1); | 2980 path.quadTo(0, 1, 2, 1); |
| 2983 path.close(); | 2981 path.close(); |
| 2984 testSimplify(reporter, path); | 2982 testSimplify(reporter, path, filename); |
| 2985 } | 2983 } |
| 2986 | 2984 |
| 2987 static void testQuadratic69(skiatest::Reporter* reporter) { | 2985 static void testQuadratic69(skiatest::Reporter* reporter, const char* filename)
{ |
| 2988 SkPath path; | 2986 SkPath path; |
| 2989 path.moveTo(0, 0); | 2987 path.moveTo(0, 0); |
| 2990 path.quadTo(0, 0, 0, 1); | 2988 path.quadTo(0, 0, 0, 1); |
| 2991 path.lineTo(3, 2); | 2989 path.lineTo(3, 2); |
| 2992 path.close(); | 2990 path.close(); |
| 2993 path.moveTo(2, 0); | 2991 path.moveTo(2, 0); |
| 2994 path.lineTo(1, 1); | 2992 path.lineTo(1, 1); |
| 2995 path.quadTo(3, 2, 2, 3); | 2993 path.quadTo(3, 2, 2, 3); |
| 2996 path.close(); | 2994 path.close(); |
| 2997 testSimplify(reporter, path); | 2995 testSimplify(reporter, path, filename); |
| 2998 } | 2996 } |
| 2999 | 2997 |
| 3000 static void testQuadratic70x(skiatest::Reporter* reporter) { | 2998 static void testQuadratic70x(skiatest::Reporter* reporter, const char* filename)
{ |
| 3001 SkPath path; | 2999 SkPath path; |
| 3002 path.setFillType(SkPath::kEvenOdd_FillType); | 3000 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3003 path.moveTo(0, 0); | 3001 path.moveTo(0, 0); |
| 3004 path.quadTo(1, 0, 0, 1); | 3002 path.quadTo(1, 0, 0, 1); |
| 3005 path.lineTo(1, 2); | 3003 path.lineTo(1, 2); |
| 3006 path.close(); | 3004 path.close(); |
| 3007 path.moveTo(0, 0); | 3005 path.moveTo(0, 0); |
| 3008 path.lineTo(0, 0); | 3006 path.lineTo(0, 0); |
| 3009 path.quadTo(0, 1, 2, 1); | 3007 path.quadTo(0, 1, 2, 1); |
| 3010 path.close(); | 3008 path.close(); |
| 3011 testSimplify(reporter, path); | 3009 testSimplify(reporter, path, filename); |
| 3012 } | 3010 } |
| 3013 | 3011 |
| 3014 static void testQuadratic71(skiatest::Reporter* reporter) { | 3012 static void testQuadratic71(skiatest::Reporter* reporter, const char* filename)
{ |
| 3015 SkPath path; | 3013 SkPath path; |
| 3016 path.moveTo(0, 0); | 3014 path.moveTo(0, 0); |
| 3017 path.quadTo(1, 0, 1, 1); | 3015 path.quadTo(1, 0, 1, 1); |
| 3018 path.lineTo(3, 2); | 3016 path.lineTo(3, 2); |
| 3019 path.close(); | 3017 path.close(); |
| 3020 path.moveTo(0, 0); | 3018 path.moveTo(0, 0); |
| 3021 path.lineTo(0, 0); | 3019 path.lineTo(0, 0); |
| 3022 path.quadTo(1, 1, 3, 1); | 3020 path.quadTo(1, 1, 3, 1); |
| 3023 path.close(); | 3021 path.close(); |
| 3024 testSimplify(reporter, path); | 3022 testSimplify(reporter, path, filename); |
| 3025 } | 3023 } |
| 3026 | 3024 |
| 3027 static void testQuadratic72(skiatest::Reporter* reporter) { | 3025 static void testQuadratic72(skiatest::Reporter* reporter, const char* filename)
{ |
| 3028 SkPath path; | 3026 SkPath path; |
| 3029 path.moveTo(0, 0); | 3027 path.moveTo(0, 0); |
| 3030 path.quadTo(1, 0, 1, 2); | 3028 path.quadTo(1, 0, 1, 2); |
| 3031 path.lineTo(1, 2); | 3029 path.lineTo(1, 2); |
| 3032 path.close(); | 3030 path.close(); |
| 3033 path.moveTo(0, 0); | 3031 path.moveTo(0, 0); |
| 3034 path.lineTo(1, 0); | 3032 path.lineTo(1, 0); |
| 3035 path.quadTo(0, 1, 3, 2); | 3033 path.quadTo(0, 1, 3, 2); |
| 3036 path.close(); | 3034 path.close(); |
| 3037 testSimplify(reporter, path); | 3035 testSimplify(reporter, path, filename); |
| 3038 } | 3036 } |
| 3039 | 3037 |
| 3040 static void testQuadratic73(skiatest::Reporter* reporter) { | 3038 static void testQuadratic73(skiatest::Reporter* reporter, const char* filename)
{ |
| 3041 SkPath path; | 3039 SkPath path; |
| 3042 path.moveTo(0, 0); | 3040 path.moveTo(0, 0); |
| 3043 path.quadTo(1, 0, 0, 3); | 3041 path.quadTo(1, 0, 0, 3); |
| 3044 path.lineTo(0, 3); | 3042 path.lineTo(0, 3); |
| 3045 path.close(); | 3043 path.close(); |
| 3046 path.moveTo(0, 0); | 3044 path.moveTo(0, 0); |
| 3047 path.lineTo(1, 0); | 3045 path.lineTo(1, 0); |
| 3048 path.quadTo(0, 1, 1, 1); | 3046 path.quadTo(0, 1, 1, 1); |
| 3049 path.close(); | 3047 path.close(); |
| 3050 testSimplify(reporter, path); | 3048 testSimplify(reporter, path, filename); |
| 3051 } | 3049 } |
| 3052 | 3050 |
| 3053 static void testQuadratic74(skiatest::Reporter* reporter) { | 3051 static void testQuadratic74(skiatest::Reporter* reporter, const char* filename)
{ |
| 3054 SkPath path; | 3052 SkPath path; |
| 3055 path.moveTo(0, 0); | 3053 path.moveTo(0, 0); |
| 3056 path.quadTo(1, 0, 1, 3); | 3054 path.quadTo(1, 0, 1, 3); |
| 3057 path.lineTo(1, 3); | 3055 path.lineTo(1, 3); |
| 3058 path.close(); | 3056 path.close(); |
| 3059 path.moveTo(0, 0); | 3057 path.moveTo(0, 0); |
| 3060 path.lineTo(0, 1); | 3058 path.lineTo(0, 1); |
| 3061 path.quadTo(3, 2, 2, 3); | 3059 path.quadTo(3, 2, 2, 3); |
| 3062 path.close(); | 3060 path.close(); |
| 3063 testSimplify(reporter, path); | 3061 testSimplify(reporter, path, filename); |
| 3064 } | 3062 } |
| 3065 | 3063 |
| 3066 static void testQuadratic75(skiatest::Reporter* reporter) { | 3064 static void testQuadratic75(skiatest::Reporter* reporter, const char* filename)
{ |
| 3067 SkPath path; | 3065 SkPath path; |
| 3068 path.moveTo(0, 0); | 3066 path.moveTo(0, 0); |
| 3069 path.quadTo(1, 0, 1, 3); | 3067 path.quadTo(1, 0, 1, 3); |
| 3070 path.lineTo(2, 3); | 3068 path.lineTo(2, 3); |
| 3071 path.close(); | 3069 path.close(); |
| 3072 path.moveTo(0, 0); | 3070 path.moveTo(0, 0); |
| 3073 path.lineTo(0, 1); | 3071 path.lineTo(0, 1); |
| 3074 path.quadTo(3, 2, 2, 3); | 3072 path.quadTo(3, 2, 2, 3); |
| 3075 path.close(); | 3073 path.close(); |
| 3076 testSimplify(reporter, path); | 3074 testSimplify(reporter, path, filename); |
| 3077 } | 3075 } |
| 3078 | 3076 |
| 3079 static void testQuadratic76(skiatest::Reporter* reporter) { | 3077 static void testQuadratic76(skiatest::Reporter* reporter, const char* filename)
{ |
| 3080 SkPath path; | 3078 SkPath path; |
| 3081 path.moveTo(0, 0); | 3079 path.moveTo(0, 0); |
| 3082 path.quadTo(0, 0, 0, 0); | 3080 path.quadTo(0, 0, 0, 0); |
| 3083 path.lineTo(2, 3); | 3081 path.lineTo(2, 3); |
| 3084 path.close(); | 3082 path.close(); |
| 3085 path.moveTo(1, 0); | 3083 path.moveTo(1, 0); |
| 3086 path.lineTo(1, 2); | 3084 path.lineTo(1, 2); |
| 3087 path.quadTo(1, 2, 2, 2); | 3085 path.quadTo(1, 2, 2, 2); |
| 3088 path.close(); | 3086 path.close(); |
| 3089 testSimplify(reporter, path); | 3087 testSimplify(reporter, path, filename); |
| 3090 } | 3088 } |
| 3091 | 3089 |
| 3092 static void testQuadratic77(skiatest::Reporter* reporter) { | 3090 static void testQuadratic77(skiatest::Reporter* reporter, const char* filename)
{ |
| 3093 SkPath path; | 3091 SkPath path; |
| 3094 path.moveTo(0, 0); | 3092 path.moveTo(0, 0); |
| 3095 path.quadTo(1, 0, 1, 1); | 3093 path.quadTo(1, 0, 1, 1); |
| 3096 path.lineTo(3, 1); | 3094 path.lineTo(3, 1); |
| 3097 path.close(); | 3095 path.close(); |
| 3098 path.moveTo(0, 0); | 3096 path.moveTo(0, 0); |
| 3099 path.lineTo(1, 0); | 3097 path.lineTo(1, 0); |
| 3100 path.quadTo(0, 1, 3, 2); | 3098 path.quadTo(0, 1, 3, 2); |
| 3101 path.close(); | 3099 path.close(); |
| 3102 testSimplify(reporter, path); | 3100 testSimplify(reporter, path, filename); |
| 3103 } | 3101 } |
| 3104 | 3102 |
| 3105 static void testQuadratic78(skiatest::Reporter* reporter) { | 3103 static void testQuadratic78(skiatest::Reporter* reporter, const char* filename)
{ |
| 3106 SkPath path; | 3104 SkPath path; |
| 3107 path.moveTo(0, 0); | 3105 path.moveTo(0, 0); |
| 3108 path.quadTo(1, 0, 1, 2); | 3106 path.quadTo(1, 0, 1, 2); |
| 3109 path.lineTo(3, 2); | 3107 path.lineTo(3, 2); |
| 3110 path.close(); | 3108 path.close(); |
| 3111 path.moveTo(0, 0); | 3109 path.moveTo(0, 0); |
| 3112 path.lineTo(0, 0); | 3110 path.lineTo(0, 0); |
| 3113 path.quadTo(2, 1, 0, 2); | 3111 path.quadTo(2, 1, 0, 2); |
| 3114 path.close(); | 3112 path.close(); |
| 3115 testSimplify(reporter, path); | 3113 testSimplify(reporter, path, filename); |
| 3116 } | 3114 } |
| 3117 | 3115 |
| 3118 static void testQuadratic79(skiatest::Reporter* reporter) { | 3116 static void testQuadratic79(skiatest::Reporter* reporter, const char* filename)
{ |
| 3119 SkPath path; | 3117 SkPath path; |
| 3120 path.moveTo(0, 0); | 3118 path.moveTo(0, 0); |
| 3121 path.quadTo(1, 0, 1, 2); | 3119 path.quadTo(1, 0, 1, 2); |
| 3122 path.lineTo(3, 2); | 3120 path.lineTo(3, 2); |
| 3123 path.close(); | 3121 path.close(); |
| 3124 path.moveTo(0, 0); | 3122 path.moveTo(0, 0); |
| 3125 path.lineTo(1, 0); | 3123 path.lineTo(1, 0); |
| 3126 path.quadTo(0, 1, 3, 2); | 3124 path.quadTo(0, 1, 3, 2); |
| 3127 path.close(); | 3125 path.close(); |
| 3128 testSimplify(reporter, path); | 3126 testSimplify(reporter, path, filename); |
| 3129 } | 3127 } |
| 3130 | 3128 |
| 3131 static void testEight1(skiatest::Reporter* reporter) { | 3129 static void testEight1(skiatest::Reporter* reporter, const char* filename) { |
| 3132 SkPath path; | 3130 SkPath path; |
| 3133 path.moveTo(0, 0); | 3131 path.moveTo(0, 0); |
| 3134 path.lineTo(2, 2); | 3132 path.lineTo(2, 2); |
| 3135 path.lineTo(0, 2); | 3133 path.lineTo(0, 2); |
| 3136 path.lineTo(2, 0); | 3134 path.lineTo(2, 0); |
| 3137 path.close(); | 3135 path.close(); |
| 3138 testSimplify(reporter, path); | 3136 testSimplify(reporter, path, filename); |
| 3139 } | 3137 } |
| 3140 | 3138 |
| 3141 static void testEight2(skiatest::Reporter* reporter) { | 3139 static void testEight2(skiatest::Reporter* reporter, const char* filename) { |
| 3142 SkPath path; | 3140 SkPath path; |
| 3143 path.moveTo(0, 0); | 3141 path.moveTo(0, 0); |
| 3144 path.lineTo(2, 0); | 3142 path.lineTo(2, 0); |
| 3145 path.lineTo(0, 2); | 3143 path.lineTo(0, 2); |
| 3146 path.lineTo(2, 2); | 3144 path.lineTo(2, 2); |
| 3147 path.close(); | 3145 path.close(); |
| 3148 testSimplify(reporter, path); | 3146 testSimplify(reporter, path, filename); |
| 3149 } | 3147 } |
| 3150 | 3148 |
| 3151 static void testEight3(skiatest::Reporter* reporter) { | 3149 static void testEight3(skiatest::Reporter* reporter, const char* filename) { |
| 3152 SkPath path; | 3150 SkPath path; |
| 3153 path.moveTo(0, 0); | 3151 path.moveTo(0, 0); |
| 3154 path.lineTo(0, 2); | 3152 path.lineTo(0, 2); |
| 3155 path.lineTo(2, 0); | 3153 path.lineTo(2, 0); |
| 3156 path.lineTo(2, 2); | 3154 path.lineTo(2, 2); |
| 3157 path.close(); | 3155 path.close(); |
| 3158 testSimplify(reporter, path); | 3156 testSimplify(reporter, path, filename); |
| 3159 } | 3157 } |
| 3160 | 3158 |
| 3161 static void testEight4(skiatest::Reporter* reporter) { | 3159 static void testEight4(skiatest::Reporter* reporter, const char* filename) { |
| 3162 SkPath path; | 3160 SkPath path; |
| 3163 path.moveTo(0, 0); | 3161 path.moveTo(0, 0); |
| 3164 path.lineTo(2, 2); | 3162 path.lineTo(2, 2); |
| 3165 path.lineTo(2, 0); | 3163 path.lineTo(2, 0); |
| 3166 path.lineTo(0, 2); | 3164 path.lineTo(0, 2); |
| 3167 path.close(); | 3165 path.close(); |
| 3168 testSimplify(reporter, path); | 3166 testSimplify(reporter, path, filename); |
| 3169 } | 3167 } |
| 3170 | 3168 |
| 3171 static void testEight5(skiatest::Reporter* reporter) { | 3169 static void testEight5(skiatest::Reporter* reporter, const char* filename) { |
| 3172 SkPath path; | 3170 SkPath path; |
| 3173 path.moveTo(1, 0); | 3171 path.moveTo(1, 0); |
| 3174 path.lineTo(1, 2); | 3172 path.lineTo(1, 2); |
| 3175 path.lineTo(0, 2); | 3173 path.lineTo(0, 2); |
| 3176 path.lineTo(2, 0); | 3174 path.lineTo(2, 0); |
| 3177 path.close(); | 3175 path.close(); |
| 3178 testSimplify(reporter, path); | 3176 testSimplify(reporter, path, filename); |
| 3179 } | 3177 } |
| 3180 | 3178 |
| 3181 static void testEight6(skiatest::Reporter* reporter) { | 3179 static void testEight6(skiatest::Reporter* reporter, const char* filename) { |
| 3182 SkPath path; | 3180 SkPath path; |
| 3183 path.moveTo(1, 0); | 3181 path.moveTo(1, 0); |
| 3184 path.lineTo(2, 0); | 3182 path.lineTo(2, 0); |
| 3185 path.lineTo(0, 2); | 3183 path.lineTo(0, 2); |
| 3186 path.lineTo(1, 2); | 3184 path.lineTo(1, 2); |
| 3187 path.close(); | 3185 path.close(); |
| 3188 testSimplify(reporter, path); | 3186 testSimplify(reporter, path, filename); |
| 3189 } | 3187 } |
| 3190 | 3188 |
| 3191 static void testEight7(skiatest::Reporter* reporter) { | 3189 static void testEight7(skiatest::Reporter* reporter, const char* filename) { |
| 3192 SkPath path; | 3190 SkPath path; |
| 3193 path.moveTo(0, 0); | 3191 path.moveTo(0, 0); |
| 3194 path.lineTo(0, 1); | 3192 path.lineTo(0, 1); |
| 3195 path.lineTo(2, 1); | 3193 path.lineTo(2, 1); |
| 3196 path.lineTo(2, 2); | 3194 path.lineTo(2, 2); |
| 3197 path.close(); | 3195 path.close(); |
| 3198 testSimplify(reporter, path); | 3196 testSimplify(reporter, path, filename); |
| 3199 } | 3197 } |
| 3200 | 3198 |
| 3201 static void testEight8(skiatest::Reporter* reporter) { | 3199 static void testEight8(skiatest::Reporter* reporter, const char* filename) { |
| 3202 SkPath path; | 3200 SkPath path; |
| 3203 path.moveTo(0, 0); | 3201 path.moveTo(0, 0); |
| 3204 path.lineTo(2, 2); | 3202 path.lineTo(2, 2); |
| 3205 path.lineTo(2, 1); | 3203 path.lineTo(2, 1); |
| 3206 path.lineTo(0, 1); | 3204 path.lineTo(0, 1); |
| 3207 path.close(); | 3205 path.close(); |
| 3208 testSimplify(reporter, path); | 3206 testSimplify(reporter, path, filename); |
| 3209 } | 3207 } |
| 3210 | 3208 |
| 3211 static void testEight9(skiatest::Reporter* reporter) { | 3209 static void testEight9(skiatest::Reporter* reporter, const char* filename) { |
| 3212 SkPath path; | 3210 SkPath path; |
| 3213 path.moveTo(1, 0); | 3211 path.moveTo(1, 0); |
| 3214 path.lineTo(1, 2); | 3212 path.lineTo(1, 2); |
| 3215 path.lineTo(2, 1); | 3213 path.lineTo(2, 1); |
| 3216 path.lineTo(0, 1); | 3214 path.lineTo(0, 1); |
| 3217 path.close(); | 3215 path.close(); |
| 3218 testSimplify(reporter, path); | 3216 testSimplify(reporter, path, filename); |
| 3219 } | 3217 } |
| 3220 | 3218 |
| 3221 static void testEight10(skiatest::Reporter* reporter) { | 3219 static void testEight10(skiatest::Reporter* reporter, const char* filename) { |
| 3222 SkPath path; | 3220 SkPath path; |
| 3223 path.moveTo(1, 0); | 3221 path.moveTo(1, 0); |
| 3224 path.lineTo(0, 1); | 3222 path.lineTo(0, 1); |
| 3225 path.lineTo(2, 1); | 3223 path.lineTo(2, 1); |
| 3226 path.lineTo(1, 2); | 3224 path.lineTo(1, 2); |
| 3227 path.close(); | 3225 path.close(); |
| 3228 testSimplify(reporter, path); | 3226 testSimplify(reporter, path, filename); |
| 3229 } | 3227 } |
| 3230 | 3228 |
| 3231 static void testQuadratic80(skiatest::Reporter* reporter) { | 3229 static void testQuadratic80(skiatest::Reporter* reporter, const char* filename)
{ |
| 3232 SkPath path; | 3230 SkPath path; |
| 3233 path.moveTo(0, 0); | 3231 path.moveTo(0, 0); |
| 3234 path.quadTo(1, 0, 2, 3); | 3232 path.quadTo(1, 0, 2, 3); |
| 3235 path.lineTo(2, 3); | 3233 path.lineTo(2, 3); |
| 3236 path.close(); | 3234 path.close(); |
| 3237 path.moveTo(1, 0); | 3235 path.moveTo(1, 0); |
| 3238 path.lineTo(3, 0); | 3236 path.lineTo(3, 0); |
| 3239 path.quadTo(0, 1, 1, 1); | 3237 path.quadTo(0, 1, 1, 1); |
| 3240 path.close(); | 3238 path.close(); |
| 3241 testSimplify(reporter, path); | 3239 testSimplify(reporter, path, filename); |
| 3242 } | 3240 } |
| 3243 | 3241 |
| 3244 static void testQuadratic81(skiatest::Reporter* reporter) { | 3242 static void testQuadratic81(skiatest::Reporter* reporter, const char* filename)
{ |
| 3245 SkPath path; | 3243 SkPath path; |
| 3246 path.moveTo(0, 0); | 3244 path.moveTo(0, 0); |
| 3247 path.quadTo(2, 0, 1, 1); | 3245 path.quadTo(2, 0, 1, 1); |
| 3248 path.lineTo(1, 1); | 3246 path.lineTo(1, 1); |
| 3249 path.close(); | 3247 path.close(); |
| 3250 path.moveTo(0, 0); | 3248 path.moveTo(0, 0); |
| 3251 path.lineTo(0, 0); | 3249 path.lineTo(0, 0); |
| 3252 path.quadTo(2, 1, 0, 2); | 3250 path.quadTo(2, 1, 0, 2); |
| 3253 path.close(); | 3251 path.close(); |
| 3254 testSimplify(reporter, path); | 3252 testSimplify(reporter, path, filename); |
| 3255 } | 3253 } |
| 3256 | 3254 |
| 3257 static void testQuadratic82(skiatest::Reporter* reporter) { | 3255 static void testQuadratic82(skiatest::Reporter* reporter, const char* filename)
{ |
| 3258 SkPath path; | 3256 SkPath path; |
| 3259 path.moveTo(0, 0); | 3257 path.moveTo(0, 0); |
| 3260 path.quadTo(2, 0, 1, 1); | 3258 path.quadTo(2, 0, 1, 1); |
| 3261 path.lineTo(0, 3); | 3259 path.lineTo(0, 3); |
| 3262 path.close(); | 3260 path.close(); |
| 3263 path.moveTo(0, 0); | 3261 path.moveTo(0, 0); |
| 3264 path.lineTo(0, 0); | 3262 path.lineTo(0, 0); |
| 3265 path.quadTo(2, 1, 0, 2); | 3263 path.quadTo(2, 1, 0, 2); |
| 3266 path.close(); | 3264 path.close(); |
| 3267 testSimplify(reporter, path); | 3265 testSimplify(reporter, path, filename); |
| 3268 } | 3266 } |
| 3269 | 3267 |
| 3270 static void testQuadratic83(skiatest::Reporter* reporter) { | 3268 static void testQuadratic83(skiatest::Reporter* reporter, const char* filename)
{ |
| 3271 SkPath path; | 3269 SkPath path; |
| 3272 path.moveTo(0, 0); | 3270 path.moveTo(0, 0); |
| 3273 path.quadTo(0, 0, 2, 0); | 3271 path.quadTo(0, 0, 2, 0); |
| 3274 path.lineTo(2, 2); | 3272 path.lineTo(2, 2); |
| 3275 path.close(); | 3273 path.close(); |
| 3276 path.moveTo(0, 1); | 3274 path.moveTo(0, 1); |
| 3277 path.lineTo(0, 2); | 3275 path.lineTo(0, 2); |
| 3278 path.quadTo(2, 2, 1, 3); | 3276 path.quadTo(2, 2, 1, 3); |
| 3279 path.close(); | 3277 path.close(); |
| 3280 testSimplify(reporter, path); | 3278 testSimplify(reporter, path, filename); |
| 3281 } | 3279 } |
| 3282 | 3280 |
| 3283 static void testQuadratic84(skiatest::Reporter* reporter) { | 3281 static void testQuadratic84(skiatest::Reporter* reporter, const char* filename)
{ |
| 3284 SkPath path; | 3282 SkPath path; |
| 3285 path.moveTo(0, 0); | 3283 path.moveTo(0, 0); |
| 3286 path.quadTo(2, 0, 1, 1); | 3284 path.quadTo(2, 0, 1, 1); |
| 3287 path.lineTo(2, 1); | 3285 path.lineTo(2, 1); |
| 3288 path.close(); | 3286 path.close(); |
| 3289 path.moveTo(1, 0); | 3287 path.moveTo(1, 0); |
| 3290 path.lineTo(2, 0); | 3288 path.lineTo(2, 0); |
| 3291 path.quadTo(0, 1, 2, 2); | 3289 path.quadTo(0, 1, 2, 2); |
| 3292 path.close(); | 3290 path.close(); |
| 3293 testSimplify(reporter, path); | 3291 testSimplify(reporter, path, filename); |
| 3294 } | 3292 } |
| 3295 | 3293 |
| 3296 static void testQuadratic85(skiatest::Reporter* reporter) { | 3294 static void testQuadratic85(skiatest::Reporter* reporter, const char* filename)
{ |
| 3297 SkPath path; | 3295 SkPath path; |
| 3298 path.moveTo(0, 0); | 3296 path.moveTo(0, 0); |
| 3299 path.quadTo(3, 0, 1, 1); | 3297 path.quadTo(3, 0, 1, 1); |
| 3300 path.lineTo(1, 1); | 3298 path.lineTo(1, 1); |
| 3301 path.close(); | 3299 path.close(); |
| 3302 path.moveTo(1, 0); | 3300 path.moveTo(1, 0); |
| 3303 path.lineTo(3, 0); | 3301 path.lineTo(3, 0); |
| 3304 path.quadTo(0, 1, 1, 2); | 3302 path.quadTo(0, 1, 1, 2); |
| 3305 path.close(); | 3303 path.close(); |
| 3306 testSimplify(reporter, path); | 3304 testSimplify(reporter, path, filename); |
| 3307 } | 3305 } |
| 3308 | 3306 |
| 3309 static void testQuadratic86(skiatest::Reporter* reporter) { | 3307 static void testQuadratic86(skiatest::Reporter* reporter, const char* filename)
{ |
| 3310 SkPath path; | 3308 SkPath path; |
| 3311 path.moveTo(0, 0); | 3309 path.moveTo(0, 0); |
| 3312 path.quadTo(0, 1, 1, 1); | 3310 path.quadTo(0, 1, 1, 1); |
| 3313 path.lineTo(2, 3); | 3311 path.lineTo(2, 3); |
| 3314 path.close(); | 3312 path.close(); |
| 3315 path.moveTo(0, 0); | 3313 path.moveTo(0, 0); |
| 3316 path.lineTo(0, 0); | 3314 path.lineTo(0, 0); |
| 3317 path.quadTo(1, 1, 1, 3); | 3315 path.quadTo(1, 1, 1, 3); |
| 3318 path.close(); | 3316 path.close(); |
| 3319 testSimplify(reporter, path); | 3317 testSimplify(reporter, path, filename); |
| 3320 } | 3318 } |
| 3321 | 3319 |
| 3322 static void testQuadratic87(skiatest::Reporter* reporter) { | 3320 static void testQuadratic87(skiatest::Reporter* reporter, const char* filename)
{ |
| 3323 SkPath path; | 3321 SkPath path; |
| 3324 path.moveTo(0, 0); | 3322 path.moveTo(0, 0); |
| 3325 path.quadTo(2, 1, 0, 2); | 3323 path.quadTo(2, 1, 0, 2); |
| 3326 path.lineTo(2, 3); | 3324 path.lineTo(2, 3); |
| 3327 path.close(); | 3325 path.close(); |
| 3328 path.moveTo(0, 0); | 3326 path.moveTo(0, 0); |
| 3329 path.lineTo(1, 1); | 3327 path.lineTo(1, 1); |
| 3330 path.quadTo(0, 2, 3, 2); | 3328 path.quadTo(0, 2, 3, 2); |
| 3331 path.close(); | 3329 path.close(); |
| 3332 testSimplify(reporter, path); | 3330 testSimplify(reporter, path, filename); |
| 3333 } | 3331 } |
| 3334 | 3332 |
| 3335 static void testQuadratic88(skiatest::Reporter* reporter) { | 3333 static void testQuadratic88(skiatest::Reporter* reporter, const char* filename)
{ |
| 3336 SkPath path; | 3334 SkPath path; |
| 3337 path.moveTo(0, 0); | 3335 path.moveTo(0, 0); |
| 3338 path.quadTo(2, 1, 0, 2); | 3336 path.quadTo(2, 1, 0, 2); |
| 3339 path.lineTo(2, 2); | 3337 path.lineTo(2, 2); |
| 3340 path.close(); | 3338 path.close(); |
| 3341 path.moveTo(1, 0); | 3339 path.moveTo(1, 0); |
| 3342 path.lineTo(1, 1); | 3340 path.lineTo(1, 1); |
| 3343 path.quadTo(0, 2, 2, 2); | 3341 path.quadTo(0, 2, 2, 2); |
| 3344 path.close(); | 3342 path.close(); |
| 3345 testSimplify(reporter, path); | 3343 testSimplify(reporter, path, filename); |
| 3346 } | 3344 } |
| 3347 | 3345 |
| 3348 static void testQuadratic89x(skiatest::Reporter* reporter) { | 3346 static void testQuadratic89x(skiatest::Reporter* reporter, const char* filename)
{ |
| 3349 SkPath path; | 3347 SkPath path; |
| 3350 path.setFillType(SkPath::kEvenOdd_FillType); | 3348 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3351 path.moveTo(0, 0); | 3349 path.moveTo(0, 0); |
| 3352 path.quadTo(3, 1, 2, 2); | 3350 path.quadTo(3, 1, 2, 2); |
| 3353 path.lineTo(0, 3); | 3351 path.lineTo(0, 3); |
| 3354 path.close(); | 3352 path.close(); |
| 3355 path.moveTo(0, 0); | 3353 path.moveTo(0, 0); |
| 3356 path.lineTo(2, 1); | 3354 path.lineTo(2, 1); |
| 3357 path.quadTo(3, 1, 3, 3); | 3355 path.quadTo(3, 1, 3, 3); |
| 3358 path.close(); | 3356 path.close(); |
| 3359 testSimplify(reporter, path); | 3357 testSimplify(reporter, path, filename); |
| 3360 } | 3358 } |
| 3361 | 3359 |
| 3362 static void testQuadratic90x(skiatest::Reporter* reporter) { | 3360 static void testQuadratic90x(skiatest::Reporter* reporter, const char* filename)
{ |
| 3363 SkPath path; | 3361 SkPath path; |
| 3364 path.setFillType(SkPath::kEvenOdd_FillType); | 3362 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3365 path.moveTo(0, 0); | 3363 path.moveTo(0, 0); |
| 3366 path.quadTo(3, 0, 2, 2); | 3364 path.quadTo(3, 0, 2, 2); |
| 3367 path.lineTo(1, 3); | 3365 path.lineTo(1, 3); |
| 3368 path.close(); | 3366 path.close(); |
| 3369 path.moveTo(0, 0); | 3367 path.moveTo(0, 0); |
| 3370 path.lineTo(0, 1); | 3368 path.lineTo(0, 1); |
| 3371 path.quadTo(3, 2, 2, 3); | 3369 path.quadTo(3, 2, 2, 3); |
| 3372 path.close(); | 3370 path.close(); |
| 3373 testSimplify(reporter, path); | 3371 testSimplify(reporter, path, filename); |
| 3374 } | 3372 } |
| 3375 | 3373 |
| 3376 static void testQuadratic91(skiatest::Reporter* reporter) { | 3374 static void testQuadratic91(skiatest::Reporter* reporter, const char* filename)
{ |
| 3377 SkPath path; | 3375 SkPath path; |
| 3378 path.moveTo(0, 0); | 3376 path.moveTo(0, 0); |
| 3379 path.quadTo(3, 2, 2, 3); | 3377 path.quadTo(3, 2, 2, 3); |
| 3380 path.lineTo(2, 3); | 3378 path.lineTo(2, 3); |
| 3381 path.close(); | 3379 path.close(); |
| 3382 path.moveTo(0, 0); | 3380 path.moveTo(0, 0); |
| 3383 path.lineTo(1, 1); | 3381 path.lineTo(1, 1); |
| 3384 path.quadTo(2, 1, 2, 3); | 3382 path.quadTo(2, 1, 2, 3); |
| 3385 path.close(); | 3383 path.close(); |
| 3386 testSimplify(reporter, path); | 3384 testSimplify(reporter, path, filename); |
| 3387 } | 3385 } |
| 3388 | 3386 |
| 3389 static void testQuadratic92x(skiatest::Reporter* reporter) { | 3387 static void testQuadratic92x(skiatest::Reporter* reporter, const char* filename)
{ |
| 3390 SkPath path; | 3388 SkPath path; |
| 3391 path.setFillType(SkPath::kEvenOdd_FillType); | 3389 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3392 path.moveTo(1, 0); | 3390 path.moveTo(1, 0); |
| 3393 path.quadTo(3, 0, 2, 2); | 3391 path.quadTo(3, 0, 2, 2); |
| 3394 path.lineTo(2, 2); | 3392 path.lineTo(2, 2); |
| 3395 path.close(); | 3393 path.close(); |
| 3396 path.moveTo(2, 0); | 3394 path.moveTo(2, 0); |
| 3397 path.lineTo(0, 1); | 3395 path.lineTo(0, 1); |
| 3398 path.quadTo(3, 2, 2, 3); | 3396 path.quadTo(3, 2, 2, 3); |
| 3399 path.close(); | 3397 path.close(); |
| 3400 testSimplify(reporter, path); | 3398 testSimplify(reporter, path, filename); |
| 3401 } | 3399 } |
| 3402 | 3400 |
| 3403 static void testLine82(skiatest::Reporter* reporter) { | 3401 static void testLine82(skiatest::Reporter* reporter, const char* filename) { |
| 3404 SkPath path; | 3402 SkPath path; |
| 3405 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); | 3403 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); |
| 3406 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); | 3404 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 3407 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); | 3405 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); |
| 3408 testSimplify(reporter, path); | 3406 testSimplify(reporter, path, filename); |
| 3409 } | 3407 } |
| 3410 | 3408 |
| 3411 static void testLine82a(skiatest::Reporter* reporter) { | 3409 static void testLine82a(skiatest::Reporter* reporter, const char* filename) { |
| 3412 SkPath path; | 3410 SkPath path; |
| 3413 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); | 3411 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3414 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 3412 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3415 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); | 3413 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
| 3416 testSimplify(reporter, path); | 3414 testSimplify(reporter, path, filename); |
| 3417 } | 3415 } |
| 3418 | 3416 |
| 3419 static void testLine82b(skiatest::Reporter* reporter) { | 3417 static void testLine82b(skiatest::Reporter* reporter, const char* filename) { |
| 3420 SkPath path; | 3418 SkPath path; |
| 3421 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); | 3419 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3422 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 3420 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3423 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); | 3421 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
| 3424 testSimplify(reporter, path); | 3422 testSimplify(reporter, path, filename); |
| 3425 } | 3423 } |
| 3426 | 3424 |
| 3427 static void testLine82c(skiatest::Reporter* reporter) { | 3425 static void testLine82c(skiatest::Reporter* reporter, const char* filename) { |
| 3428 SkPath path; | 3426 SkPath path; |
| 3429 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); | 3427 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3430 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); | 3428 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3431 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); | 3429 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
| 3432 testSimplify(reporter, path); | 3430 testSimplify(reporter, path, filename); |
| 3433 } | 3431 } |
| 3434 | 3432 |
| 3435 static void testLine82d(skiatest::Reporter* reporter) { | 3433 static void testLine82d(skiatest::Reporter* reporter, const char* filename) { |
| 3436 SkPath path; | 3434 SkPath path; |
| 3437 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); | 3435 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); |
| 3438 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); | 3436 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3439 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); | 3437 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
| 3440 testSimplify(reporter, path); | 3438 testSimplify(reporter, path, filename); |
| 3441 } | 3439 } |
| 3442 | 3440 |
| 3443 static void testLine82e(skiatest::Reporter* reporter) { | 3441 static void testLine82e(skiatest::Reporter* reporter, const char* filename) { |
| 3444 SkPath path; | 3442 SkPath path; |
| 3445 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); | 3443 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3446 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 3444 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3447 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); | 3445 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
| 3448 testSimplify(reporter, path); | 3446 testSimplify(reporter, path, filename); |
| 3449 } | 3447 } |
| 3450 | 3448 |
| 3451 static void testLine82f(skiatest::Reporter* reporter) { | 3449 static void testLine82f(skiatest::Reporter* reporter, const char* filename) { |
| 3452 SkPath path; | 3450 SkPath path; |
| 3453 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); | 3451 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3454 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 3452 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
| 3455 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); | 3453 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
| 3456 testSimplify(reporter, path); | 3454 testSimplify(reporter, path, filename); |
| 3457 } | 3455 } |
| 3458 | 3456 |
| 3459 static void testLine82g(skiatest::Reporter* reporter) { | 3457 static void testLine82g(skiatest::Reporter* reporter, const char* filename) { |
| 3460 SkPath path; | 3458 SkPath path; |
| 3461 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); | 3459 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3462 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); | 3460 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3463 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); | 3461 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); |
| 3464 testSimplify(reporter, path); | 3462 testSimplify(reporter, path, filename); |
| 3465 } | 3463 } |
| 3466 | 3464 |
| 3467 static void testLine82h(skiatest::Reporter* reporter) { | 3465 static void testLine82h(skiatest::Reporter* reporter, const char* filename) { |
| 3468 SkPath path; | 3466 SkPath path; |
| 3469 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); | 3467 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); |
| 3470 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); | 3468 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); |
| 3471 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); | 3469 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); |
| 3472 testSimplify(reporter, path); | 3470 testSimplify(reporter, path, filename); |
| 3473 } | 3471 } |
| 3474 | 3472 |
| 3475 static void testLine83(skiatest::Reporter* reporter) { | 3473 static void testLine83(skiatest::Reporter* reporter, const char* filename) { |
| 3476 SkPath path; | 3474 SkPath path; |
| 3477 path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction); | 3475 path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction); |
| 3478 path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction); | 3476 path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction); |
| 3479 path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction); | 3477 path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction); |
| 3480 testSimplify(reporter, path); | 3478 testSimplify(reporter, path, filename); |
| 3481 } | 3479 } |
| 3482 | 3480 |
| 3483 static void testLine84(skiatest::Reporter* reporter) { | 3481 static void testLine84(skiatest::Reporter* reporter, const char* filename) { |
| 3484 SkPath path; | 3482 SkPath path; |
| 3485 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); | 3483 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); |
| 3486 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); | 3484 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); |
| 3487 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); | 3485 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); |
| 3488 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); | 3486 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); |
| 3489 testSimplify(reporter, path); | 3487 testSimplify(reporter, path, filename); |
| 3490 } | 3488 } |
| 3491 | 3489 |
| 3492 static void testLine84x(skiatest::Reporter* reporter) { | 3490 static void testLine84x(skiatest::Reporter* reporter, const char* filename) { |
| 3493 SkPath path; | 3491 SkPath path; |
| 3494 path.setFillType(SkPath::kEvenOdd_FillType); | 3492 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3495 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); | 3493 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); |
| 3496 path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction); | 3494 path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction); |
| 3497 path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction); | 3495 path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction); |
| 3498 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); | 3496 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); |
| 3499 testSimplify(reporter, path); | 3497 testSimplify(reporter, path, filename); |
| 3500 } | 3498 } |
| 3501 | 3499 |
| 3502 static void testLine85(skiatest::Reporter* reporter) { | 3500 static void testLine85(skiatest::Reporter* reporter, const char* filename) { |
| 3503 SkPath path; | 3501 SkPath path; |
| 3504 path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction); | 3502 path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction); |
| 3505 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); | 3503 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); |
| 3506 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); | 3504 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); |
| 3507 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); | 3505 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); |
| 3508 testSimplify(reporter, path); | 3506 testSimplify(reporter, path, filename); |
| 3509 } | 3507 } |
| 3510 | 3508 |
| 3511 static void testQuadralateral1(skiatest::Reporter* reporter) { | 3509 static void testQuadralateral1(skiatest::Reporter* reporter, const char* filenam
e) { |
| 3512 SkPath path; | 3510 SkPath path; |
| 3513 path.moveTo(0, 0); | 3511 path.moveTo(0, 0); |
| 3514 path.lineTo(0, 0); | 3512 path.lineTo(0, 0); |
| 3515 path.lineTo(0, 0); | 3513 path.lineTo(0, 0); |
| 3516 path.lineTo(3, 2); | 3514 path.lineTo(3, 2); |
| 3517 path.close(); | 3515 path.close(); |
| 3518 path.moveTo(0, 0); | 3516 path.moveTo(0, 0); |
| 3519 path.lineTo(2, 1); | 3517 path.lineTo(2, 1); |
| 3520 path.lineTo(2, 2); | 3518 path.lineTo(2, 2); |
| 3521 path.lineTo(2, 3); | 3519 path.lineTo(2, 3); |
| 3522 path.close(); | 3520 path.close(); |
| 3523 testSimplify(reporter, path); | 3521 testSimplify(reporter, path, filename); |
| 3524 } | 3522 } |
| 3525 | 3523 |
| 3526 static void testCubic1(skiatest::Reporter* reporter) { | 3524 static void testCubic1(skiatest::Reporter* reporter, const char* filename) { |
| 3527 SkPath path; | 3525 SkPath path; |
| 3528 path.moveTo(0, 0); | 3526 path.moveTo(0, 0); |
| 3529 path.cubicTo(0, 1, 1, 1, 1, 0); | 3527 path.cubicTo(0, 1, 1, 1, 1, 0); |
| 3530 path.close(); | 3528 path.close(); |
| 3531 path.moveTo(1, 0); | 3529 path.moveTo(1, 0); |
| 3532 path.cubicTo(0, 0, 0, 1, 1, 1); | 3530 path.cubicTo(0, 0, 0, 1, 1, 1); |
| 3533 path.close(); | 3531 path.close(); |
| 3534 testSimplify(reporter, path); | 3532 testSimplify(reporter, path, filename); |
| 3535 } | 3533 } |
| 3536 | 3534 |
| 3537 static void testQuadratic93(skiatest::Reporter* reporter) { | 3535 static void testQuadratic93(skiatest::Reporter* reporter, const char* filename)
{ |
| 3538 SkPath path; | 3536 SkPath path; |
| 3539 path.moveTo(3, 0); | 3537 path.moveTo(3, 0); |
| 3540 path.quadTo(0, 1, 3, 2); | 3538 path.quadTo(0, 1, 3, 2); |
| 3541 path.lineTo(0, 3); | 3539 path.lineTo(0, 3); |
| 3542 path.close(); | 3540 path.close(); |
| 3543 path.moveTo(1, 0); | 3541 path.moveTo(1, 0); |
| 3544 path.lineTo(2, 0); | 3542 path.lineTo(2, 0); |
| 3545 path.quadTo(1, 1, 2, 2); | 3543 path.quadTo(1, 1, 2, 2); |
| 3546 path.close(); | 3544 path.close(); |
| 3547 testSimplify(reporter, path); | 3545 testSimplify(reporter, path, filename); |
| 3548 } | 3546 } |
| 3549 | 3547 |
| 3550 static void testCubic2(skiatest::Reporter* reporter) { | 3548 static void testCubic2(skiatest::Reporter* reporter, const char* filename) { |
| 3551 SkPath path; | 3549 SkPath path; |
| 3552 path.moveTo(0,2); | 3550 path.moveTo(0,2); |
| 3553 path.cubicTo(0,3, 2,1, 4,0); | 3551 path.cubicTo(0,3, 2,1, 4,0); |
| 3554 path.close(); | 3552 path.close(); |
| 3555 path.moveTo(1,2); | 3553 path.moveTo(1,2); |
| 3556 path.cubicTo(0,4, 2,0, 3,0); | 3554 path.cubicTo(0,4, 2,0, 3,0); |
| 3557 path.close(); | 3555 path.close(); |
| 3558 testSimplify(reporter, path); | 3556 testSimplify(reporter, path, filename); |
| 3559 } | 3557 } |
| 3560 | 3558 |
| 3561 static void testQuad1(skiatest::Reporter* reporter) { | 3559 static void testQuad1(skiatest::Reporter* reporter, const char* filename) { |
| 3562 SkPath path; | 3560 SkPath path; |
| 3563 path.moveTo(0,0); | 3561 path.moveTo(0,0); |
| 3564 path.quadTo(0,0, 0,1); | 3562 path.quadTo(0,0, 0,1); |
| 3565 path.lineTo(1,1); | 3563 path.lineTo(1,1); |
| 3566 path.close(); | 3564 path.close(); |
| 3567 path.moveTo(0,0); | 3565 path.moveTo(0,0); |
| 3568 path.quadTo(1,1, 0,2); | 3566 path.quadTo(1,1, 0,2); |
| 3569 path.close(); | 3567 path.close(); |
| 3570 testSimplify(reporter, path); | 3568 testSimplify(reporter, path, filename); |
| 3571 } | 3569 } |
| 3572 | 3570 |
| 3573 static void testQuadralateral2(skiatest::Reporter* reporter) { | 3571 static void testQuadralateral2(skiatest::Reporter* reporter, const char* filenam
e) { |
| 3574 SkPath path; | 3572 SkPath path; |
| 3575 path.moveTo(0, 0); | 3573 path.moveTo(0, 0); |
| 3576 path.lineTo(2, 2); | 3574 path.lineTo(2, 2); |
| 3577 path.lineTo(0, 3); | 3575 path.lineTo(0, 3); |
| 3578 path.lineTo(3, 3); | 3576 path.lineTo(3, 3); |
| 3579 path.close(); | 3577 path.close(); |
| 3580 path.moveTo(2, 0); | 3578 path.moveTo(2, 0); |
| 3581 path.lineTo(3, 0); | 3579 path.lineTo(3, 0); |
| 3582 path.lineTo(0, 1); | 3580 path.lineTo(0, 1); |
| 3583 path.lineTo(1, 2); | 3581 path.lineTo(1, 2); |
| 3584 path.close(); | 3582 path.close(); |
| 3585 testSimplify(reporter, path); | 3583 testSimplify(reporter, path, filename); |
| 3586 } | 3584 } |
| 3587 | 3585 |
| 3588 static void testQuadratic94(skiatest::Reporter* reporter) { | 3586 static void testQuadratic94(skiatest::Reporter* reporter, const char* filename)
{ |
| 3589 SkPath path; | 3587 SkPath path; |
| 3590 path.moveTo(0, 0); | 3588 path.moveTo(0, 0); |
| 3591 path.lineTo(8, 8); | 3589 path.lineTo(8, 8); |
| 3592 path.quadTo(8, 4, 4, 4); | 3590 path.quadTo(8, 4, 4, 4); |
| 3593 path.quadTo(4, 0, 0, 0); | 3591 path.quadTo(4, 0, 0, 0); |
| 3594 path.close(); | 3592 path.close(); |
| 3595 testSimplify(reporter, path); | 3593 testSimplify(reporter, path, filename); |
| 3596 } | 3594 } |
| 3597 | 3595 |
| 3598 static void testQuadratic95(skiatest::Reporter* reporter) { | 3596 static void testQuadratic95(skiatest::Reporter* reporter, const char* filename)
{ |
| 3599 SkPath path; | 3597 SkPath path; |
| 3600 path.moveTo(8, 8); | 3598 path.moveTo(8, 8); |
| 3601 path.lineTo(0, 0); | 3599 path.lineTo(0, 0); |
| 3602 path.quadTo(4, 0, 4, 4); | 3600 path.quadTo(4, 0, 4, 4); |
| 3603 path.quadTo(8, 4, 8, 8); | 3601 path.quadTo(8, 4, 8, 8); |
| 3604 path.close(); | 3602 path.close(); |
| 3605 testSimplify(reporter, path); | 3603 testSimplify(reporter, path, filename); |
| 3606 } | 3604 } |
| 3607 | 3605 |
| 3608 static void testQuadratic96(skiatest::Reporter* reporter) { | 3606 static void testQuadratic96(skiatest::Reporter* reporter, const char* filename)
{ |
| 3609 SkPath path; | 3607 SkPath path; |
| 3610 path.moveTo(8, 0); | 3608 path.moveTo(8, 0); |
| 3611 path.lineTo(0, 8); | 3609 path.lineTo(0, 8); |
| 3612 path.quadTo(0, 4, 4, 4); | 3610 path.quadTo(0, 4, 4, 4); |
| 3613 path.quadTo(4, 0, 8, 0); | 3611 path.quadTo(4, 0, 8, 0); |
| 3614 path.close(); | 3612 path.close(); |
| 3615 testSimplify(reporter, path); | 3613 testSimplify(reporter, path, filename); |
| 3616 } | 3614 } |
| 3617 | 3615 |
| 3618 static void testQuadratic97(skiatest::Reporter* reporter) { | 3616 static void testQuadratic97(skiatest::Reporter* reporter, const char* filename)
{ |
| 3619 SkPath path; | 3617 SkPath path; |
| 3620 path.moveTo(0, 8); | 3618 path.moveTo(0, 8); |
| 3621 path.lineTo(8, 0); | 3619 path.lineTo(8, 0); |
| 3622 path.quadTo(4, 0, 4, 4); | 3620 path.quadTo(4, 0, 4, 4); |
| 3623 path.quadTo(0, 4, 0, 8); | 3621 path.quadTo(0, 4, 0, 8); |
| 3624 path.close(); | 3622 path.close(); |
| 3625 testSimplify(reporter, path); | 3623 testSimplify(reporter, path, filename); |
| 3626 } | 3624 } |
| 3627 | 3625 |
| 3628 static void testTriangles1(skiatest::Reporter* reporter) { | 3626 static void testTriangles1(skiatest::Reporter* reporter, const char* filename) { |
| 3629 SkPath path; | 3627 SkPath path; |
| 3630 path.moveTo(0, 0); | 3628 path.moveTo(0, 0); |
| 3631 path.lineTo(1, 0); | 3629 path.lineTo(1, 0); |
| 3632 path.lineTo(3, 3); | 3630 path.lineTo(3, 3); |
| 3633 path.close(); | 3631 path.close(); |
| 3634 path.moveTo(0, 0); | 3632 path.moveTo(0, 0); |
| 3635 path.lineTo(1, 2); | 3633 path.lineTo(1, 2); |
| 3636 path.lineTo(1, 1); | 3634 path.lineTo(1, 1); |
| 3637 path.close(); | 3635 path.close(); |
| 3638 testSimplify(reporter, path); | 3636 testSimplify(reporter, path, filename); |
| 3639 } | 3637 } |
| 3640 | 3638 |
| 3641 static void testTriangles2(skiatest::Reporter* reporter) { | 3639 static void testTriangles2(skiatest::Reporter* reporter, const char* filename) { |
| 3642 SkPath path; | 3640 SkPath path; |
| 3643 path.moveTo(0, 0); | 3641 path.moveTo(0, 0); |
| 3644 path.lineTo(1, 0); | 3642 path.lineTo(1, 0); |
| 3645 path.lineTo(3, 3); | 3643 path.lineTo(3, 3); |
| 3646 path.close(); | 3644 path.close(); |
| 3647 path.moveTo(1, 1); | 3645 path.moveTo(1, 1); |
| 3648 path.lineTo(2, 3); | 3646 path.lineTo(2, 3); |
| 3649 path.lineTo(1, 2); | 3647 path.lineTo(1, 2); |
| 3650 path.close(); | 3648 path.close(); |
| 3651 testSimplify(reporter, path); | 3649 testSimplify(reporter, path, filename); |
| 3652 } | 3650 } |
| 3653 | 3651 |
| 3654 // A test this for this case: | 3652 // A test this for this case: |
| 3655 // contourA has two segments that are coincident | 3653 // contourA has two segments that are coincident |
| 3656 // contourB has two segments that are coincident in the same place | 3654 // contourB has two segments that are coincident in the same place |
| 3657 // each ends up with +2/0 pairs for winding count | 3655 // each ends up with +2/0 pairs for winding count |
| 3658 // since logic in OpSegment::addTCoincident doesn't transfer count (only increme
nts/decrements) | 3656 // since logic in OpSegment::addTCoincident doesn't transfer count (only increme
nts/decrements) |
| 3659 // can this be resolved to +4/0 ? | 3657 // can this be resolved to +4/0 ? |
| 3660 static void testAddTCoincident1(skiatest::Reporter* reporter) { | 3658 static void testAddTCoincident1(skiatest::Reporter* reporter, const char* filena
me) { |
| 3661 SkPath path; | 3659 SkPath path; |
| 3662 path.moveTo(2, 0); | 3660 path.moveTo(2, 0); |
| 3663 path.lineTo(2, 2); | 3661 path.lineTo(2, 2); |
| 3664 path.lineTo(1, 1); | 3662 path.lineTo(1, 1); |
| 3665 path.lineTo(2, 0); | 3663 path.lineTo(2, 0); |
| 3666 path.lineTo(2, 2); | 3664 path.lineTo(2, 2); |
| 3667 path.lineTo(1, 1); | 3665 path.lineTo(1, 1); |
| 3668 path.close(); | 3666 path.close(); |
| 3669 path.moveTo(2, 0); | 3667 path.moveTo(2, 0); |
| 3670 path.lineTo(2, 2); | 3668 path.lineTo(2, 2); |
| 3671 path.lineTo(3, 1); | 3669 path.lineTo(3, 1); |
| 3672 path.lineTo(2, 0); | 3670 path.lineTo(2, 0); |
| 3673 path.lineTo(2, 2); | 3671 path.lineTo(2, 2); |
| 3674 path.lineTo(3, 1); | 3672 path.lineTo(3, 1); |
| 3675 path.close(); | 3673 path.close(); |
| 3676 testSimplify(reporter, path); | 3674 testSimplify(reporter, path, filename); |
| 3677 } | 3675 } |
| 3678 | 3676 |
| 3679 // test with implicit close | 3677 // test with implicit close |
| 3680 static void testAddTCoincident2(skiatest::Reporter* reporter) { | 3678 static void testAddTCoincident2(skiatest::Reporter* reporter, const char* filena
me) { |
| 3681 SkPath path; | 3679 SkPath path; |
| 3682 path.moveTo(2, 0); | 3680 path.moveTo(2, 0); |
| 3683 path.lineTo(2, 2); | 3681 path.lineTo(2, 2); |
| 3684 path.lineTo(1, 1); | 3682 path.lineTo(1, 1); |
| 3685 path.lineTo(2, 0); | 3683 path.lineTo(2, 0); |
| 3686 path.lineTo(2, 2); | 3684 path.lineTo(2, 2); |
| 3687 path.lineTo(1, 1); | 3685 path.lineTo(1, 1); |
| 3688 path.moveTo(2, 0); | 3686 path.moveTo(2, 0); |
| 3689 path.lineTo(2, 2); | 3687 path.lineTo(2, 2); |
| 3690 path.lineTo(3, 1); | 3688 path.lineTo(3, 1); |
| 3691 path.lineTo(2, 0); | 3689 path.lineTo(2, 0); |
| 3692 path.lineTo(2, 2); | 3690 path.lineTo(2, 2); |
| 3693 path.lineTo(3, 1); | 3691 path.lineTo(3, 1); |
| 3694 testSimplify(reporter, path); | 3692 testSimplify(reporter, path, filename); |
| 3695 } | 3693 } |
| 3696 | 3694 |
| 3697 static void testQuad2(skiatest::Reporter* reporter) { | 3695 static void testQuad2(skiatest::Reporter* reporter, const char* filename) { |
| 3698 SkPath path; | 3696 SkPath path; |
| 3699 path.moveTo(1, 0); | 3697 path.moveTo(1, 0); |
| 3700 path.quadTo(0, 1, 3, 2); | 3698 path.quadTo(0, 1, 3, 2); |
| 3701 path.lineTo(2, 3); | 3699 path.lineTo(2, 3); |
| 3702 path.close(); | 3700 path.close(); |
| 3703 path.moveTo(0, 0); | 3701 path.moveTo(0, 0); |
| 3704 path.lineTo(1, 0); | 3702 path.lineTo(1, 0); |
| 3705 path.quadTo(0, 1, 1, 1); | 3703 path.quadTo(0, 1, 1, 1); |
| 3706 path.close(); | 3704 path.close(); |
| 3707 } | 3705 } |
| 3708 | 3706 |
| 3709 static void testQuad3(skiatest::Reporter* reporter) { | 3707 static void testQuad3(skiatest::Reporter* reporter, const char* filename) { |
| 3710 SkPath path; | 3708 SkPath path; |
| 3711 path.moveTo(1, 0); | 3709 path.moveTo(1, 0); |
| 3712 path.quadTo(0, 1, 3, 2); | 3710 path.quadTo(0, 1, 3, 2); |
| 3713 path.lineTo(3, 3); | 3711 path.lineTo(3, 3); |
| 3714 path.close(); | 3712 path.close(); |
| 3715 path.moveTo(0, 0); | 3713 path.moveTo(0, 0); |
| 3716 path.lineTo(1, 0); | 3714 path.lineTo(1, 0); |
| 3717 path.quadTo(0, 1, 1, 1); | 3715 path.quadTo(0, 1, 1, 1); |
| 3718 path.close(); | 3716 path.close(); |
| 3719 testSimplify(reporter, path); | 3717 testSimplify(reporter, path, filename); |
| 3720 } | 3718 } |
| 3721 | 3719 |
| 3722 static void testQuad4(skiatest::Reporter* reporter) { | 3720 static void testQuad4(skiatest::Reporter* reporter, const char* filename) { |
| 3723 SkPath path; | 3721 SkPath path; |
| 3724 path.moveTo(2, 0); | 3722 path.moveTo(2, 0); |
| 3725 path.quadTo(0, 1, 1, 1); | 3723 path.quadTo(0, 1, 1, 1); |
| 3726 path.lineTo(3, 3); | 3724 path.lineTo(3, 3); |
| 3727 path.close(); | 3725 path.close(); |
| 3728 path.moveTo(0, 0); | 3726 path.moveTo(0, 0); |
| 3729 path.lineTo(2, 0); | 3727 path.lineTo(2, 0); |
| 3730 path.quadTo(0, 1, 2, 2); | 3728 path.quadTo(0, 1, 2, 2); |
| 3731 path.close(); | 3729 path.close(); |
| 3732 testSimplify(reporter, path); | 3730 testSimplify(reporter, path, filename); |
| 3733 } | 3731 } |
| 3734 | 3732 |
| 3735 static void testQuad5(skiatest::Reporter* reporter) { | 3733 static void testQuad5(skiatest::Reporter* reporter, const char* filename) { |
| 3736 SkPath path; | 3734 SkPath path; |
| 3737 path.moveTo(2, 0); | 3735 path.moveTo(2, 0); |
| 3738 path.quadTo(0, 1, 2, 2); | 3736 path.quadTo(0, 1, 2, 2); |
| 3739 path.lineTo(1, 3); | 3737 path.lineTo(1, 3); |
| 3740 path.close(); | 3738 path.close(); |
| 3741 path.moveTo(0, 0); | 3739 path.moveTo(0, 0); |
| 3742 path.lineTo(2, 0); | 3740 path.lineTo(2, 0); |
| 3743 path.quadTo(0, 1, 1, 1); | 3741 path.quadTo(0, 1, 1, 1); |
| 3744 path.close(); | 3742 path.close(); |
| 3745 testSimplify(reporter, path); | 3743 testSimplify(reporter, path, filename); |
| 3746 } | 3744 } |
| 3747 | 3745 |
| 3748 static void testQuad6(skiatest::Reporter* reporter) { | 3746 static void testQuad6(skiatest::Reporter* reporter, const char* filename) { |
| 3749 SkPath path; | 3747 SkPath path; |
| 3750 path.moveTo(2, 0); | 3748 path.moveTo(2, 0); |
| 3751 path.quadTo(0, 1, 2, 2); | 3749 path.quadTo(0, 1, 2, 2); |
| 3752 path.lineTo(1, 3); | 3750 path.lineTo(1, 3); |
| 3753 path.close(); | 3751 path.close(); |
| 3754 path.moveTo(1, 0); | 3752 path.moveTo(1, 0); |
| 3755 path.lineTo(2, 0); | 3753 path.lineTo(2, 0); |
| 3756 path.quadTo(0, 1, 1, 1); | 3754 path.quadTo(0, 1, 1, 1); |
| 3757 path.close(); | 3755 path.close(); |
| 3758 testSimplify(reporter, path); | 3756 testSimplify(reporter, path, filename); |
| 3759 } | 3757 } |
| 3760 | 3758 |
| 3761 static void testQuad7(skiatest::Reporter* reporter) { | 3759 static void testQuad7(skiatest::Reporter* reporter, const char* filename) { |
| 3762 SkPath path; | 3760 SkPath path; |
| 3763 path.moveTo(3, 0); | 3761 path.moveTo(3, 0); |
| 3764 path.quadTo(0, 1, 1, 1); | 3762 path.quadTo(0, 1, 1, 1); |
| 3765 path.lineTo(1, 3); | 3763 path.lineTo(1, 3); |
| 3766 path.close(); | 3764 path.close(); |
| 3767 path.moveTo(1, 0); | 3765 path.moveTo(1, 0); |
| 3768 path.lineTo(3, 0); | 3766 path.lineTo(3, 0); |
| 3769 path.quadTo(0, 1, 1, 2); | 3767 path.quadTo(0, 1, 1, 2); |
| 3770 path.close(); | 3768 path.close(); |
| 3771 testSimplify(reporter, path); | 3769 testSimplify(reporter, path, filename); |
| 3772 } | 3770 } |
| 3773 | 3771 |
| 3774 static void testQuadLineIntersect1(skiatest::Reporter* reporter) { | 3772 static void testQuadLineIntersect1(skiatest::Reporter* reporter, const char* fil
ename) { |
| 3775 SkPath path; | 3773 SkPath path; |
| 3776 path.moveTo(0, 0); | 3774 path.moveTo(0, 0); |
| 3777 path.quadTo(3, 1, 0, 3); | 3775 path.quadTo(3, 1, 0, 3); |
| 3778 path.lineTo(2, 3); | 3776 path.lineTo(2, 3); |
| 3779 path.close(); | 3777 path.close(); |
| 3780 path.moveTo(2, 0); | 3778 path.moveTo(2, 0); |
| 3781 path.lineTo(0, 1); | 3779 path.lineTo(0, 1); |
| 3782 path.quadTo(3, 1, 0, 2); | 3780 path.quadTo(3, 1, 0, 2); |
| 3783 path.close(); | 3781 path.close(); |
| 3784 testSimplify(reporter, path); | 3782 testSimplify(reporter, path, filename); |
| 3785 } | 3783 } |
| 3786 | 3784 |
| 3787 static void testQuadLineIntersect2(skiatest::Reporter* reporter) { | 3785 static void testQuadLineIntersect2(skiatest::Reporter* reporter, const char* fil
ename) { |
| 3788 SkPath path; | 3786 SkPath path; |
| 3789 path.moveTo(0, 0); | 3787 path.moveTo(0, 0); |
| 3790 path.quadTo(3, 1, 0, 3); | 3788 path.quadTo(3, 1, 0, 3); |
| 3791 path.lineTo(0, 3); | 3789 path.lineTo(0, 3); |
| 3792 path.close(); | 3790 path.close(); |
| 3793 path.moveTo(2, 0); | 3791 path.moveTo(2, 0); |
| 3794 path.lineTo(0, 1); | 3792 path.lineTo(0, 1); |
| 3795 path.quadTo(3, 1, 0, 2); | 3793 path.quadTo(3, 1, 0, 2); |
| 3796 path.close(); | 3794 path.close(); |
| 3797 testSimplify(reporter, path); | 3795 testSimplify(reporter, path, filename); |
| 3798 } | 3796 } |
| 3799 | 3797 |
| 3800 static void testQuadLineIntersect3(skiatest::Reporter* reporter) { | 3798 static void testQuadLineIntersect3(skiatest::Reporter* reporter, const char* fil
ename) { |
| 3801 SkPath path; | 3799 SkPath path; |
| 3802 path.moveTo(0, 0); | 3800 path.moveTo(0, 0); |
| 3803 path.quadTo(3, 1, 0, 3); | 3801 path.quadTo(3, 1, 0, 3); |
| 3804 path.lineTo(1, 3); | 3802 path.lineTo(1, 3); |
| 3805 path.close(); | 3803 path.close(); |
| 3806 path.moveTo(2, 0); | 3804 path.moveTo(2, 0); |
| 3807 path.lineTo(0, 1); | 3805 path.lineTo(0, 1); |
| 3808 path.quadTo(3, 1, 0, 2); | 3806 path.quadTo(3, 1, 0, 2); |
| 3809 path.close(); | 3807 path.close(); |
| 3810 testSimplify(reporter, path); | 3808 testSimplify(reporter, path, filename); |
| 3811 } | 3809 } |
| 3812 | 3810 |
| 3813 static void skphealth_com76(skiatest::Reporter* reporter) { | 3811 static void skphealth_com76(skiatest::Reporter* reporter, const char* filename)
{ |
| 3814 SkPath path; | 3812 SkPath path; |
| 3815 path.setFillType(SkPath::kWinding_FillType); | 3813 path.setFillType(SkPath::kWinding_FillType); |
| 3816 path.moveTo(708.099182f, 7.09919119f); | 3814 path.moveTo(708.099182f, 7.09919119f); |
| 3817 path.lineTo(708.099182f, 7.09920025f); | 3815 path.lineTo(708.099182f, 7.09920025f); |
| 3818 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); | 3816 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); |
| 3819 path.lineTo(704.000000f, 33.0000000f); | 3817 path.lineTo(704.000000f, 33.0000000f); |
| 3820 path.lineTo(705.000000f, 33.0000000f); | 3818 path.lineTo(705.000000f, 33.0000000f); |
| 3821 path.lineTo(705.000000f, 17.0000000f); | 3819 path.lineTo(705.000000f, 17.0000000f); |
| 3822 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f
, 7.80761385f); | 3820 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f
, 7.80761385f); |
| 3823 path.lineTo(708.099182f, 7.09919119f); | 3821 path.lineTo(708.099182f, 7.09919119f); |
| 3824 path.close(); | 3822 path.close(); |
| 3825 path.moveTo(704.000000f, 3.00000000f); | 3823 path.moveTo(704.000000f, 3.00000000f); |
| 3826 path.lineTo(704.000000f, 33.0000000f); | 3824 path.lineTo(704.000000f, 33.0000000f); |
| 3827 path.lineTo(705.000000f, 33.0000000f); | 3825 path.lineTo(705.000000f, 33.0000000f); |
| 3828 path.lineTo(719.500000f, 3.00000000f); | 3826 path.lineTo(719.500000f, 3.00000000f); |
| 3829 testSimplify(reporter, path); | 3827 testSimplify(reporter, path, filename); |
| 3830 } | 3828 } |
| 3831 | 3829 |
| 3832 static void tooCloseTest(skiatest::Reporter* reporter) { | 3830 static void tooCloseTest(skiatest::Reporter* reporter, const char* filename) { |
| 3833 SkPath path; | 3831 SkPath path; |
| 3834 path.moveTo(0, 0); | 3832 path.moveTo(0, 0); |
| 3835 path.lineTo(1, 1); | 3833 path.lineTo(1, 1); |
| 3836 path.lineTo(1,-1); | 3834 path.lineTo(1,-1); |
| 3837 path.close(); | 3835 path.close(); |
| 3838 path.moveTo(0, 0); | 3836 path.moveTo(0, 0); |
| 3839 path.lineTo(1,-2); | 3837 path.lineTo(1,-2); |
| 3840 path.lineTo(1, 2); | 3838 path.lineTo(1, 2); |
| 3841 path.lineTo(2, 0); | 3839 path.lineTo(2, 0); |
| 3842 path.close(); | 3840 path.close(); |
| 3843 testSimplify(reporter, path); | 3841 testSimplify(reporter, path, filename); |
| 3844 } | 3842 } |
| 3845 | 3843 |
| 3846 static void testRect1(skiatest::Reporter* reporter) { | 3844 static void testRect1(skiatest::Reporter* reporter, const char* filename) { |
| 3847 SkPath path; | 3845 SkPath path; |
| 3848 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); | 3846 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); |
| 3849 path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction); | 3847 path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction); |
| 3850 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); | 3848 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 3851 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); | 3849 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); |
| 3852 testSimplify(reporter, path); | 3850 testSimplify(reporter, path, filename); |
| 3853 } | 3851 } |
| 3854 | 3852 |
| 3855 static void testRect2(skiatest::Reporter* reporter) { | 3853 static void testRect2(skiatest::Reporter* reporter, const char* filename) { |
| 3856 SkPath path; | 3854 SkPath path; |
| 3857 path.setFillType(SkPath::kWinding_FillType); | 3855 path.setFillType(SkPath::kWinding_FillType); |
| 3858 path.moveTo(0, 0); | 3856 path.moveTo(0, 0); |
| 3859 path.lineTo(60, 0); | 3857 path.lineTo(60, 0); |
| 3860 path.lineTo(60, 60); | 3858 path.lineTo(60, 60); |
| 3861 path.lineTo(0, 60); | 3859 path.lineTo(0, 60); |
| 3862 path.close(); | 3860 path.close(); |
| 3863 path.moveTo(30, 20); | 3861 path.moveTo(30, 20); |
| 3864 path.lineTo(30, 50); | 3862 path.lineTo(30, 50); |
| 3865 path.lineTo(50, 50); | 3863 path.lineTo(50, 50); |
| 3866 path.lineTo(50, 20); | 3864 path.lineTo(50, 20); |
| 3867 path.close(); | 3865 path.close(); |
| 3868 path.moveTo(24, 20); | 3866 path.moveTo(24, 20); |
| 3869 path.lineTo(24, 30); | 3867 path.lineTo(24, 30); |
| 3870 path.lineTo(36, 30); | 3868 path.lineTo(36, 30); |
| 3871 path.lineTo(36, 20); | 3869 path.lineTo(36, 20); |
| 3872 path.close(); | 3870 path.close(); |
| 3873 path.moveTo(32, 24); | 3871 path.moveTo(32, 24); |
| 3874 path.lineTo(32, 41); | 3872 path.lineTo(32, 41); |
| 3875 path.lineTo(36, 41); | 3873 path.lineTo(36, 41); |
| 3876 path.lineTo(36, 24); | 3874 path.lineTo(36, 24); |
| 3877 path.close(); | 3875 path.close(); |
| 3878 testSimplify(reporter, path); | 3876 testSimplify(reporter, path, filename); |
| 3879 } | 3877 } |
| 3880 | 3878 |
| 3881 static void testTriangles3x(skiatest::Reporter* reporter) { | 3879 static void testTriangles3x(skiatest::Reporter* reporter, const char* filename)
{ |
| 3882 SkPath path; | 3880 SkPath path; |
| 3883 path.setFillType(SkPath::kEvenOdd_FillType); | 3881 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3884 path.moveTo(1, 0); | 3882 path.moveTo(1, 0); |
| 3885 path.quadTo(0, 1, 3, 2); | 3883 path.quadTo(0, 1, 3, 2); |
| 3886 path.lineTo(1, 3); | 3884 path.lineTo(1, 3); |
| 3887 path.close(); | 3885 path.close(); |
| 3888 path.moveTo(0, 0); | 3886 path.moveTo(0, 0); |
| 3889 path.lineTo(1, 1); | 3887 path.lineTo(1, 1); |
| 3890 path.quadTo(2, 1, 0, 2); | 3888 path.quadTo(2, 1, 0, 2); |
| 3891 path.close(); | 3889 path.close(); |
| 3892 testSimplify(reporter, path); | 3890 testSimplify(reporter, path, filename); |
| 3893 } | 3891 } |
| 3894 | 3892 |
| 3895 static void testQuad8(skiatest::Reporter* reporter) { | 3893 static void testQuad8(skiatest::Reporter* reporter, const char* filename) { |
| 3896 SkPath path; | 3894 SkPath path; |
| 3897 path.moveTo(3, 0); | 3895 path.moveTo(3, 0); |
| 3898 path.quadTo(0, 1, 3, 2); | 3896 path.quadTo(0, 1, 3, 2); |
| 3899 path.lineTo(0, 3); | 3897 path.lineTo(0, 3); |
| 3900 path.close(); | 3898 path.close(); |
| 3901 path.moveTo(1, 0); | 3899 path.moveTo(1, 0); |
| 3902 path.lineTo(3, 0); | 3900 path.lineTo(3, 0); |
| 3903 path.quadTo(1, 1, 2, 2); | 3901 path.quadTo(1, 1, 2, 2); |
| 3904 path.close(); | 3902 path.close(); |
| 3905 testSimplify(reporter, path); | 3903 testSimplify(reporter, path, filename); |
| 3906 } | 3904 } |
| 3907 | 3905 |
| 3908 static void testTriangles4x(skiatest::Reporter* reporter) { | 3906 static void testTriangles4x(skiatest::Reporter* reporter, const char* filename)
{ |
| 3909 SkPath path; | 3907 SkPath path; |
| 3910 path.setFillType(SkPath::kEvenOdd_FillType); | 3908 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3911 path.moveTo(0, 0); | 3909 path.moveTo(0, 0); |
| 3912 path.quadTo(2, 0, 0, 3); | 3910 path.quadTo(2, 0, 0, 3); |
| 3913 path.lineTo(2, 3); | 3911 path.lineTo(2, 3); |
| 3914 path.close(); | 3912 path.close(); |
| 3915 path.moveTo(0, 0); | 3913 path.moveTo(0, 0); |
| 3916 path.lineTo(0, 1); | 3914 path.lineTo(0, 1); |
| 3917 path.quadTo(3, 2, 2, 3); | 3915 path.quadTo(3, 2, 2, 3); |
| 3918 path.close(); | 3916 path.close(); |
| 3919 testSimplify(reporter, path); | 3917 testSimplify(reporter, path, filename); |
| 3920 } | 3918 } |
| 3921 | 3919 |
| 3922 static void testQuad9(skiatest::Reporter* reporter) { | 3920 static void testQuad9(skiatest::Reporter* reporter, const char* filename) { |
| 3923 SkPath path; | 3921 SkPath path; |
| 3924 path.setFillType(SkPath::kEvenOdd_FillType); | 3922 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3925 path.moveTo(1, 0); | 3923 path.moveTo(1, 0); |
| 3926 path.quadTo(0, 1, 3, 2); | 3924 path.quadTo(0, 1, 3, 2); |
| 3927 path.lineTo(1, 3); | 3925 path.lineTo(1, 3); |
| 3928 path.close(); | 3926 path.close(); |
| 3929 path.moveTo(1, 0); | 3927 path.moveTo(1, 0); |
| 3930 path.lineTo(1, 1); | 3928 path.lineTo(1, 1); |
| 3931 path.quadTo(2, 1, 1, 3); | 3929 path.quadTo(2, 1, 1, 3); |
| 3932 path.close(); | 3930 path.close(); |
| 3933 testSimplify(reporter, path); | 3931 testSimplify(reporter, path, filename); |
| 3934 } | 3932 } |
| 3935 | 3933 |
| 3936 static void testQuad10(skiatest::Reporter* reporter) { | 3934 static void testQuad10(skiatest::Reporter* reporter, const char* filename) { |
| 3937 SkPath path; | 3935 SkPath path; |
| 3938 path.moveTo(1, 0); | 3936 path.moveTo(1, 0); |
| 3939 path.quadTo(0, 1, 3, 2); | 3937 path.quadTo(0, 1, 3, 2); |
| 3940 path.lineTo(3, 3); | 3938 path.lineTo(3, 3); |
| 3941 path.close(); | 3939 path.close(); |
| 3942 path.moveTo(1, 0); | 3940 path.moveTo(1, 0); |
| 3943 path.lineTo(2, 0); | 3941 path.lineTo(2, 0); |
| 3944 path.quadTo(2, 3, 3, 3); | 3942 path.quadTo(2, 3, 3, 3); |
| 3945 path.close(); | 3943 path.close(); |
| 3946 testSimplify(reporter, path); | 3944 testSimplify(reporter, path, filename); |
| 3947 } | 3945 } |
| 3948 | 3946 |
| 3949 static void testQuad11(skiatest::Reporter* reporter) { | 3947 static void testQuad11(skiatest::Reporter* reporter, const char* filename) { |
| 3950 SkPath path; | 3948 SkPath path; |
| 3951 path.moveTo(2, 0); | 3949 path.moveTo(2, 0); |
| 3952 path.quadTo(0, 1, 1, 2); | 3950 path.quadTo(0, 1, 1, 2); |
| 3953 path.lineTo(1, 2); | 3951 path.lineTo(1, 2); |
| 3954 path.close(); | 3952 path.close(); |
| 3955 path.moveTo(0, 0); | 3953 path.moveTo(0, 0); |
| 3956 path.lineTo(1, 1); | 3954 path.lineTo(1, 1); |
| 3957 path.quadTo(1, 3, 3, 3); | 3955 path.quadTo(1, 3, 3, 3); |
| 3958 path.close(); | 3956 path.close(); |
| 3959 testSimplify(reporter, path); | 3957 testSimplify(reporter, path, filename); |
| 3960 } | 3958 } |
| 3961 | 3959 |
| 3962 static void (*firstTest)(skiatest::Reporter* ) = 0; | 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* filenam
e) { |
| 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* filenam
e) { |
| 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); |
| 4145 path.close(); |
| 4146 testSimplify(reporter, path, filename); |
| 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); |
| 4158 path.close(); |
| 4159 testSimplify(reporter, path, filename); |
| 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); |
| 4171 path.close(); |
| 4172 testSimplify(reporter, path, filename); |
| 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); |
| 4184 path.close(); |
| 4185 testSimplify(reporter, path, filename); |
| 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); |
| 4197 path.close(); |
| 4198 testSimplify(reporter, path, filename); |
| 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); |
| 4210 path.close(); |
| 4211 testSimplify(reporter, path, filename); |
| 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); |
| 4223 path.close(); |
| 4224 testSimplify(reporter, path, filename); |
| 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); |
| 4236 path.close(); |
| 4237 testSimplify(reporter, path, filename); |
| 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); |
| 4249 path.close(); |
| 4250 testSimplify(reporter, path, filename); |
| 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); |
| 4263 path.close(); |
| 4264 testSimplify(reporter, path, filename); |
| 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); |
| 4277 path.close(); |
| 4278 testSimplify(reporter, path, filename); |
| 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); |
| 4290 path.close(); |
| 4291 testSimplify(reporter, path, filename); |
| 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); |
| 4303 path.close(); |
| 4304 testSimplify(reporter, path, filename); |
| 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); |
| 4316 path.close(); |
| 4317 testSimplify(reporter, path, filename); |
| 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 |
| 4509 // this fails because there is a short unorderable segment and the unordered sta
te isn't handled |
| 4510 // correctly later on. |
| 4511 static void testQuads46x(skiatest::Reporter* reporter, const char* filename) { |
| 4512 SkPath path; |
| 4513 path.setFillType(SkPath::kEvenOdd_FillType); |
| 4514 path.moveTo(2, 0); |
| 4515 path.quadTo(0, 1, 3, 2); |
| 4516 path.lineTo(1, 3); |
| 4517 path.close(); |
| 4518 path.moveTo(0, 0); |
| 4519 path.lineTo(1, 1); |
| 4520 path.quadTo(3, 2, 1, 3); |
| 4521 path.close(); |
| 4522 testSimplify(reporter, path, filename); |
| 4523 } |
| 4524 |
| 4525 static void testQuads45(skiatest::Reporter* reporter, const char* filename) { |
| 4526 SkPath path; |
| 4527 path.moveTo(2, 0); |
| 4528 path.quadTo(3, 2, 3, 3); |
| 4529 path.lineTo(3, 3); |
| 4530 path.close(); |
| 4531 path.moveTo(0, 0); |
| 4532 path.lineTo(0, 2); |
| 4533 path.quadTo(3, 2, 3, 3); |
| 4534 path.close(); |
| 4535 testSimplify(reporter, path, filename); |
| 4536 } |
| 4537 |
| 4538 static void testQuads44(skiatest::Reporter* reporter, const char* filename) { |
| 4539 SkPath path; |
| 4540 path.moveTo(2, 0); |
| 4541 path.quadTo(3, 2, 3, 3); |
| 4542 path.lineTo(3, 3); |
| 4543 path.close(); |
| 4544 path.moveTo(1, 0); |
| 4545 path.lineTo(0, 2); |
| 4546 path.quadTo(3, 2, 3, 3); |
| 4547 path.close(); |
| 4548 testSimplify(reporter, path, filename); |
| 4549 } |
| 4550 |
| 4551 static void testQuads43(skiatest::Reporter* reporter, const char* filename) { |
| 4552 SkPath path; |
| 4553 path.moveTo(2, 0); |
| 4554 path.quadTo(2, 3, 3, 3); |
| 4555 path.lineTo(3, 3); |
| 4556 path.close(); |
| 4557 path.moveTo(0, 2); |
| 4558 path.lineTo(0, 2); |
| 4559 path.quadTo(2, 3, 3, 3); |
| 4560 path.close(); |
| 4561 testSimplify(reporter, path, filename); |
| 4562 } |
| 4563 |
| 4564 static void testQuads42(skiatest::Reporter* reporter, const char* filename) { |
| 4565 SkPath path; |
| 4566 path.moveTo(2, 0); |
| 4567 path.quadTo(3, 2, 3, 3); |
| 4568 path.lineTo(3, 3); |
| 4569 path.close(); |
| 4570 path.moveTo(2, 0); |
| 4571 path.lineTo(0, 2); |
| 4572 path.quadTo(3, 2, 3, 3); |
| 4573 path.close(); |
| 4574 testSimplify(reporter, path, filename); |
| 4575 } |
| 4576 |
| 4577 static void testQuads56(skiatest::Reporter* reporter, const char* filename) { |
| 4578 SkPath path; |
| 4579 path.moveTo(2, 0); |
| 4580 path.quadTo(3, 1, 0, 2); |
| 4581 path.lineTo(3, 2); |
| 4582 path.close(); |
| 4583 path.moveTo(3, 0); |
| 4584 path.lineTo(2, 1); |
| 4585 path.quadTo(2, 1, 3, 3); |
| 4586 path.close(); |
| 4587 testSimplify(reporter, path, filename); |
| 4588 } |
| 4589 |
| 4590 static void testQuads57(skiatest::Reporter* reporter, const char* filename) { |
| 4591 SkPath path; |
| 4592 path.moveTo(1, 0); |
| 4593 path.quadTo(3, 0, 3, 1); |
| 4594 path.lineTo(2, 2); |
| 4595 path.close(); |
| 4596 path.moveTo(2, 0); |
| 4597 path.lineTo(3, 1); |
| 4598 path.quadTo(2, 2, 3, 2); |
| 4599 path.close(); |
| 4600 testSimplify(reporter, path, filename); |
| 4601 } |
| 4602 |
| 4603 static void testQuads58(skiatest::Reporter* reporter, const char* filename) { |
| 4604 SkPath path; |
| 4605 path.moveTo(1, 0); |
| 4606 path.quadTo(3, 0, 3, 1); |
| 4607 path.lineTo(1, 3); |
| 4608 path.close(); |
| 4609 path.moveTo(2, 0); |
| 4610 path.lineTo(3, 1); |
| 4611 path.quadTo(2, 2, 3, 2); |
| 4612 path.close(); |
| 4613 testSimplify(reporter, path, filename); |
| 4614 } |
| 4615 |
| 4616 static void testQuads59(skiatest::Reporter* reporter, const char* filename) { |
| 4617 SkPath path; |
| 4618 path.moveTo(3, 0); |
| 4619 path.quadTo(3, 1, 3, 1); |
| 4620 path.lineTo(2, 2); |
| 4621 path.close(); |
| 4622 path.moveTo(2, 0); |
| 4623 path.lineTo(3, 1); |
| 4624 path.quadTo(2, 2, 3, 2); |
| 4625 path.close(); |
| 4626 testSimplify(reporter, path, filename); |
| 4627 } |
| 4628 |
| 4629 static void testQuads60(skiatest::Reporter* reporter, const char* filename) { |
| 4630 SkPath path; |
| 4631 path.moveTo(2, 1); |
| 4632 path.quadTo(0, 2, 3, 2); |
| 4633 path.lineTo(2, 3); |
| 4634 path.close(); |
| 4635 path.moveTo(0, 0); |
| 4636 path.lineTo(2, 0); |
| 4637 path.quadTo(1, 1, 2, 2); |
| 4638 path.close(); |
| 4639 testSimplify(reporter, path, filename); |
| 4640 } |
| 4641 |
| 4642 static void testQuads61(skiatest::Reporter* reporter, const char* filename) { |
| 4643 SkPath path; |
| 4644 path.setFillType(SkPath::kEvenOdd_FillType); |
| 4645 path.moveTo(0, 0); |
| 4646 path.quadTo(0, 0, 2, 0); |
| 4647 path.lineTo(1, 1); |
| 4648 path.close(); |
| 4649 path.moveTo(0, 0); |
| 4650 path.lineTo(0, 0); |
| 4651 path.quadTo(1, 0, 2, 2); |
| 4652 path.close(); |
| 4653 testSimplify(reporter, path, filename); |
| 4654 } |
| 4655 |
| 4656 static void (*firstTest)(skiatest::Reporter* , const char* filename) = testQuadr
atic56; |
| 3963 | 4657 |
| 3964 static TestDesc tests[] = { | 4658 static TestDesc tests[] = { |
| 4659 TEST(testQuads61), |
| 4660 TEST(testQuads60), |
| 4661 TEST(testQuads59), |
| 4662 TEST(testQuads58), |
| 4663 TEST(testQuads57), |
| 4664 TEST(testQuads56), |
| 4665 TEST(testQuads54), |
| 4666 TEST(testQuads53), |
| 4667 TEST(testQuads52), |
| 4668 TEST(testQuads51), |
| 4669 TEST(testQuads50), |
| 4670 TEST(testQuads49), |
| 4671 TEST(testQuads48), |
| 4672 TEST(testQuads47), |
| 4673 TEST(testQuads46x), |
| 4674 TEST(testQuads45), |
| 4675 TEST(testQuads44), |
| 4676 TEST(testQuads43), |
| 4677 TEST(testQuads42), |
| 4678 TEST(testQuads41), |
| 4679 TEST(testQuads36), |
| 4680 TEST(testQuads37), |
| 4681 TEST(testQuads38), |
| 4682 TEST(testQuads39), |
| 4683 TEST(testQuads40), |
| 4684 TEST(testQuads16), |
| 4685 TEST(testQuads17), |
| 4686 TEST(testQuads18), |
| 4687 TEST(testQuads19), |
| 4688 TEST(testQuads20), |
| 4689 TEST(testQuads21), |
| 4690 TEST(testQuads22), |
| 4691 TEST(testQuads23), |
| 4692 TEST(testQuads24), |
| 4693 TEST(testQuads25), |
| 4694 TEST(testQuads26), |
| 4695 TEST(testQuads27), |
| 4696 TEST(testQuads28), |
| 4697 TEST(testQuads29), |
| 4698 TEST(testQuads30), |
| 4699 TEST(testQuads31), |
| 4700 TEST(testQuads32), |
| 4701 TEST(testQuads33), |
| 4702 TEST(testQuads34), |
| 4703 TEST(testQuads35), |
| 4704 TEST(testDegenerates1), |
| 4705 TEST(testQuad13), |
| 4706 TEST(testQuad14), |
| 4707 TEST(testQuad15), |
| 4708 TEST(testQuadratic56), |
| 4709 TEST(testQuadralateral4), |
| 4710 TEST(testQuadralateral3), |
| 4711 TEST(testDegenerate5), |
| 4712 TEST(testQuad12), |
| 4713 TEST(testQuadratic51), // has unorderable angles |
| 4714 TEST(testQuad8), |
| 3965 TEST(testQuad11), | 4715 TEST(testQuad11), |
| 3966 TEST(testQuad10), | 4716 TEST(testQuad10), |
| 3967 TEST(testQuad9), | 4717 TEST(testQuad9), |
| 3968 TEST(testTriangles4x), | 4718 TEST(testTriangles4x), |
| 3969 TEST(testQuad8), | |
| 3970 TEST(testTriangles3x), | 4719 TEST(testTriangles3x), |
| 3971 TEST(testRect2), | 4720 TEST(testRect2), |
| 3972 TEST(testRect1), | 4721 TEST(testRect1), |
| 3973 TEST(tooCloseTest), | 4722 TEST(tooCloseTest), |
| 3974 TEST(skphealth_com76), | 4723 TEST(skphealth_com76), |
| 3975 TEST(testQuadLineIntersect1), | 4724 TEST(testQuadLineIntersect1), |
| 3976 TEST(testQuadLineIntersect2), | 4725 TEST(testQuadLineIntersect2), |
| 3977 TEST(testQuadLineIntersect3), | 4726 TEST(testQuadLineIntersect3), |
| 3978 TEST(testQuad7), | 4727 TEST(testQuad7), |
| 3979 TEST(testQuad6), | 4728 TEST(testQuad6), |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4045 TEST(testQuadratic68), | 4794 TEST(testQuadratic68), |
| 4046 TEST(testQuadratic67x), | 4795 TEST(testQuadratic67x), |
| 4047 TEST(testQuadratic65), | 4796 TEST(testQuadratic65), |
| 4048 TEST(testQuadratic64), | 4797 TEST(testQuadratic64), |
| 4049 TEST(testQuadratic63), | 4798 TEST(testQuadratic63), |
| 4050 TEST(testLine1a), | 4799 TEST(testLine1a), |
| 4051 TEST(testLine1ax), | 4800 TEST(testLine1ax), |
| 4052 TEST(testQuadratic59), | 4801 TEST(testQuadratic59), |
| 4053 TEST(testQuadratic59x), | 4802 TEST(testQuadratic59x), |
| 4054 TEST(testQuadratic58), | 4803 TEST(testQuadratic58), |
| 4055 TEST(testQuadratic56), | |
| 4056 TEST(testQuadratic55), | 4804 TEST(testQuadratic55), |
| 4057 TEST(testQuadratic53), | 4805 TEST(testQuadratic53), |
| 4058 TEST(testQuadratic51), | |
| 4059 TEST(testQuadratic38), | 4806 TEST(testQuadratic38), |
| 4060 TEST(testQuadratic37), | 4807 TEST(testQuadratic37), |
| 4061 TEST(testQuadratic36), | 4808 TEST(testQuadratic36), |
| 4062 TEST(testQuadratic35), | 4809 TEST(testQuadratic35), |
| 4063 TEST(testQuadratic34), | 4810 TEST(testQuadratic34), |
| 4064 TEST(testQuadratic33), | 4811 TEST(testQuadratic33), |
| 4065 TEST(testQuadratic32), | 4812 TEST(testQuadratic32), |
| 4066 TEST(testQuadratic31), | 4813 TEST(testQuadratic31), |
| 4067 TEST(testQuadratic30), | 4814 TEST(testQuadratic30), |
| 4068 TEST(testQuadratic29), | 4815 TEST(testQuadratic29), |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4324 static const size_t testCount = SK_ARRAY_COUNT(tests); | 5071 static const size_t testCount = SK_ARRAY_COUNT(tests); |
| 4325 | 5072 |
| 4326 static TestDesc subTests[] = { | 5073 static TestDesc subTests[] = { |
| 4327 TEST(testLine3), | 5074 TEST(testLine3), |
| 4328 TEST(testLine2), | 5075 TEST(testLine2), |
| 4329 TEST(testLine1), | 5076 TEST(testLine1), |
| 4330 }; | 5077 }; |
| 4331 | 5078 |
| 4332 static const size_t subTestCount = SK_ARRAY_COUNT(subTests); | 5079 static const size_t subTestCount = SK_ARRAY_COUNT(subTests); |
| 4333 | 5080 |
| 4334 static void (*firstSubTest)(skiatest::Reporter* ) = 0; | 5081 static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4335 | 5082 |
| 5083 static bool runSubTests = false; |
| 4336 static bool runSubTestsFirst = false; | 5084 static bool runSubTestsFirst = false; |
| 4337 static bool runReverse = false; | 5085 static bool runReverse = false; |
| 4338 static void (*stopTest)(skiatest::Reporter* ) = 0; | 5086 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4339 | 5087 |
| 4340 DEF_TEST(PathOpsSimplify, reporter) { | 5088 DEF_TEST(PathOpsSimplify, reporter) { |
| 4341 #ifdef SK_DEBUG | 5089 #ifdef SK_DEBUG |
| 4342 SkPathOpsDebug::gMaxWindSum = 4; | 5090 SkPathOpsDebug::gMaxWindSum = 4; |
| 4343 SkPathOpsDebug::gMaxWindValue = 4; | 5091 SkPathOpsDebug::gMaxWindValue = 4; |
| 4344 #endif | 5092 #endif |
| 4345 if (runSubTestsFirst) { | 5093 if (runSubTests && runSubTestsFirst) { |
| 4346 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 5094 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); |
| 4347 } | 5095 } |
| 4348 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); | 5096 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); |
| 4349 if (!runSubTestsFirst) { | 5097 if (runSubTests && !runSubTestsFirst) { |
| 4350 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 5098 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); |
| 4351 } | 5099 } |
| 4352 #ifdef SK_DEBUG | 5100 #ifdef SK_DEBUG |
| 4353 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; | 5101 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; |
| 4354 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; | 5102 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; |
| 4355 #endif | 5103 #endif |
| 4356 } | 5104 } |
| OLD | NEW |