mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Fix animated images rendering offscreen for the first frame
This commit is contained in:
parent
c9bcf3a7c0
commit
b3c78ea81a
1 changed files with 3 additions and 1 deletions
|
@ -175,7 +175,9 @@ MxcAnimatedImage::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeD
|
||||||
if (!imageDirty)
|
if (!imageDirty)
|
||||||
return oldNode;
|
return oldNode;
|
||||||
|
|
||||||
if (clipRect().isEmpty())
|
// If the image is offscreen, just return the old node (if it exists) to save on animation CPU
|
||||||
|
// use. Don't return null here, or you will never be called again.
|
||||||
|
if (clipRect().isEmpty() && oldNode)
|
||||||
return oldNode;
|
return oldNode;
|
||||||
|
|
||||||
imageDirty = false;
|
imageDirty = false;
|
||||||
|
|
Loading…
Reference in a new issue