[mutter/gbsneto/graphene-matrix: 68/71] texture-tower: Use graphene APIs




commit de71c62494963d4a77fa1bf4c1975cce20940407
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Sep 11 19:40:00 2020 -0300

    texture-tower: Use graphene APIs
    
    A boring one, with the exception that row and column needed to be
    swapped.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439

 src/compositor/meta-texture-tower.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/compositor/meta-texture-tower.c b/src/compositor/meta-texture-tower.c
index 87c9ff3de4..18f1bf22d0 100644
--- a/src/compositor/meta-texture-tower.c
+++ b/src/compositor/meta-texture-tower.c
@@ -281,17 +281,17 @@ get_paint_level (ClutterPaintContext *paint_context,
   cogl_framebuffer_get_projection_matrix (framebuffer, &projection);
   cogl_framebuffer_get_modelview_matrix (framebuffer, &modelview);
 
-  cogl_matrix_multiply (&pm, &projection, &modelview);
-
-  xx = cogl_matrix_get_value (&pm, 0, 0);
-  xy = cogl_matrix_get_value (&pm, 0, 1);
-  xw = cogl_matrix_get_value (&pm, 0, 3);
-  yx = cogl_matrix_get_value (&pm, 1, 0);
-  yy = cogl_matrix_get_value (&pm, 1, 1);
-  yw = cogl_matrix_get_value (&pm, 1, 3);
-  wx = cogl_matrix_get_value (&pm, 3, 0);
-  wy = cogl_matrix_get_value (&pm, 3, 1);
-  ww = cogl_matrix_get_value (&pm, 3, 3);
+  graphene_matrix_multiply (&modelview, &projection, &pm);
+
+  xx = graphene_matrix_get_value (&pm, 0, 0);
+  xy = graphene_matrix_get_value (&pm, 1, 0);
+  xw = graphene_matrix_get_value (&pm, 3, 0);
+  yx = graphene_matrix_get_value (&pm, 0, 1);
+  yy = graphene_matrix_get_value (&pm, 1, 1);
+  yw = graphene_matrix_get_value (&pm, 3, 1);
+  wx = graphene_matrix_get_value (&pm, 0, 3);
+  wy = graphene_matrix_get_value (&pm, 1, 3);
+  ww = graphene_matrix_get_value (&pm, 3, 3);
 
   cogl_framebuffer_get_viewport4fv (framebuffer, v);
   viewport_width = v[2];


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