mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
compositor: don't handle size or viewport src change in surface_update_damage()
This is incorrectly leads to buffer reuploading.
This commit is contained in:
parent
7dfbd87771
commit
5b08f91004
1 changed files with 30 additions and 38 deletions
|
@ -249,13 +249,6 @@ static void surface_update_damage(pixman_region32_t *buffer_damage,
|
||||||
struct wlr_surface_state *current, struct wlr_surface_state *pending) {
|
struct wlr_surface_state *current, struct wlr_surface_state *pending) {
|
||||||
pixman_region32_clear(buffer_damage);
|
pixman_region32_clear(buffer_damage);
|
||||||
|
|
||||||
if (pending->width != current->width ||
|
|
||||||
pending->height != current->height ||
|
|
||||||
!wlr_fbox_equal(&pending->viewport.src, ¤t->viewport.src)) {
|
|
||||||
// Damage the whole buffer on resize or viewport source box change
|
|
||||||
pixman_region32_union_rect(buffer_damage, buffer_damage, 0, 0,
|
|
||||||
pending->buffer_width, pending->buffer_height);
|
|
||||||
} else {
|
|
||||||
// Copy over surface damage + buffer damage
|
// Copy over surface damage + buffer damage
|
||||||
pixman_region32_t surface_damage;
|
pixman_region32_t surface_damage;
|
||||||
pixman_region32_init(&surface_damage);
|
pixman_region32_init(&surface_damage);
|
||||||
|
@ -289,7 +282,6 @@ static void surface_update_damage(pixman_region32_t *buffer_damage,
|
||||||
&pending->buffer_damage, &surface_damage);
|
&pending->buffer_damage, &surface_damage);
|
||||||
|
|
||||||
pixman_region32_fini(&surface_damage);
|
pixman_region32_fini(&surface_damage);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *surface_synced_create_state(struct wlr_surface_synced *synced) {
|
static void *surface_synced_create_state(struct wlr_surface_synced *synced) {
|
||||||
|
|
Loading…
Reference in a new issue