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

Commit 31102536 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Snap outline clipping to integer coordinates correctly" into lmp-dev

parents aeb88ed6 4340c260
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1744,10 +1744,13 @@ void OpenGLRenderer::setupDrawProgram() {
        glUniform4f(mCaches.currentProgram->getUniform("roundRectInnerRectLTRB"),
                innerRect.left, innerRect.top,
                innerRect.right, innerRect.bottom);
        glUniform1f(mCaches.currentProgram->getUniform("roundRectRadius"),
                state->radius);
        glUniformMatrix4fv(mCaches.currentProgram->getUniform("roundRectInvTransform"),
                1, GL_FALSE, &state->matrix.data[0]);

        // add half pixel to round out integer rect space to cover pixel centers
        float roundedOutRadius = state->radius + 0.5f;
        glUniform1f(mCaches.currentProgram->getUniform("roundRectRadius"),
                roundedOutRadius);
    }
}