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

Commit f59d6c62 authored by Rajulu Ponnada's avatar Rajulu Ponnada Committed by Steve Kondik
Browse files

frameworks/base: fixes for tile rendering issues

1)fixes invalid operation issue on start tiling
2)twitter balckbox, graybox issues
3)miscellaneous corruption issues

CRs-Fixed: 387801

Change-Id: I5e63b2fb751e6973cc6f86437cb7066db4fe95d4
parent fcc01b4a
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -656,11 +656,6 @@ bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, sp<Snapshot> sna
    TILERENDERING_END(previousFbo);
#endif
    glBindFramebuffer(GL_FRAMEBUFFER, layer->getFbo());
#ifdef QCOM_HARDWARE
    TILERENDERING_START(layer->getFbo(), clip.left, clip.top,
                        clip.right, clip.bottom,
                        bounds.getWidth(), bounds.getHeight());
#endif
    layer->bindTexture();

    // Initialize the texture if needed
@@ -676,12 +671,9 @@ bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, sp<Snapshot> sna
    GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
    if (status != GL_FRAMEBUFFER_COMPLETE) {
        ALOGE("Framebuffer incomplete (GL error code 0x%x)", status);
#ifdef QCOM_HARDWARE
        TILERENDERING_END(layer->getFbo(), true);
#endif
        glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
#ifdef QCOM_HARDWARE
        TILERENDERING_START(previousFbo);
        TILERENDERING_START(previousFbo, true);
#endif
        layer->deleteTexture();
        mCaches.fboCache.put(layer->getFbo());
@@ -691,6 +683,12 @@ bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, sp<Snapshot> sna
    }
#endif

#ifdef QCOM_HARDWARE
    TILERENDERING_START(layer->getFbo(), clip.left, clip.top,
                        clip.right, clip.bottom,
                        bounds.getWidth(), bounds.getHeight());
#endif

    // Clear the FBO, expand the clear region by 1 to get nice bilinear filtering
    mCaches.setScissor(clip.left - 1.0f, bounds.getHeight() - clip.bottom - 1.0f,
            clip.getWidth() + 2.0f, clip.getHeight() + 2.0f);