qt: use non-branching fragment shader in window shadow effect if window is opaque
The hollow shader discards the pixels that are in the interior area. It is known that branching in fragment shader should be avoided if possible.
By checking if the window is opaque, we can disable hollowing and use it only if the window is translucent or transparent (due to window backdrop blur effect).
The glow effect should not act as a filter for the window backdrop blur, it is only used for providing a glow effect around the edges. This was the reason of coming up with the possibility of hollowing.
Currently, areas of the interface that want to show the window backdrop effect use a hack to "punch a hole" as they are placed deep down in the scene graph hierarchy and in certain cases parent item(s) provide background color.
This hack is done by simply disabling blending but still painting with
translucent colors (see ViewBlockingRectangle
). In this case, it does
not really matter if the glow effect here is hollow or not, because the
areas that want to pass the backdrop effect disabling blending means that
the glow effect would not be visible behind those areas anyway.
However, "punching hole" hack has been used as a convenience when it is necessary. In the future, the areas that want to pass the backdrop effect should placed in the scene graph hierarchy so that there is no item in beneath that is opaque. This is possibly impossible for the PIP player, but there are currently places in the interface that this can be done, such as the top bar. So, for these cases, we need hollowing so that the glow effect does not appear (and act as a filter) in the interface main area.
Request review @chub.
Merge request reports
Activity
added 1 commit
- 184e3d44 - qml: make window glow effect hollow only when the window is translucent
added MRStatus::Reviewable label
added 1 commit
- d9a3b2ab - qml: make window glow effect hollow only when the window is translucent
changed milestone to %4.0
added Component::Interface: Qt label
- Resolved by Pierre Lamot
By checking if the window is opaque, we can disable hollowing and use it only if the window is translucent or transparent (due to window backdrop blur effect).
win7 compositor also relies on transparent window. Did you check with this?
added MRStatus::InReview label and removed MRStatus::Reviewable label
added MRStatus::Acceptable label and removed MRStatus::InReview label
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, have votes and score > 0 -
MergeRequest should have no activity (threads/votes) for (72h/72h)
-
added 179 commits
-
d9a3b2ab...f8fc5b85 - 178 commits from branch
videolan:master
- 7c9fef82 - qml: make window glow effect hollow only when the window is translucent
-
d9a3b2ab...f8fc5b85 - 178 commits from branch
enabled an automatic merge when all merge checks for 7c9fef82 pass