[skottie] Make stroke width optional

TBR=
Change-Id: I432a79b652ffd5838829f32980e2dcca55d57af4
Reviewed-on: https://skia-review.googlesource.com/141283
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2018-07-13 14:08:14 -04:00 committed by Skia Commit-Bot
parent 36848f6b30
commit a487b0677a

View File

@ -324,12 +324,10 @@ sk_sp<sksg::PaintNode> AttachStroke(const skjson::ObjectValue& jstroke, AttachCo
stroke_node->setStyle(SkPaint::kStroke_Style);
auto width_attached = BindProperty<ScalarValue>(jstroke["w"], &ctx->fAnimators,
BindProperty<ScalarValue>(jstroke["w"], &ctx->fAnimators,
[stroke_node](const ScalarValue& w) {
stroke_node->setStrokeWidth(w);
});
if (!width_attached)
return nullptr;
stroke_node->setStrokeMiter(ParseDefault<SkScalar>(jstroke["ml"], 4.0f));