diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-06-23 16:12:45 -0400 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-06-23 16:43:32 -0400 |
commit | 70fe57703bcd733e3f2811a0a236ff7796d6a38d (patch) | |
tree | 987b95f7030d760730634202322d459c784875d0 | |
parent | a9759c7756c719a89546f3287e16d230d0d87646 (diff) | |
download | gtk+-70fe57703bcd733e3f2811a0a236ff7796d6a38d.tar.gz |
gdkwindow: Don't do some extra work
We can do an early return in some specific cases before we need to
create and clip a cairo region.
-rw-r--r-- | gdk/gdkwindow.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 597556e837..db7b640312 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -3246,19 +3246,22 @@ _gdk_window_process_updates_recurse_helper (GdkWindow *window, cairo_region_t *clipped_expose_region; GList *l, *children; + if (window->destroyed) + return; + + if (window->alpha == 0 && !gdk_window_has_impl (window)) + return; + clipped_expose_region = cairo_region_copy (expose_region); cairo_region_translate (clipped_expose_region, dx, dy); cairo_region_intersect (clipped_expose_region, window->clip_region); - if (cairo_region_is_empty (clipped_expose_region) || window->destroyed) + if (cairo_region_is_empty (clipped_expose_region)) goto out; if (gdk_window_is_offscreen (window)) gdk_window_add_damage (window, clipped_expose_region); - if (window->alpha == 0 && !gdk_window_has_impl (window)) - goto out; - /* Paint the window before the children, clipped to the window region */ /* While gtk+ no longer handles exposes on anything but native |