From 19550c28f9ad68bd3b24cb858c3465dd3356254e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 30 Apr 2020 21:59:49 +0200 Subject: [PATCH] clutter/stage-view: Change set_dirty..() API to invalidate..() The manual "cleaning" of the viewport and projection state is removed, and we only ever try to invalidate the state so that it'll be updated next time. Change the API used to reflect this. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1237 --- clutter/clutter/clutter-stage-view-private.h | 6 ++---- clutter/clutter/clutter-stage-view.c | 10 ++++------ clutter/clutter/clutter-stage.c | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/clutter/clutter/clutter-stage-view-private.h b/clutter/clutter/clutter-stage-view-private.h index 6b445448e..2855211eb 100644 --- a/clutter/clutter/clutter-stage-view-private.h +++ b/clutter/clutter/clutter-stage-view-private.h @@ -24,8 +24,7 @@ void clutter_stage_view_after_paint (ClutterStageView *view); gboolean clutter_stage_view_is_dirty_viewport (ClutterStageView *view); -void clutter_stage_view_set_dirty_viewport (ClutterStageView *view, - gboolean dirty); +void clutter_stage_view_invalidate_viewport (ClutterStageView *view); void clutter_stage_view_set_viewport (ClutterStageView *view, float x, @@ -35,8 +34,7 @@ void clutter_stage_view_set_viewport (ClutterStageView *view, gboolean clutter_stage_view_is_dirty_projection (ClutterStageView *view); -void clutter_stage_view_set_dirty_projection (ClutterStageView *view, - gboolean dirty); +void clutter_stage_view_invalidate_projection (ClutterStageView *view); void clutter_stage_view_set_projection (ClutterStageView *view, const CoglMatrix *matrix); diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c index 3ebe9c445..48d8b3577 100644 --- a/clutter/clutter/clutter-stage-view.c +++ b/clutter/clutter/clutter-stage-view.c @@ -354,13 +354,12 @@ clutter_stage_view_is_dirty_viewport (ClutterStageView *view) } void -clutter_stage_view_set_dirty_viewport (ClutterStageView *view, - gboolean dirty) +clutter_stage_view_invalidate_viewport (ClutterStageView *view) { ClutterStageViewPrivate *priv = clutter_stage_view_get_instance_private (view); - priv->dirty_viewport = dirty; + priv->dirty_viewport = TRUE; } void @@ -389,13 +388,12 @@ clutter_stage_view_is_dirty_projection (ClutterStageView *view) } void -clutter_stage_view_set_dirty_projection (ClutterStageView *view, - gboolean dirty) +clutter_stage_view_invalidate_projection (ClutterStageView *view) { ClutterStageViewPrivate *priv = clutter_stage_view_get_instance_private (view); - priv->dirty_projection = dirty; + priv->dirty_projection = TRUE; } void diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index 310da1744..ca0ab44de 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -2434,7 +2434,7 @@ _clutter_stage_dirty_projection (ClutterStage *stage) { ClutterStageView *view = l->data; - clutter_stage_view_set_dirty_projection (view, TRUE); + clutter_stage_view_invalidate_projection (view); } } @@ -2524,7 +2524,7 @@ _clutter_stage_dirty_viewport (ClutterStage *stage) { ClutterStageView *view = l->data; - clutter_stage_view_set_dirty_viewport (view, TRUE); + clutter_stage_view_invalidate_viewport (view); } }