Qt Graphical Effects: Cache shaders between runs
In order to support multiple graphics backends, we generate qsb files
in the Qt 6 version of Qt Graphical Effects. For a few effects, like
anything depending on Gaussian Blur, this is done at runtime.
Generating these is expensive, and we were generating them once per
created item in the scene. Since the shaders will often be identical,
there is no need to do this. Instead, we cache them and reuse identical
shaders, even across runs.
As a failsafe, the environment variable QT_GFXSHADERBUILDER_REFRESH_CACHE
will force the cache to be updated.
Pick-to: 6.4
Fixes: QTBUG-107468
Change-Id: I94cab6cc6f528a4071833e3d66b50606e3200d97
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>