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

Unified Diff: src/gpu/GrShape.h

Issue 2067283003: Apply canonicalizations to path GrShapes. (Closed) Base URL: https://chromium.googlesource.com/skia.git@intermediate_grshape
Patch Set: fix indentation 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 6086537a99547daf3780523940905c35be734c0c..1ed69ba6e89d023c9cc0f6cc3caffb2ff3d73cec 100644
--- a/src/gpu/GrShape.h
+++ b/src/gpu/GrShape.h
@@ -188,8 +188,11 @@ public:
case Type::kRRect:
out->reset();
out->addRRect(fRRect, fRRectDir, fRRectStart);
+ // Below matches the fill type that attemptToSimplifyPath uses.
if (fRRectIsInverted) {
- out->setFillType(SkPath::kInverseWinding_FillType);
+ out->setFillType(SkPath::kInverseEvenOdd_FillType);
+ } else {
+ out->setFillType(SkPath::kEvenOdd_FillType);
}
break;
case Type::kPath:
@@ -279,7 +282,6 @@ private:
void setInheritedKey(const GrShape& parentShape, GrStyle::Apply, SkScalar scale);
void attemptToSimplifyPath();
-
void attemptToSimplifyRRect();
static constexpr SkPath::Direction kDefaultRRectDir = SkPath::kCW_Direction;
@@ -333,6 +335,8 @@ private:
unsigned fRRectStart;
bool fRRectIsInverted;
SkTLazy<SkPath> fPath;
+ // Gen ID of the original path (fPath may be modified)
+ int32_t fPathGenID = 0;
GrStyle fStyle;
SkAutoSTArray<8, uint32_t> fInheritedKey;
};
« 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