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

Commit 4340c260 authored by Chris Craik's avatar Chris Craik
Browse files

Snap outline clipping to integer coordinates correctly

bug:17403105
Change-Id: I65b5d7103aac58ba6feb4b021c276c67e9341716
parent db352c78
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);
    }
}