aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrShape.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-05-04 13:50:29 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-04 13:50:29 -0700
commit06077565b18714ff3fc0db9118e2c21f6f25243f (patch)
treeb5b250ce3600dc4fd67ebea5d7096ec1779bc133 /src/gpu/GrShape.cpp
parent345242671587d7273819bfe423be96e4392033e3 (diff)
Make cap only affect the keys of GrShapes that are possibly-open
Diffstat (limited to 'src/gpu/GrShape.cpp')
-rw-r--r--src/gpu/GrShape.cpp8
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);
}
}