summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-10-04 14:14:11 -0700
committerRomain Guy <romainguy@google.com>2010-10-04 14:14:11 -0700
commite8cb9c14309b0f01c0159efdf9a7198f44a62642 (patch)
tree4e4e2702c4db4fadc6161f62d5e34c36bfc83ccf /libs/hwui/OpenGLRenderer.cpp
parent95930e13faac8c17dabfaa1478089baa772f091b (diff)
downloadframeworks_base-e8cb9c14309b0f01c0159efdf9a7198f44a62642.zip
frameworks_base-e8cb9c14309b0f01c0159efdf9a7198f44a62642.tar.gz
frameworks_base-e8cb9c14309b0f01c0159efdf9a7198f44a62642.tar.bz2
Apply bilinear filtering on text only when necessary.
Change-Id: Ic903f4b5d30e9c92528c6291941896efe4729ee3
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 0810fb8..81d36e9 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -767,8 +767,10 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
GLuint textureUnit = 0;
glActiveTexture(gTextureUnits[textureUnit]);
- setupTextureAlpha8(fontRenderer.getTexture(), 0, 0, textureUnit, x, y, r, g, b, a,
- mode, false, true);
+ // Assume that the modelView matrix does not force scales, rotates, etc.
+ const bool linearFilter = mSnapshot->transform->changesBounds();
+ setupTextureAlpha8(fontRenderer.getTexture(linearFilter), 0, 0, textureUnit,
+ x, y, r, g, b, a, mode, false, true);
const Rect& clip = mSnapshot->getLocalClip();
clearLayerRegions();