[gtk+/wip/watson/progress-tracker: 25/28] styleanimation: don't take timestamp for static/finished
- From: Matthew Watson <watson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/watson/progress-tracker: 25/28] styleanimation: don't take timestamp for static/finished
- Date: Wed, 30 Mar 2016 23:14:24 +0000 (UTC)
commit 2e048c3a79d9e58555c7fabb59a77308943b875b
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 3b5e749..e0bd425 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;
}
@@ -474,7 +474,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;
if (GTK_IS_CSS_ANIMATION (animation))
animation = _gtk_css_animation_copy (GTK_CSS_ANIMATION (animation));
diff --git a/gtk/gtkcssanimation.c b/gtk/gtkcssanimation.c
index a69ca92..0f7535e 100644
--- a/gtk/gtkcssanimation.c
+++ b/gtk/gtkcssanimation.c
@@ -112,15 +112,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);
diff --git a/gtk/gtkcsstransition.c b/gtk/gtkcsstransition.c
index 846e213..6358b09 100644
--- a/gtk/gtkcsstransition.c
+++ b/gtk/gtkcsstransition.c
@@ -66,8 +66,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);
@@ -75,8 +74,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]