Skip to content

Commit

Permalink
frameworks/base: fixes for tile rendering issues
Browse files Browse the repository at this point in the history
1)fixes invalid operation issue on start tiling
2)twitter balckbox, graybox issues
3)miscellaneous corruption issues

CRs-Fixed: 387801

Change-Id: I5e63b2fb751e6973cc6f86437cb7066db4fe95d4
  • Loading branch information
Rajulu Ponnada authored and Whitehawkx committed Sep 12, 2012
1 parent 1fe1051 commit 1bf4417
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions libs/hwui/OpenGLRenderer.cpp
Expand Up @@ -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
Expand All @@ -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());
Expand All @@ -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);
Expand Down

0 comments on commit 1bf4417

Please sign in to comment.