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

Side by Side Diff: tests/PathOpsExtendedTest.cpp

Issue 1037953004: add conics to path ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix linux build Created 5 years, 8 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
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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 bool testPathOpCheck(skiatest::Reporter* reporter, const SkPath& a, const SkPath & b, 546 bool testPathOpCheck(skiatest::Reporter* reporter, const SkPath& a, const SkPath & b,
547 const SkPathOp shapeOp, const char* testName, bool checkFail) { 547 const SkPathOp shapeOp, const char* testName, bool checkFail) {
548 return innerPathOp(reporter, a, b, shapeOp, testName, false, checkFail); 548 return innerPathOp(reporter, a, b, shapeOp, testName, false, checkFail);
549 } 549 }
550 550
551 bool testPathFailOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 551 bool testPathFailOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
552 const SkPathOp shapeOp, const char* testName) { 552 const SkPathOp shapeOp, const char* testName) {
553 #if DEBUG_SHOW_TEST_NAME 553 #if DEBUG_SHOW_TEST_NAME
554 showName(a, b, shapeOp); 554 showName(a, b, shapeOp);
555 #endif 555 #endif
556 SkPath out; 556 SkPath orig;
557 orig.lineTo(54, 43);
558 SkPath out = orig;
557 if (Op(a, b, shapeOp, &out) ) { 559 if (Op(a, b, shapeOp, &out) ) {
558 SkDebugf("%s test is expected to fail\n", __FUNCTION__); 560 SkDebugf("%s test is expected to fail\n", __FUNCTION__);
559 REPORTER_ASSERT(reporter, 0); 561 REPORTER_ASSERT(reporter, 0);
560 return false; 562 return false;
561 } 563 }
564 SkASSERT(out == orig);
562 return true; 565 return true;
563 } 566 }
564 567
565 bool testThreadedPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkP ath& b, 568 bool testThreadedPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkP ath& b,
566 const SkPathOp shapeOp, const char* testName) { 569 const SkPathOp shapeOp, const char* testName) {
567 return innerPathOp(reporter, a, b, shapeOp, testName, true, true); 570 return innerPathOp(reporter, a, b, shapeOp, testName, true, true);
568 } 571 }
569 572
570 SK_DECLARE_STATIC_MUTEX(gMutex); 573 SK_DECLARE_STATIC_MUTEX(gMutex);
571 574
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 if (tests[index].fun == stopTest) { 652 if (tests[index].fun == stopTest) {
650 SkDebugf("lastTest\n"); 653 SkDebugf("lastTest\n");
651 break; 654 break;
652 } 655 }
653 if (index == last) { 656 if (index == last) {
654 break; 657 break;
655 } 658 }
656 index += reverse ? -1 : 1; 659 index += reverse ? -1 : 1;
657 } while (true); 660 } while (true);
658 } 661 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698