@@ -767,20 +767,17 @@ class SkCanvasGlue {
767767
768768 sp<TextLayoutCacheValue> value;
769769#if USE_TEXT_LAYOUT_CACHE
770- value = TextLayoutCache::getInstance ().getValue (paint, textArray, contextCount, flags);
770+ value = TextLayoutCache::getInstance ().getValue (paint, textArray, start, count,
771+ contextCount, flags);
771772 if (value == NULL ) {
772773 LOGE (" Cannot get TextLayoutCache value" );
773774 return ;
774775 }
775776#else
776777 value = new TextLayoutCacheValue ();
777- value->computeValues (paint, textArray, contextCount, flags);
778+ value->computeValues (paint, textArray, start, count, contextCount, flags);
778779#endif
779- size_t startIndex = 0 ;
780- size_t glyphsCount = 0 ;
781- value->getGlyphsIndexAndCount (start, count, &startIndex, &glyphsCount);
782- const jchar* glyphs = value->getGlyphs (startIndex, glyphsCount);
783- doDrawGlyphs (canvas, glyphs, 0 , glyphsCount, x, y, flags, paint);
780+ doDrawGlyphs (canvas, value->getGlyphs (), 0 , value->getGlyphsCount (), x, y, flags, paint);
784781 }
785782
786783 static void doDrawGlyphs (SkCanvas* canvas, const jchar* glyphArray, int index, int count,
0 commit comments