Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
b5f1d577 by Fatih Uzunoglu at 2026-01-22T14:22:17+00:00
qt: use private rhi header as fallback in `TextureProviderObserver`
In Qt versions older than 6.6, this allows making use of rhi. One
may argue that this is risky to do, considering that there is
already a fallback mechanism that does not use rhi, however we
only use `QRhiTexture::pixelSize()` here which is not expected
to change any time soon.
I have tested this with Qt 6.2. This change effectively enables
using rhi to probe the native texture size for all Qt versions
we support, provided that gui-private is available. Some
distributions such as Debian provide it in a different package.
Currently we are not enforcing availability of Qt gui-private,
unless it is used for some functionality (for example video
integration). So, we still need to keep the legacy fallback
option here.
- - - - -
1 changed file:
- modules/gui/qt/util/textureproviderobserver.cpp
Changes:
=====================================
modules/gui/qt/util/textureproviderobserver.cpp
=====================================
@@ -23,6 +23,9 @@
#if __has_include(<rhi/qrhi.h>) // RHI is semi-public since Qt 6.6
#define RHI_HEADER_AVAILABLE
#include <rhi/qrhi.h>
+#elif __has_include(<QtGui/private/qrhi_p.h>)
+#define RHI_HEADER_AVAILABLE
+#include <QtGui/private/qrhi_p.h>
#endif
TextureProviderObserver::TextureProviderObserver(QObject *parent)
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/b5f1d577fdb625782011458ac5d12d9d5b1af7d0
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/b5f1d577fdb625782011458ac5d12d9d5b1af7d0
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