From bd9a53f1a3e7dba247aab0a4e4268724acc12c38 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 25 Sep 2019 17:35:41 +0300 Subject: view: add max_render_time --- include/sway/commands.h | 1 + include/sway/output.h | 2 +- include/sway/surface.h | 7 +++++++ include/sway/tree/view.h | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sway/commands.h b/include/sway/commands.h index 5d468a42..45b5b0f4 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h @@ -145,6 +145,7 @@ sway_cmd cmd_kill; sway_cmd cmd_layout; sway_cmd cmd_log_colors; sway_cmd cmd_mark; +sway_cmd cmd_max_render_time; sway_cmd cmd_mode; sway_cmd cmd_mouse_warping; sway_cmd cmd_move; diff --git a/include/sway/output.h b/include/sway/output.h index 741f5b5e..ddc08022 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -72,7 +72,7 @@ struct sway_output *output_get_in_direction(struct sway_output *reference, void output_add_workspace(struct sway_output *output, struct sway_workspace *workspace); -typedef void (*sway_surface_iterator_func_t)(struct sway_output *output, +typedef void (*sway_surface_iterator_func_t)(struct sway_output *output, struct sway_view *view, struct wlr_surface *surface, struct wlr_box *box, float rotation, void *user_data); diff --git a/include/sway/surface.h b/include/sway/surface.h index 06874af2..4da96c02 100644 --- a/include/sway/surface.h +++ b/include/sway/surface.h @@ -6,6 +6,13 @@ struct sway_surface { struct wlr_surface *wlr_surface; struct wl_listener destroy; + + /** + * This timer can be used for issuing delayed frame done callbacks (for + * example, to improve presentation latency). Its handler is set to a + * function that issues a frame done callback to this surface. + */ + struct wl_event_source *frame_done_timer; }; #endif diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 44cd4a7b..29c87967 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -108,6 +108,8 @@ struct sway_view { } events; struct wl_listener surface_new_subsurface; + + int max_render_time; // In milliseconds }; struct sway_xdg_shell_view { -- cgit v1.2.3-70-g09d2