[gtk+/wip/watson/progress-tracker: 187/191] styleanimation: don't take timestamp for static/finished



commit 5f9e75e564e090ec9f4297a9f078cc0a3770c604
Author: Matt Watson <mattdangerw gmail com>
Date:   Thu Mar 24 23:50:39 2016 -0700

    styleanimation: don't take timestamp for static/finished
    
    With the switch to progress tracker we don't need to anymore

 gtk/gtkcssanimatedstyle.c      |    4 ++--
 gtk/gtkcssanimation.c          |    6 ++----
 gtk/gtkcsstransition.c         |    6 ++----
 gtk/gtkstyleanimation.c        |   16 ++++++----------
 gtk/gtkstyleanimationprivate.h |   12 ++++--------
 5 files changed, 16 insertions(+), 28 deletions(-)
---
diff --git a/gtk/gtkcssanimatedstyle.c b/gtk/gtkcssanimatedstyle.c
index 87e5147..f51d0eb 100644
--- a/gtk/gtkcssanimatedstyle.c
+++ b/gtk/gtkcssanimatedstyle.c
@@ -71,7 +71,7 @@ gtk_css_animated_style_is_static (GtkCssStyle *style)
 
   for (list = animated->animations; list; list = list->next)
     {
-      if (!_gtk_style_animation_is_static (list->data, animated->current_time))
+      if (!_gtk_style_animation_is_static (list->data))
         return FALSE;
     }
 
