[gnome-shell] Improve handling of gradients
- From: Florian Müllner <fmuellner src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Improve handling of gradients
- Date: Wed, 3 Feb 2010 22:30:22 +0000 (UTC)
commit fd1ce40ee7e5eb389cfaecaf4d56f86ae781da89
Author: Florian Müllner <fmuellner src gnome org>
Date: Wed Feb 3 21:30:35 2010 +0100
Improve handling of gradients
By calling clutter_actor_get_allocation() in st_widget_recompute_style()
to determine whether to redraw gradients, we triggered a complete
reallocation of the stage for each gradient.
As gradients are processed in st_widget_real_style_changed() anyway, the
additional checks in st_widget_recompute_style() are redundant and can
be removed altogether.
https://bugzilla.gnome.org/show_bug.cgi?id=608847
src/st/st-widget.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index 4338982..e0a7e00 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -1520,22 +1520,12 @@ static void
st_widget_recompute_style (StWidget *widget,
StThemeNode *old_theme_node)
{
- ClutterActorBox allocation_box;
StThemeNode *new_theme_node = st_widget_get_theme_node (widget);
- clutter_actor_get_allocation_box ((ClutterActor *) widget, &allocation_box);
-
if (!old_theme_node ||
!st_theme_node_geometry_equal (old_theme_node, new_theme_node))
clutter_actor_queue_relayout ((ClutterActor *) widget);
- /* Could compare gradient values here if we hit a performance issue.
- * Also, only redraw if we've been allocated.
- */
- if (allocation_box.x2 - allocation_box.x1 > 0 &&
- allocation_box.y2 - allocation_box.y1 > 0)
- st_widget_redraw_gradient (widget);
-
g_signal_emit (widget, signals[STYLE_CHANGED], 0);
widget->priv->is_style_dirty = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]