[vlc-commits] [Git][videolan/vlc][master] qt: use mipmap filtering by default if source is mipmapped in `TextureProviderItem`
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Sep 8 15:10:02 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
bab4f984 by Fatih Uzunoglu at 2025-09-08T14:41:14+00:00
qt: use mipmap filtering by default if source is mipmapped in `TextureProviderItem`
This fixes the regression in 0e5200bc where it made mip map filtering off by default
for mipmapped source textures (unless `mipmap: TextureProviderItem.Linear` is used,
which we do not want in each case explicitly).
This is not really a bug, but I consider this a regression because it is hard to
justify not using mipmap filtering when the texture has mip maps.
- - - - -
2 changed files:
- modules/gui/qt/widgets/native/textureprovideritem.cpp
- modules/gui/qt/widgets/native/textureprovideritem.hpp
Changes:
=====================================
modules/gui/qt/widgets/native/textureprovideritem.cpp
=====================================
@@ -235,7 +235,6 @@ void QSGTextureViewProvider::setMipmapFiltering(QSGTexture::Filtering filter)
if (targetTexture && !targetTexture->hasMipmaps())
{
// Having mip map filtering when there are no mip maps may be problematic with certain graphics backends (like OpenGL).
- qWarning() << this << "Enabling mip map filtering is blocked if the target texture has no mip maps.";
return;
}
}
=====================================
modules/gui/qt/widgets/native/textureprovideritem.hpp
=====================================
@@ -139,7 +139,8 @@ private:
std::atomic<QSGTexture::WrapMode> m_horizontalWrapMode = QSGTexture::ClampToEdge;
std::atomic<QSGTexture::WrapMode> m_verticalWrapMode = QSGTexture::ClampToEdge;
// When there are mip maps, no mip map filtering should be fine (unlike no mip maps with mip map filtering):
- std::atomic<QSGTexture::Filtering> m_mipmapFiltering = QSGTexture::None;
+ // But we want to have mip map filtering by default if the texture has mip maps (if not, it won't be respected):
+ std::atomic<QSGTexture::Filtering> m_mipmapFiltering = QSGTexture::Linear;
};
#endif // TEXTUREPROVIDERITEM_HPP
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bab4f9848ea8a5573a60984128b1f7f51068c26e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bab4f9848ea8a5573a60984128b1f7f51068c26e
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