mirror of https://github.com/yshui/picom.git
core: track if root is damaged
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
dad2bf53f8
commit
10400d7e62
|
@ -106,6 +106,7 @@ bool paint_all_new(session_t *ps, struct managed_win *const t) {
|
|||
// part of the image we want to reuse
|
||||
region_t reg_damage;
|
||||
reg_damage = get_damage(ps, ps->o.monitor_repaint || !ps->o.use_damage);
|
||||
ps->root_damaged = false;
|
||||
|
||||
if (!pixman_region32_not_empty(®_damage)) {
|
||||
pixman_region32_fini(®_damage);
|
||||
|
|
|
@ -264,6 +264,8 @@ typedef struct session {
|
|||
bool render_queued;
|
||||
/// For tracking damage regions
|
||||
struct damage_ring damage_ring;
|
||||
/// Whether the root image has been changed since last render
|
||||
bool root_damaged;
|
||||
/// Whether all windows are currently redirected.
|
||||
bool redirected;
|
||||
/// Pre-generated alpha pictures.
|
||||
|
|
|
@ -1205,6 +1205,7 @@ void root_damaged(session_t *ps) {
|
|||
log_error("Failed to bind root back pixmap");
|
||||
}
|
||||
}
|
||||
ps->root_damaged = true;
|
||||
}
|
||||
|
||||
// Mark screen damaged
|
||||
|
|
Loading…
Reference in New Issue