[gtk/wip/chergert/glproto: 472/526] use cached transform bounds




commit ad50b5a77f9429793af1cebadb7010b439cd1492
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 8 13:31:08 2021 -0800

    use cached transform bounds

 gsk/next/gskglrenderjob.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 4c1f611814..9e1176b8bb 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -724,12 +724,11 @@ gsk_gl_render_state_restore (GskGLRenderState *state,
   job->scale_y = state->scale_y;
 }
 
-static void
+static inline void
 gsk_gl_render_job_transform_bounds (GskGLRenderJob        *job,
                                     const graphene_rect_t *rect,
                                     graphene_rect_t       *out_rect)
 {
-  const GskGLRenderModelview *modelview;
   graphene_rect_t r;
 
   g_assert (job != NULL);
@@ -742,9 +741,7 @@ gsk_gl_render_job_transform_bounds (GskGLRenderJob        *job,
   r.size.width = rect->size.width;
   r.size.height = rect->size.height;
 
-  modelview = gsk_gl_render_job_get_modelview (job);
-
-  gsk_transform_transform_bounds (modelview->transform, &r, out_rect);
+  gsk_transform_transform_bounds (job->current_modelview->transform, &r, out_rect);
 }
 
 static inline void


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