[gtk+] sizerequest: Cache sizes without size groups
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] sizerequest: Cache sizes without size groups
- Date: Sun, 4 Nov 2012 14:36:06 +0000 (UTC)
commit 62f541474247db57d17833ad05ade2a2c5625f66
Author: Benjamin Otte <otte redhat com>
Date: Fri Nov 2 00:50:54 2012 +0100
sizerequest: Cache sizes without size groups
We compute on-demand for size groups anyway, so we can (in theory, this
patch doesn't do that yet) get around costly cache blowing when
invalidating single widgets of a size group this way.
gtk/gtksizerequest.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index c0e461f..289317b 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -464,15 +464,6 @@ compute_size_for_orientation (GtkWidget *widget,
nat_size = adjusted_natural;
}
- /* Update size-groups with our request and update our cached requests
- * with the size-group values in a single pass.
- */
- _gtk_size_group_bump_requisition (widget,
- orientation,
- for_size,
- &min_size,
- &nat_size);
-
commit_cached_size (widget, orientation, for_size, min_size, nat_size);
}
else
@@ -481,6 +472,12 @@ compute_size_for_orientation (GtkWidget *widget,
nat_size = cached_size->natural_size;
}
+ _gtk_size_group_bump_requisition (widget,
+ orientation,
+ for_size,
+ &min_size,
+ &nat_size);
+
if (minimum_size)
*minimum_size = min_size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]