mirror of https://github.com/yshui/picom.git
Dump damage region info in trace log
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
ffa121f176
commit
e35533d8a8
|
@ -71,7 +71,7 @@ OPTIONS
|
||||||
Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||||
|
|
||||||
*--log-level*::
|
*--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*::
|
*--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.
|
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.
|
||||||
|
|
|
@ -40,6 +40,8 @@ region_t get_damage(session_t *ps, bool all_damage) {
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < buffer_age; i++) {
|
for (int i = 0; i < buffer_age; i++) {
|
||||||
const int curr = ((ps->damage - ps->damage_ring) + i) % ps->ndamage;
|
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_union(®ion, ®ion, &ps->damage_ring[curr]);
|
||||||
}
|
}
|
||||||
pixman_region32_intersect(®ion, ®ion, &ps->screen_reg);
|
pixman_region32_intersect(®ion, ®ion, &ps->screen_reg);
|
||||||
|
|
Loading…
Reference in New Issue