Permalink
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
  • Loading branch information...
1 parent 1fe1051 commit 1bf4417de247c4342666a51a5c3d9f431f856cbc Rajulu Ponnada committed with Whitehawkx Sep 7, 2012
Showing with 7 additions and 9 deletions.
  1. +7 −9 libs/hwui/OpenGLRenderer.cpp
@@ -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);

0 comments on commit 1bf4417

Please sign in to comment.