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

Side by Side Diff: tests/PathOpsExtendedTest.cpp

Issue 1250293002: fix path ops fuzz buster (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: corrupting bug kaput Created 5 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 | « tests/PathOpsBuilderTest.cpp ('k') | tests/PathOpsSimplifyTest.cpp » ('j') | 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 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 7
8 #include "PathOpsExtendedTest.h" 8 #include "PathOpsExtendedTest.h"
9 #include "PathOpsThreadedCommon.h" 9 #include "PathOpsThreadedCommon.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 #if DEBUG_SHOW_TEST_NAME 482 #if DEBUG_SHOW_TEST_NAME
483 static void showName(const SkPath& a, const SkPath& b, const SkPathOp shapeOp) { 483 static void showName(const SkPath& a, const SkPath& b, const SkPathOp shapeOp) {
484 SkDebugf("\n"); 484 SkDebugf("\n");
485 showPathData(a); 485 showPathData(a);
486 showOp(shapeOp); 486 showOp(shapeOp);
487 showPathData(b); 487 showPathData(b);
488 } 488 }
489 #endif 489 #endif
490 490
491 bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result, bool expectSuccess); 491 bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result,
492 bool expectSuccess SkDEBUGPARAMS(const char* testName));
492 493
493 static bool innerPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkP ath& b, 494 static bool innerPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkP ath& b,
494 const SkPathOp shapeOp, const char* testName, bool expectSuccess) { 495 const SkPathOp shapeOp, const char* testName, bool expectSuccess) {
495 #if 0 && DEBUG_SHOW_TEST_NAME 496 #if 0 && DEBUG_SHOW_TEST_NAME
496 showName(a, b, shapeOp); 497 showName(a, b, shapeOp);
497 #endif 498 #endif
498 SkPath out; 499 SkPath out;
499 if (!OpDebug(a, b, shapeOp, &out, expectSuccess)) { 500 if (!OpDebug(a, b, shapeOp, &out, expectSuccess SkDEBUGPARAMS(testName))) {
500 SkDebugf("%s did not expect failure\n", __FUNCTION__); 501 SkDebugf("%s did not expect failure\n", __FUNCTION__);
501 REPORTER_ASSERT(reporter, 0); 502 REPORTER_ASSERT(reporter, 0);
502 return false; 503 return false;
503 } 504 }
504 if (!reporter->verbose()) { 505 if (!reporter->verbose()) {
505 return true; 506 return true;
506 } 507 }
507 SkPath pathOut, scaledPathOut; 508 SkPath pathOut, scaledPathOut;
508 SkRegion rgnA, rgnB, openClip, rgnOut; 509 SkRegion rgnA, rgnB, openClip, rgnOut;
509 openClip.setRect(-16000, -16000, 16000, 16000); 510 openClip.setRect(-16000, -16000, 16000, 16000);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 if (foundSkip && tests[index].fun != firstTest) { 670 if (foundSkip && tests[index].fun != firstTest) {
670 SkDebugf(" %s,\n", tests[index].str); 671 SkDebugf(" %s,\n", tests[index].str);
671 } 672 }
672 if (tests[index].fun == stopTest || index == last) { 673 if (tests[index].fun == stopTest || index == last) {
673 break; 674 break;
674 } 675 }
675 index += reverse ? -1 : 1; 676 index += reverse ? -1 : 1;
676 } while (true); 677 } while (true);
677 #endif 678 #endif
678 } 679 }
OLDNEW
« no previous file with comments | « tests/PathOpsBuilderTest.cpp ('k') | tests/PathOpsSimplifyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698