From f0468cf828d933431ef4e18f3b60376f5df76cf6 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 12 Dec 2011 16:44:47 +0000 Subject: [PATCH] wayland/surface: Use queue_redraw_with_clip() Just like the X11 texture-pixmap actor. https://bugzilla.gnome.org/show_bug.cgi?id=660997 --- clutter/wayland/clutter-wayland-surface.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/clutter/wayland/clutter-wayland-surface.c b/clutter/wayland/clutter-wayland-surface.c index 84c8dc6..c829b41 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 -- 2.7.4