mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-12 15:34:22 +00:00
lottie: hotfix with an intermediate patch merge.
This commit is contained in:
parent
ecec838006
commit
859cac20dd
2 changed files with 3 additions and 3 deletions
|
@ -1070,7 +1070,7 @@ static void _updateSolid(LottieLayer* layer)
|
||||||
static void _updateImage(LottieGroup* layer)
|
static void _updateImage(LottieGroup* layer)
|
||||||
{
|
{
|
||||||
auto image = static_cast<LottieImage*>(layer->children.first());
|
auto image = static_cast<LottieImage*>(layer->children.first());
|
||||||
layer->scene->push(tvg::cast(image->pooling()));
|
layer->scene->push(tvg::cast(image->pooling(true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ struct LottieRenderPooler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
T* pooling()
|
T* pooling(bool copy = false)
|
||||||
{
|
{
|
||||||
//return available one.
|
//return available one.
|
||||||
for (auto p = pooler.begin(); p < pooler.end(); ++p) {
|
for (auto p = pooler.begin(); p < pooler.end(); ++p) {
|
||||||
|
@ -48,7 +48,7 @@ struct LottieRenderPooler
|
||||||
}
|
}
|
||||||
|
|
||||||
//no empty, generate a new one.
|
//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();
|
PP(p)->ref();
|
||||||
pooler.push(p);
|
pooler.push(p);
|
||||||
return p;
|
return p;
|
||||||
|
|
Loading…
Add table
Reference in a new issue