lottie: hotfix with an intermediate patch merge.

This commit is contained in:
Hermet Park 2024-07-22 12:22:27 +09:00
parent ecec838006
commit 859cac20dd
2 changed files with 3 additions and 3 deletions

View file

@ -1070,7 +1070,7 @@ static void _updateSolid(LottieLayer* layer)
static void _updateImage(LottieGroup* layer)
{
auto image = static_cast<LottieImage*>(layer->children.first());
layer->scene->push(tvg::cast(image->pooling()));
layer->scene->push(tvg::cast(image->pooling(true)));
}

View file

@ -40,7 +40,7 @@ struct LottieRenderPooler
}
}
T* pooling()
T* pooling(bool copy = false)
{
//return available one.
for (auto p = pooler.begin(); p < pooler.end(); ++p) {
@ -48,7 +48,7 @@ struct LottieRenderPooler
}
//no empty, generate a new one.
auto p = static_cast<T*>(pooler[0]->duplicate());
auto p = copy ? static_cast<T*>(pooler[0]->duplicate()) : T::gen().release();
PP(p)->ref();
pooler.push(p);
return p;