mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
loader/lottie: do not build layers if the frame is out.
This commit is contained in:
parent
86aabb4df0
commit
5778bda4db
1 changed files with 10 additions and 0 deletions
|
@ -43,6 +43,16 @@ static bool _invisible(LottieGroup* group, int32_t frameNo)
|
|||
else return false;
|
||||
}
|
||||
|
||||
static bool _invisible(LottieLayer* layer, int32_t frameNo)
|
||||
{
|
||||
if (frameNo < layer->inFrame || frameNo > layer->outFrame) {
|
||||
if (layer->scene) layer->scene->opacity(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
return _invisible(static_cast<LottieGroup*>(layer), frameNo);
|
||||
}
|
||||
|
||||
|
||||
static bool _updateTransform(LottieTransform* transform, int32_t frameNo, bool autoOrient, Matrix& matrix, uint8_t& opacity)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue