compositor: triangle fan debug
Draw the borders of all the triangles.
v1: original
v2: add keybinding to enable/disable fan debug (super-alt-space),
cycle colors to make it easier to see individual draws, and
redraw undamaged region to clean up previous frames debug
lines
Signed-off-by: Rob Clark <rob@ti.com>
diff --git a/src/shell.c b/src/shell.c
index 2bd23fc..45323c2 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -3266,6 +3266,17 @@
}
}
+
+static void
+fan_debug_repaint_binding(struct wl_seat *seat, uint32_t time, uint32_t key,
+ void *data)
+{
+ struct desktop_shell *shell = data;
+ struct weston_compositor *compositor = shell->compositor;
+ compositor->fan_debug = !compositor->fan_debug;
+ weston_compositor_damage_all(compositor);
+}
+
static void
force_kill_binding(struct wl_seat *seat, uint32_t time, uint32_t key,
void *data)
@@ -3400,6 +3411,8 @@
backlight_binding, ec);
weston_compositor_add_key_binding(ec, KEY_SPACE, mod | MODIFIER_SHIFT,
debug_repaint_binding, shell);
+ weston_compositor_add_key_binding(ec, KEY_SPACE, mod | MODIFIER_ALT,
+ fan_debug_repaint_binding, shell);
weston_compositor_add_key_binding(ec, KEY_K, mod,
force_kill_binding, shell);
weston_compositor_add_key_binding(ec, KEY_UP, mod,