diff options
author | Florin Malita <fmalita@chromium.org> | 2018-07-16 14:20:51 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-16 18:43:39 +0000 |
commit | c45a5c559365b2e04c89a3ef09752e5c1bb24aa2 (patch) | |
tree | 54548c2ad7065d0df6b6280fce2868071611fbf2 | |
parent | 71ed661963ba57200e6f9b3d5ad64105b607bb98 (diff) |
[skottie] Treat color properties as optional (default black)
TBR=
Change-Id: I51029b5718ec9925c214709ae4e3497dae130d37
Reviewed-on: https://skia-review.googlesource.com/141544
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
-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 20390eedc5..760d9c52fa 100644 --- a/modules/skottie/src/Skottie.cpp +++ b/modules/skottie/src/Skottie.cpp @@ -254,12 +254,12 @@ sk_sp<sksg::GeometryNode> AttachPolystarGeometry(const skjson::ObjectValue& jsta sk_sp<sksg::Color> AttachColor(const skjson::ObjectValue& jcolor, AttachContext* ctx) { auto color_node = sksg::Color::Make(SK_ColorBLACK); - auto color_attached = BindProperty<VectorValue>(jcolor["c"], &ctx->fAnimators, + BindProperty<VectorValue>(jcolor["c"], &ctx->fAnimators, [color_node](const VectorValue& c) { color_node->setColor(ValueTraits<VectorValue>::As<SkColor>(c)); }); - return color_attached ? color_node : nullptr; + return color_node; } sk_sp<sksg::Gradient> AttachGradient(const skjson::ObjectValue& jgrad, AttachContext* ctx) { |