Wayland clients receive frame callbacks for each stage view they are visible on
Continuation of !1285 (comment 848183): after !1285 (merged) clients that are e.g. visible on two stage views now receive frame callbacks for each of them. This is somewhat wasteful, so lets evaluate ways to reduce frame callbacks to a reasonable level.
STR:
- start an application like
weston-simple-egl
orglxgears
- place it so it covers parts of two screens
Observed behaviour:
- the application reports higher frame draws than each of the screens, roughly the sum of them
I think there are two main questions that we need to answer here:
- If we limit frame callbacks to those of one stage view, which one should we take?
- the fastest one
- the one where most of the surface is visible on
- a combination of those (only consider a stage view if more than x% of the surface is visible on it)
- ???
- How to deal with subsurfaces
- consider each surface on its own
- take the combined geometry of the whole subsurfaces tree into account
- take the combined geometry of each syncronous subtree into account. Like above, but allowing e.g. a async subsurface to receive frame callbacks at a different speed than e.g. the root surface (could be useful for shadow subsurfaces that slightly overlap with a much faster stage view)
- ???
cc: @jadahl