[vlc-commits] [Git][videolan/vlc][master] qt: fix chaining `QSGTextureView` if the master target is a sg layer
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sun Aug 24 14:18:17 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
f0051aa4 by Fatih Uzunoglu at 2025-08-24T13:47:35+00:00
qt: fix chaining `QSGTextureView` if the master target is a sg layer
This bug is currently not observed, as we are not chaining
texture views, but it is easy to have problems once we
start doing that (such as, layer -> view -> view).
I'm not happy being sub-class aware here, but there is not
much to do because `updateRequested()` signal is neither
part of the `QSGTexture` nor `QSGDynamicTexture` api.
Note that the targeting mechanism is level-blind here, i.e.,
if the view target is another view, it does not try to find
the master target and attach to it instead (internally or
not). Even though this means that dispatching is going to
be more cumbersome (such as `commitTextureOperations()`
would need to travel through all the views first), this is
intentional and will not change for the sake of maintenance,
as chains are not expected to be long.
- - - - -
1 changed file:
- modules/gui/qt/util/qsgtextureview.cpp
Changes:
=====================================
modules/gui/qt/util/qsgtextureview.cpp
=====================================
@@ -51,7 +51,8 @@ void QSGTextureView::setTexture(QSGTexture *texture)
{
resetState();
- if (texture->inherits("QSGLayer"))
+ // Maybe use `QMetaObject::indexOfSignal()` instead to probe `updateRequested()`?
+ if (qobject_cast<QSGTextureView*>(texture) || texture->inherits("QSGLayer"))
{
// Since Qt 5, it is guaranteed that slots are executed in the order they
// are connected. The order is important here, we want to emit `updateRequested()`
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f0051aa4594b5c079c519cf650430e876a2e11ef
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f0051aa4594b5c079c519cf650430e876a2e11ef
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