From 44b2fe3fc114ee5f7273c6b0fee2cc999bf244a2 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Wed, 6 Jun 2012 19:03:58 -0700 Subject: 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 --- libs/hwui/DisplayListRenderer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/hwui/DisplayListRenderer.cpp') diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 88d2209..d376e3a 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -1368,13 +1368,14 @@ void DisplayListRenderer::setViewport(int width, int height) { mHeight = height; } -void DisplayListRenderer::prepareDirty(float left, float top, +int DisplayListRenderer::prepareDirty(float left, float top, float right, float bottom, bool opaque) { mSnapshot = new Snapshot(mFirstSnapshot, SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag); mSaveCount = 1; mSnapshot->setClip(0.0f, 0.0f, mWidth, mHeight); mRestoreSaveCount = -1; + return DrawGlInfo::kStatusDone; // No invalidate needed at record-time } void DisplayListRenderer::finish() { -- cgit v1.1