[mutter/gnome-3-36] clutter/stage: Make clutter_stage_schedule_update() public API
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-36] clutter/stage: Make clutter_stage_schedule_update() public API
- Date: Wed, 30 Sep 2020 18:39:16 +0000 (UTC)
commit ed90af0751ecbb24e3a04da1190a1dffd13f329f
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Apr 16 19:11:37 2020 +0200
clutter/stage: Make clutter_stage_schedule_update() public API
It's effectively used by mutter by abusing a ClutterTimeline to scedule
updates. Timelines are not really suited in places that is done, as it
is really just about getting a single new update scheduled whenever
suitable, so expose the API so we can use it directly.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1218
(cherry picked from commit 99c9a14bc8058830232cd4e07c7bb897e84a8c9c)
clutter/clutter/clutter-master-clock-default.c | 4 ++--
clutter/clutter/clutter-stage-private.h | 1 -
clutter/clutter/clutter-stage.c | 16 ++++++++--------
clutter/clutter/clutter-stage.h | 3 +++
4 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/clutter/clutter/clutter-master-clock-default.c b/clutter/clutter/clutter-master-clock-default.c
index ac55f1b424..d419a89f8c 100644
--- a/clutter/clutter/clutter-master-clock-default.c
+++ b/clutter/clutter/clutter-master-clock-default.c
@@ -219,7 +219,7 @@ master_clock_schedule_stage_updates (ClutterMasterClockDefault *master_clock)
stages = clutter_stage_manager_peek_stages (stage_manager);
for (l = stages; l != NULL; l = l->next)
- _clutter_stage_schedule_update (l->data);
+ clutter_stage_schedule_update (l->data);
}
static GSList *
@@ -272,7 +272,7 @@ master_clock_reschedule_stage_updates (ClutterMasterClockDefault *master_clock,
if (master_clock->timelines ||
_clutter_stage_has_queued_events (l->data) ||
_clutter_stage_needs_update (l->data))
- _clutter_stage_schedule_update (l->data);
+ clutter_stage_schedule_update (l->data);
}
}
diff --git a/clutter/clutter/clutter-stage-private.h b/clutter/clutter/clutter-stage-private.h
index a8abd05648..0bda81d9a7 100644
--- a/clutter/clutter/clutter-stage-private.h
+++ b/clutter/clutter/clutter-stage-private.h
@@ -74,7 +74,6 @@ void _clutter_stage_queue_event (ClutterStage *stage,
gboolean _clutter_stage_has_queued_events (ClutterStage *stage);
void _clutter_stage_process_queued_events (ClutterStage *stage);
void _clutter_stage_update_input_devices (ClutterStage *stage);
-void _clutter_stage_schedule_update (ClutterStage *stage);
gint64 _clutter_stage_get_update_time (ClutterStage *stage);
void _clutter_stage_clear_update_time (ClutterStage *stage);
gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage);
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 09c8010d52..ba2f2440a9 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1182,7 +1182,7 @@ _clutter_stage_queue_event (ClutterStage *stage,
{
ClutterMasterClock *master_clock = _clutter_master_clock_get_default ();
_clutter_master_clock_start_running (master_clock);
- _clutter_stage_schedule_update (stage);
+ clutter_stage_schedule_update (stage);
}
}
@@ -1326,7 +1326,7 @@ clutter_stage_queue_actor_relayout (ClutterStage *stage,
ClutterStagePrivate *priv = stage->priv;
if (g_hash_table_size (priv->pending_relayouts) == 0)
- _clutter_stage_schedule_update (stage);
+ clutter_stage_schedule_update (stage);
g_hash_table_add (priv->pending_relayouts, g_object_ref (actor));
priv->pending_relayouts_version++;
@@ -3409,7 +3409,7 @@ clutter_stage_ensure_redraw (ClutterStage *stage)
priv = stage->priv;
if (!_clutter_stage_needs_update (stage))
- _clutter_stage_schedule_update (stage);
+ clutter_stage_schedule_update (stage);
priv->redraw_pending = TRUE;
@@ -3687,13 +3687,13 @@ clutter_stage_get_minimum_size (ClutterStage *stage,
}
/**
- * _clutter_stage_schedule_update:
- * @window: a #ClutterStage actor
+ * clutter_stage_schedule_update:
+ * @stage: a #ClutterStage actor
*
* Schedules a redraw of the #ClutterStage at the next optimal timestamp.
*/
void
-_clutter_stage_schedule_update (ClutterStage *stage)
+clutter_stage_schedule_update (ClutterStage *stage)
{
ClutterStageWindow *stage_window;
@@ -3715,7 +3715,7 @@ _clutter_stage_schedule_update (ClutterStage *stage)
* @stage: a #ClutterStage actor
*
* Returns the earliest time in which the stage is ready to update. The update
- * time is set when _clutter_stage_schedule_update() is called. This can then
+ * time is set when clutter_stage_schedule_update() is called. This can then
* be used by e.g. the #ClutterMasterClock to know when the stage needs to be
* redrawn.
*
@@ -3840,7 +3840,7 @@ _clutter_stage_queue_actor_redraw (ClutterStage *stage,
CLUTTER_NOTE (PAINT, "First redraw request");
- _clutter_stage_schedule_update (stage);
+ clutter_stage_schedule_update (stage);
priv->redraw_pending = TRUE;
master_clock = _clutter_master_clock_get_default ();
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index 19de749b9f..7afe4c2977 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -222,6 +222,9 @@ CLUTTER_EXPORT
void clutter_stage_skip_sync_delay (ClutterStage *stage);
#endif
+CLUTTER_EXPORT
+void clutter_stage_schedule_update (ClutterStage *stage);
+
CLUTTER_EXPORT
gboolean clutter_stage_get_capture_final_size (ClutterStage *stage,
cairo_rectangle_int_t *rect,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]