mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
wayland/surface: Use queue_redraw_with_clip()
Just like the X11 texture-pixmap actor. https://bugzilla.gnome.org/show_bug.cgi?id=660997
This commit is contained in:
parent
30c464e68f
commit
f0468cf828
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user