From e35533d8a831187fc5714c2f99478604c2a57118 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Wed, 27 Mar 2019 15:41:02 +0000 Subject: [PATCH] Dump damage region info in trace log Signed-off-by: Yuxuan Shui --- man/compton.1.asciidoc | 2 +- src/backend/backend.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/man/compton.1.asciidoc b/man/compton.1.asciidoc index a240fd5c..fa896da7 100644 --- a/man/compton.1.asciidoc +++ b/man/compton.1.asciidoc @@ -71,7 +71,7 @@ OPTIONS Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. *--log-level*:: - Set the log level. Possible values are "TRACE", "DEBUG", "INFO", "WARN", "ERROR", in increasing level of importance. Case doesn't matter. + Set the log level. Possible values are "TRACE", "DEBUG", "INFO", "WARN", "ERROR", in increasing level of importance. Case doesn't matter. If using the "TRACE" log level, it's better to log into a file using *--log-file*, since it can generate a huge stream of logs. *--log-file*:: Set the log file. If *--log-file* is never specified, logs will be written to stderr. Otherwise, logs will to written to the given file, though some of the early logs might still be written to the stderr. When setting this option from the config file, it is recommended to use an absolute path. diff --git a/src/backend/backend.c b/src/backend/backend.c index 68a15d1f..a2e612ac 100644 --- a/src/backend/backend.c +++ b/src/backend/backend.c @@ -40,6 +40,8 @@ region_t get_damage(session_t *ps, bool all_damage) { } else { for (int i = 0; i < buffer_age; i++) { const int curr = ((ps->damage - ps->damage_ring) + i) % ps->ndamage; + log_trace("damage index: %d, damage ring offset: %d", i, curr); + dump_region(&ps->damage_ring[curr]); pixman_region32_union(®ion, ®ion, &ps->damage_ring[curr]); } pixman_region32_intersect(®ion, ®ion, &ps->screen_reg);