aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/output.h
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/sway/output.h
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/sway/output.h')
-rw-r--r--include/sway/output.h14
1 files changed, 12 insertions, 2 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