Make backend_info_t::buffer_age optional
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
b50f15c835
commit
22f0d10c65
|
@ -24,8 +24,10 @@ bool default_is_frame_transparent(void *backend_data, win *w, void *win_data) {
|
||||||
|
|
||||||
region_t get_damage(session_t *ps) {
|
region_t get_damage(session_t *ps) {
|
||||||
region_t region;
|
region_t region;
|
||||||
|
auto buffer_age_fn = backend_list[ps->o.backend]->buffer_age;
|
||||||
|
int buffer_age = buffer_age_fn ? buffer_age_fn(ps->backend_data, ps) : -1;
|
||||||
|
|
||||||
pixman_region32_init(®ion);
|
pixman_region32_init(®ion);
|
||||||
int buffer_age = backend_list[ps->o.backend]->buffer_age(ps->backend_data, ps);
|
|
||||||
if (buffer_age == -1 || buffer_age > ps->ndamage) {
|
if (buffer_age == -1 || buffer_age > ps->ndamage) {
|
||||||
pixman_region32_copy(®ion, &ps->screen_reg);
|
pixman_region32_copy(®ion, &ps->screen_reg);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue