[mutter/gbsneto/graphene-matrix: 10/71] clutter/util: Make ClutterVertex4 internal to clutter-util.c




commit 886713ab1a7520265045f5672e468e4a5ba53ab8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Sep 9 19:45:20 2020 -0300

    clutter/util: Make ClutterVertex4 internal to clutter-util.c
    
    It's an implementation detail now, and not used not exposed anywhere.
    One less Clutter type for us to deal with \o/
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439

 clutter/clutter/clutter-private.h | 16 ----------------
 clutter/clutter/clutter-util.c    | 20 ++++++++------------
 2 files changed, 8 insertions(+), 28 deletions(-)
---
diff --git a/clutter/clutter/clutter-private.h b/clutter/clutter/clutter-private.h
index 22050f24c3..687c4856e8 100644
--- a/clutter/clutter/clutter-private.h
+++ b/clutter/clutter/clutter-private.h
@@ -44,7 +44,6 @@
 G_BEGIN_DECLS
 
 typedef struct _ClutterMainContext      ClutterMainContext;
-typedef struct _ClutterVertex4          ClutterVertex4;
 
 #define CLUTTER_REGISTER_VALUE_TRANSFORM_TO(TYPE_TO,func)             { \
   g_value_register_transform_func (g_define_type_id, TYPE_TO, func);    \
@@ -240,21 +239,6 @@ gboolean _clutter_util_rectangle_intersection (const cairo_rectangle_int_t *src1
 gboolean clutter_util_rectangle_equal (const cairo_rectangle_int_t *src1,
                                        const cairo_rectangle_int_t *src2);
 
-
-struct _ClutterVertex4
-{
-  float x;
-  float y;
-  float z;
-  float w;
-};
-
-void
-_clutter_util_vertex4_interpolate (const ClutterVertex4 *a,
-                                   const ClutterVertex4 *b,
-                                   double                progress,
-                                   ClutterVertex4       *res);
-
 float   _clutter_util_matrix_determinant        (const CoglMatrix *matrix);
 
 gboolean        _clutter_util_matrix_decompose  (const CoglMatrix *src,
diff --git a/clutter/clutter/clutter-util.c b/clutter/clutter/clutter-util.c
index 2b0f8a7da8..d1b01a882d 100644
--- a/clutter/clutter/clutter-util.c
+++ b/clutter/clutter/clutter-util.c
@@ -47,6 +47,14 @@
 #define MTX_GL_SCALE_Y(y,w,v1,v2) ((v1) - (((((y) / (w)) + 1.0f) / 2.0f) * (v1)) + (v2))
 #define MTX_GL_SCALE_Z(z,w,v1,v2) (MTX_GL_SCALE_X ((z), (w), (v1), (v2)))
 
+typedef struct
+{
+  float x;
+  float y;
+  float z;
+  float w;
+} ClutterVertex4;
+
 void
 _clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
                                         const CoglMatrix *projection,
@@ -301,18 +309,6 @@ _clutter_util_vertex_combine (const graphene_point3d_t *a,
   res->z = (ascl * a->z) + (bscl * b->z);
 }
 
-void
-_clutter_util_vertex4_interpolate (const ClutterVertex4 *a,
-                                   const ClutterVertex4 *b,
-                                   double                progress,
-                                   ClutterVertex4       *res)
-{
-  res->x = a->x + (b->x - a->x) * progress;
-  res->y = a->y + (b->y - a->y) * progress;
-  res->z = a->z + (b->z - a->z) * progress;
-  res->w = a->w + (b->w - a->w) * progress;
-}
-
 /*< private >
  * clutter_util_matrix_decompose:
  * @src: the matrix to decompose


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]