Merge branch 'ngl-uninitialized-matrix' into 'master'

Ngl uninitialized matrix

See merge request GNOME/gtk!3358
This commit is contained in:
Matthias Clasen 2021-03-27 20:59:54 +00:00
commit 478ecf8db4
2 changed files with 10 additions and 7 deletions

View File

@ -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);

View File

@ -322,12 +322,16 @@ test_ui_file (GFile *file)
if (diff_image)
{
save_image (diff_image, ui_file, ".diff.png");
cairo_surface_destroy (diff_image);
g_test_fail ();
}
remove_extra_css (provider);
g_free (ui_file);
cairo_surface_destroy (ui_image);
cairo_surface_destroy (reference_image);
}
static int