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

Commit 16554527 authored by Rama Vaddula's avatar Rama Vaddula Committed by Linux Build Service Account
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 89a0c21b
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -251,17 +251,17 @@ void OpenGLRenderer::discardFramebuffer(float left, float top, float right, floa
}

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;
    }

    if (opaque && !mCountOverdraw) {
        mCaches.resetScissor();
        return DrawGlInfo::kStatusDone;
    }

    return DrawGlInfo::kStatusDrew;
}

void OpenGLRenderer::syncState() {
    if (mCaches.blend) {
        glEnable(GL_BLEND);