[gtk/wip/chergert/glproto: 373/526] use 4f instead of 4fv
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 373/526] use 4f instead of 4fv
- Date: Tue, 16 Feb 2021 01:14:35 +0000 (UTC)
commit c45bfa2799b75f2fda22fd11f9e8f118cd487a27
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]