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




commit c4a9fe0a10b31b59fb4ef935e4e17a9745b25fd4
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 9553ef6e4c..6b3d590cbd 100644
--- a/clutter/clutter/clutter-util.c
+++ b/clutter/clutter/clutter-util.c
@@ -49,6 +49,14 @@
 
 #define ROUND_TO_256THS(x) (roundf ((x) * 256) / 256)
 
+typedef struct
+{
+  float x;
+  float y;
+  float z;
+  float w;
+} ClutterVertex4;
+
 void
 _clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
                                         const CoglMatrix *projection,
@@ -307,18 +315,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]