summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
author Geoffrey Pitsch <gpitsch@google.com> 2016-07-11 20:11:17 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-07-11 20:11:21 +0000
commitf1439105f82e65891047713576f14cad8b73f497 (patch)
tree1222d49b70b1e6129f181800a3d698c0c8f408cd /cmds/bootanimation/BootAnimation.cpp
parent13bd96457f2a4b831908b085978e92db50f1740b (diff)
parent2fb30fb68e9acb121a3e0dae0cd2790b3a7cc17d (diff)
Merge "Wait until end of BootAnimation to free looping textures" into nyc-mr1-dev
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp8
1 files changed, 6 insertions, 2 deletions
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<fcount ; j++) {
+ const size_t fcount = part.frames.size();
+ for (size_t j = 0; j < fcount; j++) {
const Animation::Frame& frame(part.frames[j]);
glDeleteTextures(1, &frame.tid);
}