output: add max_render_time

This commit is contained in:
Ivan Molodetskikh 2019-09-25 13:58:27 +03:00 committed by Simon Ser
parent cb905effde
commit 022df2542b
10 changed files with 166 additions and 22 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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,