Disable EGL hibernation due to jank
Hibernating EGL takes a long time (>100 ms) and blocks all other
rendering. During window animations, the outgoing activity begins
hibernation before the animation stops, causing visible stutter.
Hibernation is still available by setting 'BOARD_ALLOW_EGL_HIBERNATION
:= true' in the devices BoardConfig.mk
Change-Id: Iab4e00723a1adcd97481e81b2efdc821b3e9712f
diff --git a/opengl/libs/EGL/egl_display.h b/opengl/libs/EGL/egl_display.h
index 412568b..7bb09a3 100644
--- a/opengl/libs/EGL/egl_display.h
+++ b/opengl/libs/EGL/egl_display.h
@@ -155,7 +155,12 @@
};
HibernationMachine(): mWakeCount(0), mHibernating(false),
- mAttemptHibernation(false), mDpyValid(false)
+ mAttemptHibernation(false), mDpyValid(false),
+#if BOARD_ALLOW_EGL_HIBERNATION
+ mAllowHibernation(true)
+#else
+ mAllowHibernation(false)
+#endif
{}
~HibernationMachine() {}
@@ -165,11 +170,12 @@
void setDisplayValid(bool valid);
private:
- Mutex mLock;
- int32_t mWakeCount;
- bool mHibernating;
- bool mAttemptHibernation;
- bool mDpyValid;
+ Mutex mLock;
+ int32_t mWakeCount;
+ bool mHibernating;
+ bool mAttemptHibernation;
+ bool mDpyValid;
+ const bool mAllowHibernation;
};
HibernationMachine mHibernation;
};