x11/texture-pixmap: Use ClutterActor.queue_redraw_with_clip()

Instead of using a PaintVolume for a 2D region, and an internal
function, use the newly added queue_redraw_with_clip() method.

This removes the last bit of internal API usage in the
ClutterX11TexturePixmap actor.

https://bugzilla.gnome.org/show_bug.cgi?id=660997
This commit is contained in:
Emmanuele Bassi 2011-10-31 11:56:23 +00:00
parent 749fe38fec
commit 30c464e68f

View File

@ -343,10 +343,8 @@ clutter_x11_texture_pixmap_real_queue_damage_redraw (
ClutterX11TexturePixmapPrivate *priv = texture->priv; ClutterX11TexturePixmapPrivate *priv = texture->priv;
ClutterActor *self = CLUTTER_ACTOR (texture); ClutterActor *self = CLUTTER_ACTOR (texture);
ClutterActorBox allocation; ClutterActorBox allocation;
float scale_x; float scale_x, scale_y;
float scale_y; cairo_rectangle_int_t clip;
ClutterVertex origin;
ClutterPaintVolume clip;
/* NB: clutter_actor_queue_clipped_redraw expects a box in the actor's /* NB: clutter_actor_queue_clipped_redraw expects a box in the actor's
* coordinate space so we need to convert from pixmap coordinates to * coordinate space so we need to convert from pixmap coordinates to
@ -373,17 +371,11 @@ clutter_x11_texture_pixmap_real_queue_damage_redraw (
scale_x = (allocation.x2 - allocation.x1) / priv->pixmap_width; scale_x = (allocation.x2 - allocation.x1) / priv->pixmap_width;
scale_y = (allocation.y2 - allocation.y1) / priv->pixmap_height; scale_y = (allocation.y2 - allocation.y1) / priv->pixmap_height;
_clutter_paint_volume_init_static (&clip, self); clip.x = x * scale_x;
clip.y = y * scale_y;
origin.x = x * scale_x; clip.width = width * scale_x;
origin.y = y * scale_y; clip.height = height * scale_y;
origin.z = 0; clutter_actor_queue_redraw_with_clip (self, &clip);
clutter_paint_volume_set_origin (&clip, &origin);
clutter_paint_volume_set_width (&clip, width * scale_x);
clutter_paint_volume_set_height (&clip, height * scale_y);
_clutter_actor_queue_redraw_with_clip (self, 0, &clip);
clutter_paint_volume_free (&clip);
} }
static void static void