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
This commit is contained in:
Georges Basile Stavracas Neto 2020-09-09 19:45:20 -03:00
parent eed3c62751
commit f61377bb5e
2 changed files with 8 additions and 28 deletions

View File

@ -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,

View File

@ -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