[vlc-commits] [Git][videolan/vlc][master] qt: do not call `QSGTextureView::adjustNormalRect()` when there is no texture

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Jul 26 15:16:30 UTC 2025



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


Commits:
e5ef5bbc by Fatih Uzunoglu at 2025-07-26T14:20:30+00:00
qt: do not call `QSGTextureView::adjustNormalRect()` when there is no texture

It is illegal to call `::adjustNormalRect()` without a texture bound, as
normalization depends on the texture size.

This is already satisfied in `QSGTextureView::setRect()`, but it seems I
forgot this here.

- - - - -


1 changed file:

- modules/gui/qt/util/qsgtextureview.cpp


Changes:

=====================================
modules/gui/qt/util/qsgtextureview.cpp
=====================================
@@ -59,9 +59,16 @@ void QSGTextureView::setTexture(QSGTexture *texture)
             connect(texture, SIGNAL(updateRequested()), this, SLOT(adjustNormalRect()));
             connect(texture, SIGNAL(updateRequested()), this, SIGNAL(updateRequested()));
         }
+
+        adjustNormalRect();
+    }
+    else
+    {
+        // Invalidate the normal rect, so that it is calculated via
+        // `normalizedTextureSubRect()` when there is a texture:
+        m_normalRect.reset();
     }
 
-    adjustNormalRect();
     emit updateRequested();
 }
 



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e5ef5bbc6cf70b5fa4d8805e59fd968ff90f7612
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list