aboutsummaryrefslogtreecommitdiff
path: root/include/rootston
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-21 11:11:25 +0100
committeremersion <contact@emersion.fr>2018-01-21 11:11:25 +0100
commitc6aab6f56ccbc41563ef12e5fa1ed47082dffec6 (patch)
treeaeb2a3cd3a836d35cfbeac7d255a03fd0f4cf481 /include/rootston
parent0365b587f03411d6a55017e111a991d466decc35 (diff)
Add docs and comments
Diffstat (limited to 'include/rootston')
-rw-r--r--include/rootston/output.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rootston/output.h b/include/rootston/output.h
index c0022d1a..89fe1d82 100644
--- a/include/rootston/output.h
+++ b/include/rootston/output.h
@@ -5,6 +5,11 @@
#include <pixman.h>
#include <wayland-server.h>
+/**
+ * Damage tracking requires to keep track of previous frames' damage. To allow
+ * damage tracking to work with triple buffering, an history of two frames is
+ * required.
+ */
#define ROOTS_OUTPUT_PREVIOUS_DAMAGE_LEN 2
struct roots_desktop;
@@ -20,6 +25,7 @@ struct roots_output {
pixman_region32_t damage;
bool frame_pending;
+ // circular queue for previous damage
pixman_region32_t previous_damage[ROOTS_OUTPUT_PREVIOUS_DAMAGE_LEN];
size_t previous_damage_idx;