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
This commit is contained in:
Georges Basile Stavracas Neto 2020-09-11 10:34:28 -03:00
parent 6512138791
commit 1f38494a7a

View File

@ -29,6 +29,23 @@
#include "clutter-private.h" #include "clutter-private.h"
#include "clutter-types.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 static gboolean
graphene_point_progress (const GValue *a, graphene_point_progress (const GValue *a,
const GValue *b, const GValue *b,
@ -100,6 +117,8 @@ graphene_size_progress (const GValue *a,
void void
clutter_graphene_init (void) clutter_graphene_init (void)
{ {
clutter_interval_register_progress_func (GRAPHENE_TYPE_MATRIX,
graphene_matrix_progress);
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT, clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT,
graphene_point_progress); graphene_point_progress);
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT3D, clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT3D,