diff options
author | Romain Guy <romainguy@google.com> | 2011-03-15 11:31:22 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-15 11:31:22 -0700 |
commit | a1bd5a5fd7107483290627d942ae2dd1910b57ca (patch) | |
tree | e4317528bd390237e1fed0a61cb472b7934a219f /libs | |
parent | 197d77528648b7ec3d44ca6ab63e3036669c1bc8 (diff) | |
parent | ad37cd3b5d3de9dd0858af04fbccd102e8ff4b0e (diff) | |
download | frameworks_base-a1bd5a5fd7107483290627d942ae2dd1910b57ca.zip frameworks_base-a1bd5a5fd7107483290627d942ae2dd1910b57ca.tar.gz frameworks_base-a1bd5a5fd7107483290627d942ae2dd1910b57ca.tar.bz2 |
Merge "Fix disappearing edges in lists/scrollviews/etc. Bug #4093871" into honeycomb-mr1
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 5d9522e..b8bd7d6 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -407,15 +407,19 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top, mSnapshot->transform->mapRect(bounds); // Layers only make sense if they are in the framebuffer's bounds - bounds.intersect(*snapshot->clipRect); - - // We cannot work with sub-pixels in this case - bounds.snapToPixelBoundaries(); - - // When the layer is not an FBO, we may use glCopyTexImage so we - // need to make sure the layer does not extend outside the bounds - // of the framebuffer - bounds.intersect(snapshot->previous->viewport); + if (bounds.intersect(*snapshot->clipRect)) { + // We cannot work with sub-pixels in this case + bounds.snapToPixelBoundaries(); + + // When the layer is not an FBO, we may use glCopyTexImage so we + // need to make sure the layer does not extend outside the bounds + // of the framebuffer + if (!bounds.intersect(snapshot->previous->viewport)) { + bounds.setEmpty(); + } + } else { + bounds.setEmpty(); + } } if (bounds.isEmpty() || bounds.getWidth() > mCaches.maxTextureSize || |