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

This commit is contained in:
Romain Guy
2011-03-15 11:31:22 -07:00
committed by Android (Google) Code Review

View File

@@ -407,15 +407,19 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top,
mSnapshot->transform->mapRect(bounds); mSnapshot->transform->mapRect(bounds);
// Layers only make sense if they are in the framebuffer's 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 // When the layer is not an FBO, we may use glCopyTexImage so we
bounds.snapToPixelBoundaries(); // need to make sure the layer does not extend outside the bounds
// of the framebuffer
// When the layer is not an FBO, we may use glCopyTexImage so we if (!bounds.intersect(snapshot->previous->viewport)) {
// need to make sure the layer does not extend outside the bounds bounds.setEmpty();
// of the framebuffer }
bounds.intersect(snapshot->previous->viewport); } else {
bounds.setEmpty();
}
} }
if (bounds.isEmpty() || bounds.getWidth() > mCaches.maxTextureSize || if (bounds.isEmpty() || bounds.getWidth() > mCaches.maxTextureSize ||