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

Commit b7475e7b authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Fix tiling on QCOM GPU"

parents 65f4effc f735c8e5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -466,9 +466,9 @@ void Caches::resetScissor() {
// Tiling
///////////////////////////////////////////////////////////////////////////////

void Caches::startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool opaque) {
void Caches::startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool discard) {
    if (extensions.hasTiledRendering() && !debugOverdraw) {
        glStartTilingQCOM(x, y, width, height, (opaque ? GL_NONE : GL_COLOR_BUFFER_BIT0_QCOM));
        glStartTilingQCOM(x, y, width, height, (discard ? GL_NONE : GL_COLOR_BUFFER_BIT0_QCOM));
    }
}

+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ public:
    bool disableScissor();
    void setScissorEnabled(bool enabled);

    void startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool opaque);
    void startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool preserve);
    void endTiling();

    /**
+2 −2
Original line number Diff line number Diff line
@@ -818,7 +818,7 @@ bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, Rect& clip, GLui
    glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
            layer->getTexture(), 0);

    startTiling(mSnapshot, !layer->isBlend());
    startTiling(mSnapshot, true);

    // Clear the FBO, expand the clear region by 1 to get nice bilinear filtering
    mCaches.enableScissor();
@@ -1267,7 +1267,7 @@ void OpenGLRenderer::attachStencilBufferToLayer(Layer* layer) {

        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, buffer);

        startTiling(layer->clipRect, layer->layer.getHeight(), !layer->isBlend());
        startTiling(layer->clipRect, layer->layer.getHeight());
    }
}