From 5448f0378ede9c5d33e7300fa318ef4a6925562f Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Fri, 2 Dec 2011 15:56:19 -0800 Subject: TextLayoutCache Fix compilation issue - fix compilation after refactoring and when setting DEBUG_ADVANCES to 1 Change-Id: I8eef7e3c4550c505325459948d3c8eebbdd5215a --- core/jni/android/graphics/TextLayoutCache.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp index b08946679545..675cf3388da3 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -368,7 +368,7 @@ void TextLayoutEngine::computeValues(TextLayoutCacheValue* value, SkPaint* paint &value->mAdvances, &value->mTotalAdvance, &value->mGlyphs); #if DEBUG_ADVANCES LOGD("Advances - start = %d, count = %d, contextCount = %d, totalAdvance = %f", start, count, - contextCount, mTotalAdvance); + contextCount, value->mTotalAdvance); #endif } @@ -602,13 +602,14 @@ void TextLayoutEngine::computeRunValues(SkPaint* paint, const UChar* chars, outAdvances->add(currentAdvance); } } + totalAdvance += totalFontRunAdvance; #if DEBUG_ADVANCES LOGD("Returned advances"); for (size_t i = 0; i < countScriptRun; i++) { LOGD(" -- hb-adv[%d] = %f, log_clusters = %d, total = %f", i, - (*outAdvances)[i], shaperItem.log_clusters[i], totalFontRunAdvance); + (*outAdvances)[i], mShaperItem.log_clusters[i], totalFontRunAdvance); } #endif @@ -628,7 +629,9 @@ void TextLayoutEngine::computeRunValues(SkPaint* paint, const UChar* chars, } } } + *outTotalAdvance = totalAdvance; + #if DEBUG_GLYPHS LOGD("-------- End of Script Run --------"); #endif -- cgit v1.2.3-59-g8ed1b