summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-12-12 16:44:47 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-12-12 17:29:58 +0000
commitf0468cf828d933431ef4e18f3b60376f5df76cf6 (patch)
treef12fdf7b9739b0305e946177619f1da2992756b8
parent30c464e68f302c5039421b5cc9b043bfa8dc2e9c (diff)
downloadclutter-f0468cf828d933431ef4e18f3b60376f5df76cf6.tar.gz
wayland/surface: Use queue_redraw_with_clip()
Just like the X11 texture-pixmap actor. https://bugzilla.gnome.org/show_bug.cgi?id=660997
-rw-r--r--clutter/wayland/clutter-wayland-surface.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/clutter/wayland/clutter-wayland-surface.c b/clutter/wayland/clutter-wayland-surface.c
index 84c8dc65b..c829b41be 100644
--- a/clutter/wayland/clutter-wayland-surface.c
+++ b/clutter/wayland/clutter-wayland-surface.c
@@ -100,16 +100,16 @@ clutter_wayland_surface_queue_damage_redraw (ClutterWaylandSurface *texture,
float scale_x;
float scale_y;
ClutterVertex origin;
- ClutterPaintVolume clip;
+ cairo_rectangle_int_t clip;
- /* NB: clutter_actor_queue_clipped_redraw expects a box in the actor's
+ /* NB: clutter_actor_queue_redraw_with_clip expects a box in the actor's
* coordinate space so we need to convert from surface coordinates to
* actor coordinates...
*/
/* Calling clutter_actor_get_allocation_box() is enormously expensive
* if the actor has an out-of-date allocation, since it triggers
- * a full redraw. clutter_actor_queue_clipped_redraw() would redraw
+ * a full redraw. clutter_actor_queue_redraw_with_clip() would redraw
* the whole stage anyways in that case, so just go ahead and do
* it here.
*/
@@ -127,17 +127,11 @@ clutter_wayland_surface_queue_damage_redraw (ClutterWaylandSurface *texture,
scale_x = (allocation.x2 - allocation.x1) / priv->width;
scale_y = (allocation.y2 - allocation.y1) / priv->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