Fix animated images rendering offscreen for the first frame

This commit is contained in:
Nicolas Werner 2024-03-05 21:56:10 +01:00
parent c9bcf3a7c0
commit b3c78ea81a
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -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;