[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: do not attempt to release resources if `live` is set in `DualKawaseBlur`

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon May 11 11:27:23 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
7359f405 by Fatih Uzunoglu at 2026-05-11T10:50:18+00:00
qml: do not attempt to release resources if `live` is set in `DualKawaseBlur`

- - - - -
31cefe32 by Fatih Uzunoglu at 2026-05-11T10:50:18+00:00
qml: remove queued update request if `live` is turned on in `DualKawaseBlur`

- - - - -
02a55d1d by Fatih Uzunoglu at 2026-05-11T10:50:18+00:00
qml: exit the chained update if `live` is turned on in `DualKawaseBlur`

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/DualKawaseBlur.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/DualKawaseBlur.qml
=====================================
@@ -227,6 +227,11 @@ Item {
         if (live) {
             ds1layer.parent = root
             ds2layer.inhibitParent = false
+
+            if (root._queuedScheduledUpdate) {
+                console.debug(root, "scheduleUpdate(): `live` is turned on, canceling the scheduled update.")
+                root._queuedScheduledUpdate = false
+            }
         } else {
             root.scheduleUpdate() // this triggers releasing intermediate layers (when applicable)
         }
@@ -378,6 +383,16 @@ Item {
             if (!ds2layer) // context is lost, Qt bug (reproduced with 6.2)
                 return
 
+            if (root._window) {
+                root._window.afterAnimating.disconnect(ds2layer, ds2layer.scheduleChainedUpdate)
+            }
+
+            // If `live` is turned on during a chained update, we do not need to continue:
+            if (root.live) {
+                root._window = null
+                return
+            }
+
             ds2.sourceTextureSize = ds2.tpObserver.nativeTextureSize
             if (ds2.ensurePolished)
                 ds2.ensurePolished()
@@ -386,7 +401,6 @@ Item {
             ds2layer.scheduleUpdate()
 
             if (root._window) {
-                root._window.afterAnimating.disconnect(ds2layer, ds2layer.scheduleChainedUpdate)
                 root._window.afterAnimating.connect(us1layer, us1layer.scheduleChainedUpdate)
             }
         }
@@ -424,6 +438,16 @@ Item {
             if (!us1layer) // context is lost, Qt bug (reproduced with 6.2)
                 return
 
+            if (root._window) {
+                root._window.afterAnimating.disconnect(us1layer, us1layer.scheduleChainedUpdate)
+            }
+
+            // If `live` is turned on during a chained update, we do not need to continue:
+            if (root.live) {
+                root._window = null
+                return
+            }
+
             us1.sourceTextureSize = us1.tpObserver.nativeTextureSize
             if (us1.ensurePolished)
                 us1.ensurePolished()
@@ -431,7 +455,6 @@ Item {
             us1layer.scheduleUpdate()
 
             if (root._window) {
-                root._window.afterAnimating.disconnect(us1layer, us1layer.scheduleChainedUpdate)
                 root._window.afterAnimating.connect(us1layer, us1layer.releaseResourcesOfIntermediateLayers)
             }
         }
@@ -440,6 +463,19 @@ Item {
             if (!ds1layer || !ds2layer) // context is lost, Qt bug (reproduced with 6.2)
                 return
 
+            if (root._window) {
+                root._window.afterAnimating.disconnect(us1layer, us1layer.releaseResourcesOfIntermediateLayers)
+                root._window = null
+            }
+
+            // If `live` is turned on during a chained update, we should not attempt to
+            // release resources by removing layers from the scene, because turning live
+            // on already brings the layer to the scene and doing so would make the
+            // last layer (`us1layer`) being live while having a `sourceItem` that is
+            // not in the scene anymore:
+            if (root.live)
+                return
+
             us2.sourceTextureSize = us2.tpObserver.nativeTextureSize
 
             // Last layer is updated, now it is time to release the intermediate buffers:
@@ -449,11 +485,6 @@ Item {
             ds1layer.parent = null
             ds2layer.inhibitParent = true
 
-            if (root._window) {
-                root._window.afterAnimating.disconnect(us1layer, us1layer.releaseResourcesOfIntermediateLayers)
-                root._window = null
-            }
-
             if (root._queuedScheduledUpdate) {
                 // Tried calling `scheduleUpdate()` before the ongoing chained updates completed.
                 root._queuedScheduledUpdate = false



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/43cf1d2a54999f2a74435c4d2e31b5268cd03d0f...02a55d1d2ce1231077ed9c76cbfd2057e218dcb3

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/43cf1d2a54999f2a74435c4d2e31b5268cd03d0f...02a55d1d2ce1231077ed9c76cbfd2057e218dcb3
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list