Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: tests/PathOpsBuilderTest.cpp

Issue 2058773002: add fail condition to addexpanded (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove debug change Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698