clutter-actor: Remove unused clutter_actor_get_allocation_vertices

It was also apparently broken (mutter#1126)

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1126
This commit is contained in:
Daniel van Vugt 2020-03-19 15:25:02 +08:00 committed by verdre
parent bd28581471
commit 1880e22229
2 changed files with 0 additions and 94 deletions

View File

@ -3076,96 +3076,6 @@ _clutter_actor_transform_and_project_box (ClutterActor *self,
_clutter_actor_fully_transform_vertices (self, box_vertices, verts, 4); _clutter_actor_fully_transform_vertices (self, box_vertices, verts, 4);
} }
/**
* clutter_actor_get_allocation_vertices:
* @self: A #ClutterActor
* @ancestor: (allow-none): A #ClutterActor to calculate the vertices
* against, or %NULL to use the #ClutterStage
* @verts: (out) (array fixed-size=4): return
* location for an array of 4 #graphene_point3d_t in which to store the result
*
* Calculates the transformed coordinates of the four corners of the
* actor in the plane of @ancestor. The returned vertices relate to
* the #ClutterActorBox coordinates as follows:
*
* - @verts[0] contains (x1, y1)
* - @verts[1] contains (x2, y1)
* - @verts[2] contains (x1, y2)
* - @verts[3] contains (x2, y2)
*
* If @ancestor is %NULL the ancestor will be the #ClutterStage. In
* this case, the coordinates returned will be the coordinates on
* the stage before the projection is applied. This is different from
* the behaviour of clutter_actor_get_abs_allocation_vertices().
*
* Since: 0.6
*/
void
clutter_actor_get_allocation_vertices (ClutterActor *self,
ClutterActor *ancestor,
graphene_point3d_t *verts)
{
ClutterActorPrivate *priv;
ClutterActorBox box;
graphene_point3d_t vertices[4];
CoglMatrix modelview;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
g_return_if_fail (ancestor == NULL || CLUTTER_IS_ACTOR (ancestor));
if (ancestor == NULL)
ancestor = _clutter_actor_get_stage_internal (self);
/* Fallback to a NOP transform if the actor isn't parented under a
* stage. */
if (ancestor == NULL)
ancestor = self;
priv = self->priv;
/* if the actor needs to be allocated we force a relayout, so that
* we will have valid values to use in the transformations */
if (priv->needs_allocation)
{
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
if (stage)
_clutter_stage_maybe_relayout (stage);
else
{
box.x1 = box.y1 = 0;
/* The result isn't really meaningful in this case but at
* least try to do something *vaguely* reasonable... */
clutter_actor_get_size (self, &box.x2, &box.y2);
}
}
clutter_actor_get_allocation_box (self, &box);
vertices[0].x = box.x1;
vertices[0].y = box.y1;
vertices[0].z = 0;
vertices[1].x = box.x2;
vertices[1].y = box.y1;
vertices[1].z = 0;
vertices[2].x = box.x1;
vertices[2].y = box.y2;
vertices[2].z = 0;
vertices[3].x = box.x2;
vertices[3].y = box.y2;
vertices[3].z = 0;
_clutter_actor_get_relative_transformation_matrix (self, ancestor,
&modelview);
cogl_matrix_transform_points (&modelview,
3,
sizeof (graphene_point3d_t),
vertices,
sizeof (graphene_point3d_t),
vertices,
4);
}
/** /**
* clutter_actor_get_abs_allocation_vertices: * clutter_actor_get_abs_allocation_vertices:
* @self: A #ClutterActor * @self: A #ClutterActor

View File

@ -443,10 +443,6 @@ CLUTTER_EXPORT
void clutter_actor_get_allocation_box (ClutterActor *self, void clutter_actor_get_allocation_box (ClutterActor *self,
ClutterActorBox *box); ClutterActorBox *box);
CLUTTER_EXPORT CLUTTER_EXPORT
void clutter_actor_get_allocation_vertices (ClutterActor *self,
ClutterActor *ancestor,
graphene_point3d_t *verts);
CLUTTER_EXPORT
gboolean clutter_actor_has_allocation (ClutterActor *self); gboolean clutter_actor_has_allocation (ClutterActor *self);
CLUTTER_EXPORT CLUTTER_EXPORT
void clutter_actor_set_size (ClutterActor *self, void clutter_actor_set_size (ClutterActor *self,