[mutter/wip/carlosg/clip-regions: 3/6] compositor: Use redraw clip region to cull out children



commit 04a4ad4c722c025a77c9018e067d6e76eaa7710d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Jul 20 18:33:11 2019 +0200

    compositor: Use redraw clip region to cull out children
    
    This will avoid repainting too much of the background if the
    bounding box turned out to be too large.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782344

 src/compositor/meta-window-group.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index 29ec1e742..b8a33cc30 100644
--- a/src/compositor/meta-window-group.c
+++ b/src/compositor/meta-window-group.c
@@ -56,7 +56,7 @@ meta_window_group_paint (ClutterActor *actor)
 {
   cairo_region_t *clip_region;
   cairo_region_t *unobscured_region;
-  cairo_rectangle_int_t visible_rect, clip_rect;
+  cairo_rectangle_int_t visible_rect;
   int paint_x_origin, paint_y_origin;
   int screen_width, screen_height;
 
@@ -112,10 +112,7 @@ meta_window_group_paint (ClutterActor *actor)
    * sizes, we could intersect this with an accurate union of the
    * monitors to avoid painting shadows that are visible only in the
    * holes. */
-  clutter_stage_get_redraw_clip_bounds (CLUTTER_STAGE (stage),
-                                        &clip_rect);
-
-  clip_region = cairo_region_create_rectangle (&clip_rect);
+  clip_region = clutter_stage_get_redraw_clip (CLUTTER_STAGE (stage));
 
   cairo_region_translate (clip_region, -paint_x_origin, -paint_y_origin);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]