clutter/actor: Always return a resource scale in get_resource_scale()

Since we now always return a resource scale, we can remove the boolean
return value from clutter_actor_get_resource_scale() and
_clutter_actor_get_real_resource_scale(), and instead simply return the
scale.

While at it, also remove the underscore from the
_clutter_actor_get_real_resource_scale() private API.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1276
This commit is contained in:
Jonas Dreßler
2020-04-10 11:41:58 +02:00
committed by Jonas Ådahl
parent 4a72ac0516
commit 98df2dbd05
8 changed files with 35 additions and 70 deletions

View File

@ -475,8 +475,7 @@ validate_markup_attributes (ClutterText *text,
PangoAttrFloat *scale = (PangoAttrFloat*) a;
float resource_scale;
if (!clutter_actor_get_resource_scale (CLUTTER_ACTOR (text), &resource_scale))
resource_scale = 1.0;
resource_scale = clutter_actor_get_resource_scale (CLUTTER_ACTOR (text));
g_assert_cmpfloat (scale->value, ==, resource_scale);
g_slist_free_full (attributes, (GDestroyNotify) pango_attribute_destroy);