summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-03-15 13:01:24 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-03-15 13:01:24 -0700
commit8390c7cf6838eb8d63b8e38109751e5c7d13599b (patch)
tree78845f3ebd3fe66ba8d96e5cdfdbed1520a4b305 /libs/hwui
parenta91c019ce10c57819df494b427e8f0a32ce9849e (diff)
parent5c84a1341b05e96f2c76da7252ed823ec3121102 (diff)
downloadframeworks_base-8390c7cf6838eb8d63b8e38109751e5c7d13599b.zip
frameworks_base-8390c7cf6838eb8d63b8e38109751e5c7d13599b.tar.gz
frameworks_base-8390c7cf6838eb8d63b8e38109751e5c7d13599b.tar.bz2
am 5c84a134: am a1bd5a5f: Merge "Fix disappearing edges in lists/scrollviews/etc. Bug #4093871" into honeycomb-mr1
* commit '5c84a1341b05e96f2c76da7252ed823ec3121102': Fix disappearing edges in lists/scrollviews/etc. Bug #4093871
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp22
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 ||