deform-effect: Don't use deprecated API

The ClutterOffscreenEffect.get_target_size() method has been deprecated,
and replaced by the get_target_rect() one. We can easily switch to the
latter, and avoid the deprecation warning.

https://bugzilla.gnome.org/show_bug.cgi?id=670004
This commit is contained in:
Emmanuele Bassi 2013-02-21 13:04:34 +00:00
parent 37e3ef2303
commit 78962f9ab9

View File

@ -180,6 +180,7 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
if (priv->is_dirty) if (priv->is_dirty)
{ {
ClutterRect rect;
gboolean mapped_buffer; gboolean mapped_buffer;
CoglVertexP3T2C4 *verts; CoglVertexP3T2C4 *verts;
ClutterActor *actor; ClutterActor *actor;
@ -193,7 +194,12 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
/* if we don't have a target size, fall back to the actor's /* if we don't have a target size, fall back to the actor's
* allocation, though wrong it might be * allocation, though wrong it might be
*/ */
if (!clutter_offscreen_effect_get_target_size (effect, &width, &height)) if (clutter_offscreen_effect_get_target_rect (effect, &rect))
{
width = clutter_rect_get_width (&rect);
height = clutter_rect_get_height (&rect);
}
else
clutter_actor_get_size (actor, &width, &height); clutter_actor_get_size (actor, &width, &height);
/* XXX ideally, the sub-classes should tell us what they /* XXX ideally, the sub-classes should tell us what they