Skip to content

qt: enhance texture introspection and do not use blending if source texture has no alpha channel in kawase blur

Fatih Uzunoğlu requested to merge fuzun/vlc:qt/tpobservernewproperties into master

We should not need blending if the source texture has no alpha channel. We do not support transparentBorder unlike FastBlur, so blending should solely depend on whether the source texture has alpha channel or not.

Granted, textures generated from PNG images may have alpha channel even if transparency is not used, but we do not lose anything with disabling blending if there is no alpha channel. At the same time, textures generated from JPEG images can benefit from this optimization at all times (since I assume they can not have an alpha channel).

There are more places where we could selectively disable blending besides the blur effect, such as PartialEffect and ImageExt, but I decided that it is not worth it because PartialEffect is currently only used for item layers and layers always have an alpha channel (and in our case we can even know if the media library view layer uses transparency or not without probing alpha channel, as we decide the background color), and ImageExt is usually used to have rounding (it needs blending due to the transparent region, and even if we use custom geometry we would still need it due to AA unless MSAA is used).

Depends on !7589 (merged).

Merge request reports

Loading