[gtk] gl renderer: Don't copy matrix/offset of color matrix nodes into ops



commit 219493c8185d7b4c264148700b3f615179649746
Author: Timm Bäder <mail baedert org>
Date:   Mon Dec 16 06:32:36 2019 +0100

    gl renderer: Don't copy matrix/offset of color matrix nodes into ops

 gsk/gl/gskglrenderer.c  | 4 ++--
 gsk/gl/gskglrenderops.c | 4 ++--
 gsk/gl/opbuffer.h       | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index b64338a919..c0734532cc 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -2492,10 +2492,10 @@ apply_color_matrix_op (const Program       *program,
   float mat[16];
   float vec[4];
   OP_PRINT (" -> Color Matrix");
-  graphene_matrix_to_float (&op->matrix, mat);
+  graphene_matrix_to_float (op->matrix, mat);
   glUniformMatrix4fv (program->color_matrix.color_matrix_location, 1, GL_FALSE, mat);
 
-  graphene_vec4_to_float (&op->offset, vec);
+  graphene_vec4_to_float (op->offset, vec);
   glUniform4fv (program->color_matrix.color_offset_location, 1, vec);
 }
 
diff --git a/gsk/gl/gskglrenderops.c b/gsk/gl/gskglrenderops.c
index da725b8bbf..1e245212e4 100644
--- a/gsk/gl/gskglrenderops.c
+++ b/gsk/gl/gskglrenderops.c
@@ -653,8 +653,8 @@ ops_set_color_matrix (RenderOpBuilder         *builder,
   current_program_state->color_matrix.offset = *offset;
 
   op = ops_begin (builder, OP_CHANGE_COLOR_MATRIX);
-  op->matrix = *matrix;
-  op->offset = *offset;
+  op->matrix = matrix;
+  op->offset = offset;
 }
 
 void
diff --git a/gsk/gl/opbuffer.h b/gsk/gl/opbuffer.h
index 8578bc108b..e5198bb0b3 100644
--- a/gsk/gl/opbuffer.h
+++ b/gsk/gl/opbuffer.h
@@ -118,8 +118,8 @@ typedef struct
 
 typedef struct
 {
-  graphene_matrix_t matrix;
-  graphene_vec4_t offset;
+  const graphene_matrix_t *matrix;
+  const graphene_vec4_t *offset;
 } OpColorMatrix;
 
 typedef struct


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