Skip to content

qml: use better blur implementation for shadows

Pierre Lamot requested to merge chub/vlc:qml/shadow-source-size into master

see individual commits, the purpose of this MR is:

  • being able to distinguish shadow sourceSize from the rendering size:
    • having the shadow item size being set by the effect itself is unsettling from the QML side, in the current code base, we ask the shadow to fill its parent, but the item ends up with a different size
    • this should fix some issues from !4404 (merged) as all metrics of the effect are in the referential of the sourceSize, so as long are the metrics remains coherent dpr shouldn't impact. At the moment the rendering size and source size are the same
    • this should fix issues @leon.vitanos is having in draft MR leon.vitanos/vlc!10 as shadow rendering size may change too often (source size can be fixed)
  • Double shadows are implemented as a custom effect, so the shadow is generated in one go, and rendered once by the engine (vs twice with the current implementation)
  • the qt_blurImage image implementation as been replaced by a (box) Gaussian blur implementation. The match to the original designs, the downside is that running the algorithm consumes more CPU. mitigations are possible if needed, like reducing/limiting the source size or not blurring the whole image for the smaller shadow in the double shadow.

this MR doesn't intend to replace !4404 (merged), even if some parts overlaps/conflicts with it. Think that many bits from !4404 (merged) are still relevant.

Merge request reports