[mutter/gbsneto/graphene-matrix: 10/27] clutter/clone: Use graphene APIs




commit d76c09eb88a7812122e83034f4aec27c073f7272
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Sep 11 16:32:16 2020 -0300

    clutter/clone: Use graphene APIs
    
    This is another instance of graphene reversing the order of operations (see
    the commit notes of how ClutterActor was ported.) The tl;dr; here is that,
    in the CoglMatrix past, we used to do:
    
      (actor transforms) → scale
    
    and now, it's the other way round:
    
      scale → (actor transforms)
    
    due to changing from right-handed multiplications (CoglMatrix) to left-handed
    ones (graphene_matrix_t).
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439

 clutter/clutter/clutter-clone.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/clutter/clutter/clutter-clone.c b/clutter/clutter/clutter-clone.c
index 97da2f7a24..86f124e6da 100644
--- a/clutter/clutter/clutter-clone.c
+++ b/clutter/clutter/clutter-clone.c
@@ -126,16 +126,12 @@ clutter_clone_apply_transform (ClutterActor      *self,
 {
   ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
 
-  /* First chain up and apply all the standard ClutterActor
-   * transformations... */
-  CLUTTER_ACTOR_CLASS (clutter_clone_parent_class)->apply_transform (self,
-                                                                     matrix);
 
-  /* if we don't have a source, nothing else to do */
-  if (priv->clone_source == NULL)
-    return;
+  if (priv->clone_source)
+    graphene_matrix_scale (matrix, priv->x_scale, priv->y_scale, 1.f);
 
-  cogl_matrix_scale (matrix, priv->x_scale, priv->y_scale, 1.f);
+  CLUTTER_ACTOR_CLASS (clutter_clone_parent_class)->apply_transform (self,
+                                                                     matrix);
 }
 
 static void


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