[mutter/wip/carlosg/performance-improvements: 11/13] compositor: Use redraw clip region to cull out children
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/performance-improvements: 11/13] compositor: Use redraw clip region to cull out children
- Date: Fri, 5 May 2017 13:05:59 +0000 (UTC)
commit 78ff617ff8a4c6ba0f254001afdb7b0058f4c9b5
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon May 1 13:44:04 2017 +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.
src/compositor/meta-window-group.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index 4b90777..33ca056 100644
--- a/src/compositor/meta-window-group.c
+++ b/src/compositor/meta-window-group.c
@@ -57,7 +57,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;
@@ -109,11 +109,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);
meta_cullable_cull_out (META_CULLABLE (window_group), unobscured_region, clip_region);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]