diff options
| author | 2013-09-20 17:13:18 -0700 | |
|---|---|---|
| committer | 2013-09-20 17:25:31 -0700 | |
| commit | 996fe656340ede058a6f0e6b18f9ec525ddb4e27 (patch) | |
| tree | 7efca330f6633eb665b611469f1149dabb1383a5 /libs/hwui/OpenGLRenderer.cpp | |
| parent | 564c45b976b56bc33f18271e1c813a0bd91b2eb4 (diff) | |
Correct bitmap merging logic
bug:10863163
This fixes two issues
The check for pure translation was incorrect. It was fixed and renamed
for clarity.
Certain matrix paths weren't setting kTypePositiveScale. For
simplicity (and because positive scale is simple to check) removed
flag in favor of dynamic checking.
Change-Id: Ic5ce235653ef49a68b8b242bd89fc2e95874ecc9
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 89a82fdc4a84..35fc804594b5 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -2096,7 +2096,7 @@ void OpenGLRenderer::drawAlphaBitmap(Texture* texture, float left, float top, Sk * The caller is responsible for properly dirtying the current layer. */ status_t OpenGLRenderer::drawBitmaps(SkBitmap* bitmap, AssetAtlas::Entry* entry, int bitmapCount, - TextureVertex* vertices, bool transformed, const Rect& bounds, SkPaint* paint) { + TextureVertex* vertices, bool pureTranslate, const Rect& bounds, SkPaint* paint) { mCaches.activeTexture(0); Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap); if (!texture) return DrawGlInfo::kStatusDone; @@ -2108,7 +2108,7 @@ status_t OpenGLRenderer::drawBitmaps(SkBitmap* bitmap, AssetAtlas::Entry* entry, getAlphaAndMode(paint, &alpha, &mode); texture->setWrap(GL_CLAMP_TO_EDGE, true); - texture->setFilter(transformed ? FILTER(paint) : GL_NEAREST, true); + texture->setFilter(pureTranslate ? GL_NEAREST : FILTER(paint), true); const float x = (int) floorf(bounds.left + 0.5f); const float y = (int) floorf(bounds.top + 0.5f); |