[vlc-commits] [Git][videolan/vlc][master] qt: correct incorrect comments in `VideoSurface`

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Nov 7 09:08:48 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
e892cb38 by Fatih Uzunoglu at 2026-11-07T09:44:17+01:00
qt: correct incorrect comments in `VideoSurface`

Docs note that `QQuickItem::updatePaintNode()`
is called when `ItemHasContents` flag is set,
which may be also the case when the item is
not visible.

- - - - -


1 changed file:

- modules/gui/qt/maininterface/videosurface.cpp


Changes:

=====================================
modules/gui/qt/maininterface/videosurface.cpp
=====================================
@@ -290,8 +290,8 @@ void VideoSurface::itemChange(ItemChange change, const ItemChangeData &value)
         {
             // It is intentional that window connection is made in `::updatePaintNode()`, and not here, because we don't
             // want to explicitly connect whenever `ItemHasContents`, `isVisible()`, `window()` are all satisfied, which
-            // is implicitly the case with `::updatePaintNode()` (it is only called when all these are satisfied). This
-            // is strictly for maintenance reasons.
+            // is implicitly the case except `isVisible()` in `::updatePaintNode()`. We can check only for `isVisible()`
+            // there and establish the connection. This is strictly for maintenance reasons.
 
             disconnect(m_synchConnection);
 
@@ -314,7 +314,7 @@ void VideoSurface::itemChange(ItemChange change, const ItemChangeData &value)
         {
             if (!value.boolValue)
             {
-                // Connection is made in `::updatePaintNode()` (which is called when both the item is visible and `ItemHasContents` is set).
+                // Connection is made in `::updatePaintNode()`:
                 disconnect(m_synchConnection);
             }
             break;
@@ -376,7 +376,7 @@ void VideoSurface::setVideoSurfaceProvider(VideoSurfaceProvider *newVideoSurface
     else
     {
         setFlag(ItemHasContents, false);
-        // Connection is made in `::updatePaintNode()` (which is called when both the item is visible and `ItemHasContents` is set).
+        // Connection is made in `::updatePaintNode()`:
         disconnect(m_synchConnection);
     }
 
@@ -396,7 +396,6 @@ QSGNode *VideoSurface::updatePaintNode(QSGNode *node, UpdatePaintNodeData *data)
     if (Q_UNLIKELY(!m_provider))
         return node;
 
-    // WARNING: For some reason `::updatePaintNode()` is called initially when the item is invisible.
     if (!m_synchConnection && isVisible())
     {
         // Disconnection is made in `::itemChange()`'s `ItemSceneChange` handler.



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e892cb38b7a86b28f6e66d709d357bfd1f52e8ea

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e892cb38b7a86b28f6e66d709d357bfd1f52e8ea
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list