diff options
author | Florin Malita <fmalita@chromium.org> | 2018-07-12 17:48:36 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-13 00:07:44 +0000 |
commit | 13ac194dbf9968d356e580b85420f1314f453a10 (patch) | |
tree | 98c6ff4760b2e48a47d7a72aead5a96b309de941 /modules | |
parent | ab5c9af442382fd05215a09f1814686710108880 (diff) |
[skottie] Fix matrix parenting for default/static values
When all matrix properties are static/default, we simply discard the
matrix node. But we cannot do that in the presence of a parent matrix.
TBR=
Change-Id: I56c62216f18786249dea063690261bfae83fabec
Reviewed-on: https://skia-review.googlesource.com/141127
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.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/skottie/src/Skottie.cpp b/modules/skottie/src/Skottie.cpp index 571cbd1d9d..88e42d4e58 100644 --- a/modules/skottie/src/Skottie.cpp +++ b/modules/skottie/src/Skottie.cpp @@ -80,7 +80,7 @@ sk_sp<sksg::Matrix> AttachMatrix(const skjson::ObjectValue& t, AttachContext* ct static const VectorValue g_default_vec_0 = { 0, 0}, g_default_vec_100 = {100, 100}; - auto matrix = sksg::Matrix::Make(SkMatrix::I(), std::move(parentMatrix)); + auto matrix = sksg::Matrix::Make(SkMatrix::I(), parentMatrix); auto adapter = sk_make_sp<TransformAdapter>(matrix); auto bound = BindProperty<VectorValue>(t["a"], &ctx->fAnimators, @@ -115,7 +115,7 @@ sk_sp<sksg::Matrix> AttachMatrix(const skjson::ObjectValue& t, AttachContext* ct adapter->setSkewAxis(sa); }, 0.0f); - return bound ? matrix : nullptr; + return bound ? matrix : parentMatrix; } sk_sp<sksg::RenderNode> AttachOpacity(const skjson::ObjectValue& jtransform, AttachContext* ctx, |