aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-07-03 18:10:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-03 22:36:27 +0000
commit502c3ffce8eb6f4b9dadfb4825ef3f4e13bb4bd1 (patch)
tree4f37eb976a880ee543a7c32e42109743ca2f732e /modules
parent3e95e578c255e8b854d7997a47b74b1b03f1346f (diff)
[skottie] Do not discard SkPath's FillType when interpolating
The fill type is not reflected in shape keyframes, but it is tracked in the scene graph. Make sure we don't overwrite when interpolating. TBR= Change-Id: I281a61c3f4181ce34f772b36b83d0c7a64e265f6 Reviewed-on: https://skia-review.googlesource.com/139176 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'modules')
-rw-r--r--modules/skottie/src/Skottie.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/skottie/src/Skottie.cpp b/modules/skottie/src/Skottie.cpp
index 69f595fd48..6cfeddcfce 100644
--- a/modules/skottie/src/Skottie.cpp
+++ b/modules/skottie/src/Skottie.cpp
@@ -150,7 +150,10 @@ sk_sp<sksg::Path> AttachPath(const skjson::Value& jpath, AttachContext* ctx) {
auto path_node = sksg::Path::Make();
return BindProperty<ShapeValue>(jpath, &ctx->fAnimators,
[path_node](const ShapeValue& p) {
- path_node->setPath(ValueTraits<ShapeValue>::As<SkPath>(p));
+ // FillType is tracked in the SG node, not in keyframes -- make sure we preserve it.
+ auto path = ValueTraits<ShapeValue>::As<SkPath>(p);
+ path.setFillType(path_node->getFillType());
+ path_node->setPath(path);
})
? path_node
: nullptr;