diff options
author | Mathias Agopian <mathias@google.com> | 2009-11-06 16:30:18 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-11-06 16:30:18 -0800 |
commit | 9f3020db15e50d07ee1ace42e47d90b076f2ce54 (patch) | |
tree | 5ccf2dc549f87d5e7e327f9ac25351a752290a38 /cmds/bootanimation/BootAnimation.cpp | |
parent | 818a9cf827f282addbf7c8ee23534e08a3aaa358 (diff) |
fix [2243164] live wallpaper screen artifacts at end of boot
make sure to glClear() the areas not touched by the animation
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index b5b88f354e93..ce36c4b3320a 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -437,6 +437,9 @@ bool BootAnimation::movie() nsecs_t lastFrame = systemTime(); nsecs_t frameDuration = s2ns(1) / animation.fps; + Region clearReg(Rect(mWidth, mHeight)); + clearReg.subtractSelf(Rect(xc, yc, xc+animation.width, yc+animation.height)); + for (int i=0 ; i<pcount && !exitPending() ; i++) { const Animation::Part& part(animation.parts[i]); const size_t fcount = part.frames.size(); @@ -460,6 +463,18 @@ bool BootAnimation::movie() frame.map->getDataLength()); } + if (!clearReg.isEmpty()) { + Region::const_iterator head(clearReg.begin()); + Region::const_iterator tail(clearReg.end()); + glEnable(GL_SCISSOR_TEST); + while (head != tail) { + const Rect& r(*head++); + glScissor(r.left, mHeight - r.bottom, + r.width(), r.height()); + glClear(GL_COLOR_BUFFER_BIT); + } + glDisable(GL_SCISSOR_TEST); + } glDrawTexiOES(xc, yc, 0, animation.width, animation.height); eglSwapBuffers(mDisplay, mSurface); |