wayland/compositor: Only emit frame callbacks for the primary stage view
Since we schedule frames for each stage view seperately, surfaces receive frame callbacks for each stage view they are visible on.
This is problematic for several reasons. Thus, add a simple heuristic how to choose a primary stage view and only emit frame callbacks when that one updates.
Closes #1325 (closed)
This heuristic is:
- take the fastest stage view where the surface is non-obscured / visible on
- if we have clones, take the fastest stage view the surface or a clone is located on, ignoring obscuredness
- if two stage views run at the same speed, choose one randomly - this could be improved, see !1468 (comment 926160)
See also: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/450
Edited by Robert Mader