[mutter/gbsneto/graphene-matrix: 20/44] cogl/matrix: Remove custom boxed type
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/graphene-matrix: 20/44] cogl/matrix: Remove custom boxed type
- Date: Tue, 6 Oct 2020 15:00:01 +0000 (UTC)
commit 56d2af1588dc312bda5b1880b95f27cf20c8f47b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Sep 11 14:53:32 2020 -0300
cogl/matrix: Remove custom boxed type
Given that CoglMatrix is simply a typedef to graphene_matrix_t, we can
remove all the GType machinery and reuse Graphene's.
Also remove the clutter-cogl helper, and cogl_matrix_to_graphene_matrix()
which is now unused.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
clutter/clutter/clutter-actor.c | 4 +--
clutter/clutter/clutter-cogl.c | 62 -----------------------------------------
clutter/clutter/clutter-cogl.h | 30 --------------------
clutter/clutter/clutter-main.c | 2 --
clutter/clutter/meson.build | 2 --
cogl/cogl/cogl-matrix.c | 17 -----------
cogl/cogl/cogl-matrix.h | 35 -----------------------
7 files changed, 2 insertions(+), 150 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 8e2ac6154b..f8141e3123 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -6908,7 +6908,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_param_spec_boxed ("transform",
P_("Transform"),
P_("Transformation matrix"),
- COGL_GTYPE_TYPE_MATRIX,
+ GRAPHENE_TYPE_MATRIX,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
CLUTTER_PARAM_ANIMATABLE);
@@ -6946,7 +6946,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_param_spec_boxed ("child-transform",
P_("Child Transform"),
P_("Children transformation matrix"),
- COGL_GTYPE_TYPE_MATRIX,
+ GRAPHENE_TYPE_MATRIX,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
CLUTTER_PARAM_ANIMATABLE);
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index 78e717704e..1dbca4782d 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -53,7 +53,6 @@
#include "clutter-actor-private.h"
#include "clutter-backend-private.h"
-#include "clutter-cogl.h"
#include "clutter-config.h"
#include "clutter-debug.h"
#include "clutter-event-private.h"
@@ -2021,7 +2020,6 @@ clutter_base_init (void)
g_type_init ();
#endif
- clutter_cogl_init ();
clutter_graphene_init ();
}
}
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index 067669c7f4..18994df8d1 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -109,7 +109,6 @@ clutter_sources = [
'clutter-child-meta.c',
'clutter-click-action.c',
'clutter-clone.c',
- 'clutter-cogl.c',
'clutter-color.c',
'clutter-colorize-effect.c',
'clutter-constraint.c',
@@ -184,7 +183,6 @@ clutter_private_headers = [
'clutter-actor-private.h',
'clutter-backend-private.h',
'clutter-bezier.h',
- 'clutter-cogl.h',
'clutter-constraint-private.h',
'clutter-content-private.h',
'clutter-damage-history.h',
diff --git a/cogl/cogl/cogl-matrix.c b/cogl/cogl/cogl-matrix.c
index a5dc20dbaf..4101569834 100644
--- a/cogl/cogl/cogl-matrix.c
+++ b/cogl/cogl/cogl-matrix.c
@@ -42,11 +42,6 @@
#include <math.h>
#include <string.h>
-#include <cogl-gtype-private.h>
-COGL_GTYPE_DEFINE_BOXED (Matrix, matrix,
- cogl_matrix_copy,
- cogl_matrix_free);
-
void
cogl_matrix_multiply (CoglMatrix *result,
const CoglMatrix *a,
@@ -692,12 +687,6 @@ cogl_matrix_transpose (CoglMatrix *matrix)
graphene_matrix_transpose (matrix, matrix);
}
-GType
-cogl_gtype_matrix_get_type (void)
-{
- return cogl_matrix_get_gtype ();
-}
-
void
cogl_matrix_skew_xy (CoglMatrix *matrix,
float factor)
@@ -736,9 +725,3 @@ cogl_matrix_skew_yz (CoglMatrix *matrix,
_COGL_MATRIX_DEBUG_PRINT (matrix);
}
-
-const graphene_matrix_t *
-cogl_matrix_get_graphene_matrix (const CoglMatrix *matrix)
-{
- return matrix;
-}
diff --git a/cogl/cogl/cogl-matrix.h b/cogl/cogl/cogl-matrix.h
index d18ad674d9..072ed61d4d 100644
--- a/cogl/cogl/cogl-matrix.h
+++ b/cogl/cogl/cogl-matrix.h
@@ -673,29 +673,6 @@ cogl_matrix_transpose (CoglMatrix *matrix);
COGL_EXPORT void
cogl_debug_matrix_print (const CoglMatrix *matrix);
-#define COGL_GTYPE_TYPE_MATRIX (cogl_matrix_get_gtype ())
-
-/**
- * cogl_matrix_get_gtype:
- *
- * Returns: a #GType that can be used with the GLib type system.
- */
-COGL_EXPORT
-GType cogl_matrix_get_gtype (void);
-
-/**
- * cogl_gtype_matrix_get_type:
- *
- * Returns: the GType for the registered "CoglMatrix" boxed type. This
- * can be used for example to define GObject properties that accept a
- * #CoglMatrix value.
- *
- * Deprecated: 1.18: Use cogl_matrix_get_gtype() instead.
- */
-COGL_EXPORT GType
-cogl_gtype_matrix_get_type (void);
-
-
/**
* cogl_matrix_determinant:
* @matrix: a #CoglMatrix
@@ -740,18 +717,6 @@ COGL_EXPORT void
cogl_matrix_skew_yz (CoglMatrix *matrix,
float factor);
-/**
- * cogl_matrix_get_graphene_matrix:
- * @matrix: a #CoglMatrix
- *
- * Retrieves the internal #graphene_matrix_t of @matrix. It should not
- * be modified, and must be considered read-only.
- *
- * Returns: (transfer none): a #graphene_matrix_t
- */
-COGL_EXPORT const graphene_matrix_t *
-cogl_matrix_get_graphene_matrix (const CoglMatrix *matrix);
-
G_END_DECLS
#endif /* __COGL_MATRIX_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]