mirror of
https://github.com/brl/mutter.git
synced 2025-08-01 14:15:30 +00:00
clutter: Use graphene_matrix_inverse()
Instead of our own implementation that upscales, then downscales back, use graphene_matrix_inverse() directly. This is possible after switching to a z-near value that doesn't have problems with float precision. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
This commit is contained in:
@@ -3165,9 +3165,8 @@ ensure_valid_actor_transform (ClutterActor *actor)
|
||||
graphene_matrix_init_identity (&priv->transform);
|
||||
|
||||
CLUTTER_ACTOR_GET_CLASS (actor)->apply_transform (actor, &priv->transform);
|
||||
priv->has_inverse_transform =
|
||||
cogl_graphene_matrix_get_inverse (&priv->transform,
|
||||
&priv->inverse_transform);
|
||||
priv->has_inverse_transform = graphene_matrix_inverse (&priv->transform,
|
||||
&priv->inverse_transform);
|
||||
|
||||
priv->transform_valid = TRUE;
|
||||
}
|
||||
|
@@ -2068,8 +2068,8 @@ clutter_stage_set_perspective (ClutterStage *stage,
|
||||
priv->perspective.aspect,
|
||||
priv->perspective.z_near,
|
||||
priv->perspective.z_far);
|
||||
cogl_graphene_matrix_get_inverse (&priv->projection,
|
||||
&priv->inverse_projection);
|
||||
graphene_matrix_inverse (&priv->projection,
|
||||
&priv->inverse_projection);
|
||||
|
||||
_clutter_stage_dirty_projection (stage);
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
|
||||
|
Reference in New Issue
Block a user