This is an optimization case for opaque background color.
With custom blending, we could potentially achieve the same
even if the background is not opaque, but that requires more
investigation since in such a case, not only the view elements
would be affected but the whole primitives drawn before in the
same area, while the fading edge effect should only be applied
to the primitives of the view (and not the background).
If the effect is not live, we can update the source texture sizes of the
layers once. There is no need to constantly update the texture sizes in
non-live case, because the textures do not change.
The important animation here is the size animation, opacity
animation is something that is not really important.
We do not want to animate the opacity at initialization. In
other cases, we often enable the behavior when the component
completes, so that at initialization opacity change is not
animated. Since the animation is not important, we can just
get rid of it instead.
The binding was made delayed to fix a binding loop, which was
not symptomatic. This delay causes the scroll bar to appear
intermittently.
I no longer get the warning without the delay, so it seems
safe to get rid of the delay. Besides, there seems no apparent
reason to have a binding loop here, footer's (y) position
should not depend on footer's height to cause a binding loop.
It is generally advised to avoid branching in fragment shader,
but in this case the condition is a uniform value, so it is
not terrible to do this. This way, we avoid the unnecessary
crop calculations.
An alternative to this would be generating new shaders with
preprocessor defines to avoid branching. Considering we already
have a branch for `borderRange`, we might as well have branches
for crop rates.
Otherwise bounds are not correctly calculated for certain cases, such as
having a header with overlay positioning. Currently this bug does not
seem to be exposed, though.
It's not supported in FFMpeg 8.0 since 60.40.100.
It used to be used with preallocated packet buffers with
the old encode API, but said API is no more and therefore
there is no reason for this to be public any more.
So deprecate it and use an internal replacement
for the encoders using it as an upper bound for the
size of their headers.
If `textureProviderItem` is overridden but set to null,
the `ShaderEffect` is going to use the default `Image`
as the texture provider. In that case, `Image` should
load the image.