[gtk+/gtk-2-24] Optimize gdk_window_set_shape_combine_region
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Optimize gdk_window_set_shape_combine_region
- Date: Wed, 15 Dec 2010 03:24:30 +0000 (UTC)
commit c282958fb4bb25c736c682735002d15c50cb44d0
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Dec 14 22:24:09 2010 -0500
Optimize gdk_window_set_shape_combine_region
When setting no shape on an unshaped window, nothing changes,
so return early instead of recomputing lots of visibility
information.
Pointed out by Owen Taylor in bug 637156.
gdk/gdkwindow.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index c550aea..c4e8744 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -8640,6 +8640,9 @@ gdk_window_shape_combine_region (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
+ if (!private->shaped && shape_region == NULL)
+ return;
+
private->shaped = (shape_region != NULL);
if (private->shape)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]