[gtk+/wip/baedert/gl: 32/94] gl renderer: Don't initialize modelview matrix twice



commit bbfb96821c60ec478f4c1dc7130f2f290afc9bcb
Author: Timm Bäder <mail baedert org>
Date:   Mon Nov 20 15:08:04 2017 +0100

    gl renderer: Don't initialize modelview matrix twice

 gsk/gskglrenderer.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c
index b36af0f..c4484fa 100644
--- a/gsk/gskglrenderer.c
+++ b/gsk/gskglrenderer.c
@@ -1319,18 +1319,16 @@ gsk_gl_renderer_add_render_item (GskGLRenderer           *self,
 static void
 gsk_gl_renderer_validate_tree (GskGLRenderer           *self,
                                GskRenderNode           *root,
-                               const graphene_matrix_t *projection)
+                               const graphene_matrix_t *projection,
+                               const graphene_matrix_t *modelview)
 {
-  graphene_matrix_t modelview;
   GskRoundedRect viewport_clip;
 
-  graphene_matrix_init_scale (&modelview, self->scale_factor, self->scale_factor, 1.0f);
-
   gdk_gl_context_make_current (self->gl_context);
 
   gsk_rounded_rect_init_from_rect (&viewport_clip, &self->viewport, 0.0f);
 
-  gsk_gl_renderer_add_render_item (self, projection, &modelview, self->render_items, root,
+  gsk_gl_renderer_add_render_item (self, projection, modelview, self->render_items, root,
                                    self->texture_id, &viewport_clip);
 }
 
@@ -1451,7 +1449,7 @@ gsk_gl_renderer_do_render (GskRenderer           *renderer,
 
   gsk_gl_driver_begin_frame (self->gl_driver);
   gsk_gl_glyph_cache_begin_frame (&self->glyph_cache);
-  gsk_gl_renderer_validate_tree (self, root, &projection);
+  gsk_gl_renderer_validate_tree (self, root, &projection, &modelview);
 
 #ifdef G_ENABLE_DEBUG
   gsk_gl_profiler_begin_gpu_region (self->gl_profiler);


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