| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "PathOpsExtendedTest.h" | 8 #include "PathOpsExtendedTest.h" |
| 9 #include "PathOpsTestCommon.h" | 9 #include "PathOpsTestCommon.h" |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 path1.lineTo(220, 230); | 337 path1.lineTo(220, 230); |
| 338 path1.lineTo(60, 120); | 338 path1.lineTo(60, 120); |
| 339 path1.lineTo(2.22223e+07f, 2.22222e+14f); | 339 path1.lineTo(2.22223e+07f, 2.22222e+14f); |
| 340 path1.lineTo(2.22223e+07f, 2.22222e+14f); | 340 path1.lineTo(2.22223e+07f, 2.22222e+14f); |
| 341 | 341 |
| 342 SkOpBuilder builder; | 342 SkOpBuilder builder; |
| 343 builder.add(path0, SkPathOp::kUnion_SkPathOp); | 343 builder.add(path0, SkPathOp::kUnion_SkPathOp); |
| 344 builder.add(path1, SkPathOp::kUnion_SkPathOp); | 344 builder.add(path1, SkPathOp::kUnion_SkPathOp); |
| 345 builder.resolve(&path0); | 345 builder.resolve(&path0); |
| 346 } | 346 } |
| 347 |
| 348 DEF_TEST(SkOpBuilder623072, reporter) { |
| 349 SkOpBuilder builder; |
| 350 SkPath path; |
| 351 |
| 352 builder.add(path, SkPathOp::kDifference_SkPathOp); |
| 353 |
| 354 builder.add(path, SkPathOp::kIntersect_SkPathOp); |
| 355 |
| 356 path.moveTo(0, 0); |
| 357 path.lineTo(1.50606e+13f, 1.43144e-13f); |
| 358 path.conicTo(-2.04889f, 3.04132e+35f, 9.69467e-12f, 1.5954e+13f, 4.87407e+16
f); |
| 359 path.lineTo(1.43144e-13f, 4.7323e-37f); |
| 360 path.conicTo(3.04132e+35f, 5.77848e-19f, 4.61198e-19f, 1.64987e+07f, 121589)
; |
| 361 path.lineTo(0, 0); |
| 362 path.close(); |
| 363 path.moveTo(0, 0); |
| 364 path.quadTo(-1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f); |
| 365 path.lineTo(0, 0); |
| 366 path.close(); |
| 367 builder.add(path, SkPathOp::kIntersect_SkPathOp); |
| 368 path.reset(); |
| 369 |
| 370 path.moveTo(0, 0); |
| 371 path.lineTo(300.343f, 2.36623e-15f); |
| 372 builder.add(path, SkPathOp::kUnion_SkPathOp); |
| 373 path.reset(); |
| 374 |
| 375 path.moveTo(5.78315e-19f, 4.7323e-37f); |
| 376 path.lineTo(1.51217e-18f, -3.85756e-23f); |
| 377 path.quadTo(9.2831e-15f, -1.85547e+23f, 1.79534e-28f, 2.36623e-15f); |
| 378 builder.add(path, SkPathOp::kDifference_SkPathOp); |
| 379 path.reset(); |
| 380 |
| 381 builder.add(path, SkPathOp::kDifference_SkPathOp); |
| 382 |
| 383 builder.add(path, SkPathOp::kDifference_SkPathOp); |
| 384 |
| 385 builder.add(path, SkPathOp::kDifference_SkPathOp); |
| 386 |
| 387 path.moveTo(0, 0); |
| 388 path.conicTo(2.49282e-13f, 4.78968e-34f, 1.99397e+36f, -4.84373e+27f, 3.4128
3e-20f); |
| 389 path.lineTo(1.99397e+36f, -4.84373e+27f); |
| 390 path.lineTo(9.4495e-15f, 0.000617492f); |
| 391 path.lineTo(0, 0); |
| 392 path.close(); |
| 393 path.moveTo(0, 0); |
| 394 path.quadTo(-8.10388e-33f, 0.00148185f, 2.25206e-21f, 5.54035e+21f); |
| 395 path.moveTo(3.71183e-14f, 3.13044e-13f); |
| 396 path.quadTo(2.22225e-15f, 0.000615227f, -1.2117e+19f, -8.43217e-33f); |
| 397 path.quadTo(1.11596e-05f, 1.35329e-19f, 2.98959e-15f, 2.8457e+15f); |
| 398 path.quadTo(2.22225e-15f, 0.000615227f, -1.2117e+19f, 0.00105459f); |
| 399 path.cubicTo(1.11598e-05f, 1.35327e-19f, 2.00186e+11f, 2.9896e-15f, 2.8457e+
15f, 5.64327e+10f); |
| 400 path.quadTo(-2.56957e+15f, 1.15242e-14f, -6.4318e-08f, 0.000712428f); |
| 401 path.lineTo(-140445, 7.82294e-14f); |
| 402 builder.add(path, SkPathOp::kIntersect_SkPathOp); |
| 403 |
| 404 SkPath result; |
| 405 builder.resolve(&result); |
| 406 } |
| OLD | NEW |