From 8ab4079ca27e36e5c584495bcd71b573598ac021 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 7 Dec 2010 13:30:10 -0800 Subject: Fix 9patch rendering Bug #3253396 Some quads were incorrectly assumed to be degenerate. Change-Id: I9155699edc3424afe9d5a131886bb9966d46b109 --- libs/hwui/OpenGLRenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index fc14777..1a89ca0 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, -- cgit v1.1