No window quads are generated for sub-surfaces right now. This means that
effects that operate on window quads are not able to transform
sub-surfaces. Furthermore, the OpenGL scene needs window quads to clip
windows without using the scissor test.
The best (imho) way to render sub-surfaces would be with some help from a
scene graph. Unfortunately, KDE hasn't developed any scene graph
implementation that we could plug into kwin and let the scene graph do
its magic. As a short term solution, this patch adjusts relevant parts of
the scene to make it generate window quads for sub-surfaces.
In order to build window quads, we traverse the current window pixmap
tree in DFS manner. When we enter a pixmap, we generate window quads. An
id is assigned to each quad that can be later used to match a list of
window quads against some particular window pixmap.
With the proposed change, no changes to effects are required. Effects see
window quads for sub-surfaces as regular WindowQuadContents quads.
Cross-fading is still kind of broken. In order to cross-fade between two
window pixmap trees, we need to render each tree in a texture, then
cross-fade between those two textures in a shader. Unfortunately, this is
not easy to do with the current design, so I only left a FIXME comment.
Although it should be pretty straightforward with a scene graph.
BUG: 387313