mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
wayland-surface: Don't require a MetaWindow to process damage...
and ClutterActor will clip to the actor bounds, anyway...
This commit is contained in:
parent
7841042a85
commit
f9a2c64460
@ -63,40 +63,19 @@ static void
|
|||||||
surface_process_damage (MetaWaylandSurface *surface,
|
surface_process_damage (MetaWaylandSurface *surface,
|
||||||
cairo_region_t *region)
|
cairo_region_t *region)
|
||||||
{
|
{
|
||||||
g_assert (surface->window);
|
|
||||||
|
|
||||||
if (surface->buffer_ref.buffer)
|
|
||||||
{
|
|
||||||
MetaRectangle rect;
|
|
||||||
cairo_rectangle_int_t cairo_rect;
|
|
||||||
|
|
||||||
meta_window_get_input_rect (surface->window, &rect);
|
|
||||||
cairo_rect.x = 0;
|
|
||||||
cairo_rect.y = 0;
|
|
||||||
cairo_rect.width = rect.width;
|
|
||||||
cairo_rect.height = rect.height;
|
|
||||||
|
|
||||||
cairo_region_intersect_rectangle (region, &cairo_rect);
|
|
||||||
|
|
||||||
if (surface->surface_actor)
|
|
||||||
{
|
|
||||||
int i, n_rectangles = cairo_region_num_rectangles (region);
|
int i, n_rectangles = cairo_region_num_rectangles (region);
|
||||||
|
|
||||||
for (i = 0; i < n_rectangles; i++)
|
for (i = 0; i < n_rectangles; i++)
|
||||||
{
|
{
|
||||||
cairo_rectangle_int_t rectangle;
|
cairo_rectangle_int_t rect;
|
||||||
|
cairo_region_get_rectangle (region, i, &rect);
|
||||||
cairo_region_get_rectangle (region, i, &rectangle);
|
|
||||||
|
|
||||||
meta_surface_actor_damage_area (surface->surface_actor,
|
meta_surface_actor_damage_area (surface->surface_actor,
|
||||||
rectangle.x,
|
rect.x,
|
||||||
rectangle.y,
|
rect.y,
|
||||||
rectangle.width,
|
rect.width,
|
||||||
rectangle.height,
|
rect.height,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user