clutter/pan-action: Use graphene APIs

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
This commit is contained in:
Georges Basile Stavracas Neto 2020-09-11 17:46:13 -03:00
parent 6aa29640d6
commit 571bf5af6d

View File

@ -355,11 +355,14 @@ clutter_pan_action_real_pan (ClutterPanAction *self,
{ {
gfloat dx, dy; gfloat dx, dy;
graphene_matrix_t transform; graphene_matrix_t transform;
graphene_matrix_t translate;
clutter_pan_action_get_constrained_motion_delta (self, 0, &dx, &dy); clutter_pan_action_get_constrained_motion_delta (self, 0, &dx, &dy);
clutter_actor_get_child_transform (actor, &transform); clutter_actor_get_child_transform (actor, &transform);
cogl_matrix_translate (&transform, dx, dy, 0.0f); graphene_matrix_init_translate (&translate,
&GRAPHENE_POINT3D_INIT (dx, dy, 0.0f));
graphene_matrix_multiply (&translate, &transform, &transform);
clutter_actor_set_child_transform (actor, &transform); clutter_actor_set_child_transform (actor, &transform);
return TRUE; return TRUE;
} }