diff options
author | Alexander Orzechowski <[email protected]> | 2022-05-20 18:28:08 -0400 |
---|---|---|
committer | Alexander Orzechowski <[email protected]> | 2022-05-23 15:43:18 -0400 |
commit | 4eb610b627cb3063785883f89b432b8d95be4be9 (patch) | |
tree | 1d8c93ee0eac6437a271c158462c2ea8bc266613 | |
parent | aea018c787a3cca4310cadd16372865bfeaf23a7 (diff) |
wlr_scene: Parse out WLR_SCENE_DEBUG_DAMAGE
-rw-r--r-- | wlr_scene.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/wlr_scene.c b/wlr_scene.c index 303325f..4241a57 100644 --- a/wlr_scene.c +++ b/wlr_scene.c @@ -130,6 +130,23 @@ struct wlr_scene *wlr_scene_create(void) { scene_node_init(&scene->node, WLR_SCENE_NODE_ROOT, NULL); wl_list_init(&scene->outputs); wl_list_init(&scene->presentation_destroy.link); + + char *debug_damage = getenv("WLR_SCENE_DEBUG_DAMAGE"); + if (debug_damage) { + wlr_log(WLR_INFO, "Loading WLR_SCENE_DEBUG_DAMAGE option: %s", debug_damage); + } + + if (!debug_damage || strcmp(debug_damage, "none") == 0) { + scene->debug_damage_option = WLR_SCENE_DEBUG_DAMAGE_NONE; + } else if (strcmp(debug_damage, "rerender") == 0) { + scene->debug_damage_option = WLR_SCENE_DEBUG_DAMAGE_RERENDER; + } else if (strcmp(debug_damage, "highlight") == 0) { + scene->debug_damage_option = WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT; + } else { + wlr_log(WLR_ERROR, "Unknown WLR_SCENE_DEBUG_DAMAGE option: %s", debug_damage); + scene->debug_damage_option = WLR_SCENE_DEBUG_DAMAGE_NONE; + } + return scene; } |