[gtk+/wip/cssstyle: 15/27] stylecontext: Fold a function into only caller



commit 37d9affafd270b86fde38639dfe1b427e4c7a91d
Author: Benjamin Otte <otte redhat com>
Date:   Mon Dec 15 14:22:00 2014 +0100

    stylecontext: Fold a function into only caller

 gtk/gtkstylecontext.c |   23 +++++------------------
 1 files changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 2390464..5fe3ff4 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -2712,23 +2712,6 @@ gtk_style_context_do_invalidate (GtkStyleContext  *context,
   priv->invalidating_context = NULL;
 }
 
-static GtkBitmask *
-gtk_style_context_update_animations (GtkStyleContext *context,
-                                     gint64           timestamp)
-{
-  GtkBitmask *differences;
-  GtkCssStyle *values;
-  
-  values = style_values_lookup (context);
-
-  differences = gtk_css_animated_style_advance (GTK_CSS_ANIMATED_STYLE (values), timestamp);
-
-  if (gtk_css_animated_style_is_static (GTK_CSS_ANIMATED_STYLE (values)))
-    _gtk_style_context_update_animating (context);
-
-  return differences;
-}
-
 static gboolean
 gtk_style_context_needs_full_revalidate (GtkStyleContext  *context,
                                          GtkCssChange      change)
@@ -2884,9 +2867,13 @@ _gtk_style_context_validate (GtkStyleContext  *context,
     {
       GtkBitmask *animation_changes;
 
-      animation_changes = gtk_style_context_update_animations (context, timestamp);
+      animation_changes = gtk_css_animated_style_advance (GTK_CSS_ANIMATED_STYLE (info->values), timestamp);
+
       changes = _gtk_bitmask_union (changes, animation_changes);
       _gtk_bitmask_free (animation_changes);
+
+      if (gtk_css_animated_style_is_static (GTK_CSS_ANIMATED_STYLE (info->values)))
+        _gtk_style_context_update_animating (context);
     }
 
   if (!_gtk_bitmask_is_empty (changes))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]