clutter/stage-view: Always call finish_frame()

This will later be utilized to handle the frame clock result outside of
this function.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
Jonas Ådahl 2020-10-09 18:05:41 +02:00 committed by Marge Bot
parent 722f7ae2c3
commit 9c500f23e4

View File

@ -1074,6 +1074,7 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
ClutterStage *stage = priv->stage;
ClutterStageWindow *stage_window = _clutter_stage_get_window (stage);
g_autoptr (GSList) devices = NULL;
ClutterFrameResult result;
@ -1097,17 +1098,12 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
if (clutter_stage_view_has_redraw_clip (view))
{
ClutterStageWindow *stage_window;
clutter_stage_emit_before_paint (stage, view);
stage_window = _clutter_stage_get_window (stage);
_clutter_stage_window_redraw_view (stage_window, view);
clutter_stage_emit_after_paint (stage, view);
_clutter_stage_window_finish_frame (stage_window, view);
result = CLUTTER_FRAME_RESULT_PENDING_PRESENTED;
}
else
@ -1115,6 +1111,8 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
result = CLUTTER_FRAME_RESULT_IDLE;
}
_clutter_stage_window_finish_frame (stage_window, view);
clutter_stage_update_devices (stage, devices);
_clutter_run_repaint_functions (CLUTTER_REPAINT_FLAGS_POST_PAINT);