Remove opaque check in preparing dirty region
Since preserve swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage being present from the previous process in the color buffer.
CRs-Fixed: 549755
Conflicts:
libs/hwui/OpenGLRenderer.cpp
Change-Id: Icd12ae388077b8c9ed329c37314e896500078543
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index ce1d09f..1ba3305 100755
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -251,15 +251,15 @@
}
status_t OpenGLRenderer::clear(float left, float top, float right, float bottom, bool opaque) {
- if (!opaque || mCountOverdraw) {
- mCaches.enableScissor();
- mCaches.setScissor(left, getViewportHeight() - bottom, right - left, bottom - top);
- glClear(GL_COLOR_BUFFER_BIT);
- return DrawGlInfo::kStatusDrew;
+ mCaches.enableScissor();
+ mCaches.setScissor(left, getViewportHeight() - bottom, right - left, bottom - top);
+ glClear(GL_COLOR_BUFFER_BIT);
+ if (opaque && !mCountOverdraw) {
+ mCaches.resetScissor();
+ return DrawGlInfo::kStatusDone;
}
- mCaches.resetScissor();
- return DrawGlInfo::kStatusDone;
+ return DrawGlInfo::kStatusDrew;
}
void OpenGLRenderer::syncState() {