summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-02-02 16:44:07 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-02 16:44:07 -0800
commitf44ed5adc42fefa0c91fc79c5e3c20e1cdc7d697 (patch)
tree082565b80e1145938fef45609921d5c1a7288c71 /libs
parent6bc710f769618e87b98d51cd02241e6b1a2fb653 (diff)
parent62687ec12cb8e0b1d4044a235b1387b9a8c3b4b4 (diff)
downloadframeworks_base-f44ed5adc42fefa0c91fc79c5e3c20e1cdc7d697.zip
frameworks_base-f44ed5adc42fefa0c91fc79c5e3c20e1cdc7d697.tar.gz
frameworks_base-f44ed5adc42fefa0c91fc79c5e3c20e1cdc7d697.tar.bz2
Merge "Don't clobber the local dirty rect after rendering a layer. Bug #3417254 Bug #3413433" into honeycomb
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/LayerRenderer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 7379b63..60ff0bf 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -32,6 +32,8 @@ namespace uirenderer {
void LayerRenderer::prepareDirty(float left, float top, float right, float bottom, bool opaque) {
LAYER_RENDERER_LOGD("Rendering into layer, fbo = %d", mLayer->fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, mLayer->fbo);
+
#if RENDER_LAYERS_AS_REGIONS
Rect dirty(left, top, right, bottom);
if (dirty.isEmpty() || (dirty.left <= 0 && dirty.top <= 0 &&
@@ -43,11 +45,7 @@ void LayerRenderer::prepareDirty(float left, float top, float right, float botto
android::Rect r(dirty.left, dirty.top, dirty.right, dirty.bottom);
mLayer->region.subtractSelf(r);
}
-#endif
- glBindFramebuffer(GL_FRAMEBUFFER, mLayer->fbo);
-
-#if RENDER_LAYERS_AS_REGIONS
OpenGLRenderer::prepareDirty(dirty.left, dirty.top, dirty.right, dirty.bottom, opaque);
#else
OpenGLRenderer::prepareDirty(0.0f, 0.0f, mLayer->width, mLayer->height, opaque);