From 692a8a4d93164e6ff4747b68532580f30a02e6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sat, 24 Oct 2020 10:43:49 +0200 Subject: [PATCH] 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: --- clutter/clutter/clutter-actor.c | 59 ++------------------------------- clutter/clutter/clutter-actor.h | 2 -- 2 files changed, 2 insertions(+), 59 deletions(-) diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 009488a06..e1a6826db 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -5660,8 +5660,8 @@ atk_implementor_iface_init (AtkImplementorIface *iface) } static gboolean -clutter_actor_update_default_paint_volume (ClutterActor *self, - ClutterPaintVolume *volume) +clutter_actor_real_get_paint_volume (ClutterActor *self, + ClutterPaintVolume *volume) { ClutterActorPrivate *priv = self->priv; gboolean res = TRUE; @@ -5746,61 +5746,6 @@ clutter_actor_update_default_paint_volume (ClutterActor *self, } 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 diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h index d107b4bda..b7d9fc93d 100644 --- a/clutter/clutter/clutter-actor.h +++ b/clutter/clutter/clutter-actor.h @@ -638,8 +638,6 @@ const ClutterPaintVolume * clutter_actor_get_paint_volume CLUTTER_EXPORT const ClutterPaintVolume * clutter_actor_get_transformed_paint_volume (ClutterActor *self, ClutterActor *relative_to_ancestor); -CLUTTER_EXPORT -const ClutterPaintVolume * clutter_actor_get_default_paint_volume (ClutterActor *self); /* Events */ CLUTTER_EXPORT