surface-actor: Queue rectangles of update region separately
This aims to help reduce the amount of pixels redrawn on the screen in case the damage rectangle is partially occluded by another surface. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2965>
This commit is contained in:
parent
4048562961
commit
3f85158b85
1 changed files with 10 additions and 3 deletions
|
@ -412,10 +412,17 @@ meta_surface_actor_update_area (MetaSurfaceActor *self,
|
|||
|
||||
if (!cairo_region_is_empty (intersection))
|
||||
{
|
||||
cairo_rectangle_int_t damage_rect;
|
||||
int i, n_rectangles;
|
||||
|
||||
n_rectangles = cairo_region_num_rectangles (intersection);
|
||||
for (i = 0; i < n_rectangles; i++)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
cairo_region_get_rectangle (intersection, i, &rect);
|
||||
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (self), &rect);
|
||||
}
|
||||
|
||||
cairo_region_get_extents (intersection, &damage_rect);
|
||||
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (self), &damage_rect);
|
||||
repaint_scheduled = TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue