]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
twp-step: Remove superflous is_hidden / is_stopped checks from on_draw
authorHans de Goede <hdegoede@redhat.com>
Sat, 28 Sep 2019 10:05:11 +0000 (12:05 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 30 Sep 2019 09:15:31 +0000 (11:15 +0200)
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 <hdegoede@redhat.com>
src/plugins/splash/two-step/plugin.c

index 80f0a11ac382b5d9e783538359a55b5b1432a4f7..28bc83de94bfd62d0bd97a090f212f8bc4e395f6 100644 (file)
@@ -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);