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

Side by Side Diff: tests/PathOpsBuilderTest.cpp

Issue 2168963002: fix builder fuzz (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/SkOpBuilder.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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(SkOpBuilderKFuzz1, reporter) {
349 SkPath path;
350 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
351 path.lineTo(SkBits2Float(0x39008001), SkBits2Float(0xd31fbc1d)); // 0.000122547 f, -6.86056e+11f
352 path.conicTo(SkBits2Float(0x246a205a), SkBits2Float(0x0080d3fb), SkBits2Float(0x ce000001), SkBits2Float(0x04d31fbc), SkBits2Float(0x57a82c00)); // 5.07681e-17f , 1.1831e-38f, -5.36871e+08f, 4.9635e-36f, 3.69814e+14f
353 SkPath path0(path);
354 path.reset();
355 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
356 path.cubicTo(SkBits2Float(0x80d3f924), SkBits2Float(0xcecece4f), SkBits2Float(0x cececece), SkBits2Float(0xcececece), SkBits2Float(0x9a9a9ace), SkBits2Float(0x9a 9a9a9a)); // -1.94667e-38f, -1.73481e+09f, -1.73483e+09f, -1.73483e+09f, -6.394 3e-23f, -6.39427e-23f
357 path.moveTo(SkBits2Float(0x9a9a019a), SkBits2Float(0xa59a9a9a)); // -6.36955e-2 3f, -2.68195e-16f
358 SkPath path1(path);
359 SkOpBuilder builder;
360 builder.add(path0, SkPathOp::kUnion_SkPathOp);
361 builder.add(path1, SkPathOp::kUnion_SkPathOp);
362 builder.resolve(&path);
363 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698