clutter: Pass 'ClutterFrame' in all stage update signals

That means before-update, prepare-paint, before-paint, paint-view, after-paint,
after-update. While yet to be used, it will be used as a transient frame
book keeping object, to maintain object and state that is only valid
during a frame dispatch.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2795>
This commit is contained in:
Jonas Ådahl 2022-10-13 17:50:34 +02:00
parent 24f44aa33e
commit 08b0e563d4
30 changed files with 126 additions and 64 deletions

View File

@ -45,18 +45,24 @@ ClutterStageWindow *_clutter_stage_get_default_window (void);
CLUTTER_EXPORT CLUTTER_EXPORT
void clutter_stage_paint_view (ClutterStage *stage, void clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
const cairo_region_t *redraw_clip); const cairo_region_t *redraw_clip,
ClutterFrame *frame);
void clutter_stage_emit_before_update (ClutterStage *stage, void clutter_stage_emit_before_update (ClutterStage *stage,
ClutterStageView *view); ClutterStageView *view,
ClutterFrame *frame);
void clutter_stage_emit_prepare_frame (ClutterStage *stage, void clutter_stage_emit_prepare_frame (ClutterStage *stage,
ClutterStageView *view); ClutterStageView *view,
ClutterFrame *frame);
void clutter_stage_emit_before_paint (ClutterStage *stage, void clutter_stage_emit_before_paint (ClutterStage *stage,
ClutterStageView *view); ClutterStageView *view,
ClutterFrame *frame);
void clutter_stage_emit_after_paint (ClutterStage *stage, void clutter_stage_emit_after_paint (ClutterStage *stage,
ClutterStageView *view); ClutterStageView *view,
ClutterFrame *frame);
void clutter_stage_emit_after_update (ClutterStage *stage, void clutter_stage_emit_after_update (ClutterStage *stage,
ClutterStageView *view); ClutterStageView *view,
ClutterFrame *frame);
CLUTTER_EXPORT CLUTTER_EXPORT
void _clutter_stage_set_window (ClutterStage *stage, void _clutter_stage_set_window (ClutterStage *stage,

View File

@ -1230,7 +1230,7 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
begin_frame_timing_measurement (view); begin_frame_timing_measurement (view);
_clutter_run_repaint_functions (CLUTTER_REPAINT_FLAGS_PRE_PAINT); _clutter_run_repaint_functions (CLUTTER_REPAINT_FLAGS_PRE_PAINT);
clutter_stage_emit_before_update (stage, view); clutter_stage_emit_before_update (stage, view, frame);
clutter_stage_maybe_relayout (CLUTTER_ACTOR (stage)); clutter_stage_maybe_relayout (CLUTTER_ACTOR (stage));
clutter_stage_maybe_finish_queue_redraws (stage); clutter_stage_maybe_finish_queue_redraws (stage);
@ -1241,18 +1241,18 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
devices = clutter_stage_find_updated_devices (stage, view); devices = clutter_stage_find_updated_devices (stage, view);
_clutter_stage_window_prepare_frame (stage_window, view, frame); _clutter_stage_window_prepare_frame (stage_window, view, frame);
clutter_stage_emit_prepare_frame (stage, view); clutter_stage_emit_prepare_frame (stage, view, frame);
if (clutter_stage_view_has_redraw_clip (view)) if (clutter_stage_view_has_redraw_clip (view))
{ {
clutter_stage_emit_before_paint (stage, view); clutter_stage_emit_before_paint (stage, view, frame);
_clutter_stage_window_redraw_view (stage_window, view, frame); _clutter_stage_window_redraw_view (stage_window, view, frame);
clutter_frame_clock_record_flip_time (frame_clock, clutter_frame_clock_record_flip_time (frame_clock,
g_get_monotonic_time ()); g_get_monotonic_time ());
clutter_stage_emit_after_paint (stage, view); clutter_stage_emit_after_paint (stage, view, frame);
if (_clutter_context_get_show_fps ()) if (_clutter_context_get_show_fps ())
end_frame_timing_measurement (view); end_frame_timing_measurement (view);
@ -1264,7 +1264,7 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
priv->needs_update_devices = FALSE; priv->needs_update_devices = FALSE;
_clutter_run_repaint_functions (CLUTTER_REPAINT_FLAGS_POST_PAINT); _clutter_run_repaint_functions (CLUTTER_REPAINT_FLAGS_POST_PAINT);
clutter_stage_emit_after_update (stage, view); clutter_stage_emit_after_update (stage, view, frame);
return clutter_frame_get_result (frame); return clutter_frame_get_result (frame);
} }

View File

@ -53,6 +53,7 @@
#include "clutter-enum-types.h" #include "clutter-enum-types.h"
#include "clutter-event-private.h" #include "clutter-event-private.h"
#include "clutter-frame-clock.h" #include "clutter-frame-clock.h"
#include "clutter-frame.h"
#include "clutter-grab.h" #include "clutter-grab.h"
#include "clutter-id-pool.h" #include "clutter-id-pool.h"
#include "clutter-input-device-private.h" #include "clutter-input-device-private.h"
@ -444,7 +445,8 @@ clutter_stage_do_paint_view (ClutterStage *stage,
void void
clutter_stage_paint_view (ClutterStage *stage, clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
const cairo_region_t *redraw_clip) const cairo_region_t *redraw_clip,
ClutterFrame *frame)
{ {
ClutterStagePrivate *priv = stage->priv; ClutterStagePrivate *priv = stage->priv;
@ -455,44 +457,49 @@ clutter_stage_paint_view (ClutterStage *stage,
if (g_signal_has_handler_pending (stage, stage_signals[PAINT_VIEW], if (g_signal_has_handler_pending (stage, stage_signals[PAINT_VIEW],
0, TRUE)) 0, TRUE))
g_signal_emit (stage, stage_signals[PAINT_VIEW], 0, view, redraw_clip); g_signal_emit (stage, stage_signals[PAINT_VIEW], 0, view, redraw_clip, frame);
else else
CLUTTER_STAGE_GET_CLASS (stage)->paint_view (stage, view, redraw_clip); CLUTTER_STAGE_GET_CLASS (stage)->paint_view (stage, view, redraw_clip, frame);
} }
void void
clutter_stage_emit_before_update (ClutterStage *stage, clutter_stage_emit_before_update (ClutterStage *stage,
ClutterStageView *view) ClutterStageView *view,
ClutterFrame *frame)
{ {
g_signal_emit (stage, stage_signals[BEFORE_UPDATE], 0, view); g_signal_emit (stage, stage_signals[BEFORE_UPDATE], 0, view, frame);
} }
void void
clutter_stage_emit_prepare_frame (ClutterStage *stage, clutter_stage_emit_prepare_frame (ClutterStage *stage,
ClutterStageView *view) ClutterStageView *view,
ClutterFrame *frame)
{ {
g_signal_emit (stage, stage_signals[PREPARE_FRAME], 0, view); g_signal_emit (stage, stage_signals[PREPARE_FRAME], 0, view, frame);
} }
void void
clutter_stage_emit_before_paint (ClutterStage *stage, clutter_stage_emit_before_paint (ClutterStage *stage,
ClutterStageView *view) ClutterStageView *view,
ClutterFrame *frame)
{ {
g_signal_emit (stage, stage_signals[BEFORE_PAINT], 0, view); g_signal_emit (stage, stage_signals[BEFORE_PAINT], 0, view, frame);
} }
void void
clutter_stage_emit_after_paint (ClutterStage *stage, clutter_stage_emit_after_paint (ClutterStage *stage,
ClutterStageView *view) ClutterStageView *view,
ClutterFrame *frame)
{ {
g_signal_emit (stage, stage_signals[AFTER_PAINT], 0, view); g_signal_emit (stage, stage_signals[AFTER_PAINT], 0, view, frame);
} }
void void
clutter_stage_emit_after_update (ClutterStage *stage, clutter_stage_emit_after_update (ClutterStage *stage,
ClutterStageView *view) ClutterStageView *view,
ClutterFrame *frame)
{ {
g_signal_emit (stage, stage_signals[AFTER_UPDATE], 0, view); g_signal_emit (stage, stage_signals[AFTER_UPDATE], 0, view, frame);
} }
static gboolean static gboolean
@ -1228,7 +1235,8 @@ clutter_stage_finalize (GObject *object)
static void static void
clutter_stage_real_paint_view (ClutterStage *stage, clutter_stage_real_paint_view (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
const cairo_region_t *redraw_clip) const cairo_region_t *redraw_clip,
ClutterFrame *frame)
{ {
clutter_stage_do_paint_view (stage, view, redraw_clip); clutter_stage_do_paint_view (stage, view, redraw_clip);
} }
@ -1383,6 +1391,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
* ClutterStage::before-update: * ClutterStage::before-update:
* @stage: the #ClutterStage * @stage: the #ClutterStage
* @view: a #ClutterStageView * @view: a #ClutterStageView
* @frame: a #ClutterFrame
*/ */
stage_signals[BEFORE_UPDATE] = stage_signals[BEFORE_UPDATE] =
g_signal_new (I_("before-update"), g_signal_new (I_("before-update"),
@ -1390,12 +1399,14 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, 0,
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_NONE, 2,
CLUTTER_TYPE_STAGE_VIEW); CLUTTER_TYPE_STAGE_VIEW,
CLUTTER_TYPE_FRAME);
/** /**
* ClutterStage::prepare-frame: * ClutterStage::prepare-frame:
* @stage: the stage that received the event * @stage: the stage that received the event
* @view: a #ClutterStageView * @view: a #ClutterStageView
* @frame: a #ClutterFrame
* *
* The signal is emitted after the stage is updated, * The signal is emitted after the stage is updated,
* before the stage is painted, even if it will not be painted. * before the stage is painted, even if it will not be painted.
@ -1406,13 +1417,15 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, 0,
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_NONE, 2,
CLUTTER_TYPE_STAGE_VIEW); CLUTTER_TYPE_STAGE_VIEW,
CLUTTER_TYPE_FRAME);
/** /**
* ClutterStage::before-paint: * ClutterStage::before-paint:
* @stage: the stage that received the event * @stage: the stage that received the event
* @view: a #ClutterStageView * @view: a #ClutterStageView
* @frame: a #ClutterFrame
* *
* The signal is emitted before the stage is painted. * The signal is emitted before the stage is painted.
*/ */
@ -1422,12 +1435,14 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageClass, before_paint), G_STRUCT_OFFSET (ClutterStageClass, before_paint),
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_NONE, 2,
CLUTTER_TYPE_STAGE_VIEW); CLUTTER_TYPE_STAGE_VIEW,
CLUTTER_TYPE_FRAME);
/** /**
* ClutterStage::after-paint: * ClutterStage::after-paint:
* @stage: the stage that received the event * @stage: the stage that received the event
* @view: a #ClutterStageView * @view: a #ClutterStageView
* @frame: a #ClutterFrame
* *
* The signal is emitted after the stage is painted, * The signal is emitted after the stage is painted,
* but before the results are displayed on the screen.0 * but before the results are displayed on the screen.0
@ -1438,13 +1453,15 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, /* no corresponding vfunc */ 0, /* no corresponding vfunc */
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_NONE, 2,
CLUTTER_TYPE_STAGE_VIEW); CLUTTER_TYPE_STAGE_VIEW,
CLUTTER_TYPE_FRAME);
/** /**
* ClutterStage::after-update: * ClutterStage::after-update:
* @stage: the #ClutterStage * @stage: the #ClutterStage
* @view: a #ClutterStageView * @view: a #ClutterStageView
* @frame: a #ClutterFrame
*/ */
stage_signals[AFTER_UPDATE] = stage_signals[AFTER_UPDATE] =
g_signal_new (I_("after-update"), g_signal_new (I_("after-update"),
@ -1452,14 +1469,16 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, 0,
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_NONE, 2,
CLUTTER_TYPE_STAGE_VIEW); CLUTTER_TYPE_STAGE_VIEW,
CLUTTER_TYPE_FRAME);
/** /**
* ClutterStage::paint-view: * ClutterStage::paint-view:
* @stage: the stage that received the event * @stage: the stage that received the event
* @view: a #ClutterStageView * @view: a #ClutterStageView
* @redraw_clip: a #cairo_region_t with the redraw clip * @redraw_clip: a #cairo_region_t with the redraw clip
* @frame: a #ClutterFrame
* *
* The signal is emitted before a [class@Clutter.StageView] is being * The signal is emitted before a [class@Clutter.StageView] is being
* painted. * painted.
@ -1474,9 +1493,10 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageClass, paint_view), G_STRUCT_OFFSET (ClutterStageClass, paint_view),
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_NONE, 3,
CLUTTER_TYPE_STAGE_VIEW, CLUTTER_TYPE_STAGE_VIEW,
CAIRO_GOBJECT_TYPE_REGION); CAIRO_GOBJECT_TYPE_REGION,
CLUTTER_TYPE_FRAME);
/** /**
* ClutterStage::presented: (skip) * ClutterStage::presented: (skip)

View File

@ -72,11 +72,13 @@ struct _ClutterStageClass
void (* deactivate) (ClutterStage *stage); void (* deactivate) (ClutterStage *stage);
void (* before_paint) (ClutterStage *stage, void (* before_paint) (ClutterStage *stage,
ClutterStageView *view); ClutterStageView *view,
ClutterFrame *frame);
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,
ClutterFrame *frame);
/*< private >*/ /*< private >*/
/* padding for future expansion */ /* padding for future expansion */

