mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
backend: remove unused parameter 'ignore_damage'
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
3aed5599c3
commit
62fcfe5d1a
5 changed files with 8 additions and 14 deletions
|
@ -81,7 +81,7 @@ void handle_device_reset(session_t *ps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// paint all windows
|
/// paint all windows
|
||||||
void paint_all_new(session_t *ps, struct managed_win *t, bool ignore_damage) {
|
void paint_all_new(session_t *ps, struct managed_win *t) {
|
||||||
if (ps->backend_data->ops->device_status &&
|
if (ps->backend_data->ops->device_status &&
|
||||||
ps->backend_data->ops->device_status(ps->backend_data) != DEVICE_STATUS_NORMAL) {
|
ps->backend_data->ops->device_status(ps->backend_data) != DEVICE_STATUS_NORMAL) {
|
||||||
return handle_device_reset(ps);
|
return handle_device_reset(ps);
|
||||||
|
@ -100,12 +100,7 @@ void paint_all_new(session_t *ps, struct managed_win *t, bool ignore_damage) {
|
||||||
// the paints bleed out of the damage region, it will destroy
|
// the paints bleed out of the damage region, it will destroy
|
||||||
// part of the image we want to reuse
|
// part of the image we want to reuse
|
||||||
region_t reg_damage;
|
region_t reg_damage;
|
||||||
if (!ignore_damage) {
|
|
||||||
reg_damage = get_damage(ps, ps->o.monitor_repaint || !ps->o.use_damage);
|
reg_damage = get_damage(ps, ps->o.monitor_repaint || !ps->o.use_damage);
|
||||||
} else {
|
|
||||||
pixman_region32_init(®_damage);
|
|
||||||
pixman_region32_copy(®_damage, &ps->screen_reg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pixman_region32_not_empty(®_damage)) {
|
if (!pixman_region32_not_empty(®_damage)) {
|
||||||
pixman_region32_fini(®_damage);
|
pixman_region32_fini(®_damage);
|
||||||
|
|
|
@ -363,5 +363,4 @@ struct backend_operations {
|
||||||
|
|
||||||
extern struct backend_operations *backend_list[];
|
extern struct backend_operations *backend_list[];
|
||||||
|
|
||||||
void paint_all_new(session_t *ps, struct managed_win *const t, bool ignore_damage)
|
void paint_all_new(session_t *ps, struct managed_win *const t) attr_nonnull(1);
|
||||||
attr_nonnull(1);
|
|
||||||
|
|
|
@ -1524,9 +1524,9 @@ static void draw_callback_impl(EV_P_ session_t *ps, int revents attr_unused) {
|
||||||
|
|
||||||
log_trace("Render start, frame %d", paint);
|
log_trace("Render start, frame %d", paint);
|
||||||
if (!ps->o.legacy_backends) {
|
if (!ps->o.legacy_backends) {
|
||||||
paint_all_new(ps, bottom, false);
|
paint_all_new(ps, bottom);
|
||||||
} else {
|
} else {
|
||||||
paint_all(ps, bottom, false);
|
paint_all(ps, bottom);
|
||||||
}
|
}
|
||||||
log_trace("Render end");
|
log_trace("Render end");
|
||||||
|
|
||||||
|
|
|
@ -969,7 +969,7 @@ win_blur_background(session_t *ps, struct managed_win *w, xcb_render_picture_t t
|
||||||
/// paint all windows
|
/// paint all windows
|
||||||
/// region = ??
|
/// region = ??
|
||||||
/// region_real = the damage region
|
/// region_real = the damage region
|
||||||
void paint_all(session_t *ps, struct managed_win *t, bool ignore_damage) {
|
void paint_all(session_t *ps, struct managed_win *t) {
|
||||||
if (ps->o.xrender_sync_fence || (ps->drivers & DRIVER_NVIDIA)) {
|
if (ps->o.xrender_sync_fence || (ps->drivers & DRIVER_NVIDIA)) {
|
||||||
if (ps->xsync_exists && !x_fence_sync(ps->c, ps->sync_fence)) {
|
if (ps->xsync_exists && !x_fence_sync(ps->c, ps->sync_fence)) {
|
||||||
log_error("x_fence_sync failed, xrender-sync-fence will be "
|
log_error("x_fence_sync failed, xrender-sync-fence will be "
|
||||||
|
@ -984,7 +984,7 @@ void paint_all(session_t *ps, struct managed_win *t, bool ignore_damage) {
|
||||||
region_t region;
|
region_t region;
|
||||||
pixman_region32_init(®ion);
|
pixman_region32_init(®ion);
|
||||||
int buffer_age = get_buffer_age(ps);
|
int buffer_age = get_buffer_age(ps);
|
||||||
if (buffer_age == -1 || buffer_age > ps->ndamage || ignore_damage) {
|
if (buffer_age == -1 || buffer_age > ps->ndamage) {
|
||||||
pixman_region32_copy(®ion, &ps->screen_reg);
|
pixman_region32_copy(®ion, &ps->screen_reg);
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < get_buffer_age(ps); i++) {
|
for (int i = 0; i < get_buffer_age(ps); i++) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ void render(session_t *ps, int x, int y, int dx, int dy, int w, int h, int fullw
|
||||||
const glx_prog_main_t *pprogram, clip_t *clip);
|
const glx_prog_main_t *pprogram, clip_t *clip);
|
||||||
void paint_one(session_t *ps, struct managed_win *w, const region_t *reg_paint);
|
void paint_one(session_t *ps, struct managed_win *w, const region_t *reg_paint);
|
||||||
|
|
||||||
void paint_all(session_t *ps, struct managed_win *const t, bool ignore_damage);
|
void paint_all(session_t *ps, struct managed_win *const t);
|
||||||
|
|
||||||
void free_picture(xcb_connection_t *c, xcb_render_picture_t *p);
|
void free_picture(xcb_connection_t *c, xcb_render_picture_t *p);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue