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

Unified Diff: src/gpu/GrShape.h

Issue 2085913003: Canonicalize path fill types for stroked paths in GrShape. (Closed) Base URL: https://chromium.googlesource.com/skia.git@canonicalize_paths
Patch Set: minor cleanup Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrShape.cpp » ('j') | src/gpu/GrShape.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrShape.h
diff --git a/src/gpu/GrShape.h b/src/gpu/GrShape.h
index 1ed69ba6e89d023c9cc0f6cc3caffb2ff3d73cec..6b4e46fb82c21fe147221e5754c4ef6e0d10830a 100644
--- a/src/gpu/GrShape.h
+++ b/src/gpu/GrShape.h
@@ -190,9 +190,9 @@ public:
out->addRRect(fRRect, fRRectDir, fRRectStart);
// Below matches the fill type that attemptToSimplifyPath uses.
if (fRRectIsInverted) {
- out->setFillType(SkPath::kInverseEvenOdd_FillType);
+ out->setFillType(kDefaultPathInverseFillType);
} else {
- out->setFillType(SkPath::kEvenOdd_FillType);
+ out->setFillType(kDefaultPathFillType);
}
break;
case Type::kPath:
@@ -284,6 +284,11 @@ private:
void attemptToSimplifyPath();
void attemptToSimplifyRRect();
+ // Defaults to use when there is no distinction between even/odd and winding fills.
+ static constexpr SkPath::FillType kDefaultPathFillType = SkPath::kEvenOdd_FillType;
+ static constexpr SkPath::FillType kDefaultPathInverseFillType =
+ SkPath::kInverseEvenOdd_FillType;
+
static constexpr SkPath::Direction kDefaultRRectDir = SkPath::kCW_Direction;
static constexpr unsigned kDefaultRRectStart = 0;
« no previous file with comments | « no previous file | src/gpu/GrShape.cpp » ('j') | src/gpu/GrShape.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698