diff options
author | Florin Malita <fmalita@chromium.org> | 2018-01-21 11:13:17 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-21 16:46:51 +0000 |
commit | ee6de4b5fac0ab2adbb7789c16acef8e35062f7b (patch) | |
tree | a138eadb036279dfe680d011ea059fbf1430e90f | |
parent | 739641580fe6c17534a73a2cd903e7e854a1ba27 (diff) |
[skottie] Only apply effects to non-empty geometry stacks
TBR=
Change-Id: Iaafd63c787b72cdf83b21bd39cc10d01612e435d
Reviewed-on: https://skia-review.googlesource.com/97662
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
-rw-r--r-- | experimental/skottie/Skottie.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/experimental/skottie/Skottie.cpp b/experimental/skottie/Skottie.cpp index 696f619f83..7a08cec9df 100644 --- a/experimental/skottie/Skottie.cpp +++ b/experimental/skottie/Skottie.cpp @@ -628,9 +628,11 @@ sk_sp<sksg::RenderNode> AttachShape(const Json::Value& jshape, AttachContext* ct case ShapeType::kGeometryEffect: { // Apply the current effect and pop from the stack. SkASSERT(rec->fInfo.fAttacherIndex < SK_ARRAY_COUNT(gGeometryEffectAttachers)); - geos = gGeometryEffectAttachers[rec->fInfo.fAttacherIndex](rec->fJson, - ctx, - std::move(geos)); + if (!geos.empty()) { + geos = gGeometryEffectAttachers[rec->fInfo.fAttacherIndex](rec->fJson, + ctx, + std::move(geos)); + } SkASSERT(geometryEffectStack->back().fJson == rec->fJson); SkASSERT(geometryEffectStack->back().fAttach == |