summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-10-31 11:56:23 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-12-12 17:29:58 +0000
commit30c464e68f302c5039421b5cc9b043bfa8dc2e9c (patch)
treeb0ce061d89b282b21df85cb962d8cb72f094d8a6
parent749fe38fec090fcbf7cb0a7ea1c98028a08fcb4e (diff)
downloadclutter-30c464e68f302c5039421b5cc9b043bfa8dc2e9c.tar.gz
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
-rw-r--r--clutter/x11/clutter-x11-texture-pixmap.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/clutter/x11/clutter-x11-texture-pixmap.c b/clutter/x11/clutter-x11-texture-pixmap.c
index 265b1379f..dd41c6208 100644
--- a/clutter/x11/clutter-x11-texture-pixmap.c
+++ b/clutter/x11/clutter-x11-texture-pixmap.c
@@ -341,12 +341,10 @@ clutter_x11_texture_pixmap_real_queue_damage_redraw (
gint height)
{
ClutterX11TexturePixmapPrivate *priv = texture->priv;
- ClutterActor *self = CLUTTER_ACTOR (texture);
- ClutterActorBox allocation;
- float scale_x;
- float scale_y;
- ClutterVertex origin;
- ClutterPaintVolume clip;
+ ClutterActor *self = CLUTTER_ACTOR (texture);
+ ClutterActorBox allocation;
+ float scale_x, scale_y;
+ cairo_rectangle_int_t clip;
/* NB: clutter_actor_queue_clipped_redraw expects a box in the actor's
* 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_y = (allocation.y2 - allocation.y1) / priv->pixmap_height;
- _clutter_paint_volume_init_static (&clip, self);
-
- origin.x = x * scale_x;
- origin.y = y * scale_y;
- origin.z = 0;
- 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);
+ clip.x = x * scale_x;
+ clip.y = y * scale_y;
+ clip.width = width * scale_x;
+ clip.height = height * scale_y;
+ clutter_actor_queue_redraw_with_clip (self, &clip);
}
static void