1
0
Fork 0

stage: Queue redraw previous Rect only if it has changed

No need to queue redraw the same area multiple times, so we can avoid the
computation involved with it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/3
This commit is contained in:
Marco Trevisan (Treviño) 2019-02-28 23:02:59 +01:00 committed by Marco Trevisan
parent f4c2b69934
commit 42953a50bb

View file

@ -123,8 +123,11 @@ meta_overlay_paint (MetaOverlay *overlay)
(overlay->current_rect.origin.y + (overlay->current_rect.origin.y +
overlay->current_rect.size.height)); overlay->current_rect.size.height));
overlay->previous_rect = overlay->current_rect; if (!clutter_rect_equals (&overlay->previous_rect, &overlay->current_rect))
overlay->previous_is_valid = TRUE; {
overlay->previous_rect = overlay->current_rect;
overlay->previous_is_valid = TRUE;
}
} }
static void static void