From: Hans de Goede Date: Sat, 28 Sep 2019 10:05:11 +0000 (+0200) Subject: twp-step: Remove superflous is_hidden / is_stopped checks from on_draw X-Git-Tag: 0.9.5~36^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f04867b745bd231ce67abc4e751c34e6446e109;p=thirdparty%2Fplymouth.git twp-step: Remove superflous is_hidden / is_stopped checks from on_draw Remove superflous is_hidden / is_stopped checks from our on_draw handler. In all 3 cases the is_hidden / is_stopped check guards a draw_area call, but the draw_area calls themselves contain the same check, so it checking this in on_draw is not necessary. Also note that we are already not doing such a check for e.g. the progress_bar so lets be consistent and remove the check everywhere. Signed-off-by: Hans de Goede --- diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c index 80f0a11a..28bc83de 100644 --- a/src/plugins/splash/two-step/plugin.c +++ b/src/plugins/splash/two-step/plugin.c @@ -1461,21 +1461,18 @@ on_draw (view_t *view, x, y, width, height); if (plugin->mode_settings[plugin->mode].use_animation && - view->throbber != NULL && - !ply_throbber_is_stopped (view->throbber)) + view->throbber != NULL) ply_throbber_draw_area (view->throbber, pixel_buffer, x, y, width, height); if (plugin->mode_settings[plugin->mode].use_animation && - view->progress_animation != NULL && - !ply_progress_animation_is_hidden (view->progress_animation)) + view->progress_animation != NULL) ply_progress_animation_draw_area (view->progress_animation, pixel_buffer, x, y, width, height); if (plugin->mode_settings[plugin->mode].use_animation && - view->end_animation != NULL && - !ply_animation_is_stopped (view->end_animation)) + view->end_animation != NULL) ply_animation_draw_area (view->end_animation, pixel_buffer, x, y, width, height);