diff options
author | Romain Guy <romainguy@google.com> | 2010-09-16 14:40:17 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2010-09-16 14:40:17 -0700 |
commit | bf434114cbf55b216fdc76fc8d65a75e84c9dab5 (patch) | |
tree | 5ad5f0411e6b804c264bed8927a9786a1942719c /libs/hwui/OpenGLRenderer.cpp | |
parent | b025b9c8b4efefadb01937db61a1f8ee7d2452bf (diff) | |
download | frameworks_base-bf434114cbf55b216fdc76fc8d65a75e84c9dab5.zip frameworks_base-bf434114cbf55b216fdc76fc8d65a75e84c9dab5.tar.gz frameworks_base-bf434114cbf55b216fdc76fc8d65a75e84c9dab5.tar.bz2 |
Snap layer bounds to pixel boundaries.
Change-Id: I272ceebf469a119f01ea9d73cdd68519afdffa99
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 670d049..d6c0053 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -353,6 +353,8 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top, // Layers only make sense if they are in the framebuffer's bounds bounds.intersect(*mSnapshot->clipRect); + bounds.snapToPixelBoundaries(); + if (bounds.isEmpty() || bounds.getWidth() > mMaxTextureSize || bounds.getHeight() > mMaxTextureSize) { return false; |