[clutter] x11/texture-pixmap: Use ClutterActor.queue_redraw_with_clip()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] x11/texture-pixmap: Use ClutterActor.queue_redraw_with_clip()
- Date: Mon, 12 Dec 2011 17:34:09 +0000 (UTC)
commit 30c464e68f302c5039421b5cc9b043bfa8dc2e9c
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Mon Oct 31 11:56:23 2011 +0000
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
clutter/x11/clutter-x11-texture-pixmap.c | 26 +++++++++-----------------
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 265b137..dd41c62 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]