[mutter/gbsneto/graphene: 10/16] Replace ClutterVertex by graphene_point3d_t



commit b3fd79d6ddabf672148e434671af652ae388cb18
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Feb 20 10:18:48 2019 -0300

    Replace ClutterVertex by graphene_point3d_t
    
    Pretty direct and straightforward port. This requires
    a GNOME Shell counterpart.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/458

 clutter/clutter/cally/cally-actor.c            |   2 +-
 clutter/clutter/cally/cally-text.c             |   4 +-
 clutter/clutter/clutter-actor-box.c            |   4 +-
 clutter/clutter/clutter-actor-private.h        |   4 +-
 clutter/clutter/clutter-actor.c                |  94 ++++++------
 clutter/clutter/clutter-actor.h                |  12 +-
 clutter/clutter/clutter-autocleanups.h         |   1 -
 clutter/clutter/clutter-base-types.c           | 196 ++-----------------------
 clutter/clutter/clutter-bind-constraint.c      |   2 +-
 clutter/clutter/clutter-blur-effect.c          |   2 +-
 clutter/clutter/clutter-offscreen-effect.c     |   4 +-
 clutter/clutter/clutter-paint-volume-private.h |   2 +-
 clutter/clutter/clutter-paint-volume.c         |  24 +--
 clutter/clutter/clutter-private.h              |  18 +--
 clutter/clutter/clutter-text.c                 |   6 +-
 clutter/clutter/clutter-types.h                |  73 +--------
 clutter/clutter/clutter-util.c                 |  42 +++---
 clutter/clutter/clutter-zoom-action.c          |   2 +-
 clutter/clutter/deprecated/clutter-animation.c |   2 +-
 clutter/clutter/deprecated/clutter-texture.c   |   2 +-
 clutter/tests/conform/actor-anchors.c          |   8 +-
 clutter/tests/interactive/test-layout.c        |   2 +-
 src/compositor/clutter-utils.c                 |  14 +-
 src/compositor/clutter-utils.h                 |  10 +-
 src/compositor/meta-window-actor.c             |   2 +-
 src/wayland/meta-wayland-surface.c             |   4 +-
 26 files changed, 150 insertions(+), 386 deletions(-)
