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

Commit 93d2361c authored by Romain Guy's avatar Romain Guy
Browse files

Fix layer rendering glitch.

Change-Id: If2f987fe5526fc88743ca3e91edde4f8232ff658
parent 909cbaf8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -455,8 +455,7 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top,
#endif

        // Clear the FBO
        bounds.snapToPixelBoundaries();
        glScissor(0.0f, 0.0f, bounds.getWidth(), bounds.getHeight());
        glScissor(0.0f, 0.0f, bounds.getWidth() + 1.0f, bounds.getHeight() + 1.0f);
        glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
        glClear(GL_COLOR_BUFFER_BIT);

+4 −4
Original line number Diff line number Diff line
@@ -149,10 +149,10 @@ struct Rect {
    }

    void snapToPixelBoundaries() {
        left = floor(left);
        top = floor(top);
        right = ceil(right);
        bottom = ceil(bottom);
        left = floorf(left);
        top = floorf(top);
        right = ceilf(right);
        bottom = ceilf(bottom);
    }

    void dump() const {