summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-03-30 13:18:50 -0400
committerLibravatar emersion <contact@emersion.fr>2018-03-30 17:16:35 -0400
commita776ecbb860608e0f75430a53ea75a6ed19ac746 (patch)
treef664978ac74c3fc13993ed709cc1015c025d3344 /include
parentMerge pull request #1667 from emersion/wlroots-xwayland-map (diff)
downloadsway-a776ecbb860608e0f75430a53ea75a6ed19ac746.tar.gz
sway-a776ecbb860608e0f75430a53ea75a6ed19ac746.tar.zst
sway-a776ecbb860608e0f75430a53ea75a6ed19ac746.zip
Add lite damage tracking
This skips the renderer if nothing has changed, and renders everything otherwise.
Diffstat (limited to 'include')
-rw-r--r--include/sway/output.h14
-rw-r--r--include/sway/server.h1
-rw-r--r--include/sway/tree/view.h4
3 files changed, 16 insertions, 3 deletions
diff --git a/include/sway/output.h b/include/sway/output.h
index 6fb79987..b4980cd8 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -5,6 +5,7 @@
5#include <wayland-server.h> 5#include <wayland-server.h>
6#include <wlr/types/wlr_box.h> 6#include <wlr/types/wlr_box.h>
7#include <wlr/types/wlr_output.h> 7#include <wlr/types/wlr_output.h>
8#include "sway/tree/view.h"
8 9
9struct sway_server; 10struct sway_server;
10struct sway_container; 11struct sway_container;
@@ -13,17 +14,26 @@ struct sway_output {
13 struct wlr_output *wlr_output; 14 struct wlr_output *wlr_output;
14 struct sway_container *swayc; 15 struct sway_container *swayc;
15 struct sway_server *server; 16 struct sway_server *server;
16 struct timespec last_frame;
17 17
18 struct wl_list layers[4]; // sway_layer_surface::link 18 struct wl_list layers[4]; // sway_layer_surface::link
19 struct wlr_box usable_area; 19 struct wlr_box usable_area;
20 20
21 struct wl_listener frame; 21 struct timespec last_frame;
22 struct wlr_output_damage *damage;
23
22 struct wl_listener destroy; 24 struct wl_listener destroy;
23 struct wl_listener mode; 25 struct wl_listener mode;
24 struct wl_listener transform; 26 struct wl_listener transform;
25 27
28 struct wl_listener damage_destroy;
29 struct wl_listener damage_frame;
30
26 pid_t bg_pid; 31 pid_t bg_pid;
27}; 32};
28 33
34void output_damage_whole(struct sway_output *output);
35
36void output_damage_whole_view(struct sway_output *output,
37 struct sway_view *view);
38
29#endif 39#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index db81932f..61f21cdb 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -25,7 +25,6 @@ struct sway_server {
25 struct sway_input_manager *input; 25 struct sway_input_manager *input;
26 26
27 struct wl_listener new_output; 27 struct wl_listener new_output;
28 struct wl_listener output_frame;
29 28
30 struct wlr_layer_shell *layer_shell; 29 struct wlr_layer_shell *layer_shell;
31 struct wl_listener layer_shell_surface; 30 struct wl_listener layer_shell_surface;
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 54f6d90e..526a8485 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -113,4 +113,8 @@ void view_close(struct sway_view *view);
113 113
114void view_update_outputs(struct sway_view *view, const struct wlr_box *before); 114void view_update_outputs(struct sway_view *view, const struct wlr_box *before);
115 115
116void view_damage_whole(struct sway_view *view);
117
118void view_damage_from(struct sway_view *view);
119
116#endif 120#endif