[mutter] clutter/stage: Find devices to update after finish queue redraw
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage: Find devices to update after finish queue redraw
- Date: Thu, 2 Jul 2020 20:51:53 +0000 (UTC)
commit 3944daf3c001a7fdf9be316718f91f1a4f9adb64
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Sat Apr 4 01:20:08 2020 +0200
clutter/stage: Find devices to update after finish queue redraw
Devices are updated (repicked) as part of the stage update phase, as
their stacking, position and transform might have changed since since
the last update.
The redraw clip was used to avoid unnecessary updating of devices, if
the device in question had it's position outside of the redraw clip. If
the device coordinate was outside of the redraw clip, what was
underneith the device couldn't have changed.
What it failed to do, however, was to update devices if a relayout had
happened in the same update, as it checked the state whether a layout
had happened before attempting to do a relayout, effectively delaying
the device updating to the next update.
This commit changes the behavior to always update the device given the
complete redraw clip caused by all possible relayouts of the same update
as the device update happens in.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
clutter/clutter/clutter-stage.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index aabf302ff9..d50fd37f07 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1402,11 +1402,8 @@ gboolean
_clutter_stage_do_update (ClutterStage *stage)
{
ClutterStagePrivate *priv = stage->priv;
- gboolean stage_was_relayout = priv->stage_was_relayout;
GSList *devices = NULL;
- priv->stage_was_relayout = FALSE;
-
priv->needs_update = FALSE;
/* if the stage is being destroyed, or if the destruction already
@@ -1430,12 +1427,16 @@ _clutter_stage_do_update (ClutterStage *stage)
if (!priv->redraw_pending)
return FALSE;
- if (stage_was_relayout)
- devices = clutter_stage_find_updated_devices (stage);
-
update_actor_stage_views (stage);
clutter_stage_maybe_finish_queue_redraws (stage);
+
+ if (priv->stage_was_relayout)
+ {
+ priv->stage_was_relayout = FALSE;
+ devices = clutter_stage_find_updated_devices (stage);
+ }
+
clutter_stage_do_redraw (stage);
/* reset the guard, so that new redraws are possible */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]