diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-01-20 17:41:55 -0800 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2012-01-23 13:34:08 -0800 |
commit | bd901dee317d10c6a921922c3d7d788b90306c82 (patch) | |
tree | 056c59c69f0c36400d52e568e94422b9562cb302 /core/jni/android/graphics/TextLayoutCache.cpp | |
parent | b2d81fead90f556279d611b6f15881c663558ad5 (diff) | |
download | frameworks_base-bd901dee317d10c6a921922c3d7d788b90306c82.zip frameworks_base-bd901dee317d10c6a921922c3d7d788b90306c82.tar.gz frameworks_base-bd901dee317d10c6a921922c3d7d788b90306c82.tar.bz2 |
Fix bug #5846413 "phone" keyboard layout is broken on master
- was a subtle regression introduced when fixing bug #5753006
- as we are now using SkPaint::kGlyphID_TextEncoding (glyph encoding)
instead of SkPaint::kUTF16_TextEncoding (UTF16 encoding), we need to
force the UTF16 encoding in some cases that are NOT going thru
the TextLayoutCache / Harfbuzz shaping
- fix also breakText() the same way
- also clean some old comment
- Warning: depends also on a CL from Skia for having getBaseGlyphCount() "const"
Change-Id: I3d1fc87f070884876c679b33541f810fbfb5df3f
Diffstat (limited to 'core/jni/android/graphics/TextLayoutCache.cpp')
-rw-r--r-- | core/jni/android/graphics/TextLayoutCache.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp index d26f563..71c283a 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -93,7 +93,7 @@ void TextLayoutCache::clear() { /* * Caching */ -sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint, +sp<TextLayoutCacheValue> TextLayoutCache::getValue(const SkPaint* paint, const jchar* text, jint start, jint count, jint contextCount, jint dirFlags) { AutoMutex _l(mLock); nsecs_t startTime = 0; @@ -360,7 +360,7 @@ TextLayoutEngine::~TextLayoutEngine() { // we don't bother at the moment } -void TextLayoutEngine::computeValues(TextLayoutCacheValue* value, SkPaint* paint, const UChar* chars, +void TextLayoutEngine::computeValues(TextLayoutCacheValue* value, const SkPaint* paint, const UChar* chars, size_t start, size_t count, size_t contextCount, int dirFlags) { computeValues(paint, chars, start, count, contextCount, dirFlags, @@ -371,7 +371,7 @@ void TextLayoutEngine::computeValues(TextLayoutCacheValue* value, SkPaint* paint #endif } -void TextLayoutEngine::computeValues(SkPaint* paint, const UChar* chars, +void TextLayoutEngine::computeValues(const SkPaint* paint, const UChar* chars, size_t start, size_t count, size_t contextCount, int dirFlags, Vector<jfloat>* const outAdvances, jfloat* outTotalAdvance, Vector<jchar>* const outGlyphs) { @@ -513,7 +513,7 @@ static void logGlyphs(HB_ShaperItem shaperItem) { } } -void TextLayoutEngine::computeRunValues(SkPaint* paint, const UChar* chars, +void TextLayoutEngine::computeRunValues(const SkPaint* paint, const UChar* chars, size_t count, bool isRTL, Vector<jfloat>* const outAdvances, jfloat* outTotalAdvance, Vector<jchar>* const outGlyphs) { @@ -719,7 +719,7 @@ void TextLayoutEngine::computeRunValues(SkPaint* paint, const UChar* chars, } -size_t TextLayoutEngine::shapeFontRun(SkPaint* paint, bool isRTL) { +size_t TextLayoutEngine::shapeFontRun(const SkPaint* paint, bool isRTL) { // Reset kerning mShaperItem.kerning_applied = false; |