[gtk/wip/baedert/gl-rework: 6/41] gl renderer: Don't copy matrix/offset of color matrix nodes into ops
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/gl-rework: 6/41] gl renderer: Don't copy matrix/offset of color matrix nodes into ops
- Date: Fri, 20 Dec 2019 09:53:09 +0000 (UTC)
commit edb4fc7fee4aa3b470bae4ae74e6b36491816aa4
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 739fce6a2f..684cd91de1 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]