clutter-actor: Initialize with the identity matrix in get_transform
The documentation and name of the get_transformation_matrix function implies that 'matrix' is purely an out parameter. However it wasn't initializing the matrix before calling the 'apply_transform' virtual so it was basically just a wrapper for the virtual. The virtual assumes the matrix parameter is in/out and applies the actor's transformation on top of any existing transformations. This causes unexpected semantics that are inconsistent with the documentation.
This commit is contained in:
parent
e550755f3d
commit
048fcea988
@ -9802,6 +9802,8 @@ clutter_actor_get_transformation_matrix (ClutterActor *self,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||||
|
|
||||||
|
cogl_matrix_init_identity (matrix);
|
||||||
|
|
||||||
CLUTTER_ACTOR_GET_CLASS (self)->apply_transform (self, matrix);
|
CLUTTER_ACTOR_GET_CLASS (self)->apply_transform (self, matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user