@@ -470,7 +470,7 @@ gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source,
     {
       GtkStyleAnimation *animation = l->data;
       
-      if (_gtk_style_animation_is_finished (animation, timestamp))
+      if (_gtk_style_animation_is_finished (animation))
         continue;
 
       animations = g_slist_prepend (animations, g_object_ref (animation));
diff --git a/gtk/gtkcssanimation.c b/gtk/gtkcssanimation.c
index ba57842..e7bb6ba 100644
--- a/gtk/gtkcssanimation.c
+++ b/gtk/gtkcssanimation.c
@@ -113,15 +113,13 @@ gtk_css_animation_set_values (GtkStyleAnimation    *style_animation,
 }
 
 static gboolean
-gtk_css_animation_is_finished (GtkStyleAnimation *style_animation,
-                               gint64             at_time_us)
+gtk_css_animation_is_finished (GtkStyleAnimation *style_animation)
 {
   return FALSE;
 }
 
 static gboolean
-gtk_css_animation_is_static (GtkStyleAnimation *style_animation,
-                             gint64             at_time_us)
+gtk_css_animation_is_static (GtkStyleAnimation *style_animation)
 {
   GtkCssAnimation *animation = GTK_CSS_ANIMATION (style_animation);
   double iteration;
diff --git a/gtk/gtkcsstransition.c b/gtk/gtkcsstransition.c
index a06ff23..d5ff14d 100644
--- a/gtk/gtkcsstransition.c
+++ b/gtk/gtkcsstransition.c
@@ -57,8 +57,7 @@ gtk_css_transition_set_values (GtkStyleAnimation   *animation,
 }
 
 static gboolean
-gtk_css_transition_is_finished (GtkStyleAnimation *animation,
-                                gint64             at_time_us)
+gtk_css_transition_is_finished (GtkStyleAnimation *animation)
 {
   GtkCssTransition *transition = GTK_CSS_TRANSITION (animation);
 
@@ -66,8 +65,7 @@ gtk_css_transition_is_finished (GtkStyleAnimation *animation,
 }
 
 static gboolean
-gtk_css_transition_is_static (GtkStyleAnimation *animation,
-                              gint64             at_time_us)
+gtk_css_transition_is_static (GtkStyleAnimation *animation)
 {
   GtkCssTransition *transition = GTK_CSS_TRANSITION (animation);
 
diff --git a/gtk/gtkstyleanimation.c b/gtk/gtkstyleanimation.c
index 3c1a887..0ca8852 100644
--- a/gtk/gtkstyleanimation.c
+++ b/gtk/gtkstyleanimation.c
@@ -31,15 +31,13 @@ gtk_style_animation_real_set_values (GtkStyleAnimation    *animation,
 }
 
 static gboolean
-gtk_style_animation_real_is_finished (GtkStyleAnimation *animation,
-                                      gint64             at_time_us)
+gtk_style_animation_real_is_finished (GtkStyleAnimation *animation)
 {
   return TRUE;
 }
 
 static gboolean
-gtk_style_animation_real_is_static (GtkStyleAnimation *animation,
-                                    gint64             at_time_us)
+gtk_style_animation_real_is_static (GtkStyleAnimation *animation)
 {
   return FALSE;
 }
@@ -73,8 +71,7 @@ _gtk_style_animation_set_values (GtkStyleAnimation    *animation,
 }
 
 gboolean
-_gtk_style_animation_is_finished (GtkStyleAnimation *animation,
-                                  gint64             at_time_us)
+_gtk_style_animation_is_finished (GtkStyleAnimation *animation)
 {
   GtkStyleAnimationClass *klass;
 
@@ -82,7 +79,7 @@ _gtk_style_animation_is_finished (GtkStyleAnimation *animation,
 
   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
 
-  return klass->is_finished (animation, at_time_us);
+  return klass->is_finished (animation);
 }
 
 /**
@@ -97,8 +94,7 @@ _gtk_style_animation_is_finished (GtkStyleAnimation *animation,
  * Returns: %TRUE if @animation will not change anymore after @at_time_us
  **/
 gboolean
-_gtk_style_animation_is_static (GtkStyleAnimation *animation,
-                                gint64             at_time_us)
+_gtk_style_animation_is_static (GtkStyleAnimation *animation)
 {
   GtkStyleAnimationClass *klass;
 
@@ -106,5 +102,5 @@ _gtk_style_animation_is_static (GtkStyleAnimation *animation,
 
   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
 
-  return klass->is_static (animation, at_time_us);
+  return klass->is_static (animation);
 }
diff --git a/gtk/gtkstyleanimationprivate.h b/gtk/gtkstyleanimationprivate.h
index 6981004..5fc3a96 100644
--- a/gtk/gtkstyleanimationprivate.h
+++ b/gtk/gtkstyleanimationprivate.h
@@ -43,10 +43,8 @@ struct _GtkStyleAnimationClass
 {
   GObjectClass parent_class;
 
-  gboolean      (* is_finished)                         (GtkStyleAnimation      *animation,
-                                                         gint64                  at_time_us);
-  gboolean      (* is_static)                           (GtkStyleAnimation      *animation,
-                                                         gint64                  at_time_us);
+  gboolean      (* is_finished)                         (GtkStyleAnimation      *animation);
+  gboolean      (* is_static)                           (GtkStyleAnimation      *animation);
   void          (* set_values)                          (GtkStyleAnimation      *animation,
                                                          gint64                  for_time_us,
                                                          GtkCssAnimatedStyle    *style);
@@ -57,10 +55,8 @@ GType           _gtk_style_animation_get_type           (void) G_GNUC_CONST;
 void            _gtk_style_animation_set_values         (GtkStyleAnimation      *animation,
                                                          gint64                  for_time_us,
                                                          GtkCssAnimatedStyle    *style);
-gboolean        _gtk_style_animation_is_finished        (GtkStyleAnimation      *animation,
-                                                         gint64                  at_time_us);
-gboolean        _gtk_style_animation_is_static          (GtkStyleAnimation      *animation,
-                                                         gint64                  at_time_us);
+gboolean        _gtk_style_animation_is_finished        (GtkStyleAnimation      *animation);
+gboolean        _gtk_style_animation_is_static          (GtkStyleAnimation      *animation);
 
 
 G_END_DECLS


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