loader/lottie: fix a missing opacity propagation.

the propagated opacity size should be accumulated.
This commit is contained in:
Hermet Park 2023-09-14 10:54:30 +09:00
parent 5298f338de
commit 00ab8c254d

View file

@ -168,7 +168,7 @@ static void _updateTransform(LottieTransform* transform, int32_t frameNo, Render
auto pmatrix = PP(ctx.propagator)->transform();
ctx.propagator->transform(pmatrix ? mathMultiply(pmatrix, &matrix) : matrix);
ctx.propagator->opacity(opacity);
ctx.propagator->opacity(MULTIPLY(opacity, PP(ctx.propagator)->opacity));
}
@ -180,9 +180,6 @@ static void _updateGroup(LottieGroup* parent, LottieGroup* group, int32_t frameN
auto opacity = group->opacity(frameNo);
if (opacity == 0) return;
//TODO: move transform to layer.
if (group->transform) TVGERR("LOTTIE", "group transform is not working?!");
auto ctx2 = ctx;
_updateChildren(group, frameNo, ctx2);
}
@ -942,8 +939,6 @@ void LottieBuilder::build(LottieComposition* comp)
_buildPrecomp(comp, comp->root);
//TODO: Process repeater objects?
if (!update(comp, 0)) return;
//viewport clip