[gtk+] Optimize gdk_window_set_shape_combine_region
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Optimize gdk_window_set_shape_combine_region
- Date: Wed, 15 Dec 2010 03:23:10 +0000 (UTC)
commit 208d717fefb7d1d1faa0dada132a290036b458d0
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Dec 14 22:21:39 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 becfba5..54f5d2f 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7167,6 +7167,9 @@ gdk_window_shape_combine_region (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
+ if (!window->shape && shape_region == NULL)
+ return;
+
window->shaped = (shape_region != NULL);
if (window->shape)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]