From fb1f613510b871bcc117179a9d3a32aabc4508c0 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sat, 11 Dec 2021 12:25:53 +0100 Subject: scene: add primary output to wlr_scene_surface This allows compositors to avoid sending multiple frame done events to a surface that is rendered on multiple outputs at once. This may also be used in the same way for presentation feedback. --- include/wlr/types/wlr_scene.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index 1238653d..6c2928ee 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -74,6 +74,14 @@ struct wlr_scene_surface { struct wlr_scene_node node; struct wlr_surface *surface; + /** + * The output that the largest area of this surface is displayed on. + * This may be NULL if the surface is not currently displayed on any + * outputs. This is the output that should be used for frame callbacks, + * presentation feedback, etc. + */ + struct wlr_output *primary_output; + // private state int prev_width, prev_height; -- cgit v1.2.3