From c5ca7b4b12955e85d9a885fa4b6f975d77c4d250 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 25 Feb 2025 18:54:04 +0900 Subject: [PATCH] lottie: hotfix a regression a regression by the code refactoring: 5b30e2ad65135026eabec48b44960183dbe1fb73 --- src/loaders/lottie/tvgLottieBuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/loaders/lottie/tvgLottieBuilder.cpp b/src/loaders/lottie/tvgLottieBuilder.cpp index fb9bd3af..a2800cae 100644 --- a/src/loaders/lottie/tvgLottieBuilder.cpp +++ b/src/loaders/lottie/tvgLottieBuilder.cpp @@ -1177,6 +1177,7 @@ void LottieBuilder::updateMasks(LottieLayer* layer, float frameNo) //the first mask if (!pShape) { pShape = layer->pooling(); + pShape->reset(); auto compMethod = (method == MaskMethod::Subtract || method == MaskMethod::InvAlpha) ? MaskMethod::InvAlpha : MaskMethod::Alpha; //Cheaper. Replace the masking with a clipper if (layer->masks.count == 1 && compMethod == MaskMethod::Alpha) { @@ -1189,11 +1190,11 @@ void LottieBuilder::updateMasks(LottieLayer* layer, float frameNo) //Chain mask composition } else if (pMethod != method || pOpacity != opacity || (method != MaskMethod::Subtract && method != MaskMethod::Difference)) { auto shape = layer->pooling(); + shape->reset(); pShape->mask(shape, method); pShape = shape; } - pShape->reset(); pShape->trimpath(0.0f, 1.0f); pShape->strokeWidth(0.0f); pShape->fill(255, 255, 255, opacity);