clutter/stage: Add new before_paint signal hook

It'll allow subclasses to get notified of the before-paint
signal without having to connect to it. This will allow
MetaStage to have proper watches being fired there without
the cost of the signal handling machinery.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1421
This commit is contained in:
Georges Basile Stavracas Neto 2020-08-31 10:22:35 -03:00
parent b1648e75a8
commit 9e011958d4
2 changed files with 4 additions and 1 deletions

View File

@ -1874,7 +1874,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
g_signal_new (I_("before-paint"), g_signal_new (I_("before-paint"),
G_TYPE_FROM_CLASS (gobject_class), G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, G_STRUCT_OFFSET (ClutterStageClass, before_paint),
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_NONE, 1,
CLUTTER_TYPE_STAGE_VIEW); CLUTTER_TYPE_STAGE_VIEW);

View File

@ -80,6 +80,9 @@ struct _ClutterStageClass
void (* activate) (ClutterStage *stage); void (* activate) (ClutterStage *stage);
void (* deactivate) (ClutterStage *stage); void (* deactivate) (ClutterStage *stage);
void (* before_paint) (ClutterStage *stage,
ClutterStageView *view);
void (* paint_view) (ClutterStage *stage, void (* paint_view) (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
const cairo_region_t *redraw_clip); const cairo_region_t *redraw_clip);