---
diff --git a/clutter/clutter/cally/cally-actor.c b/clutter/clutter/cally/cally-actor.c
index 548615f48..f39736325 100644
--- a/clutter/clutter/cally/cally-actor.c
+++ b/clutter/clutter/cally/cally-actor.c
@@ -657,7 +657,7 @@ cally_actor_get_extents (AtkComponent *component,
   ClutterActor *actor      = NULL;
   gint          top_level_x, top_level_y;
   gfloat        f_width, f_height;
-  ClutterVertex verts[4];
+  graphene_point3d_t verts[4];
   ClutterActor  *stage = NULL;
 
   g_return_if_fail (CALLY_IS_ACTOR (component));
diff --git a/clutter/clutter/cally/cally-text.c b/clutter/clutter/cally/cally-text.c
index 6375a3855..cbdec8496 100644
--- a/clutter/clutter/cally/cally-text.c
+++ b/clutter/clutter/cally/cally-text.c
@@ -1438,7 +1438,7 @@ static void cally_text_get_character_extents (AtkText *text,
   PangoLayout *layout;
   PangoRectangle extents;
   const gchar *text_value;
-  ClutterVertex verts[4];
+  graphene_point3d_t verts[4];
 
   actor = CALLY_GET_CLUTTER_ACTOR (text);
   if (actor == NULL) /* State is defunct */
@@ -2294,7 +2294,7 @@ _cally_misc_get_index_at_point (ClutterText *clutter_text,
   gint index, x_window, y_window, x_toplevel, y_toplevel;
   gint x_temp, y_temp;
   gboolean ret;
-  ClutterVertex verts[4];
+  graphene_point3d_t verts[4];
   PangoLayout *layout;
   gint x_layout, y_layout;
 
diff --git a/clutter/clutter/clutter-actor-box.c b/clutter/clutter/clutter-actor-box.c
index 8be2f377e..58631f7cf 100644
--- a/clutter/clutter/clutter-actor-box.c
+++ b/clutter/clutter/clutter-actor-box.c
@@ -340,7 +340,7 @@ clutter_actor_box_contains (const ClutterActorBox *box,
 /**
  * clutter_actor_box_from_vertices:
  * @box: a #ClutterActorBox
- * @verts: (array fixed-size=4): array of four #ClutterVertex
+ * @verts: (array fixed-size=4): array of four #graphene_point3d_t
  *
  * Calculates the bounding box represented by the four vertices; for details
  * of the vertex array see clutter_actor_get_abs_allocation_vertices().
@@ -349,7 +349,7 @@ clutter_actor_box_contains (const ClutterActorBox *box,
  */
 void
 clutter_actor_box_from_vertices (ClutterActorBox     *box,
-                                 const ClutterVertex  verts[])
+                                 const graphene_point3d_t  verts[])
 {
   gfloat x_1, x_2, y_1, y_2;
 
diff --git a/clutter/clutter/clutter-actor-private.h b/clutter/clutter/clutter-actor-private.h
index 33ee89563..e3f214fb3 100644
--- a/clutter/clutter/clutter-actor-private.h
+++ b/clutter/clutter/clutter-actor-private.h
@@ -133,7 +133,7 @@ struct _AnchorCoord
     } fraction;
 
     /* Use when is_fractional == FALSE */
-    ClutterVertex units;
+    graphene_point3d_t units;
   } v;
 };
 
@@ -201,7 +201,7 @@ struct _ClutterTransformInfo
   AnchorCoord anchor;
 
   /* translation */
-  ClutterVertex translation;
+  graphene_point3d_t translation;
 
   /* z_position */
   gfloat z_position;
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 685d4d37f..19a44305e 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -2806,8 +2806,8 @@ clutter_actor_real_queue_relayout (ClutterActor *self)
  * @self: A #ClutterActor
  * @ancestor: (allow-none): A #ClutterActor ancestor, or %NULL to use the
  *   default #ClutterStage
- * @point: A point as #ClutterVertex
- * @vertex: (out caller-allocates): The translated #ClutterVertex
+ * @point: A point as #graphene_point3d_t
+ * @vertex: (out caller-allocates): The translated #graphene_point3d_t
  *
  * Transforms @point in coordinates relative to the actor into
  * ancestor-relative coordinates using the relevant transform
@@ -2821,10 +2821,10 @@ clutter_actor_real_queue_relayout (ClutterActor *self)
  * Since: 0.6
  */
 void
-clutter_actor_apply_relative_transform_to_point (ClutterActor        *self,
-                                                ClutterActor        *ancestor,
-                                                const ClutterVertex *point,
-                                                ClutterVertex       *vertex)
+clutter_actor_apply_relative_transform_to_point (ClutterActor             *self,
+                                                 ClutterActor             *ancestor,
+                                                 const graphene_point3d_t *point,
+                                                 graphene_point3d_t       *vertex)
 {
   gfloat w;
   CoglMatrix matrix;
@@ -2851,10 +2851,10 @@ clutter_actor_apply_relative_transform_to_point (ClutterActor        *self,
 }
 
 static gboolean
-_clutter_actor_fully_transform_vertices (ClutterActor *self,
-                                         const ClutterVertex *vertices_in,
-                                         ClutterVertex *vertices_out,
-                                         int n_vertices)
+_clutter_actor_fully_transform_vertices (ClutterActor             *self,
+                                         const graphene_point3d_t *vertices_in,
+                                         graphene_point3d_t       *vertices_out,
+                                         int                       n_vertices)
 {
   ClutterActor *stage;
   CoglMatrix modelview;
@@ -2896,8 +2896,8 @@ _clutter_actor_fully_transform_vertices (ClutterActor *self,
 /**
  * clutter_actor_apply_transform_to_point:
  * @self: A #ClutterActor
- * @point: A point as #ClutterVertex
- * @vertex: (out caller-allocates): The translated #ClutterVertex
+ * @point: A point as #graphene_point3d_t
+ * @vertex: (out caller-allocates): The translated #graphene_point3d_t
  *
  * Transforms @point in coordinates relative to the actor
  * into screen-relative coordinates with the current actor
@@ -2906,9 +2906,9 @@ _clutter_actor_fully_transform_vertices (ClutterActor *self,
  * Since: 0.4
  **/
 void
-clutter_actor_apply_transform_to_point (ClutterActor        *self,
-                                        const ClutterVertex *point,
-                                        ClutterVertex       *vertex)
+clutter_actor_apply_transform_to_point (ClutterActor             *self,
+                                        const graphene_point3d_t *point,
+                                        graphene_point3d_t       *vertex)
 {
   g_return_if_fail (point != NULL);
   g_return_if_fail (vertex != NULL);
@@ -2958,10 +2958,10 @@ _clutter_actor_get_relative_transformation_matrix (ClutterActor *self,
  * transformed vertices to @verts[]. */
 static gboolean
 _clutter_actor_transform_and_project_box (ClutterActor          *self,
-                                         const ClutterActorBox *box,
-                                         ClutterVertex          verts[])
+                                          const ClutterActorBox *box,
+                                          graphene_point3d_t    *verts)
 {
-  ClutterVertex box_vertices[4];
+  graphene_point3d_t box_vertices[4];
 
   box_vertices[0].x = box->x1;
   box_vertices[0].y = box->y1;
@@ -2985,8 +2985,8 @@ _clutter_actor_transform_and_project_box (ClutterActor          *self,
  * @self: A #ClutterActor
  * @ancestor: (allow-none): A #ClutterActor to calculate the vertices
  *   against, or %NULL to use the #ClutterStage
- * @verts: (out) (array fixed-size=4) (element-type Clutter.Vertex): return
- *   location for an array of 4 #ClutterVertex in which to store the result
+ * @verts: (out) (array fixed-size=4): return
+ *   location for an array of 4 #graphene_point3d_t in which to store the result
  *
  * Calculates the transformed coordinates of the four corners of the
  * actor in the plane of @ancestor. The returned vertices relate to
@@ -3005,13 +3005,13 @@ _clutter_actor_transform_and_project_box (ClutterActor          *self,
  * Since: 0.6
  */
 void
-clutter_actor_get_allocation_vertices (ClutterActor  *self,
-                                       ClutterActor  *ancestor,
-                                       ClutterVertex  verts[])
+clutter_actor_get_allocation_vertices (ClutterActor       *self,
+                                       ClutterActor       *ancestor,
+                                       graphene_point3d_t *verts)
 {
   ClutterActorPrivate *priv;
   ClutterActorBox box;
-  ClutterVertex vertices[4];
+  graphene_point3d_t vertices[4];
   CoglMatrix modelview;
 
   g_return_if_fail (CLUTTER_IS_ACTOR (self));
@@ -3063,9 +3063,9 @@ clutter_actor_get_allocation_vertices (ClutterActor  *self,
 
   cogl_matrix_transform_points (&modelview,
                                 3,
-                                sizeof (ClutterVertex),
+                                sizeof (graphene_point3d_t),
                                 vertices,
-                                sizeof (ClutterVertex),
+                                sizeof (graphene_point3d_t),
                                 vertices,
                                 4);
 }
@@ -3074,7 +3074,7 @@ clutter_actor_get_allocation_vertices (ClutterActor  *self,
  * clutter_actor_get_abs_allocation_vertices:
  * @self: A #ClutterActor
  * @verts: (out) (array fixed-size=4): Pointer to a location of an array
- *   of 4 #ClutterVertex where to store the result.
+ *   of 4 #graphene_point3d_t where to store the result.
  *
  * Calculates the transformed screen coordinates of the four corners of
  * the actor; the returned vertices relate to the #ClutterActorBox
@@ -3088,8 +3088,8 @@ clutter_actor_get_allocation_vertices (ClutterActor  *self,
  * Since: 0.4
  */
 void
-clutter_actor_get_abs_allocation_vertices (ClutterActor  *self,
-                                           ClutterVertex  verts[])
+clutter_actor_get_abs_allocation_vertices (ClutterActor       *self,
+                                           graphene_point3d_t *verts)
 {
   ClutterActorPrivate *priv;
   ClutterActorBox actor_space_allocation;
@@ -3330,7 +3330,7 @@ _clutter_actor_draw_paint_volume_full (ClutterActor *self,
 {
   static CoglPipeline *outline = NULL;
   CoglPrimitive *prim;
-  ClutterVertex line_ends[12 * 2];
+  graphene_point3d_t line_ends[12 * 2];
   int n_vertices;
   CoglContext *ctx =
     clutter_backend_get_cogl_context (clutter_get_default_backend ());
@@ -4391,7 +4391,7 @@ static const ClutterTransformInfo default_transform_info = {
 
   { 0, },                       /* anchor XXX:2.0 - remove*/
 
-  CLUTTER_VERTEX_INIT_ZERO,     /* translation */
+  GRAPHENE_POINT3D_INIT_ZERO,     /* translation */
 
   0.f,                          /* z-position */
 
@@ -4782,9 +4782,9 @@ clutter_actor_get_rotation_angle (ClutterActor      *self,
 static inline void
 clutter_actor_set_rotation_center_internal (ClutterActor        *self,
                                             ClutterRotateAxis    axis,
-                                            const ClutterVertex *center)
+                                            const graphene_point3d_t *center)
 {
-  ClutterVertex v = CLUTTER_VERTEX_INIT_ZERO; 
+  graphene_point3d_t v = GRAPHENE_POINT3D_INIT_ZERO;
   GObject *obj = G_OBJECT (self);
   ClutterTransformInfo *info;
 
@@ -5689,7 +5689,7 @@ clutter_actor_get_property (GObject    *object,
 
     case PROP_ROTATION_CENTER_X: /* XXX:2.0 - remove */
       {
-        ClutterVertex center;
+        graphene_point3d_t center;
 
         clutter_actor_get_rotation (actor, CLUTTER_X_AXIS,
                                     &center.x,
@@ -5702,7 +5702,7 @@ clutter_actor_get_property (GObject    *object,
 
     case PROP_ROTATION_CENTER_Y: /* XXX:2.0 - remove */
       {
-        ClutterVertex center;
+        graphene_point3d_t center;
 
         clutter_actor_get_rotation (actor, CLUTTER_Y_AXIS,
                                     &center.x,
@@ -5715,7 +5715,7 @@ clutter_actor_get_property (GObject    *object,
 
     case PROP_ROTATION_CENTER_Z: /* XXX:2.0 - remove */
       {
-        ClutterVertex center;
+        graphene_point3d_t center;
 
         clutter_actor_get_rotation (actor, CLUTTER_Z_AXIS,
                                     &center.x,
@@ -6125,7 +6125,7 @@ clutter_actor_update_default_paint_volume (ClutterActor       *self,
           priv->clip.size.width >= 0 &&
           priv->clip.size.height >= 0)
         {
-          ClutterVertex origin;
+          graphene_point3d_t origin;
 
           origin.x = priv->clip.origin.x;
           origin.y = priv->clip.origin.y;
@@ -7166,7 +7166,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
     g_param_spec_boxed ("rotation-center-x",
                         P_("Rotation Center X"),
                         P_("The rotation center on the X axis"),
-                        CLUTTER_TYPE_VERTEX,
+                        GRAPHENE_TYPE_POINT3D,
                         G_PARAM_READWRITE |
                         G_PARAM_STATIC_STRINGS |
                         G_PARAM_DEPRECATED);
@@ -7184,7 +7184,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
     g_param_spec_boxed ("rotation-center-y",
                         P_("Rotation Center Y"),
                         P_("The rotation center on the Y axis"),
-                        CLUTTER_TYPE_VERTEX,
+                        GRAPHENE_TYPE_POINT3D,
                         G_PARAM_READWRITE |
                         G_PARAM_STATIC_STRINGS |
                         G_PARAM_DEPRECATED);
@@ -7202,7 +7202,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
     g_param_spec_boxed ("rotation-center-z",
                         P_("Rotation Center Z"),
                         P_("The rotation center on the Z axis"),
-                        CLUTTER_TYPE_VERTEX,
+                        GRAPHENE_TYPE_POINT3D,
                         G_PARAM_READWRITE |
                         G_PARAM_STATIC_STRINGS |
                         G_PARAM_DEPRECATED);
@@ -8827,7 +8827,7 @@ _clutter_actor_queue_redraw_full (ClutterActor             *self,
   if (flags & CLUTTER_REDRAW_CLIPPED_TO_ALLOCATION)
     {
       ClutterActorBox allocation_clip;
-      ClutterVertex origin;
+      graphene_point3d_t origin;
 
       /* If the actor doesn't have a valid allocation then we will
        * queue a full stage redraw. */
@@ -9031,7 +9031,7 @@ clutter_actor_queue_redraw_with_clip (ClutterActor                *self,
                                       const cairo_rectangle_int_t *clip)
 {
   ClutterPaintVolume volume;
-  ClutterVertex origin;
+  graphene_point3d_t origin;
 
   g_return_if_fail (CLUTTER_IS_ACTOR (self));
 
@@ -10839,8 +10839,8 @@ clutter_actor_get_transformed_position (ClutterActor *self,
                                         gfloat       *x,
                                         gfloat       *y)
 {
-  ClutterVertex v1;
-  ClutterVertex v2;
+  graphene_point3d_t v1;
+  graphene_point3d_t v2;
 
   v1.x = v1.y = v1.z = 0;
   clutter_actor_apply_transform_to_point (self, &v1, &v2);
@@ -10886,7 +10886,7 @@ clutter_actor_get_transformed_size (ClutterActor *self,
                                     gfloat       *height)
 {
   ClutterActorPrivate *priv;
-  ClutterVertex v[4];
+  graphene_point3d_t v[4];
   gfloat x_min, x_max, y_min, y_max;
   gint i;
 
@@ -12198,7 +12198,7 @@ clutter_actor_set_rotation (ClutterActor      *self,
                             gfloat             y,
                             gfloat             z)
 {
-  ClutterVertex v;
+  graphene_point3d_t v;
 
   g_return_if_fail (CLUTTER_IS_ACTOR (self));
 
@@ -15141,7 +15141,7 @@ clutter_actor_transform_stage_point (ClutterActor *self,
                                     gfloat       *x_out,
                                     gfloat       *y_out)
 {
-  ClutterVertex v[4];
+  graphene_point3d_t v[4];
   double ST[3][3];
   double RQ[3][3];
   int du, dv;
diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h
index ade912485..c6804cf5b 100644
--- a/clutter/clutter/clutter-actor.h
+++ b/clutter/clutter/clutter-actor.h
@@ -431,7 +431,7 @@ void                            clutter_actor_get_allocation_box
 CLUTTER_EXPORT
 void                            clutter_actor_get_allocation_vertices           (ClutterActor                
*self,
                                                                                  ClutterActor                
*ancestor,
-                                                                                 ClutterVertex               
 verts[]);
+                                                                                 graphene_point3d_t          
*verts);
 CLUTTER_EXPORT
 gboolean                        clutter_actor_has_allocation                    (ClutterActor                
*self);
 CLUTTER_EXPORT
@@ -812,16 +812,16 @@ gboolean                        clutter_actor_transform_stage_point
                                                                                  gfloat                     
*y_out);
 CLUTTER_EXPORT
 void                            clutter_actor_get_abs_allocation_vertices       (ClutterActor               
*self,
-                                                                                 ClutterVertex               
verts[]);
+                                                                                 graphene_point3d_t         
*verts);
 CLUTTER_EXPORT
 void                            clutter_actor_apply_transform_to_point          (ClutterActor               
*self,
-                                                                                 const ClutterVertex        
*point,
-                                                                                 ClutterVertex              
*vertex);
+                                                                                 const graphene_point3d_t   
*point,
+                                                                                 graphene_point3d_t         
*vertex);
 CLUTTER_EXPORT
 void                            clutter_actor_apply_relative_transform_to_point (ClutterActor               
*self,
                                                                                  ClutterActor               
*ancestor,
-                                                                                 const ClutterVertex        
*point,
-                                                                                 ClutterVertex              
*vertex);
+                                                                                 const graphene_point3d_t   
*point,
+                                                                                 graphene_point3d_t         
*vertex);
 
 /* Implicit animations */
 CLUTTER_EXPORT
diff --git a/clutter/clutter/clutter-autocleanups.h b/clutter/clutter/clutter-autocleanups.h
index 10c73fdd4..5896d0451 100644
--- a/clutter/clutter/clutter-autocleanups.h
+++ b/clutter/clutter/clutter-autocleanups.h
@@ -99,7 +99,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathNode, clutter_path_node_free)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPoint, clutter_point_free)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterRect, clutter_rect_free)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSize, clutter_size_free)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterVertex, clutter_vertex_free)
 
 #endif /* __GI_SCANNER__ */
 
diff --git a/clutter/clutter/clutter-base-types.c b/clutter/clutter/clutter-base-types.c
index ba38d7e34..1055e055f 100644
--- a/clutter/clutter/clutter-base-types.c
+++ b/clutter/clutter/clutter-base-types.c
@@ -149,178 +149,6 @@ G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterGeometry, clutter_geometry,
 
 
 
-/*
- * ClutterVertices
- */
-
-/**
- * clutter_vertex_new:
- * @x: X coordinate
- * @y: Y coordinate
- * @z: Z coordinate
- *
- * Creates a new #ClutterVertex for the point in 3D space
- * identified by the 3 coordinates @x, @y, @z.
- *
- * This function is the logical equivalent of:
- *
- * |[
- *   clutter_vertex_init (clutter_vertex_alloc (), x, y, z);
- * ]|
- *
- * Return value: (transfer full): the newly allocated #ClutterVertex.
- *   Use clutter_vertex_free() to free the resources
- *
- * Since: 1.0
- */
-ClutterVertex *
-clutter_vertex_new (gfloat x,
-                    gfloat y,
-                    gfloat z)
-{
-  return clutter_vertex_init (clutter_vertex_alloc (), x, y, z);
-}
-
-/**
- * clutter_vertex_alloc: (constructor)
- *
- * Allocates a new, empty #ClutterVertex.
- *
- * Return value: (transfer full): the newly allocated #ClutterVertex.
- *   Use clutter_vertex_free() to free its resources
- *
- * Since: 1.12
- */
-ClutterVertex *
-clutter_vertex_alloc (void)
-{
-  return g_slice_new0 (ClutterVertex);
-}
-
-/**
- * clutter_vertex_init:
- * @vertex: a #ClutterVertex
- * @x: X coordinate
- * @y: Y coordinate
- * @z: Z coordinate
- *
- * Initializes @vertex with the given coordinates.
- *
- * Return value: (transfer none): the initialized #ClutterVertex
- *
- * Since: 1.10
- */
-ClutterVertex *
-clutter_vertex_init (ClutterVertex *vertex,
-                     gfloat         x,
-                     gfloat         y,
-                     gfloat         z)
-{
-  g_return_val_if_fail (vertex != NULL, NULL);
-
-  vertex->x = x;
-  vertex->y = y;
-  vertex->z = z;
-
-  return vertex;
-}
-
-/**
- * clutter_vertex_copy:
- * @vertex: a #ClutterVertex
- *
- * Copies @vertex
- *
- * Return value: (transfer full): a newly allocated copy of #ClutterVertex.
- *   Use clutter_vertex_free() to free the allocated resources
- *
- * Since: 1.0
- */
-ClutterVertex *
-clutter_vertex_copy (const ClutterVertex *vertex)
-{
-  if (G_LIKELY (vertex != NULL))
-    return g_slice_dup (ClutterVertex, vertex);
-
-  return NULL;
-}
-
-/**
- * clutter_vertex_free:
- * @vertex: a #ClutterVertex
- *
- * Frees a #ClutterVertex allocated using clutter_vertex_alloc() or
- * clutter_vertex_copy().
- *
- * Since: 1.0
- */
-void
-clutter_vertex_free (ClutterVertex *vertex)
-{
-  if (G_UNLIKELY (vertex != NULL))
-    g_slice_free (ClutterVertex, vertex);
-}
-
-/**
- * clutter_vertex_equal:
- * @vertex_a: a #ClutterVertex
- * @vertex_b: a #ClutterVertex
- *
- * Compares @vertex_a and @vertex_b for equality
- *
- * Return value: %TRUE if the passed #ClutterVertex are equal
- *
- * Since: 1.0
- */
-gboolean
-clutter_vertex_equal (const ClutterVertex *vertex_a,
-                      const ClutterVertex *vertex_b)
-{
-  g_return_val_if_fail (vertex_a != NULL && vertex_b != NULL, FALSE);
-
-  if (vertex_a == vertex_b)
-    return TRUE;
-
-  return fabsf (vertex_a->x - vertex_b->x) < FLOAT_EPSILON &&
-         fabsf (vertex_a->y - vertex_b->y) < FLOAT_EPSILON &&
-         fabsf (vertex_a->z - vertex_b->z) < FLOAT_EPSILON;
-}
-
-static void
-clutter_vertex_interpolate (const ClutterVertex *a,
-                            const ClutterVertex *b,
-                            double               progress,
-                            ClutterVertex       *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;
-}
-
-static gboolean
-clutter_vertex_progress (const GValue *a,
-                         const GValue *b,
-                         gdouble       progress,
-                         GValue       *retval)
-{
-  const ClutterVertex *av = g_value_get_boxed (a);
-  const ClutterVertex *bv = g_value_get_boxed (b);
-  ClutterVertex res;
-
-  clutter_vertex_interpolate (av, bv, progress, &res);
-
-  g_value_set_boxed (retval, &res);
-
-  return TRUE;
-}
-
-G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterVertex, clutter_vertex,
-                               clutter_vertex_copy,
-                               clutter_vertex_free,
-                               CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_vertex_progress));
-
-
-
 /*
  * ClutterMargin
  */
@@ -1300,20 +1128,20 @@ clutter_matrix_progress (const GValue *a,
 {
   const ClutterMatrix *matrix1 = g_value_get_boxed (a);
   const ClutterMatrix *matrix2 = g_value_get_boxed (b);
-  ClutterVertex scale1 = CLUTTER_VERTEX_INIT (1.f, 1.f, 1.f);
+  graphene_point3d_t scale1 = GRAPHENE_POINT3D_INIT (1.f, 1.f, 1.f);
   float shear1[3] = { 0.f, 0.f, 0.f };
-  ClutterVertex rotate1 = CLUTTER_VERTEX_INIT_ZERO;
-  ClutterVertex translate1 = CLUTTER_VERTEX_INIT_ZERO;
+  graphene_point3d_t rotate1 = GRAPHENE_POINT3D_INIT_ZERO;
+  graphene_point3d_t translate1 = GRAPHENE_POINT3D_INIT_ZERO;
   ClutterVertex4 perspective1 = { 0.f, 0.f, 0.f, 0.f };
-  ClutterVertex scale2 = CLUTTER_VERTEX_INIT (1.f, 1.f, 1.f);
+  graphene_point3d_t scale2 = GRAPHENE_POINT3D_INIT (1.f, 1.f, 1.f);
   float shear2[3] = { 0.f, 0.f, 0.f };
-  ClutterVertex rotate2 = CLUTTER_VERTEX_INIT_ZERO;
-  ClutterVertex translate2 = CLUTTER_VERTEX_INIT_ZERO;
+  graphene_point3d_t rotate2 = GRAPHENE_POINT3D_INIT_ZERO;
+  graphene_point3d_t translate2 = GRAPHENE_POINT3D_INIT_ZERO;
   ClutterVertex4 perspective2 = { 0.f, 0.f, 0.f, 0.f };
-  ClutterVertex scale_res = CLUTTER_VERTEX_INIT (1.f, 1.f, 1.f);
+  graphene_point3d_t scale_res = GRAPHENE_POINT3D_INIT (1.f, 1.f, 1.f);
   float shear_res = 0.f;
-  ClutterVertex rotate_res = CLUTTER_VERTEX_INIT_ZERO;
-  ClutterVertex translate_res = CLUTTER_VERTEX_INIT_ZERO;
+  graphene_point3d_t rotate_res = GRAPHENE_POINT3D_INIT_ZERO;
+  graphene_point3d_t translate_res = GRAPHENE_POINT3D_INIT_ZERO;
   ClutterVertex4 perspective_res = { 0.f, 0.f, 0.f, 0.f };
   ClutterMatrix res;
 
@@ -1334,11 +1162,11 @@ clutter_matrix_progress (const GValue *a,
   res.ww = perspective_res.w;
 
   /* translation */
-  clutter_vertex_interpolate (&translate1, &translate2, progress, &translate_res);
+  graphene_point3d_interpolate (&translate1, &translate2, progress, &translate_res);
   cogl_matrix_translate (&res, translate_res.x, translate_res.y, translate_res.z);
 
   /* rotation */
-  clutter_vertex_interpolate (&rotate1, &rotate2, progress, &rotate_res);
+  graphene_point3d_interpolate (&rotate1, &rotate2, progress, &rotate_res);
   cogl_matrix_rotate (&res, rotate_res.x, 1.0f, 0.0f, 0.0f);
   cogl_matrix_rotate (&res, rotate_res.y, 0.0f, 1.0f, 0.0f);
   cogl_matrix_rotate (&res, rotate_res.z, 0.0f, 0.0f, 1.0f);
@@ -1357,7 +1185,7 @@ clutter_matrix_progress (const GValue *a,
     _clutter_util_matrix_skew_xy (&res, shear_res);
 
   /* scale */
-  clutter_vertex_interpolate (&scale1, &scale2, progress, &scale_res);
+  graphene_point3d_interpolate (&scale1, &scale2, progress, &scale_res);
   cogl_matrix_scale (&res, scale_res.x, scale_res.y, scale_res.z);
 
   g_value_set_boxed (retval, &res);
diff --git a/clutter/clutter/clutter-bind-constraint.c b/clutter/clutter/clutter-bind-constraint.c
index 138866882..965314c9e 100644
--- a/clutter/clutter/clutter-bind-constraint.c
+++ b/clutter/clutter/clutter-bind-constraint.c
@@ -152,7 +152,7 @@ clutter_bind_constraint_update_allocation (ClutterConstraint *constraint,
   ClutterBindConstraint *bind = CLUTTER_BIND_CONSTRAINT (constraint);
   gfloat source_width, source_height;
   gfloat actor_width, actor_height;
-  ClutterVertex source_position = { 0., };
+  graphene_point3d_t source_position = { 0., };
 
   if (bind->source == NULL)
     return;
diff --git a/clutter/clutter/clutter-blur-effect.c b/clutter/clutter/clutter-blur-effect.c
index 564f796b3..434265bcd 100644
--- a/clutter/clutter/clutter-blur-effect.c
+++ b/clutter/clutter/clutter-blur-effect.c
@@ -182,7 +182,7 @@ clutter_blur_effect_get_paint_volume (ClutterEffect      *effect,
                                       ClutterPaintVolume *volume)
 {
   gfloat cur_width, cur_height;
-  ClutterVertex origin;
+  graphene_point3d_t origin;
 
   clutter_paint_volume_get_origin (volume, &origin);
   cur_width = clutter_paint_volume_get_width (volume);
diff --git a/clutter/clutter/clutter-offscreen-effect.c b/clutter/clutter/clutter-offscreen-effect.c
index 9dae899ed..6e918c96c 100644
--- a/clutter/clutter/clutter-offscreen-effect.c
+++ b/clutter/clutter/clutter-offscreen-effect.c
@@ -84,7 +84,7 @@ struct _ClutterOffscreenEffectPrivate
   ClutterActor *actor;
   ClutterActor *stage;
 
-  ClutterVertex position;
+  graphene_point3d_t position;
 
   int fbo_offset_x;
   int fbo_offset_y;
@@ -223,7 +223,7 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
   CoglColor transparent;
   gfloat stage_width, stage_height;
   gfloat fbo_width = -1, fbo_height = -1;
-  ClutterVertex local_offset = { 0.f, 0.f, 0.f };
+  graphene_point3d_t local_offset = { 0.f, 0.f, 0.f };
   gfloat old_viewport[4];
 
   if (!clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (effect)))
diff --git a/clutter/clutter/clutter-paint-volume-private.h b/clutter/clutter/clutter-paint-volume-private.h
index 72bc7aee3..21e35c202 100644
--- a/clutter/clutter/clutter-paint-volume-private.h
+++ b/clutter/clutter/clutter-paint-volume-private.h
@@ -58,7 +58,7 @@ struct _ClutterPaintVolume
    * elements 4, 5, 6 and 7 most of the time for 2D actors when
    * calculating the projected paint box.
    */
-  ClutterVertex vertices[8];
+  graphene_point3d_t vertices[8];
 
   /* As an optimization for internally managed PaintVolumes we allow
    * initializing ClutterPaintVolume variables allocated on the stack
diff --git a/clutter/clutter/clutter-paint-volume.c b/clutter/clutter/clutter-paint-volume.c
index 0a197cdf6..19ea3358f 100644
--- a/clutter/clutter/clutter-paint-volume.c
+++ b/clutter/clutter/clutter-paint-volume.c
@@ -63,7 +63,7 @@ _clutter_paint_volume_new (ClutterActor *actor)
 
   pv->actor = actor;
 
-  memset (pv->vertices, 0, 8 * sizeof (ClutterVertex));
+  memset (pv->vertices, 0, 8 * sizeof (graphene_point3d_t));
 
   pv->is_static = FALSE;
   pv->is_empty = TRUE;
@@ -96,7 +96,7 @@ _clutter_paint_volume_init_static (ClutterPaintVolume *pv,
 {
   pv->actor = actor;
 
-  memset (pv->vertices, 0, 8 * sizeof (ClutterVertex));
+  memset (pv->vertices, 0, 8 * sizeof (graphene_point3d_t));
 
   pv->is_static = TRUE;
   pv->is_empty = TRUE;
@@ -170,7 +170,7 @@ clutter_paint_volume_free (ClutterPaintVolume *pv)
 /**
  * clutter_paint_volume_set_origin:
  * @pv: a #ClutterPaintVolume
- * @origin: a #ClutterVertex
+ * @origin: a #graphene_point3d_t
  *
  * Sets the origin of the paint volume.
  *
@@ -183,7 +183,7 @@ clutter_paint_volume_free (ClutterPaintVolume *pv)
  */
 void
 clutter_paint_volume_set_origin (ClutterPaintVolume  *pv,
-                                 const ClutterVertex *origin)
+                                 const graphene_point3d_t *origin)
 {
   static const int key_vertices[4] = { 0, 1, 3, 4 };
   float dx, dy, dz;
@@ -210,7 +210,7 @@ clutter_paint_volume_set_origin (ClutterPaintVolume  *pv,
 /**
  * clutter_paint_volume_get_origin:
  * @pv: a #ClutterPaintVolume
- * @vertex: (out): the return location for a #ClutterVertex
+ * @vertex: (out): the return location for a #graphene_point3d_t
  *
  * Retrieves the origin of the #ClutterPaintVolume.
  *
@@ -218,7 +218,7 @@ clutter_paint_volume_set_origin (ClutterPaintVolume  *pv,
  */
 void
 clutter_paint_volume_get_origin (const ClutterPaintVolume *pv,
-                                 ClutterVertex            *vertex)
+                                 graphene_point3d_t       *vertex)
 {
   g_return_if_fail (pv != NULL);
   g_return_if_fail (vertex != NULL);
@@ -659,7 +659,7 @@ clutter_paint_volume_union_box (ClutterPaintVolume    *pv,
                                 const ClutterActorBox *box)
 {
   ClutterPaintVolume volume;
-  ClutterVertex origin;
+  graphene_point3d_t origin;
 
   g_return_if_fail (pv != NULL);
   g_return_if_fail (box != NULL);
@@ -757,7 +757,7 @@ _clutter_paint_volume_get_bounding_box (ClutterPaintVolume *pv,
                                         ClutterActorBox *box)
 {
   gfloat x_min, y_min, x_max, y_max;
-  ClutterVertex *vertices;
+  graphene_point3d_t *vertices;
   int count;
   gint i;
 
@@ -878,9 +878,9 @@ _clutter_paint_volume_transform (ClutterPaintVolume *pv,
 
   cogl_matrix_transform_points (matrix,
                                 3,
-                                sizeof (ClutterVertex),
+                                sizeof (graphene_point3d_t),
                                 pv->vertices,
-                                sizeof (ClutterVertex),
+                                sizeof (graphene_point3d_t),
                                 pv->vertices,
                                 transform_count);
 
@@ -896,7 +896,7 @@ _clutter_paint_volume_axis_align (ClutterPaintVolume *pv)
 {
   int count;
   int i;
-  ClutterVertex origin;
+  graphene_point3d_t origin;
   float max_x;
   float max_y;
   float max_z;
@@ -1075,7 +1075,7 @@ _clutter_paint_volume_cull (ClutterPaintVolume *pv,
                             const ClutterPlane *planes)
 {
   int vertex_count;
-  ClutterVertex *vertices = pv->vertices;
+  graphene_point3d_t *vertices = pv->vertices;
   gboolean partial = FALSE;
   int i;
   int j;
diff --git a/clutter/clutter/clutter-private.h b/clutter/clutter/clutter-private.h
index cf91257f1..5fb6d4d6f 100644
--- a/clutter/clutter/clutter-private.h
+++ b/clutter/clutter/clutter-private.h
@@ -233,12 +233,12 @@ void _clutter_run_repaint_functions (ClutterRepaintFlags flags);
 
 GType _clutter_layout_manager_get_child_meta_type (ClutterLayoutManager *manager);
 
-void  _clutter_util_fully_transform_vertices (const CoglMatrix    *modelview,
-                                              const CoglMatrix    *projection,
-                                              const float         *viewport,
-                                              const ClutterVertex *vertices_in,
-                                              ClutterVertex       *vertices_out,
-                                              int                  n_vertices);
+void  _clutter_util_fully_transform_vertices (const CoglMatrix         *modelview,
+                                              const CoglMatrix         *projection,
+                                              const float              *viewport,
+                                              const graphene_point3d_t *vertices_in,
+                                              graphene_point3d_t       *vertices_out,
+                                              int                       n_vertices);
 
 void _clutter_util_rectangle_union (const cairo_rectangle_int_t *src1,
                                     const cairo_rectangle_int_t *src2,
@@ -280,10 +280,10 @@ void    _clutter_util_matrix_skew_yz            (ClutterMatrix *matrix,
                                                  float          factor);
 
 gboolean        _clutter_util_matrix_decompose  (const ClutterMatrix *src,
-                                                 ClutterVertex       *scale_p,
+                                                 graphene_point3d_t  *scale_p,
                                                  float                shear_p[3],
-                                                 ClutterVertex       *rotate_p,
-                                                 ClutterVertex       *translate_p,
+                                                 graphene_point3d_t  *rotate_p,
+                                                 graphene_point3d_t  *translate_p,
                                                  ClutterVertex4      *perspective_p);
 
 typedef struct _ClutterPlane
diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c
index 2c7c10203..0926e659a 100644
--- a/clutter/clutter/clutter-text.c
+++ b/clutter/clutter/clutter-text.c
@@ -2580,7 +2580,7 @@ add_selection_to_paint_volume (ClutterText           *text,
 {
   ClutterPaintVolume *total_volume = user_data;
   ClutterPaintVolume rect_volume;
-  ClutterVertex vertex;
+  graphene_point3d_t vertex;
 
   _clutter_paint_volume_init_static (&rect_volume, CLUTTER_ACTOR (text));
 
@@ -2601,7 +2601,7 @@ clutter_text_get_paint_volume_for_cursor (ClutterText        *text,
                                           ClutterPaintVolume *volume)
 {
   ClutterTextPrivate *priv = text->priv;
-  ClutterVertex origin;
+  graphene_point3d_t origin;
 
   clutter_text_ensure_cursor_position (text);
 
@@ -2639,7 +2639,7 @@ clutter_text_get_paint_volume (ClutterActor       *self,
     {
       PangoLayout *layout;
       PangoRectangle ink_rect;
-      ClutterVertex origin;
+      graphene_point3d_t origin;
 
       /* If the text is single line editable then it gets clipped to
          the allocation anyway so we can just use that */
diff --git a/clutter/clutter/clutter-types.h b/clutter/clutter/clutter-types.h
index 929a72a56..29fe31480 100644
--- a/clutter/clutter/clutter-types.h
+++ b/clutter/clutter/clutter-types.h
@@ -33,6 +33,8 @@
 #include <clutter/clutter-macros.h>
 #include <clutter/clutter-enums.h>
 
+#include <graphene-gobject.h>
+
 G_BEGIN_DECLS
 
 #define CLUTTER_TYPE_ACTOR_BOX          (clutter_actor_box_get_type ())
@@ -42,7 +44,6 @@ G_BEGIN_DECLS
 #define CLUTTER_TYPE_MATRIX             (clutter_matrix_get_type ())
 #define CLUTTER_TYPE_PAINT_VOLUME       (clutter_paint_volume_get_type ())
 #define CLUTTER_TYPE_PERSPECTIVE        (clutter_perspective_get_type ())
-#define CLUTTER_TYPE_VERTEX             (clutter_vertex_get_type ())
 #define CLUTTER_TYPE_POINT              (clutter_point_get_type ())
 #define CLUTTER_TYPE_SIZE               (clutter_size_get_type ())
 #define CLUTTER_TYPE_RECT               (clutter_rect_get_type ())
@@ -85,7 +86,6 @@ typedef struct _ClutterPerspective              ClutterPerspective;
 typedef struct _ClutterPoint                    ClutterPoint;
 typedef struct _ClutterRect                     ClutterRect;
 typedef struct _ClutterSize                     ClutterSize;
-typedef struct _ClutterVertex                   ClutterVertex;
 
 typedef struct _ClutterAlpha                   ClutterAlpha;
 typedef struct _ClutterAnimation                ClutterAnimation;
@@ -370,69 +370,6 @@ float                   clutter_rect_get_width          (ClutterRect       *rect
 CLUTTER_EXPORT
 float                   clutter_rect_get_height         (ClutterRect       *rect);
 
-/**
- * ClutterVertex:
- * @x: X coordinate of the vertex
- * @y: Y coordinate of the vertex
- * @z: Z coordinate of the vertex
- *
- * A point in 3D space, expressed in pixels
- *
- * Since: 0.4
- */
-struct _ClutterVertex
-{
-  gfloat x;
-  gfloat y;
-  gfloat z;
-};
-
-/**
- * CLUTTER_VERTEX_INIT:
- * @x: the X coordinate of the vertex
- * @y: the Y coordinate of the vertex
- * @z: the Z coordinate of the vertex
- *
- * A simple macro for initializing a #ClutterVertex when declaring it, e.g.:
- *
- * |[
- *   ClutterVertex v = CLUTTER_VERTEX_INIT (x, y, z);
- * ]|
- *
- * Since: 1.10
- */
-#define CLUTTER_VERTEX_INIT(x,y,z)      { (x), (y), (z) }
-
-/**
- * CLUTTER_VERTEX_INIT_ZERO:
- *
- * A simple macro for initializing a #ClutterVertex to (0, 0, 0).
- *
- * Since: 1.12
- */
-#define CLUTTER_VERTEX_INIT_ZERO        CLUTTER_VERTEX_INIT (0.f, 0.f, 0.f)
-
-CLUTTER_EXPORT
-GType          clutter_vertex_get_type (void) G_GNUC_CONST;
-CLUTTER_EXPORT
-ClutterVertex *clutter_vertex_new      (gfloat               x,
-                                        gfloat               y,
-                                        gfloat               z);
-CLUTTER_EXPORT
-ClutterVertex *clutter_vertex_alloc    (void);
-CLUTTER_EXPORT
-ClutterVertex *clutter_vertex_init     (ClutterVertex       *vertex,
-                                        gfloat               x,
-                                        gfloat               y,
-                                        gfloat               z);
-CLUTTER_EXPORT
-ClutterVertex *clutter_vertex_copy     (const ClutterVertex *vertex);
-CLUTTER_EXPORT
-void           clutter_vertex_free     (ClutterVertex       *vertex);
-CLUTTER_EXPORT
-gboolean       clutter_vertex_equal    (const ClutterVertex *vertex_a,
-                                        const ClutterVertex *vertex_b);
-
 /**
  * ClutterActorBox:
  * @x1: X coordinate of the top left corner
@@ -537,7 +474,7 @@ gboolean         clutter_actor_box_contains      (const ClutterActorBox *box,
                                                   gfloat                 y);
 CLUTTER_EXPORT
 void             clutter_actor_box_from_vertices (ClutterActorBox       *box,
-                                                  const ClutterVertex    verts[]);
+                                                  const graphene_point3d_t verts[]);
 CLUTTER_EXPORT
 void             clutter_actor_box_interpolate   (const ClutterActorBox *initial,
                                                   const ClutterActorBox *final,
@@ -665,10 +602,10 @@ void                clutter_paint_volume_free                (ClutterPaintVolume
 
 CLUTTER_EXPORT
 void                clutter_paint_volume_set_origin          (ClutterPaintVolume       *pv,
-                                                              const ClutterVertex      *origin);
+                                                              const graphene_point3d_t *origin);
 CLUTTER_EXPORT
 void                clutter_paint_volume_get_origin          (const ClutterPaintVolume *pv,
-                                                              ClutterVertex            *vertex);
+                                                              graphene_point3d_t       *vertex);
 CLUTTER_EXPORT
 void                clutter_paint_volume_set_width           (ClutterPaintVolume       *pv,
                                                               gfloat                    width);
diff --git a/clutter/clutter/clutter-util.c b/clutter/clutter/clutter-util.c
index 83e15c041..309191803 100644
--- a/clutter/clutter/clutter-util.c
+++ b/clutter/clutter/clutter-util.c
@@ -50,8 +50,8 @@ void
 _clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
                                         const CoglMatrix *projection,
                                         const float *viewport,
-                                        const ClutterVertex *vertices_in,
-                                        ClutterVertex *vertices_out,
+                                        const graphene_point3d_t *vertices_in,
+                                        graphene_point3d_t *vertices_out,
                                         int n_vertices)
 {
   CoglMatrix modelview_projection;
@@ -68,7 +68,7 @@ _clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
                             modelview);
       cogl_matrix_project_points (&modelview_projection,
                                   3,
-                                  sizeof (ClutterVertex),
+                                  sizeof (graphene_point3d_t),
                                   vertices_in,
                                   sizeof (ClutterVertex4),
                                   vertices_tmp,
@@ -78,7 +78,7 @@ _clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
     {
       cogl_matrix_transform_points (modelview,
                                     3,
-                                    sizeof (ClutterVertex),
+                                    sizeof (graphene_point3d_t),
                                     vertices_in,
                                     sizeof (ClutterVertex4),
                                     vertices_tmp,
@@ -96,7 +96,7 @@ _clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
   for (i = 0; i < n_vertices; i++)
     {
       ClutterVertex4 vertex_tmp = vertices_tmp[i];
-      ClutterVertex *vertex_out = &vertices_out[i];
+      graphene_point3d_t *vertex_out = &vertices_out[i];
       /* Finally translate from OpenGL coords to window coords */
       vertex_out->x = MTX_GL_SCALE_X (vertex_tmp.x, vertex_tmp.w,
                                       viewport[2], viewport[0]);
@@ -255,13 +255,13 @@ _clutter_util_matrix_skew_yz (ClutterMatrix *matrix,
 }
 
 static float
-_clutter_util_vertex_length (const ClutterVertex *vertex)
+_clutter_util_vertex_length (const graphene_point3d_t *vertex)
 {
   return sqrtf (vertex->x * vertex->x + vertex->y * vertex->y + vertex->z * vertex->z);
 }
 
 static void
-_clutter_util_vertex_normalize (ClutterVertex *vertex)
+_clutter_util_vertex_normalize (graphene_point3d_t *vertex)
 {
   float factor = _clutter_util_vertex_length (vertex);
 
@@ -274,16 +274,16 @@ _clutter_util_vertex_normalize (ClutterVertex *vertex)
 }
 
 static float
-_clutter_util_vertex_dot (const ClutterVertex *v1,
-                          const ClutterVertex *v2)
+_clutter_util_vertex_dot (const graphene_point3d_t *v1,
+                          const graphene_point3d_t *v2)
 {
   return v1->x * v2->x + v1->y * v2->y + v1->z * v2->z;
 }
 
 static void
-_clutter_util_vertex_cross (const ClutterVertex *v1,
-                            const ClutterVertex *v2,
-                            ClutterVertex       *res)
+_clutter_util_vertex_cross (const graphene_point3d_t *v1,
+                            const graphene_point3d_t *v2,
+                            graphene_point3d_t       *res)
 {
   res->x = v1->y * v2->z - v2->y * v1->z;
   res->y = v1->z * v2->x - v2->z * v1->x;
@@ -291,11 +291,11 @@ _clutter_util_vertex_cross (const ClutterVertex *v1,
 }
 
 static void
-_clutter_util_vertex_combine (const ClutterVertex *a,
-                              const ClutterVertex *b,
-                              double               ascl,
-                              double               bscl,
-                              ClutterVertex       *res)
+_clutter_util_vertex_combine (const graphene_point3d_t *a,
+                              const graphene_point3d_t *b,
+                              double                    ascl,
+                              double                    bscl,
+                              graphene_point3d_t       *res)
 {
   res->x = (ascl * a->x) + (bscl * b->x);
   res->y = (ascl * a->y) + (bscl * b->y);
@@ -343,16 +343,16 @@ _clutter_util_vertex4_interpolate (const ClutterVertex4 *a,
  */
 gboolean
 _clutter_util_matrix_decompose (const ClutterMatrix *src,
-                                ClutterVertex       *scale_p,
+                                graphene_point3d_t  *scale_p,
                                 float                shear_p[3],
-                                ClutterVertex       *rotate_p,
-                                ClutterVertex       *translate_p,
+                                graphene_point3d_t  *rotate_p,
+                                graphene_point3d_t  *translate_p,
                                 ClutterVertex4      *perspective_p)
 {
   CoglMatrix matrix = *src;
   CoglMatrix perspective;
   ClutterVertex4 vertex_tmp;
-  ClutterVertex row[3], pdum;
+  graphene_point3d_t row[3], pdum;
   int i, j;
 
 #define XY_SHEAR        0
diff --git a/clutter/clutter/clutter-zoom-action.c b/clutter/clutter/clutter-zoom-action.c
index 6cd35fbc1..67a3d12bd 100644
--- a/clutter/clutter/clutter-zoom-action.c
+++ b/clutter/clutter/clutter-zoom-action.c
@@ -244,7 +244,7 @@ clutter_zoom_action_real_zoom (ClutterZoomAction *action,
   ClutterZoomActionPrivate *priv = action->priv;
   gfloat x, y, z;
   gdouble scale_x, scale_y;
-  ClutterVertex out, in;
+  graphene_point3d_t out, in;
 
   in.x = priv->transformed_focal_point.x;
   in.y = priv->transformed_focal_point.y;
diff --git a/clutter/clutter/deprecated/clutter-animation.c b/clutter/clutter/deprecated/clutter-animation.c
index 01de574df..925b176e9 100644
--- a/clutter/clutter/deprecated/clutter-animation.c
+++ b/clutter/clutter/deprecated/clutter-animation.c
@@ -2222,7 +2222,7 @@ clutter_actor_animate_with_timeline (ClutterActor    *actor,
  *
  * Will animate the "rotation-angle-z" property between the current value
  * and 360 degrees, and set the "rotation-center-z" property to the fixed
- * value of the #ClutterVertex "center".
+ * value of the #graphene_point3d_t "center".
  *
  * This function will implicitly create a #ClutterAnimation object which
  * will be assigned to the @actor and will be returned to the developer
diff --git a/clutter/clutter/deprecated/clutter-texture.c b/clutter/clutter/deprecated/clutter-texture.c
index 07e9c3324..07a1655c9 100644
--- a/clutter/clutter/deprecated/clutter-texture.c
+++ b/clutter/clutter/deprecated/clutter-texture.c
@@ -439,7 +439,7 @@ set_viewport_with_buffer_under_fbo_source (ClutterActor *fbo_source,
        * falling back to a stage sized fbo with an offset of (0,0)
        */
 
-      ClutterVertex verts[4];
+      graphene_point3d_t verts[4];
       float x_min = G_MAXFLOAT, y_min = G_MAXFLOAT;
       int i;
 
diff --git a/clutter/tests/conform/actor-anchors.c b/clutter/tests/conform/actor-anchors.c
index 55395880b..6dd1b3ae4 100644
--- a/clutter/tests/conform/actor-anchors.c
+++ b/clutter/tests/conform/actor-anchors.c
@@ -99,7 +99,7 @@ notify_cb (GObject *object, GParamSpec *pspec, TestState *state)
    macro so that the assertion failure will report the right line
    number */
 #define assert_coords(state, x_1, y_1, x_2, y_2)        G_STMT_START {  \
-  ClutterVertex verts[4];                                               \
+  graphene_point3d_t verts[4];                                          \
   clutter_actor_get_abs_allocation_vertices ((state)->rect, verts);     \
   check_coords ((state), (x_1), (y_1), (x_2), (y_2), verts);            \
   g_assert (approx_equal ((x_1), verts[0].x));                          \
@@ -114,7 +114,7 @@ notify_cb (GObject *object, GParamSpec *pspec, TestState *state)
   g_assert (approx_equal (v->x, xc) &&                          \
             approx_equal (v->y, yc) &&                          \
             approx_equal (v->z, zc));                           \
-  g_boxed_free (CLUTTER_TYPE_VERTEX, v);        } G_STMT_END
+  g_boxed_free (GRAPHENE_TYPE_POINT3D, v);        } G_STMT_END
 
 static inline gboolean
 approx_equal (int a, int b)
@@ -128,7 +128,7 @@ check_coords (TestState *state,
               gint y_1,
               gint x_2,
               gint y_2,
-              const ClutterVertex *verts)
+              const graphene_point3d_t *verts)
 {
   if (g_test_verbose ())
     g_print ("checking that (%i,%i,%i,%i) \xe2\x89\x88 (%i,%i,%i,%i): %s\n",
@@ -424,7 +424,7 @@ test_rotate_center (TestState *state)
 {
   ClutterActor *rect = state->rect;
   gdouble angle_x, angle_y, angle_z;
-  ClutterVertex *center_x, *center_y, *center_z;
+  graphene_point3d_t *center_x, *center_y, *center_z;
   ClutterGravity z_center_gravity;
   gfloat stage_width, stage_height;
   gfloat rect_x, rect_y;
diff --git a/clutter/tests/interactive/test-layout.c b/clutter/tests/interactive/test-layout.c
index 7a5b3cf2e..4c73c0de2 100644
--- a/clutter/tests/interactive/test-layout.c
+++ b/clutter/tests/interactive/test-layout.c
@@ -334,7 +334,7 @@ my_thing_allocate (ClutterActor           *self,
           if (clutter_actor_is_scaled (child) ||
               clutter_actor_is_rotated (child))
             {
-              ClutterVertex v1 = { 0, }, v2 = { 0, };
+              graphene_point3d_t v1 = { 0, }, v2 = { 0, };
               ClutterActorBox transformed_box = { 0, };
 
               /* origin */
diff --git a/src/compositor/clutter-utils.c b/src/compositor/clutter-utils.c
index cfa35aaf9..a399cd477 100644
--- a/src/compositor/clutter-utils.c
+++ b/src/compositor/clutter-utils.c
@@ -66,11 +66,11 @@ round_to_fixed (float x)
  * in @x_origin and @y_origin.
  */
 gboolean
-meta_actor_vertices_are_untransformed (ClutterVertex *verts,
-                                       float          widthf,
-                                       float          heightf,
-                                       int           *x_origin,
-                                       int           *y_origin)
+meta_actor_vertices_are_untransformed (graphene_point3d_t *verts,
+                                       float               widthf,
+                                       float               heightf,
+                                       int                *x_origin,
+                                       int                *y_origin)
 {
   int width, height;
   int v0x, v0y, v1x, v1y, v2x, v2y, v3x, v3y;
@@ -119,7 +119,7 @@ meta_actor_is_untransformed (ClutterActor *actor,
                              int          *y_origin)
 {
   gfloat widthf, heightf;
-  ClutterVertex verts[4];
+  graphene_point3d_t verts[4];
 
   clutter_actor_get_size (actor, &widthf, &heightf);
   clutter_actor_get_abs_allocation_vertices (actor, verts);
@@ -153,7 +153,7 @@ meta_actor_painting_untransformed (CoglFramebuffer *fb,
                                    int             *y_origin)
 {
   CoglMatrix modelview, projection, modelview_projection;
-  ClutterVertex vertices[4];
+  graphene_point3d_t vertices[4];
   float viewport[4];
   int i;
 
diff --git a/src/compositor/clutter-utils.h b/src/compositor/clutter-utils.h
index b340ba464..d0513393e 100644
--- a/src/compositor/clutter-utils.h
+++ b/src/compositor/clutter-utils.h
@@ -23,11 +23,11 @@
 
 #include "clutter/clutter.h"
 
-gboolean meta_actor_vertices_are_untransformed (ClutterVertex *verts,
-                                                float          widthf,
-                                                float          heightf,
-                                                int           *x_origin,
-                                                int           *y_origin);
+gboolean meta_actor_vertices_are_untransformed (graphene_point3d_t *verts,
+                                                float               widthf,
+                                                float               heightf,
+                                                int                *x_origin,
+                                                int                *y_origin);
 gboolean meta_actor_is_untransformed (ClutterActor *actor,
                                       int          *x_origin,
                                       int          *y_origin);
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 20a22062f..569d48760 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1903,7 +1903,7 @@ meta_window_actor_transform_relative_position (MetaScreenCastWindow *screen_cast
     meta_window_actor_get_instance_private (window_actor);
   MetaShapedTexture *stex;
   MetaRectangle bounds;
-  ClutterVertex v1 = { 0.f, }, v2 = { 0.f, };
+  graphene_point3d_t v1 = { 0.f, }, v2 = { 0.f, };
 
   meta_window_actor_get_frame_bounds (screen_cast_window, &bounds);
 
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 893227771..b50fb2096 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -1586,11 +1586,11 @@ meta_wayland_surface_get_absolute_coordinates (MetaWaylandSurface *surface,
 {
   ClutterActor *actor =
     CLUTTER_ACTOR (meta_surface_actor_get_texture (meta_wayland_surface_get_actor (surface)));
-  ClutterVertex sv = {
+  graphene_point3d_t sv = {
     .x = sx * surface->scale,
     .y = sy * surface->scale,
   };
-  ClutterVertex v = { 0 };
+  graphene_point3d_t v = { 0 };
 
   clutter_actor_apply_relative_transform_to_point (actor, NULL, &sv, &v);
 


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