Fix animated images rendering offscreen for the first frame

pull/1692/head
Nicolas Werner 9 months ago
parent c9bcf3a7c0
commit b3c78ea81a
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      src/ui/MxcAnimatedImage.cpp

@ -175,7 +175,9 @@ MxcAnimatedImage::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeD
if (!imageDirty)
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;
imageDirty = false;

Loading…
Cancel
Save