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

Side by Side Diff: tests/PathOpsBuilderTest.cpp

Issue 1218863005: don't fix winding for empty paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/pathops/SkOpSpan.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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 path.lineTo(59, 11); 128 path.lineTo(59, 11);
129 path.lineTo(41, 11); 129 path.lineTo(41, 11);
130 130
131 SkOpBuilder builder; 131 SkOpBuilder builder;
132 builder.add(path, kUnion_SkPathOp); 132 builder.add(path, kUnion_SkPathOp);
133 SkPath result; 133 SkPath result;
134 builder.resolve(&result); 134 builder.resolve(&result);
135 int pixelDiff = comparePaths(reporter, __FUNCTION__, path, result); 135 int pixelDiff = comparePaths(reporter, __FUNCTION__, path, result);
136 REPORTER_ASSERT(reporter, pixelDiff == 0); 136 REPORTER_ASSERT(reporter, pixelDiff == 0);
137 } 137 }
138
139 DEF_TEST(BuilderIssue502792_2, reporter) {
140 SkPath path, pathB;
141 path.setFillType(SkPath::kWinding_FillType);
142 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
143 path.addRect(2, 2, 3, 3, SkPath::kCW_Direction);
144 pathB.setFillType(SkPath::kEvenOdd_FillType);
145 pathB.addRect(3, 3, 4, 4, SkPath::kCW_Direction);
146 pathB.addRect(3, 3, 4, 4, SkPath::kCW_Direction);
147 SkOpBuilder builder;
148 builder.add(path, kUnion_SkPathOp);
149 builder.add(pathB, kDifference_SkPathOp);
150 SkPath result;
151 builder.resolve(&result);
152 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpSpan.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698