[mutter] stage: Queue redraw previous Rect only if it has changed
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] stage: Queue redraw previous Rect only if it has changed
- Date: Fri, 1 Mar 2019 18:06:46 +0000 (UTC)
commit 42953a50bbe5bd7f6318c6a9f6a588a874392094
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Thu Feb 28 23:02:59 2019 +0100
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
src/backends/meta-stage.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c
index 425926a7c..1f0d9c050 100644
--- a/src/backends/meta-stage.c
+++ b/src/backends/meta-stage.c
@@ -123,8 +123,11 @@ meta_overlay_paint (MetaOverlay *overlay)
(overlay->current_rect.origin.y +
overlay->current_rect.size.height));
- overlay->previous_rect = overlay->current_rect;
- overlay->previous_is_valid = TRUE;
+ if (!clutter_rect_equals (&overlay->previous_rect, &overlay->current_rect))
+ {
+ overlay->previous_rect = overlay->current_rect;
+ overlay->previous_is_valid = TRUE;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]