ply-image: Attempt to improve animation consistency.
When displaying an animation, ply-image previously slept
before loading and displaying each image. The code was
written such that intervals between frames would be
reasonably consistent when faced with consistent load times
for each image, but less so for inconsistent load times.
This change makes ply-image load the next image before
sleeping the required amount and displaying the image.
In my testing, this leads to very consistent frame intervals
during boot on Lumpy -- out of 18 frames, all but one or two
are shown 25 ms after the previous frame and the others are
all 26 ms. Doing the same testing with the old code, I see
intervals ranging between 22 and 29 ms.
TEST=update /etc/init/boot-splash.conf to pass --debug to
ply-image and to redirect stderr to a file in /tmp;
after booting, grep it for "showing" and check
Commit-Ready: Daniel Erat <firstname.lastname@example.org>
Reviewed-by: Daniel Erat <email@example.com>
Tested-by: Daniel Erat <firstname.lastname@example.org>
1 file changed