diff options
author | Ivan Molodetskikh <yalterz@gmail.com> | 2019-09-25 13:58:27 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-11-17 20:18:42 +0100 |
commit | 022df2542baa057b1965a7c7ee9c32e738f637d2 (patch) | |
tree | e650befe8f210c0fc44eb8fadf3b125c70a1b01f /include | |
parent | Add -Wno-missing-braces (diff) | |
download | sway-022df2542baa057b1965a7c7ee9c32e738f637d2.tar.gz sway-022df2542baa057b1965a7c7ee9c32e738f637d2.tar.zst sway-022df2542baa057b1965a7c7ee9c32e738f637d2.zip |
output: add max_render_time
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 1 | ||||
-rw-r--r-- | include/sway/config.h | 1 | ||||
-rw-r--r-- | include/sway/output.h | 7 |
3 files changed, 9 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index d994ae9b..5d468a42 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -271,6 +271,7 @@ sway_cmd output_cmd_background; | |||
271 | sway_cmd output_cmd_disable; | 271 | sway_cmd output_cmd_disable; |
272 | sway_cmd output_cmd_dpms; | 272 | sway_cmd output_cmd_dpms; |
273 | sway_cmd output_cmd_enable; | 273 | sway_cmd output_cmd_enable; |
274 | sway_cmd output_cmd_max_render_time; | ||
274 | sway_cmd output_cmd_mode; | 275 | sway_cmd output_cmd_mode; |
275 | sway_cmd output_cmd_position; | 276 | sway_cmd output_cmd_position; |
276 | sway_cmd output_cmd_scale; | 277 | sway_cmd output_cmd_scale; |
diff --git a/include/sway/config.h b/include/sway/config.h index 6892c946..457e0a98 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -212,6 +212,7 @@ struct output_config { | |||
212 | float scale; | 212 | float scale; |
213 | int32_t transform; | 213 | int32_t transform; |
214 | enum wl_output_subpixel subpixel; | 214 | enum wl_output_subpixel subpixel; |
215 | int max_render_time; // In milliseconds | ||
215 | 216 | ||
216 | char *background; | 217 | char *background; |
217 | char *background_option; | 218 | char *background_option; |
diff --git a/include/sway/output.h b/include/sway/output.h index 7d7057e1..741f5b5e 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -51,6 +51,11 @@ struct sway_output { | |||
51 | struct { | 51 | struct { |
52 | struct wl_signal destroy; | 52 | struct wl_signal destroy; |
53 | } events; | 53 | } events; |
54 | |||
55 | struct timespec last_presentation; | ||
56 | uint32_t refresh_nsec; | ||
57 | int max_render_time; // In milliseconds | ||
58 | struct wl_event_source *repaint_timer; | ||
54 | }; | 59 | }; |
55 | 60 | ||
56 | struct sway_output *output_create(struct wlr_output *wlr_output); | 61 | struct sway_output *output_create(struct wlr_output *wlr_output); |
@@ -71,6 +76,8 @@ typedef void (*sway_surface_iterator_func_t)(struct sway_output *output, | |||
71 | struct wlr_surface *surface, struct wlr_box *box, float rotation, | 76 | struct wlr_surface *surface, struct wlr_box *box, float rotation, |
72 | void *user_data); | 77 | void *user_data); |
73 | 78 | ||
79 | int output_repaint_timer_handler(void *data); | ||
80 | |||
74 | void output_damage_whole(struct sway_output *output); | 81 | void output_damage_whole(struct sway_output *output); |
75 | 82 | ||
76 | void output_damage_surface(struct sway_output *output, double ox, double oy, | 83 | void output_damage_surface(struct sway_output *output, double ox, double oy, |