Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
b566d715 by Fatih Uzunoglu at 2026-01-22T15:35:45+00:00
qml: introduce property `effectiveTextureProviderItem` in `ImageExt`
- - - - -
ce998652 by Fatih Uzunoglu at 2026-01-22T15:35:45+00:00
qml: ensure that the texture is available before signaling readiness in
`DragItem`
`Image.Ready` does not necessarily mean that the texture is available. However,
we can use `TextureProviderObserver` to check if the texture is ready.
This is mostly a concern when the source is not a texture provider, that is,
when an image needs to be loaded and a texture needs to be generated within
the drag item.
- - - - -
2 changed files:
- modules/gui/qt/widgets/qml/DragItem.qml
- modules/gui/qt/widgets/qml/ImageExt.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/DragItem.qml
=====================================
@@ -521,7 +521,12 @@ Item {
}
}
- readonly property var _combinedStatus: [status, shaderStatus]
+ TextureProviderObserver {
+ id: tpObserver
+ source: artworkCover.effectiveTextureProviderItem
+ }
+
+ readonly property var _combinedStatus: [status, shaderStatus,
tpObserver.isValid]
on_CombinedStatusChanged: {
// Qt `ShaderEffect` documentation states:
@@ -543,7 +548,7 @@ Item {
} else {
source = fallbackSource
}
- } else if (status === Image.Ready /* && shaderStatus ===
ShaderEffect.Compiled */) {
+ } else if (status === Image.Ready && tpObserver.isValid /*
&& shaderStatus === ShaderEffect.Compiled */) {
// FIXME: When Qt starts to report
`ShaderEffect.Compiled` properly, start using it.
_triggerReadiness = true // Only in this case the
image is loaded and shown.
}
=====================================
modules/gui/qt/widgets/qml/ImageExt.qml
=====================================
@@ -74,10 +74,12 @@ Item {
// a source url, or the source url may also be lost and not
tracked anymore).
property Item textureProviderItem: sourceTextureProviderItem
+ readonly property Item effectiveTextureProviderItem: shaderEffect.source
+
// NOTE: If the texture provider used does not require `ImageExt` to
load the image, this
// should be disabled.
// WARNING: In non-RHI mode, this setting is not respected.
- property bool loadImages: (shaderEffect.source === image)
+ property bool loadImages: (effectiveTextureProviderItem === image)
// Padding represents how much the content is shrunk. For now this is a
readonly property.
// Currently it only takes the `softEdgeMax` into calculation, as that's
what the shader
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/ad56aa72ebc4cd35ad1167d74ecbd7c06056f420...ce9986523f3f5ef63299b9c73136153d7a79e274
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/ad56aa72ebc4cd35ad1167d74ecbd7c06056f420...ce9986523f3f5ef63299b9c73136153d7a79e274
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits