Track canvas clearing for swap buffers logic.
A previous fix made it necessary for a frame to render something to GL
in order to cause a call to eglSwapBuffers(). Besides the calls being
tracked as part of issuing a DisplayList, there is also a potential call
to clear the canvas (via glClear()) on non-opaque surfaces. This call is also
good to track, since a surface that gets cleared without any other drawing operations
is worth flipping to the screen (to erase old contents on that surface).
This fix tracks the status of the pre-draw operations to find out whether
glClear() was called and then sets the drawing status appropriately.
Issue #6606422 QuickContact dismissal is janky again (Tracking)
Change-Id: I5fcaccfdc9293dd46b83f2fc279730a5d2740ebf
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 7703e80..b342f50 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -67,8 +67,8 @@
virtual void setViewport(int width, int height);
- ANDROID_API void prepare(bool opaque);
- virtual void prepareDirty(float left, float top, float right, float bottom, bool opaque);
+ ANDROID_API int prepare(bool opaque);
+ virtual int prepareDirty(float left, float top, float right, float bottom, bool opaque);
virtual void finish();
// These two calls must not be recorded in display lists