am a1bd5a5f: Merge "Fix disappearing edges in lists/scrollviews/etc. Bug #4093871" into honeycomb-mr1

* commit 'a1bd5a5fd7107483290627d942ae2dd1910b57ca':
  Fix disappearing edges in lists/scrollviews/etc. Bug #4093871
This commit is contained in:
Romain Guy
2011-03-15 12:50:50 -07:00
committed by Android Git Automerger

View File

@@ -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);
if (bounds.intersect(*snapshot->clipRect)) {
// We cannot work with sub-pixels in this case
bounds.snapToPixelBoundaries();
// 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);
// 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 ||