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.
This commit is contained in:
Benjamin Otte
2012-11-02 00:50:54 +01:00
parent be1bde9111
commit 62f5414742

View File

@ -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;