fix a bug that caused the off animation to not show sometimes
this happened when the overlays were in use, since the animation
is rendered in the FB and the FB is not used.
we now have a way to turn hwc off temporarily.
Change-Id: I3385f0c25bb9cc91948e7b26e7cd31ed18c36ace
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index b4c5dec..4a3a8ea 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2113,6 +2113,12 @@
// we're already off
return NO_ERROR;
}
+
+ // turn off hwc while we're doing the animation
+ hw.getHwComposer().disable();
+ // and make sure to turn it back on (if needed) next time we compose
+ invalidateHwcGeometry();
+
if (mode & ISurfaceComposer::eElectronBeamAnimationOff) {
electronBeamOffAnimationImplLocked();
}