[skottie] Handle null mask filter effects gracefully

We allow animating the mask filters, so we can end up with null filters
sometimes.

TBR=
Change-Id: Id93aa033407f58bfeb5e059210141c936c356701
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256697
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2019-11-26 13:40:35 -05:00 committed by Skia Commit-Bot
parent 882115da6b
commit 466f571a51

View File

@ -142,7 +142,7 @@ RenderNode::ScopedRenderContext::modulateMaskFilter(sk_sp<SkMaskFilter> mf, cons
// => T = Inv(maskCTM) x ctm
//
SkMatrix invMaskCTM;
if (fCtx.fMaskCTM.invert(&invMaskCTM)) {
if (mf && fCtx.fMaskCTM.invert(&invMaskCTM)) {
const auto relative_transform = SkMatrix::Concat(invMaskCTM, ctm);
fCtx.fMaskFilter = SkMaskFilter::MakeCompose(std::move(fCtx.fMaskFilter),
mf->makeWithMatrix(relative_transform));