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

Side by Side Diff: tests/PathOpsSimplifyTest.cpp

Issue 272153002: fix bugs found by computing flat clips in 800K skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix maybe-uninitialized error in unbuntu Created 6 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 | « tests/PathOpsOpTest.cpp ('k') | tests/PathOpsSkpClipTest.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 #include "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 8
9 #define TEST(name) { name, #name } 9 #define TEST(name) { name, #name }
10 10
(...skipping 4635 matching lines...) Expand 10 before | Expand all | Expand 10 after
4646 path.quadTo(0, 0, 2, 0); 4646 path.quadTo(0, 0, 2, 0);
4647 path.lineTo(1, 1); 4647 path.lineTo(1, 1);
4648 path.close(); 4648 path.close();
4649 path.moveTo(0, 0); 4649 path.moveTo(0, 0);
4650 path.lineTo(0, 0); 4650 path.lineTo(0, 0);
4651 path.quadTo(1, 0, 2, 2); 4651 path.quadTo(1, 0, 2, 2);
4652 path.close(); 4652 path.close();
4653 testSimplify(reporter, path, filename); 4653 testSimplify(reporter, path, filename);
4654 } 4654 }
4655 4655
4656 static void (*firstTest)(skiatest::Reporter* , const char* filename) = testQuadr atic56; 4656 static void testQuadralateral10(skiatest::Reporter* reporter, const char* filena me) {
4657 SkPath path;
4658 path.setFillType(SkPath::kWinding_FillType);
4659 path.moveTo(0, 0);
4660 path.lineTo(0, 0);
4661 path.lineTo(0, 0);
4662 path.lineTo(2, 2);
4663 path.close();
4664 path.moveTo(1, 0);
4665 path.lineTo(1, 1);
4666 path.lineTo(2, 2);
4667 path.lineTo(1, 3);
4668 path.close();
4669 testSimplify(reporter, path, filename);
4670 }
4671
4672 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
4657 4673
4658 static TestDesc tests[] = { 4674 static TestDesc tests[] = {
4675 TEST(testQuadralateral10),
4659 TEST(testQuads61), 4676 TEST(testQuads61),
4660 TEST(testQuads60), 4677 TEST(testQuads60),
4661 TEST(testQuads59), 4678 TEST(testQuads59),
4662 TEST(testQuads58), 4679 TEST(testQuads58),
4663 TEST(testQuads57), 4680 TEST(testQuads57),
4664 TEST(testQuads56), 4681 TEST(testQuads56),
4665 TEST(testQuads54), 4682 TEST(testQuads54),
4666 TEST(testQuads53), 4683 TEST(testQuads53),
4667 TEST(testQuads52), 4684 TEST(testQuads52),
4668 TEST(testQuads51), 4685 TEST(testQuads51),
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
5087 5104
5088 DEF_TEST(PathOpsSimplify, reporter) { 5105 DEF_TEST(PathOpsSimplify, reporter) {
5089 if (runSubTests && runSubTestsFirst) { 5106 if (runSubTests && runSubTestsFirst) {
5090 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse); 5107 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse);
5091 } 5108 }
5092 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); 5109 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse);
5093 if (runSubTests && !runSubTestsFirst) { 5110 if (runSubTests && !runSubTestsFirst) {
5094 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse); 5111 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse);
5095 } 5112 }
5096 } 5113 }
OLDNEW
« no previous file with comments | « tests/PathOpsOpTest.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698