Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 324beb3b authored by Rama Vaddula's avatar Rama Vaddula Committed by Steve Kondik
Browse files

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
parent f1897256
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -251,13 +251,22 @@ void OpenGLRenderer::discardFramebuffer(float left, float top, float right, floa
}

status_t OpenGLRenderer::clear(float left, float top, float right, float bottom, bool opaque) {
#ifdef QCOM_HARDWARE
    mCaches.enableScissor();
    mCaches.setScissor(left, getViewportHeight() - bottom, right - left, bottom - top);
    glClear(GL_COLOR_BUFFER_BIT);
    if (opaque) {
        mCaches.resetScissor();
        return DrawGlInfo::kStatusDone;
    }
#else
    if (!opaque) {
        mCaches.enableScissor();
        mCaches.setScissor(left, getViewportHeight() - bottom, right - left, bottom - top);
        glClear(GL_COLOR_BUFFER_BIT);
        return DrawGlInfo::kStatusDrew;
    }

#endif
    return DrawGlInfo::kStatusDrew;
}