1
0
Fork 0

src: Use graphene APIs

This commit encompasses the trivial ones.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
This commit is contained in:
Georges Basile Stavracas Neto 2020-09-11 19:12:54 -03:00
parent f676861054
commit f6998f87c2
3 changed files with 11 additions and 10 deletions

View file

@ -131,11 +131,10 @@ draw_view (MetaStageX11Nested *stage_nested,
&transform); &transform);
cogl_framebuffer_push_matrix (onscreen); cogl_framebuffer_push_matrix (onscreen);
cogl_matrix_init_identity (&projection_matrix); graphene_matrix_init_scale (&projection_matrix, 2, -2, 0);
cogl_matrix_translate (&projection_matrix, -1, 1, 0); graphene_matrix_translate (&projection_matrix,
cogl_matrix_scale (&projection_matrix, 2, -2, 0); &GRAPHENE_POINT3D_INIT (-1, 1, 0));
graphene_matrix_multiply (&transform, &projection_matrix, &projection_matrix);
cogl_matrix_multiply (&projection_matrix, &projection_matrix, &transform);
cogl_framebuffer_set_projection_matrix (onscreen, &projection_matrix); cogl_framebuffer_set_projection_matrix (onscreen, &projection_matrix);
s_1 = sample_x / texture_width; s_1 = sample_x / texture_width;

View file

@ -148,9 +148,9 @@ meta_actor_painting_untransformed (CoglFramebuffer *fb,
cogl_framebuffer_get_modelview_matrix (fb, &modelview); cogl_framebuffer_get_modelview_matrix (fb, &modelview);
cogl_framebuffer_get_projection_matrix (fb, &projection); cogl_framebuffer_get_projection_matrix (fb, &projection);
cogl_matrix_multiply (&modelview_projection, graphene_matrix_multiply (&modelview,
&projection, &projection,
&modelview); &modelview_projection);
vertices[0].x = 0; vertices[0].x = 0;
vertices[0].y = 0; vertices[0].y = 0;

View file

@ -1118,8 +1118,10 @@ meta_window_actor_set_geometry_scale (MetaWindowActor *window_actor,
priv->geometry_scale = geometry_scale; priv->geometry_scale = geometry_scale;
cogl_matrix_init_identity (&child_transform); graphene_matrix_init_scale (&child_transform,
cogl_matrix_scale (&child_transform, geometry_scale, geometry_scale, 1); geometry_scale,
geometry_scale,
1);
clutter_actor_set_child_transform (CLUTTER_ACTOR (window_actor), clutter_actor_set_child_transform (CLUTTER_ACTOR (window_actor),
&child_transform); &child_transform);
} }