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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 path.lineTo(SkBits2Float(0x43038000), SkBits2Float(0x43080000)); // 131.5f, 136 | 316 path.lineTo(SkBits2Float(0x43038000), SkBits2Float(0x43080000)); // 131.5f, 136 |
317 path.cubicTo(SkBits2Float(0x43038000), SkBits2Float(0x42f00000), SkBits2Float(0x
42f16666), SkBits2Float(0x42d53333), SkBits2Float(0x42d3cccd), SkBits2Float(0x42
cd6666)); // 131.5f, 120, 120.7f, 106.6f, 105.9f, 102.7f | 317 path.cubicTo(SkBits2Float(0x43038000), SkBits2Float(0x42f00000), SkBits2Float(0x
42f16666), SkBits2Float(0x42d53333), SkBits2Float(0x42d3cccd), SkBits2Float(0x42
cd6666)); // 131.5f, 120, 120.7f, 106.6f, 105.9f, 102.7f |
318 path.lineTo(SkBits2Float(0x42e33333), SkBits2Float(0x42940000)); // 113.6f, 74 | 318 path.lineTo(SkBits2Float(0x42e33333), SkBits2Float(0x42940000)); // 113.6f, 74 |
319 SkPath path2(path); | 319 SkPath path2(path); |
320 SkOpBuilder builder; | 320 SkOpBuilder builder; |
321 builder.add(path1, kUnion_SkPathOp); | 321 builder.add(path1, kUnion_SkPathOp); |
322 builder.add(path2, kUnion_SkPathOp); | 322 builder.add(path2, kUnion_SkPathOp); |
323 SkPath result; | 323 SkPath result; |
324 builder.resolve(&result); | 324 builder.resolve(&result); |
325 } | 325 } |
| 326 |
| 327 DEF_TEST(SkOpBuilder618991, reporter) { |
| 328 SkPath path0; |
| 329 path0.moveTo(140, 40); |
| 330 path0.lineTo(200, 210); |
| 331 path0.lineTo(40, 100); |
| 332 path0.lineTo(2.22223e+07f, 2.22222e+14f); |
| 333 path0.lineTo(2.22223e+07f, 2.22222e+14f); |
| 334 |
| 335 SkPath path1; |
| 336 path1.moveTo(160, 60); |
| 337 path1.lineTo(220, 230); |
| 338 path1.lineTo(60, 120); |
| 339 path1.lineTo(2.22223e+07f, 2.22222e+14f); |
| 340 path1.lineTo(2.22223e+07f, 2.22222e+14f); |
| 341 |
| 342 SkOpBuilder builder; |
| 343 builder.add(path0, SkPathOp::kUnion_SkPathOp); |
| 344 builder.add(path1, SkPathOp::kUnion_SkPathOp); |
| 345 builder.resolve(&path0); |
| 346 } |
OLD | NEW |