1
0
Fork 0

clutter/actor: Remove get_default_paint_volume() API

These days it's possible to chain up into the default get_paint_volume()
implementation again, which renders
clutter_actor_get_default_paint_volume() unnecessary. So remove that
function and move clutter_actor_update_default_paint_volume() back into
real_get_paint_volume() where it belongs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1492>
This commit is contained in:
Jonas Dreßler 2020-10-24 10:43:49 +02:00 committed by Marge Bot
parent 9fab8410d7
commit 692a8a4d93
2 changed files with 2 additions and 59 deletions

View file

@ -5660,7 +5660,7 @@ atk_implementor_iface_init (AtkImplementorIface *iface)
} }
static gboolean static gboolean
clutter_actor_update_default_paint_volume (ClutterActor *self, clutter_actor_real_get_paint_volume (ClutterActor *self,
ClutterPaintVolume *volume) ClutterPaintVolume *volume)
{ {
ClutterActorPrivate *priv = self->priv; ClutterActorPrivate *priv = self->priv;
@ -5746,61 +5746,6 @@ clutter_actor_update_default_paint_volume (ClutterActor *self,
} }
return res; return res;
}
static gboolean
clutter_actor_real_get_paint_volume (ClutterActor *self,
ClutterPaintVolume *volume)
{
return clutter_actor_update_default_paint_volume (self, volume);
}
/**
* clutter_actor_get_default_paint_volume:
* @self: a #ClutterActor
*
* Retrieves the default paint volume for @self.
*
* This function provides the same #ClutterPaintVolume that would be
* computed by the default implementation inside #ClutterActor of the
* #ClutterActorClass.get_paint_volume() virtual function.
*
* This function should only be used by #ClutterActor subclasses that
* cannot chain up to the parent implementation when computing their
* paint volume.
*
* Return value: (transfer none) (nullable): a pointer to the default
* #ClutterPaintVolume, relative to the #ClutterActor, or %NULL if
* the actor could not compute a valid paint volume. The returned value
* is not guaranteed to be stable across multiple frames, so if you
* want to retain it, you will need to copy it using
* clutter_paint_volume_copy().
*/
const ClutterPaintVolume *
clutter_actor_get_default_paint_volume (ClutterActor *self)
{
ClutterPaintVolume volume;
ClutterPaintVolume *res;
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), NULL);
res = NULL;
_clutter_paint_volume_init_static (&volume, self);
if (clutter_actor_update_default_paint_volume (self, &volume))
{
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
if (stage != NULL)
{
res = _clutter_stage_paint_volume_stack_allocate (CLUTTER_STAGE (stage));
_clutter_paint_volume_copy_static (&volume, res);
}
}
clutter_paint_volume_free (&volume);
return res;
} }
static gboolean static gboolean

View file

@ -638,8 +638,6 @@ const ClutterPaintVolume * clutter_actor_get_paint_volume
CLUTTER_EXPORT CLUTTER_EXPORT
const ClutterPaintVolume * clutter_actor_get_transformed_paint_volume (ClutterActor *self, const ClutterPaintVolume * clutter_actor_get_transformed_paint_volume (ClutterActor *self,
ClutterActor *relative_to_ancestor); ClutterActor *relative_to_ancestor);
CLUTTER_EXPORT
const ClutterPaintVolume * clutter_actor_get_default_paint_volume (ClutterActor *self);
/* Events */ /* Events */
CLUTTER_EXPORT CLUTTER_EXPORT