summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/ui/MxcAnimatedImage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/MxcAnimatedImage.cpp b/src/ui/MxcAnimatedImage.cpp
index ffe54c71..f536b39f 100644
--- a/src/ui/MxcAnimatedImage.cpp
+++ b/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;