View File

@ -165,6 +165,7 @@ meta_cursor_renderer_update_stage_overlay (MetaCursorRenderer *renderer,
static void static void
meta_cursor_renderer_after_paint (ClutterStage *stage, meta_cursor_renderer_after_paint (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaCursorRenderer *renderer) MetaCursorRenderer *renderer)
{ {
MetaCursorRendererPrivate *priv = MetaCursorRendererPrivate *priv =

View File

@ -191,6 +191,7 @@ cursor_changed (MetaCursorTracker *cursor_tracker,
static void static void
on_prepare_frame (ClutterStage *stage, on_prepare_frame (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaScreenCastAreaStreamSrc *area_src) MetaScreenCastAreaStreamSrc *area_src)
{ {
sync_cursor_state (area_src); sync_cursor_state (area_src);

View File

@ -287,6 +287,7 @@ cursor_changed (MetaCursorTracker *cursor_tracker,
static void static void
on_prepare_frame (ClutterStage *stage, on_prepare_frame (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaScreenCastMonitorStreamSrc *monitor_src) MetaScreenCastMonitorStreamSrc *monitor_src)
{ {
sync_cursor_state (monitor_src); sync_cursor_state (monitor_src);

View File

@ -146,6 +146,7 @@ cursor_changed (MetaCursorTracker *cursor_tracker,
static void static void
on_prepare_frame (ClutterStage *stage, on_prepare_frame (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaScreenCastVirtualStreamSrc *virtual_src) MetaScreenCastVirtualStreamSrc *virtual_src)
{ {
sync_cursor_state (virtual_src); sync_cursor_state (virtual_src);

View File

@ -396,12 +396,13 @@ scale_offset_and_clamp_region (const cairo_region_t *region,
static void static void
paint_stage (MetaStageImpl *stage_impl, paint_stage (MetaStageImpl *stage_impl,
ClutterStageView *stage_view, ClutterStageView *stage_view,
cairo_region_t *redraw_clip) cairo_region_t *redraw_clip,
ClutterFrame *frame)
{ {
ClutterStage *stage = stage_impl->wrapper; ClutterStage *stage = stage_impl->wrapper;
_clutter_stage_maybe_setup_viewport (stage, stage_view); _clutter_stage_maybe_setup_viewport (stage, stage_view);
clutter_stage_paint_view (stage, stage_view, redraw_clip); clutter_stage_paint_view (stage, stage_view, redraw_clip, frame);
clutter_stage_view_after_paint (stage_view, redraw_clip); clutter_stage_view_after_paint (stage_view, redraw_clip);
} }
@ -607,7 +608,7 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
cairo_region_t *debug_redraw_clip; cairo_region_t *debug_redraw_clip;
debug_redraw_clip = cairo_region_create_rectangle (&view_rect); debug_redraw_clip = cairo_region_create_rectangle (&view_rect);
paint_stage (stage_impl, stage_view, debug_redraw_clip); paint_stage (stage_impl, stage_view, debug_redraw_clip, frame);
cairo_region_destroy (debug_redraw_clip); cairo_region_destroy (debug_redraw_clip);
} }
else if (use_clipped_redraw) else if (use_clipped_redraw)
@ -616,7 +617,7 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
cogl_framebuffer_push_region_clip (fb, fb_clip_region); cogl_framebuffer_push_region_clip (fb, fb_clip_region);
paint_stage (stage_impl, stage_view, redraw_clip); paint_stage (stage_impl, stage_view, redraw_clip, frame);
cogl_framebuffer_pop_clip (fb); cogl_framebuffer_pop_clip (fb);
} }
@ -624,7 +625,7 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
{ {
meta_topic (META_DEBUG_BACKEND, "Unclipped stage paint"); meta_topic (META_DEBUG_BACKEND, "Unclipped stage paint");
paint_stage (stage_impl, stage_view, redraw_clip); paint_stage (stage_impl, stage_view, redraw_clip, frame);
} }
g_clear_pointer (&redraw_clip, cairo_region_destroy); g_clear_pointer (&redraw_clip, cairo_region_destroy);

View File

@ -209,7 +209,8 @@ notify_watchers_for_mode (MetaStage *stage,
static void static void
meta_stage_before_paint (ClutterStage *stage, meta_stage_before_paint (ClutterStage *stage,
ClutterStageView *view) ClutterStageView *view,
ClutterFrame *frame)
{ {
MetaStage *meta_stage = META_STAGE (stage); MetaStage *meta_stage = META_STAGE (stage);
@ -267,12 +268,14 @@ meta_stage_paint (ClutterActor *actor,
static void static void
meta_stage_paint_view (ClutterStage *stage, meta_stage_paint_view (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
const cairo_region_t *redraw_clip) const cairo_region_t *redraw_clip,
ClutterFrame *frame)
{ {
MetaStage *meta_stage = META_STAGE (stage); MetaStage *meta_stage = META_STAGE (stage);
CLUTTER_STAGE_CLASS (meta_stage_parent_class)->paint_view (stage, view, CLUTTER_STAGE_CLASS (meta_stage_parent_class)->paint_view (stage, view,
redraw_clip); redraw_clip,
frame);
notify_watchers_for_mode (meta_stage, view, NULL, notify_watchers_for_mode (meta_stage, view, NULL,
META_STAGE_WATCH_AFTER_PAINT); META_STAGE_WATCH_AFTER_PAINT);

View File

@ -1159,6 +1159,7 @@ meta_compositor_after_paint (MetaCompositor *compositor,
static void static void
on_before_paint (ClutterStage *stage, on_before_paint (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaCompositor *compositor) MetaCompositor *compositor)
{ {
MetaCompositorView *compositor_view; MetaCompositorView *compositor_view;
@ -1174,6 +1175,7 @@ on_before_paint (ClutterStage *stage,
static void static void
on_after_paint (ClutterStage *stage, on_after_paint (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaCompositor *compositor) MetaCompositor *compositor)
{ {
MetaCompositorView *compositor_view; MetaCompositorView *compositor_view;

View File

@ -335,6 +335,7 @@ out:
static void static void
on_before_update (ClutterStage *stage, on_before_update (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaCompositor *compositor) MetaCompositor *compositor)
{ {
MetaCompositorX11 *compositor_x11 = META_COMPOSITOR_X11 (compositor); MetaCompositorX11 *compositor_x11 = META_COMPOSITOR_X11 (compositor);
@ -373,6 +374,7 @@ on_before_update (ClutterStage *stage,
static void static void
on_after_update (ClutterStage *stage, on_after_update (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaCompositor *compositor) MetaCompositor *compositor)
{ {
MetaCompositorX11 *compositor_x11 = META_COMPOSITOR_X11 (compositor); MetaCompositorX11 *compositor_x11 = META_COMPOSITOR_X11 (compositor);

View File

@ -173,6 +173,7 @@ run_repaint_laters (GSList **laters_list)
static void static void
on_before_update (ClutterStage *stage, on_before_update (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaLaters *laters) MetaLaters *laters)
{ {
unsigned int i; unsigned int i;

View File

@ -234,6 +234,7 @@ static void
view_painted_cb (ClutterStage *stage, view_painted_cb (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
cairo_region_t *redraw_clip, cairo_region_t *redraw_clip,
ClutterFrame *frame,
gpointer data) gpointer data)
{ {
CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view); CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);

View File

@ -5,6 +5,7 @@
static void static void
on_after_update (ClutterStage *stage, on_after_update (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
ClutterFrame *frame,
gboolean *was_updated) gboolean *was_updated)
{ {
*was_updated = TRUE; *was_updated = TRUE;

View File

@ -102,6 +102,7 @@ generate_round_texture (CoglContext *ctx)
static void static void
on_after_paint (ClutterActor *stage, on_after_paint (ClutterActor *stage,
ClutterPaintContext *paint_context, ClutterPaintContext *paint_context,
ClutterFrame *frame,
Data *data) Data *data)
{ {
CoglFramebuffer *framebuffer = CoglFramebuffer *framebuffer =

View File

@ -38,7 +38,8 @@ do_events (ClutterActor *stage)
static void static void
on_after_paint (ClutterActor *stage, on_after_paint (ClutterActor *stage,
ClutterPaintContext *paint_context, ClutterStageView *view,
ClutterFrame *frame,
gconstpointer *data) gconstpointer *data)
{ {
do_events (stage); do_events (stage);

View File

@ -14,7 +14,8 @@ static int rows, cols;
static void static void
on_after_paint (ClutterActor *actor, on_after_paint (ClutterActor *actor,
ClutterPaintContext *paint_context, ClutterStageView *view,
ClutterFrame *frame,
gconstpointer *data) gconstpointer *data)
{ {
static GTimer *timer = NULL; static GTimer *timer = NULL;

View File

@ -13,7 +13,8 @@
static void static void
on_after_paint (ClutterActor *actor, on_after_paint (ClutterActor *actor,
ClutterPaintContext *paint_context, ClutterStageView *view,
ClutterFrame *frame,
gconstpointer *data) gconstpointer *data)
{ {
static GTimer *timer = NULL; static GTimer *timer = NULL;

View File

@ -28,9 +28,10 @@ clutter_perf_fps_init (void)
g_random_set_seed (12345678); g_random_set_seed (12345678);
} }
static void perf_stage_after_paint_cb (ClutterStage *stage, static void perf_stage_after_paint_cb (ClutterStage *stage,
ClutterPaintContext *paint_context, ClutterStageView *view,
gpointer *data); ClutterFrame *frame,
gpointer *data);
static gboolean perf_fake_mouse_cb (gpointer stage); static gboolean perf_fake_mouse_cb (gpointer stage);
static inline void static inline void
@ -53,9 +54,10 @@ clutter_perf_fps_report (const gchar *id)
} }
static void static void
perf_stage_after_paint_cb (ClutterStage *stage, perf_stage_after_paint_cb (ClutterStage *stage,
ClutterPaintContext *paint_context, ClutterStageView *view,
gpointer *data) ClutterFrame *frame,
gpointer *data)
{ {
if (!testtimer) if (!testtimer)
testtimer = g_timer_new (); testtimer = g_timer_new ();

View File

@ -16,7 +16,8 @@ static const ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff };
static void static void
on_after_paint (ClutterActor *actor, on_after_paint (ClutterActor *actor,
ClutterPaintContext *paint_context, ClutterStageView *stage_view,
ClutterFrame *frame,
void *state) void *state)
{ {
float saved_viewport[4]; float saved_viewport[4];

View File

@ -140,9 +140,10 @@ check_paint (TestState *state, int x, int y, int scale)
#define FRAME_COUNT_UPDATED 8 #define FRAME_COUNT_UPDATED 8
static void static void
on_after_paint (ClutterActor *actor, on_after_paint (ClutterActor *actor,
ClutterPaintContext *paint_context, ClutterStageView *view,
TestState *state) ClutterFrame *frame,
TestState *state)
{ {
CoglPipeline *pipeline; CoglPipeline *pipeline;

View File

@ -64,11 +64,11 @@ assert_rectangle_color_and_black_border (int x,
assert_region_color (x-10, y+height, width+20, 10, 0x00, 0x00, 0x00, 0xff); assert_region_color (x-10, y+height, width+20, 10, 0x00, 0x00, 0x00, 0xff);
} }
static void static void
on_after_paint (ClutterActor *actor, on_after_paint (ClutterActor *actor,
ClutterPaintContext *paint_context, ClutterStageView *view,
void *state) ClutterFrame *frame,
void *state)
{ {
float saved_viewport[4]; float saved_viewport[4];
graphene_matrix_t saved_projection; graphene_matrix_t saved_projection;

View File

@ -88,6 +88,7 @@ meta_backend_test_create_color_manager (MetaBackend *backend)
static void static void
on_after_update (ClutterStage *stage, on_after_update (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
ClutterFrame *frame,
gboolean *was_updated) gboolean *was_updated)
{ {
*was_updated = TRUE; *was_updated = TRUE;

View File

@ -105,6 +105,7 @@ on_effects_completed (ClutterActor *actor,
static void static void
check_for_pending_effects (ClutterStage *stage, check_for_pending_effects (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
ClutterFrame *frame,
PendingEffectsData *data) PendingEffectsData *data)
{ {
MetaWindow *window; MetaWindow *window;
@ -178,6 +179,7 @@ sync_point (struct wl_client *client,
static void static void
on_after_paint (ClutterStage *stage, on_after_paint (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
ClutterFrame *frame,
struct wl_resource *callback) struct wl_resource *callback)
{ {
g_signal_handlers_disconnect_by_data (stage, callback); g_signal_handlers_disconnect_by_data (stage, callback);

View File

@ -54,6 +54,7 @@ static MetaContext *test_context;
static void static void
on_after_update (ClutterStage *stage, on_after_update (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
KmsRenderingTest *test) KmsRenderingTest *test)
{ {
test->number_of_frames_left--; test->number_of_frames_left--;
@ -90,6 +91,7 @@ meta_test_kms_render_basic (void)
static void static void
on_scanout_before_update (ClutterStage *stage, on_scanout_before_update (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
KmsRenderingTest *test) KmsRenderingTest *test)
{ {
test->scanout.n_paints = 0; test->scanout.n_paints = 0;
@ -99,6 +101,7 @@ on_scanout_before_update (ClutterStage *stage,
static void static void
on_scanout_before_paint (ClutterStage *stage, on_scanout_before_paint (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
KmsRenderingTest *test) KmsRenderingTest *test)
{ {
CoglScanout *scanout; CoglScanout *scanout;
@ -118,6 +121,7 @@ static void
on_scanout_paint_view (ClutterStage *stage, on_scanout_paint_view (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
cairo_region_t *region, cairo_region_t *region,
ClutterFrame *frame,
KmsRenderingTest *test) KmsRenderingTest *test)
{ {
test->scanout.n_paints++; test->scanout.n_paints++;

View File

@ -94,6 +94,7 @@ meta_test_stage_views_exist (void)
static void static void
on_after_paint (ClutterStage *stage, on_after_paint (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
ClutterFrame *frame,
gboolean *was_painted) gboolean *was_painted)
{ {
*was_painted = TRUE; *was_painted = TRUE;

View File

@ -126,6 +126,7 @@ subsurface_invalid_xdg_shell_actions (void)
static void static void
on_after_paint (ClutterStage *stage, on_after_paint (ClutterStage *stage,
ClutterStageView *view, ClutterStageView *view,
ClutterFrame *frame,
gboolean *was_painted) gboolean *was_painted)
{ {
*was_painted = TRUE; *was_painted = TRUE;

View File

@ -130,6 +130,7 @@ discard_non_cursor_feedbacks (struct wl_list *feedbacks)
static void static void
on_after_paint (ClutterStage *stage, on_after_paint (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaWaylandCompositor *compositor) MetaWaylandCompositor *compositor)
{ {
struct wl_list *feedbacks; struct wl_list *feedbacks;

View File

@ -214,6 +214,7 @@ meta_wayland_compositor_update (MetaWaylandCompositor *compositor,
static void static void
on_after_update (ClutterStage *stage, on_after_update (ClutterStage *stage,
ClutterStageView *stage_view, ClutterStageView *stage_view,
ClutterFrame *frame,
MetaWaylandCompositor *compositor) MetaWaylandCompositor *compositor)
{ {
GList *l; GList *l;