mirror of
https://github.com/brl/mutter.git
synced 2025-06-25 22:47:06 +00:00
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:
@ -234,6 +234,7 @@ static void
|
||||
view_painted_cb (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
cairo_region_t *redraw_clip,
|
||||
ClutterFrame *frame,
|
||||
gpointer data)
|
||||
{
|
||||
CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);
|
||||
|
@ -5,6 +5,7 @@
|
||||
static void
|
||||
on_after_update (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gboolean *was_updated)
|
||||
{
|
||||
*was_updated = TRUE;
|
||||
|
@ -102,6 +102,7 @@ generate_round_texture (CoglContext *ctx)
|
||||
static void
|
||||
on_after_paint (ClutterActor *stage,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
Data *data)
|
||||
{
|
||||
CoglFramebuffer *framebuffer =
|
||||
|
@ -38,7 +38,8 @@ do_events (ClutterActor *stage)
|
||||
|
||||
static void
|
||||
on_after_paint (ClutterActor *stage,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gconstpointer *data)
|
||||
{
|
||||
do_events (stage);
|
||||
|
@ -14,7 +14,8 @@ static int rows, cols;
|
||||
|
||||
static void
|
||||
on_after_paint (ClutterActor *actor,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gconstpointer *data)
|
||||
{
|
||||
static GTimer *timer = NULL;
|
||||
|
@ -13,7 +13,8 @@
|
||||
|
||||
static void
|
||||
on_after_paint (ClutterActor *actor,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gconstpointer *data)
|
||||
{
|
||||
static GTimer *timer = NULL;
|
||||
|
@ -28,9 +28,10 @@ clutter_perf_fps_init (void)
|
||||
g_random_set_seed (12345678);
|
||||
}
|
||||
|
||||
static void perf_stage_after_paint_cb (ClutterStage *stage,
|
||||
ClutterPaintContext *paint_context,
|
||||
gpointer *data);
|
||||
static void perf_stage_after_paint_cb (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gpointer *data);
|
||||
static gboolean perf_fake_mouse_cb (gpointer stage);
|
||||
|
||||
static inline void
|
||||
@ -53,9 +54,10 @@ clutter_perf_fps_report (const gchar *id)
|
||||
}
|
||||
|
||||
static void
|
||||
perf_stage_after_paint_cb (ClutterStage *stage,
|
||||
ClutterPaintContext *paint_context,
|
||||
gpointer *data)
|
||||
perf_stage_after_paint_cb (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gpointer *data)
|
||||
{
|
||||
if (!testtimer)
|
||||
testtimer = g_timer_new ();
|
||||
|
@ -16,7 +16,8 @@ static const ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
|
||||
static void
|
||||
on_after_paint (ClutterActor *actor,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterStageView *stage_view,
|
||||
ClutterFrame *frame,
|
||||
void *state)
|
||||
{
|
||||
float saved_viewport[4];
|
||||
|
@ -140,9 +140,10 @@ check_paint (TestState *state, int x, int y, int scale)
|
||||
#define FRAME_COUNT_UPDATED 8
|
||||
|
||||
static void
|
||||
on_after_paint (ClutterActor *actor,
|
||||
ClutterPaintContext *paint_context,
|
||||
TestState *state)
|
||||
on_after_paint (ClutterActor *actor,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
TestState *state)
|
||||
{
|
||||
CoglPipeline *pipeline;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
on_after_paint (ClutterActor *actor,
|
||||
ClutterPaintContext *paint_context,
|
||||
void *state)
|
||||
on_after_paint (ClutterActor *actor,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
void *state)
|
||||
{
|
||||
float saved_viewport[4];
|
||||
graphene_matrix_t saved_projection;
|
||||
|
@ -88,6 +88,7 @@ meta_backend_test_create_color_manager (MetaBackend *backend)
|
||||
static void
|
||||
on_after_update (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gboolean *was_updated)
|
||||
{
|
||||
*was_updated = TRUE;
|
||||
|
@ -105,6 +105,7 @@ on_effects_completed (ClutterActor *actor,
|
||||
static void
|
||||
check_for_pending_effects (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
PendingEffectsData *data)
|
||||
{
|
||||
MetaWindow *window;
|
||||
@ -178,6 +179,7 @@ sync_point (struct wl_client *client,
|
||||
static void
|
||||
on_after_paint (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
struct wl_resource *callback)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_data (stage, callback);
|
||||
|
@ -54,6 +54,7 @@ static MetaContext *test_context;
|
||||
static void
|
||||
on_after_update (ClutterStage *stage,
|
||||
ClutterStageView *stage_view,
|
||||
ClutterFrame *frame,
|
||||
KmsRenderingTest *test)
|
||||
{
|
||||
test->number_of_frames_left--;
|
||||
@ -90,6 +91,7 @@ meta_test_kms_render_basic (void)
|
||||
static void
|
||||
on_scanout_before_update (ClutterStage *stage,
|
||||
ClutterStageView *stage_view,
|
||||
ClutterFrame *frame,
|
||||
KmsRenderingTest *test)
|
||||
{
|
||||
test->scanout.n_paints = 0;
|
||||
@ -99,6 +101,7 @@ on_scanout_before_update (ClutterStage *stage,
|
||||
static void
|
||||
on_scanout_before_paint (ClutterStage *stage,
|
||||
ClutterStageView *stage_view,
|
||||
ClutterFrame *frame,
|
||||
KmsRenderingTest *test)
|
||||
{
|
||||
CoglScanout *scanout;
|
||||
@ -118,6 +121,7 @@ static void
|
||||
on_scanout_paint_view (ClutterStage *stage,
|
||||
ClutterStageView *stage_view,
|
||||
cairo_region_t *region,
|
||||
ClutterFrame *frame,
|
||||
KmsRenderingTest *test)
|
||||
{
|
||||
test->scanout.n_paints++;
|
||||
|
@ -94,6 +94,7 @@ meta_test_stage_views_exist (void)
|
||||
static void
|
||||
on_after_paint (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gboolean *was_painted)
|
||||
{
|
||||
*was_painted = TRUE;
|
||||
|
@ -126,6 +126,7 @@ subsurface_invalid_xdg_shell_actions (void)
|
||||
static void
|
||||
on_after_paint (ClutterStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterFrame *frame,
|
||||
gboolean *was_painted)
|
||||
{
|
||||
*was_painted = TRUE;
|
||||
|
Reference in New Issue
Block a user