mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
clutter/stage: Emit after-paint after painting
ClutterStage:after-paint is supposed to be emitted after all painting is done, but before the frame is finished. However, as it is right now, it is being emitted after each view is painted -- on multi-monitor setups, after-frame is being emitted multiple times. Send after-paint only once, after all views are painted and before finishing the frame. https://gitlab.gnome.org/GNOME/mutter/merge_requests/623
This commit is contained in:
parent
cc2c670a5e
commit
0cd54c5735
@ -40,6 +40,7 @@ void _clutter_stage_paint_view (ClutterStage
|
||||
ClutterStageView *view,
|
||||
const cairo_rectangle_int_t *clip);
|
||||
|
||||
void _clutter_stage_emit_after_paint (ClutterStage *stage);
|
||||
void _clutter_stage_set_window (ClutterStage *stage,
|
||||
ClutterStageWindow *stage_window);
|
||||
ClutterStageWindow *_clutter_stage_get_window (ClutterStage *stage);
|
||||
|
@ -683,6 +683,11 @@ _clutter_stage_paint_view (ClutterStage *stage,
|
||||
COGL_TRACE_BEGIN_SCOPED (ClutterStagePaintView, "Paint (view)");
|
||||
|
||||
clutter_stage_do_paint_view (stage, view, clip);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_stage_emit_after_paint (ClutterStage *stage)
|
||||
{
|
||||
g_signal_emit (stage, stage_signals[AFTER_PAINT], 0);
|
||||
}
|
||||
|
||||
|
@ -983,6 +983,8 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
|
||||
clutter_stage_cogl_redraw_view (stage_window, view) || swap_event;
|
||||
}
|
||||
|
||||
_clutter_stage_emit_after_paint (stage_cogl->wrapper);
|
||||
|
||||
_clutter_stage_window_finish_frame (stage_window);
|
||||
|
||||
if (swap_event)
|
||||
|
Loading…
Reference in New Issue
Block a user