diff options
author | bsalomon <bsalomon@google.com> | 2016-05-04 13:50:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-04 13:50:29 -0700 |
commit | 06077565b18714ff3fc0db9118e2c21f6f25243f (patch) | |
tree | b5b250ce3600dc4fd67ebea5d7096ec1779bc133 /src/gpu/GrShape.cpp | |
parent | 345242671587d7273819bfe423be96e4392033e3 (diff) |
Make cap only affect the keys of GrShapes that are possibly-open
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1949193002
Review-Url: https://codereview.chromium.org/1949193002
Diffstat (limited to 'src/gpu/GrShape.cpp')
-rw-r--r-- | src/gpu/GrShape.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp index 3b49f6ae7f..84e14e8925 100644 --- a/src/gpu/GrShape.cpp +++ b/src/gpu/GrShape.cpp @@ -103,7 +103,11 @@ void GrShape::setInheritedKey(const GrShape &parent, GrStyle::Apply apply) { return; } } - int styleCnt = GrStyle::KeySize(parent.fStyle, apply); + uint32_t styleKeyFlags = 0; + if (parent.knownToBeClosed()) { + styleKeyFlags |= GrStyle::kClosed_KeyFlag; + } + int styleCnt = GrStyle::KeySize(parent.fStyle, apply, styleKeyFlags); if (styleCnt < 0) { // The style doesn't allow a key, set the path to volatile so that we fail when // we try to get a key for the shape. @@ -120,7 +124,7 @@ void GrShape::setInheritedKey(const GrShape &parent, GrStyle::Apply apply) { parentCnt * sizeof(uint32_t)); } // Now turn (geo,path_effect) or (geo) into (geo,path_effect,stroke) - GrStyle::WriteKey(fInheritedKey.get() + parentCnt, parent.fStyle, apply); + GrStyle::WriteKey(fInheritedKey.get() + parentCnt, parent.fStyle, apply, styleKeyFlags); } } |