From 486590963e2207d68eebd6944fec70d50d41116a Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Thu, 31 May 2012 15:21:51 -0700 Subject: Skip eglSwapBuffers() call when we do not draw to GL The fix is to track when we issue GL drawing commands, and to skip the call to eglSwapBuffers() when a DisplayList does not result in any actual rendering calls to GL. Issue #6364143 QuickMuni list items and buttons flicker instead of fade Change-Id: I60a02c61a58c32d92481a1e814b4c8a49c6a37a3 --- include/private/hwui/DrawGlInfo.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/private/hwui') diff --git a/include/private/hwui/DrawGlInfo.h b/include/private/hwui/DrawGlInfo.h index e33823e..fc810be 100644 --- a/include/private/hwui/DrawGlInfo.h +++ b/include/private/hwui/DrawGlInfo.h @@ -72,7 +72,14 @@ struct DrawGlInfo { // The functor needs to be invoked again but will // not redraw. Only the functor is invoked again // (unless another functor requests a redraw.) - kStatusInvoke = 0x2 + kStatusInvoke = 0x2, + // DisplayList actually issued GL drawing commands. + // This is used to signal the HardwareRenderer that the + // buffers should be flipped - otherwise, there were no + // changes to the buffer, so no need to flip. Some hardware + // has issues with stale buffer contents when no GL + // commands are issued. + kStatusDrew = 0x4 }; }; // struct DrawGlInfo -- cgit v1.1