qt: optimize the frosted glass effect by not using second pass layering
Currently layering (second pass) is used to render the blurred source offscreen, and then apply the rest of the effects (tint, exclusion and noise) to the offscreen source when drawing the result in the interface.
This is not ideal, because layering requires allocating resources for offscreen rendering.
The most ideal solution would be to modify the fragment shader of the blur effect. But we currently do not do run time shader compilation, and MultiEffect does not accept overriding its shader effect.
At the same time, FastBlur from Qt 5 Compat is used as fallback when Qt Quick Effects is not available. In a hypothetical scenario where we could override the fragment shader, it would mean that we would need to handle these two cases differently because MultiEffect and FastBlur use different shaders.
As a workaround, I propose having an underlay filter rectangle that acts as exclusion (due to opacity) and colorization (tint), and having an overlay as the noise layer.
Request review @chub.