diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-27 16:23:40 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-27 16:23:40 -0400 |
commit | e7f9d56da5965fd64cf468e3f4ad9494f409c57c (patch) | |
tree | 58e2c058c852e7831c68cfd36dd14bf29d238af6 /gsk/ngl/gsknglrenderjob.c | |
parent | 34883b7142bbaec2e42f8d44973feccce3a7e05a (diff) | |
download | gtk+-e7f9d56da5965fd64cf468e3f4ad9494f409c57c.tar.gz |
ngl: Fix an uninitialized read
We were using the wrong matrix here.
valgrind pointed this point.
Diffstat (limited to 'gsk/ngl/gsknglrenderjob.c')
-rw-r--r-- | gsk/ngl/gsknglrenderjob.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c index 8e4246d8b7..38dbe8f27d 100644 --- a/gsk/ngl/gsknglrenderjob.c +++ b/gsk/ngl/gsknglrenderjob.c @@ -399,7 +399,6 @@ static void extract_matrix_metadata (GskNglRenderModelview *modelview) { float dummy; - graphene_matrix_t m; gsk_transform_to_matrix (modelview->transform, &modelview->matrix); @@ -428,14 +427,14 @@ extract_matrix_metadata (GskNglRenderModelview *modelview) /* TODO: 90% sure this is incorrect. But we should never hit this code * path anyway. */ graphene_vec3_init (&col1, - graphene_matrix_get_value (&m, 0, 0), - graphene_matrix_get_value (&m, 1, 0), - graphene_matrix_get_value (&m, 2, 0)); + graphene_matrix_get_value (&modelview->matrix, 0, 0), + graphene_matrix_get_value (&modelview->matrix, 1, 0), + graphene_matrix_get_value (&modelview->matrix, 2, 0)); graphene_vec3_init (&col2, - graphene_matrix_get_value (&m, 0, 1), - graphene_matrix_get_value (&m, 1, 1), - graphene_matrix_get_value (&m, 2, 1)); + graphene_matrix_get_value (&modelview->matrix, 0, 1), + graphene_matrix_get_value (&modelview->matrix, 1, 1), + graphene_matrix_get_value (&modelview->matrix, 2, 1)); modelview->scale_x = graphene_vec3_length (&col1); modelview->scale_y = graphene_vec3_length (&col2); @@ -2673,6 +2672,8 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job, else c = *color; + //memset (&lookup, 0, sizeof lookup); + lookup.font = (PangoFont *)font; lookup.scale = (guint) (text_scale * 1024); |