[mutter/gbsneto/graphene-matrix: 11/39] clutter: Register progress function for graphene_matrix_t
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/graphene-matrix: 11/39] clutter: Register progress function for graphene_matrix_t
- Date: Tue, 22 Sep 2020 12:55:00 +0000 (UTC)
commit d6875baec210c7dbdd6a710fee4d49d6039c5075
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Sep 11 10:34:28 2020 -0300
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 d1c447a5e5..409c189b07 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]