qt: introduce `QSGTextureView` and use it for zero-copy sub-texturing instead of layering
- I introduce a new view class for
QSGTexture
. - This class allows representing a sub-part of an already existing
QSGTexture
, without modifying the source texture. - Currently, we use layering to apply effect on the source. This is in addition to the initial layering for the source item, which makes it a texture provider.
- Although the layering for the effect area is not as expensive as the initial layer (because initial layer already makes a texture, second layer simply re-renders the texture in an offscreen buffer providing a new dynamic texture), it is still not necessary.
- Ideally this should be sent to upstream Qt, but that would take a long time. So we can merge it here.
Request review @chub.
Edited by Fatih Uzunoğlu