summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-12-06 18:47:03 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-06 18:47:03 -0800
commitde0ca31e88b0e2a1dd65e8b8d501614a5e4f0930 (patch)
tree2d917f34174f24f4fb487e4fb1246f69029799f2 /libs/hwui/OpenGLRenderer.cpp
parent9889e2b1923e94fdbe046e1599008d4696e56e64 (diff)
parent3a3fa1be9ab8e11edc660ecb35ae21ae0b5c8cc2 (diff)
downloadframeworks_base-de0ca31e88b0e2a1dd65e8b8d501614a5e4f0930.zip
frameworks_base-de0ca31e88b0e2a1dd65e8b8d501614a5e4f0930.tar.gz
frameworks_base-de0ca31e88b0e2a1dd65e8b8d501614a5e4f0930.tar.bz2
Merge "Draw text decorations correctly."
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index b24c04f..fc14777 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1116,6 +1116,8 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
}
// TODO: Handle paint->getTextScaleX()
+ const float oldX = x;
+ const float oldY = y;
const bool pureTranslate = mSnapshot->transform->isPureTranslate();
if (pureTranslate) {
x = (int) floorf(x + mSnapshot->transform->getTranslateX() + 0.5f);
@@ -1194,7 +1196,7 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDisableVertexAttribArray(mCaches.currentProgram->getAttrib("texCoords"));
- drawTextDecorations(text, bytesCount, length, x, y, paint);
+ drawTextDecorations(text, bytesCount, length, oldX, oldY, paint);
}
void OpenGLRenderer::drawPath(SkPath* path, SkPaint* paint) {