x11/stage: Use ClutterActor.queue_redraw_with_clip()

Instead of using a paint volume for a 2D region, use the newly added
queue_redraw_with_clip() method.

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

View File

@ -1111,8 +1111,7 @@ clutter_stage_x11_translate_event (ClutterEventTranslator *translator,
case Expose:
{
XExposeEvent *expose = (XExposeEvent *) xevent;
ClutterPaintVolume clip;
ClutterVertex origin;
cairo_rectangle_int_t clip;
CLUTTER_NOTE (EVENT,
"expose for stage: %s[%p], win:0x%x - "
@ -1125,19 +1124,11 @@ clutter_stage_x11_translate_event (ClutterEventTranslator *translator,
expose->width,
expose->height);
origin.x = expose->x;
origin.y = expose->y;
origin.z = 0;
_clutter_paint_volume_init_static (&clip, CLUTTER_ACTOR (stage));
clutter_paint_volume_set_origin (&clip, &origin);
clutter_paint_volume_set_width (&clip, expose->width);
clutter_paint_volume_set_height (&clip, expose->height);
_clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), 0, &clip);
clutter_paint_volume_free (&clip);
clip.x = expose->x;
clip.y = expose->y;
clip.width = expose->width;
clip.height = expose->height;
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), &clip);
}
break;