summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2010-12-07 13:30:10 -0800
committer Romain Guy <romainguy@google.com> 2010-12-07 13:30:10 -0800
commit8ab4079ca27e36e5c584495bcd71b573598ac021 (patch)
tree80b5dca2e6ad9cf75a7215109575a9c2d927b278 /libs/hwui/OpenGLRenderer.cpp
parent3a3fa1be9ab8e11edc660ecb35ae21ae0b5c8cc2 (diff)
Fix 9patch rendering
Bug #3253396 Some quads were incorrectly assumed to be degenerate. Change-Id: I9155699edc3424afe9d5a131886bb9966d46b109
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index fc14777c7881..1a89ca0eb993 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -954,11 +954,11 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int
mSnapshot->region && mesh->hasEmptyQuads) {
const size_t count = mesh->quads.size();
for (size_t i = 0; i < count; i++) {
- Rect bounds = mesh->quads.itemAt(i);
+ const Rect& bounds = mesh->quads.itemAt(i);
if (pureTranslate) {
const float x = (int) floorf(bounds.left + 0.5f);
const float y = (int) floorf(bounds.top + 0.5f);
- dirtyLayer(x, y, x + bounds.getWidth(), y + bounds.getBottom(),
+ dirtyLayer(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
*mSnapshot->transform);
} else {
dirtyLayer(bounds.left, bounds.top, bounds.right, bounds.bottom,