From 1f38494a7a0bb81950a96a68dfb59da82f8f0376 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 11 Sep 2020 10:34:28 -0300 Subject: [PATCH] clutter: Register progress function for graphene_matrix_t Soon, there'll be no CoglMatrix anymore, and to pair CoglMatrix's progress function, add the same for graphene_matrix_t. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439 --- clutter/clutter/clutter-graphene.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/clutter/clutter/clutter-graphene.c b/clutter/clutter/clutter-graphene.c index d1c447a5e..409c189b0 100644 --- a/clutter/clutter/clutter-graphene.c +++ b/clutter/clutter/clutter-graphene.c @@ -29,6 +29,23 @@ #include "clutter-private.h" #include "clutter-types.h" +static gboolean +graphene_matrix_progress (const GValue *a, + const GValue *b, + double progress, + GValue *retval) +{ + const graphene_matrix_t *am = g_value_get_boxed (a); + const graphene_matrix_t *bm = g_value_get_boxed (b); + graphene_matrix_t res; + + graphene_matrix_interpolate (am, bm, progress, &res); + + g_value_set_boxed (retval, &res); + + return TRUE; +} + static gboolean graphene_point_progress (const GValue *a, const GValue *b, @@ -100,6 +117,8 @@ graphene_size_progress (const GValue *a, void clutter_graphene_init (void) { + clutter_interval_register_progress_func (GRAPHENE_TYPE_MATRIX, + graphene_matrix_progress); clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT, graphene_point_progress); clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT3D,