[mutter] texture-tower: Don't use implicit framebuffer stack Cogl API



commit 549f60fe4927e6355d23e42dd167b8bc69a4f614
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Nov 22 11:38:18 2019 +0100

    texture-tower: Don't use implicit framebuffer stack Cogl API
    
    Replace it with the non-deprecated counterparts.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/935

 src/compositor/meta-texture-tower.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/compositor/meta-texture-tower.c b/src/compositor/meta-texture-tower.c
index 867fc16a4..c4b225f33 100644
--- a/src/compositor/meta-texture-tower.c
+++ b/src/compositor/meta-texture-tower.c
@@ -245,6 +245,7 @@ meta_texture_tower_update_area (MetaTextureTower *tower,
 static int
 get_paint_level (int width, int height)
 {
+  CoglFramebuffer *framebuffer;
   CoglMatrix projection, modelview, pm;
   float v[4];
   double viewport_width, viewport_height;
@@ -271,12 +272,13 @@ get_paint_level (int width, int height)
    *  (w_c)                               (w_o)        (1)
    */
 
-  cogl_get_projection_matrix (&projection);
-  cogl_get_modelview_matrix (&modelview);
+  framebuffer = cogl_get_draw_framebuffer ();
+  cogl_framebuffer_get_projection_matrix (framebuffer, &projection);
+  cogl_framebuffer_get_modelview_matrix (framebuffer, &modelview);
 
   cogl_matrix_multiply (&pm, &projection, &modelview);
 
-  cogl_get_viewport (v);
+  cogl_framebuffer_get_viewport4fv (framebuffer, v);
   viewport_width = v[2];
   viewport_height = v[3];
 


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