summaryrefslogtreecommitdiff
path: root/libs/hwui/DisplayListRenderer.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-12-05 11:56:09 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-12-05 11:56:09 -0800
commit7da48db9c5c071cfc1c54a3709a02c1300dccd76 (patch)
tree960648b93566fe5b23dac29d39137f0c03378383 /libs/hwui/DisplayListRenderer.cpp
parent315e468763c9601e2f06443fda847d2c9eb27a75 (diff)
parent8f9a9f61ab793d9387a5942b307e74324704893b (diff)
Merge "Clip text correctly Bug #5706056"
Diffstat (limited to 'libs/hwui/DisplayListRenderer.cpp')
-rw-r--r--libs/hwui/DisplayListRenderer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index ae7a3b5b27b4..5a52464a54fb 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -1204,6 +1204,16 @@ void DisplayListRenderer::drawText(const char* text, int bytesCount, int count,
addText(text, bytesCount);
addInt(count);
addPoint(x, y);
+ // TODO: We should probably make a copy of the paint instead of modifying
+ // it; modifying the paint will change its generationID the first
+ // time, which might impact caches. More investigation needed to
+ // see if it matters.
+ // If we make a copy, then drawTextDecorations() should *not* make
+ // its own copy as it does right now.
+ paint->setAntiAlias(true);
+#if RENDER_TEXT_AS_GLYPHS
+ paint->setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+#endif
addPaint(paint);
addFloat(length < 0.0f ? paint->measureText(text, bytesCount) : length);
}