[HWUI] Fix invisible views are still shown in popup window
Symptom: Invisible views are still shown in popup window
Root Cause: glClear isn't called if there is no draw command
Solution: Even if there is no draw command, it still calls glClear
by startFrame().
Reproduce steps: App set one view in a popup window to invisible,
it will be still visible.
Change-Id: I36bc7b752434ad388fbb80ea63341ac778f48d35
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
old mode 100644
new mode 100755
index 4d76bed..f0adea9
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -2057,7 +2057,9 @@
return status | deferredList.flush(*this, dirty);
}
- return DrawGlInfo::kStatusDone;
+ // Even if there is no drawing command(Ex: invisible),
+ // it still needs startFrame to clear buffer and start tiling.
+ return startFrame();
}
void OpenGLRenderer::outputDisplayList(DisplayList* displayList) {