1
0
Fork 0

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
This commit is contained in:
Jonas Ådahl 2020-04-01 11:03:59 +02:00
parent 62f251574f
commit 33450700dc

View file

@ -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