diff options
author | emersion <contact@emersion.fr> | 2018-01-18 03:31:46 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-18 03:31:46 +0100 |
commit | 1a084807ce6ce1d8e4b8c35e3195240507ebffe8 (patch) | |
tree | 2b4ec8fe840621d58df77c4840a652df76dcbff6 /include | |
parent | bcb58b5caa203a5651a2a24d2038117a728348e7 (diff) |
rootston: do not redraw if output has no damage
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/desktop.h | 17 | ||||
-rw-r--r-- | include/rootston/output.h | 26 |
2 files changed, 30 insertions, 13 deletions
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index 9dfd7b10..3d0e2a2b 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -16,15 +16,7 @@ #include <wlr/types/wlr_idle.h> #include "rootston/view.h" #include "rootston/config.h" - -struct roots_output { - struct roots_desktop *desktop; - struct wlr_output *wlr_output; - struct wl_listener frame; - struct timespec last_frame; - struct wl_list link; // roots_desktop:outputs - struct roots_view *fullscreen_view; -}; +#include "rootston/output.h" struct roots_desktop { struct wl_list views; // roots_view::link @@ -64,20 +56,19 @@ struct roots_desktop { struct roots_server; struct roots_desktop *desktop_create(struct roots_server *server, - struct roots_config *config); + struct roots_config *config); void desktop_destroy(struct roots_desktop *desktop); struct roots_output *desktop_output_from_wlr_output( struct roots_desktop *desktop, struct wlr_output *output); struct roots_view *desktop_view_at(struct roots_desktop *desktop, double lx, double ly, struct wlr_surface **surface, double *sx, double *sy); +void desktop_damage_surface(struct roots_desktop *desktop, + struct wlr_surface *surface, double lx, double ly); void view_init(struct roots_view *view, struct roots_desktop *desktop); void view_destroy(struct roots_view *view); void view_activate(struct roots_view *view, bool activate); -void output_add_notify(struct wl_listener *listener, void *data); -void output_remove_notify(struct wl_listener *listener, void *data); - void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); void handle_wl_shell_surface(struct wl_listener *listener, void *data); void handle_xwayland_surface(struct wl_listener *listener, void *data); diff --git a/include/rootston/output.h b/include/rootston/output.h new file mode 100644 index 00000000..e7f49227 --- /dev/null +++ b/include/rootston/output.h @@ -0,0 +1,26 @@ +#ifndef _ROOTSTON_OUTPUT_H +#define _ROOTSTON_OUTPUT_H + +#include <time.h> +#include <pixman.h> +#include <wayland-server.h> + +struct roots_desktop; + +struct roots_output { + struct roots_desktop *desktop; + struct wlr_output *wlr_output; + struct wl_listener frame; + struct timespec last_frame; + struct wl_list link; // roots_desktop:outputs + struct roots_view *fullscreen_view; + pixman_region32_t damage; +}; + +void output_add_notify(struct wl_listener *listener, void *data); +void output_remove_notify(struct wl_listener *listener, void *data); + +void output_damage_surface(struct roots_output *output, + struct wlr_surface *surface, double lx, double ly); + +#endif |