Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ebf1efd authored by Fabrice Di Meglio's avatar Fabrice Di Meglio Committed by Android (Google) Code Review
Browse files

Merge "Fix potential issue with the TextLayoutCache with glyphs"

parents eb3b750c 155fa38a
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -626,7 +626,9 @@ void TextLayoutCacheValue::getGlyphsIndexAndCount(size_t start, size_t count, si
        return;
        return;
    }
    }
    *outStartIndex = mLogClusters[start];
    *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
#if DEBUG_GLYPHS
    LOGD("getGlyphsIndexes - start=%d count=%d - startIndex=%d count=%d", start, count,
    LOGD("getGlyphsIndexes - start=%d count=%d - startIndex=%d count=%d", start, count,
            *outStartIndex, *outGlyphsCount);
            *outStartIndex, *outGlyphsCount);