From 2fb30fb68e9acb121a3e0dae0cd2790b3a7cc17d Mon Sep 17 00:00:00 2001 From: Geoffrey Pitsch Date: Wed, 6 Jul 2016 16:16:20 -0400 Subject: Wait until end of BootAnimation to free looping textures glDeleteTextures causes a noticeable framerate hitch when switching to the outro. By the time looping is finished, the system has finished booting, so freeing the textures immediately is less beneficial. Bug: 29878551 Bug: 30040263 Change-Id: I5a404a6e18cd2cf64d6c94343f82fa5db8dfbab3 --- cmds/bootanimation/BootAnimation.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index e849f4b8e9d3..abb8c04d8032 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -839,9 +839,13 @@ bool BootAnimation::playAnimation(const Animation& animation) break; } - // free the textures for this part + } + + // Free textures created for looping parts now that the animation is done. + for (const Animation::Part& part : animation.parts) { if (part.count != 1) { - for (size_t j=0 ; j