Merge "Fix potential issue with the TextLayoutCache with glyphs"
This commit is contained in:
committed by
Android (Google) Code Review
commit
8ebf1efd66
@@ -626,7 +626,9 @@ void TextLayoutCacheValue::getGlyphsIndexAndCount(size_t start, size_t count, si
|
||||
return;
|
||||
}
|
||||
*outStartIndex = mLogClusters[start];
|
||||
*outGlyphsCount = mLogClusters[start + count - 1] - mLogClusters[start] + 1;
|
||||
size_t endIndex = (start + count >= mAdvances.size()) ?
|
||||
mGlyphs.size() : mLogClusters[start + count];
|
||||
*outGlyphsCount = endIndex - *outStartIndex;
|
||||
#if DEBUG_GLYPHS
|
||||
LOGD("getGlyphsIndexes - start=%d count=%d - startIndex=%d count=%d", start, count,
|
||||
*outStartIndex, *outGlyphsCount);
|
||||
|
||||
Reference in New Issue
Block a user