From 502c3ffce8eb6f4b9dadfb4825ef3f4e13bb4bd1 Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Tue, 3 Jul 2018 18:10:39 -0400 Subject: [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 Commit-Queue: Florin Malita --- modules/skottie/src/Skottie.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules') 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 AttachPath(const skjson::Value& jpath, AttachContext* ctx) { auto path_node = sksg::Path::Make(); return BindProperty(jpath, &ctx->fAnimators, [path_node](const ShapeValue& p) { - path_node->setPath(ValueTraits::As(p)); + // FillType is tracked in the SG node, not in keyframes -- make sure we preserve it. + auto path = ValueTraits::As(p); + path.setFillType(path_node->getFillType()); + path_node->setPath(path); }) ? path_node : nullptr; -- cgit v1.2.3