dri3: only invalidate drawables on geometry change if geometry has changed

this is otherwise pointless

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23649>
This commit is contained in:
Mike Blumenkrantz 2023-06-14 11:34:28 -04:00 committed by Marge Bot
parent 2a71e332aa
commit 1e46ca673c

View file

@ -2326,10 +2326,13 @@ loader_dri3_update_drawable_geometry(struct loader_dri3_drawable *draw)
geom_reply = xcb_get_geometry_reply(draw->conn, geom_cookie, NULL);
if (geom_reply) {
bool changed = draw->width != geom_reply->width || draw->height != geom_reply->height;
draw->width = geom_reply->width;
draw->height = geom_reply->height;
draw->vtable->set_drawable_size(draw, draw->width, draw->height);
draw->ext->flush->invalidate(draw->dri_drawable);
if (changed) {
draw->vtable->set_drawable_size(draw, draw->width, draw->height);
draw->ext->flush->invalidate(draw->dri_drawable);
}
free(geom_reply);
}