[mutter/gbsneto/graphene-matrix: 11/22] clutter/scroll-actor: Use graphene APIs




commit a7ea13c3650d342772f53925fdf0229867ead756
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Sep 11 17:48:03 2020 -0300

    clutter/scroll-actor: Use graphene APIs
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439

 clutter/clutter/clutter-scroll-actor.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-scroll-actor.c b/clutter/clutter/clutter-scroll-actor.c
index 6642ecbc87..9ef63b23a2 100644
--- a/clutter/clutter/clutter-scroll-actor.c
+++ b/clutter/clutter/clutter-scroll-actor.c
@@ -102,8 +102,6 @@ clutter_scroll_actor_set_scroll_to_internal (ClutterScrollActor     *self,
   graphene_matrix_t m;
   float dx, dy;
 
-  cogl_matrix_init_identity (&m);
-
   if (graphene_point_equal (&priv->scroll_to, point))
     return;
 
@@ -122,7 +120,8 @@ clutter_scroll_actor_set_scroll_to_internal (ClutterScrollActor     *self,
   else
     dy = 0.f;
 
-  cogl_matrix_translate (&m, dx, dy, 0.f);
+  graphene_matrix_init_translate (&m,
+                                  &GRAPHENE_POINT3D_INIT (dx, dy, 0.f));
   clutter_actor_set_child_transform (actor, &m);
 }
 


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