diff options
author | Timm Bäder <mail@baedert.org> | 2020-05-06 11:40:52 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-05-10 08:44:20 +0200 |
commit | 06460ea50ca611a67c28f9e7ee1b4dba7b8f2aa5 (patch) | |
tree | c2835a33a21f0ae114f72e0a8a531e0071ff5d84 /gtk/gtkcsstransition.c | |
parent | e12c9de5dfd5b9ed0098650c516f4fed1653f423 (diff) | |
download | gtk+-06460ea50ca611a67c28f9e7ee1b4dba7b8f2aa5.tar.gz |
css: Drop a few dynamic type checks
We hit these code paths a lot
Diffstat (limited to 'gtk/gtkcsstransition.c')
-rw-r--r-- | gtk/gtkcsstransition.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk/gtkcsstransition.c b/gtk/gtkcsstransition.c index 62731a513d..bb872a0b17 100644 --- a/gtk/gtkcsstransition.c +++ b/gtk/gtkcsstransition.c @@ -30,8 +30,7 @@ static GtkStyleAnimation * gtk_css_transition_advance (GtkStyleAnimation *style_animation, gint64 timestamp) { - GtkCssTransition *source = GTK_CSS_TRANSITION (style_animation); - + GtkCssTransition *source = (GtkCssTransition *)style_animation; GtkCssTransition *transition; transition = g_object_new (GTK_TYPE_CSS_TRANSITION, NULL); @@ -44,14 +43,14 @@ gtk_css_transition_advance (GtkStyleAnimation *style_animation, gtk_progress_tracker_advance_frame (&transition->tracker, timestamp); transition->finished = gtk_progress_tracker_get_state (&transition->tracker) == GTK_PROGRESS_STATE_AFTER; - return GTK_STYLE_ANIMATION (transition); + return (GtkStyleAnimation *)transition; } static void gtk_css_transition_apply_values (GtkStyleAnimation *style_animation, GtkCssAnimatedStyle *style) { - GtkCssTransition *transition = GTK_CSS_TRANSITION (style_animation); + GtkCssTransition *transition = (GtkCssTransition *)style_animation; GtkCssValue *value, *end; double progress; GtkProgressState state; @@ -86,7 +85,7 @@ gtk_css_transition_apply_values (GtkStyleAnimation *style_animation, static gboolean gtk_css_transition_is_finished (GtkStyleAnimation *animation) { - GtkCssTransition *transition = GTK_CSS_TRANSITION (animation); + GtkCssTransition *transition = (GtkCssTransition *)animation; return transition->finished; } @@ -94,7 +93,7 @@ gtk_css_transition_is_finished (GtkStyleAnimation *animation) static gboolean gtk_css_transition_is_static (GtkStyleAnimation *animation) { - GtkCssTransition *transition = GTK_CSS_TRANSITION (animation); + GtkCssTransition *transition = (GtkCssTransition *)animation; return transition->finished; } |