aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2019-09-25 13:58:27 +0300
committerSimon Ser <contact@emersion.fr>2019-11-17 20:18:42 +0100
commit022df2542baa057b1965a7c7ee9c32e738f637d2 (patch)
treee650befe8f210c0fc44eb8fadf3b125c70a1b01f /include/sway
parentcb905effde03b19b3e32aaf6ea1fee1ed82c9f33 (diff)
output: add max_render_time
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h1
-rw-r--r--include/sway/output.h7
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;
sway_cmd output_cmd_disable;
sway_cmd output_cmd_dpms;
sway_cmd output_cmd_enable;
+sway_cmd output_cmd_max_render_time;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_position;
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 {
float scale;
int32_t transform;
enum wl_output_subpixel subpixel;
+ int max_render_time; // In milliseconds
char *background;
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 {
struct {
struct wl_signal destroy;
} events;
+
+ struct timespec last_presentation;
+ uint32_t refresh_nsec;
+ int max_render_time; // In milliseconds
+ struct wl_event_source *repaint_timer;
};
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,
struct wlr_surface *surface, struct wlr_box *box, float rotation,
void *user_data);
+int output_repaint_timer_handler(void *data);
+
void output_damage_whole(struct sway_output *output);
void output_damage_surface(struct sway_output *output, double ox, double oy,