[gtk/wip/chergert/glproto: 311/493] use 4f instead of 4fv




commit c7d6bb4dc626fe4073f6cd3030f5948674ac988f
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 29 14:19:51 2021 -0800

    use 4f instead of 4fv

 gsk/next/gskglrenderjob.c | 30 ++++++++++++------------------
 1 file changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 69fb8d7582..42de1d6aca 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -3288,24 +3288,18 @@ gsk_gl_render_job_visit_repeat_node (GskGLRenderJob *job,
                                       GL_TEXTURE_2D,
                                       GL_TEXTURE0,
                                       offscreen.texture_id);
-  gsk_gl_program_set_uniform4fv (job->driver->repeat,
-                                 UNIFORM_REPEAT_CHILD_BOUNDS,
-                                 1,
-                                 (const float []) {
-                                   node->bounds.origin.x - child_bounds->origin.x,
-                                   node->bounds.origin.y - child_bounds->origin.y,
-                                   node->bounds.size.width / child_bounds->size.width,
-                                   node->bounds.size.height / child_bounds->size.height,
-                                 });
-  gsk_gl_program_set_uniform4fv (job->driver->repeat,
-                                 UNIFORM_REPEAT_TEXTURE_RECT,
-                                 1,
-                                 (const float []) {
-                                   offscreen.area.x,
-                                   offscreen.was_offscreen ? offscreen.area.y2 : offscreen.area.y,
-                                   offscreen.area.x2,
-                                   offscreen.was_offscreen ? offscreen.area.y : offscreen.area.y2,
-                                 });
+  gsk_gl_program_set_uniform4f (job->driver->repeat,
+                                UNIFORM_REPEAT_CHILD_BOUNDS,
+                                (node->bounds.origin.x - child_bounds->origin.x) / child_bounds->size.width,
+                                (node->bounds.origin.y - child_bounds->origin.y) / child_bounds->size.height,
+                                node->bounds.size.width / child_bounds->size.width,
+                                node->bounds.size.height / child_bounds->size.height);
+  gsk_gl_program_set_uniform4f (job->driver->repeat,
+                                UNIFORM_REPEAT_TEXTURE_RECT,
+                                offscreen.area.x,
+                                offscreen.was_offscreen ? offscreen.area.y2 : offscreen.area.y,
+                                offscreen.area.x2,
+                                offscreen.was_offscreen ? offscreen.area.y : offscreen.area.y2);
   gsk_gl_render_job_load_vertices_from_offscreen (job, &node->bounds, &offscreen);
   gsk_gl_program_end_draw (job->driver->repeat);
 }


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