mirror of
https://github.com/yshui/picom.git
synced 2025-04-21 18:03:02 -04:00
options: add always_rebind_pixmap debug option
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
d5163f0a50
commit
d7fdbdc4f1
3 changed files with 15 additions and 2 deletions
|
@ -229,6 +229,14 @@ bool paint_all_new(session_t *ps, struct managed_win *const t) {
|
|||
win_bind_mask(ps->backend_data, w);
|
||||
}
|
||||
|
||||
if (ps->o.debug_options.always_rebind_pixmap) {
|
||||
auto pixmap = ps->backend_data->ops->release_image(
|
||||
ps->backend_data, w->win_image);
|
||||
assert(pixmap != XCB_NONE);
|
||||
w->win_image = ps->backend_data->ops->bind_pixmap(
|
||||
ps->backend_data, pixmap, x_get_visual_info(&ps->c, w->a.visual));
|
||||
}
|
||||
|
||||
// The clip region for the current window, in global/target coordinates
|
||||
// reg_paint_in_bound \in reg_paint
|
||||
region_t reg_paint_in_bound;
|
||||
|
|
|
@ -629,8 +629,9 @@ const char *vblank_scheduler_str[] = {
|
|||
[LAST_VBLANK_SCHEDULER] = NULL
|
||||
};
|
||||
static const struct debug_options_entry debug_options_entries[] = {
|
||||
{"smart_frame_pacing", NULL, offsetof(struct debug_options, smart_frame_pacing)},
|
||||
{"force_vblank_sched", vblank_scheduler_str, offsetof(struct debug_options, force_vblank_scheduler)},
|
||||
{"always_rebind_pixmap", NULL , offsetof(struct debug_options, always_rebind_pixmap)},
|
||||
{"smart_frame_pacing" , NULL , offsetof(struct debug_options, smart_frame_pacing)},
|
||||
{"force_vblank_sched" , vblank_scheduler_str, offsetof(struct debug_options, force_vblank_scheduler)},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
|
|
@ -92,6 +92,10 @@ struct debug_options {
|
|||
int smart_frame_pacing;
|
||||
/// Override the vblank scheduler chosen by the compositor.
|
||||
int force_vblank_scheduler;
|
||||
/// Release then immediately rebind every window pixmap each frame.
|
||||
/// Useful when being traced under apitrace, to force it to pick up
|
||||
/// updated contents. WARNING, extremely slow.
|
||||
int always_rebind_pixmap;
|
||||
};
|
||||
|
||||
/// Structure representing all options.
|
||||
|
|
Loading…
Add table
Reference in a new issue