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

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

Merge "Make Arabic script runs longer (for performance) - bug 6426451." into jb-dev

parents a1f084e8 b294435b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -849,7 +849,11 @@ size_t TextLayoutShaper::shapeFontRun(const SkPaint* paint, bool isRTL) {
    case HB_Script_Tamil:
    case HB_Script_Thai:{
        const uint16_t* text16 = (const uint16_t*)(mShaperItem.string + mShaperItem.item.pos);
        const uint16_t* text16End = text16 + mShaperItem.item.length;
        SkUnichar firstUnichar = SkUTF16_NextUnichar(&text16);
        while (firstUnichar == ' ' && text16 < text16End) {
            firstUnichar = SkUTF16_NextUnichar(&text16);
        }
        baseGlyphCount = paint->getBaseGlyphCount(firstUnichar);
        break;
    }