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

Commit 50c0f093 authored by Romain Guy's avatar Romain Guy
Browse files

Solve rendering issue with embedded WebViews.

Bug #3094017

The blending mode was not appropriately set after WebView released the
context.

Change-Id: Ib36d48e82c12f6d131dd5a0bcde9106925b8da63
parent 29d9849f
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ void OpenGLRenderer::acquireContext() {
            mCaches.currentProgram = NULL;
        }
    }
    mCaches.unbindMeshBuffer();
}

void OpenGLRenderer::releaseContext() {
@@ -180,15 +181,11 @@ void OpenGLRenderer::releaseContext() {

    glBindFramebuffer(GL_FRAMEBUFFER, 0);
    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
    mCaches.bindMeshBuffer();

    if (mCaches.blend) {
    mCaches.blend = true;
    glEnable(GL_BLEND);
    glBlendFunc(mCaches.lastSrcMode, mCaches.lastDstMode);
    glBlendEquation(GL_FUNC_ADD);
    } else {
        glDisable(GL_BLEND);
    }
}

///////////////////////////////////////////////////////////////////////////////