[mutter] clutter/stage: Add 'pending_finish_queue_redraws' state
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage: Add 'pending_finish_queue_redraws' state
- Date: Thu, 2 Jul 2020 20:51:23 +0000 (UTC)
commit 33450700dc823f2c773995ea9fcca11038d3245b
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Apr 1 11:03:59 2020 +0200
clutter/stage: Add 'pending_finish_queue_redraws' state
This will allow anyone to finish any queued redraws making their
corresponding damage end up being posted to the stage views. This will
allow units to check whether, so far, any updates are queued on a
particular stage view.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
clutter/clutter/clutter-stage.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 3225a7cb7d..8e602b8268 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -140,6 +140,7 @@ struct _ClutterStagePrivate
int update_freeze_count;
gboolean needs_update;
+ gboolean pending_finish_queue_redraws;
guint redraw_pending : 1;
guint throttle_motion_events : 1;
@@ -3257,6 +3258,8 @@ _clutter_stage_queue_actor_redraw (ClutterStage *stage,
*/
priv->cached_pick_mode = CLUTTER_PICK_NONE;
+ priv->pending_finish_queue_redraws = TRUE;
+
if (!priv->redraw_pending)
{
ClutterMasterClock *master_clock;
@@ -3356,6 +3359,13 @@ _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entr
static void
clutter_stage_maybe_finish_queue_redraws (ClutterStage *stage)
{
+ ClutterStagePrivate *priv = stage->priv;
+
+ if (!priv->pending_finish_queue_redraws)
+ return;
+
+ priv->pending_finish_queue_redraws = FALSE;
+
/* Note: we have to repeat until the pending_queue_redraws list is
* empty because actors are allowed to queue redraws in response to
* the queue-redraw signal. For example Clone actors or
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]