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

Commit b41b6d3f authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Add trace point for line breaker

Bug: N/A
Test: Manually done
Change-Id: I3164d0cc1cf77782c27b04c6d285ab823d6f42fd
parent 87fbc21f
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.graphics.RectF;
import android.graphics.text.LineBreakConfig;
import android.graphics.text.LineBreaker;
import android.os.Build;
import android.os.Trace;
import android.text.style.LeadingMarginSpan;
import android.text.style.LeadingMarginSpan.LeadingMarginSpan2;
import android.text.style.LineHeightSpan;
@@ -534,7 +535,12 @@ public class StaticLayout extends Layout {
            if (recycle == null) {
                recycle = new StaticLayout();
            }
            Trace.beginSection("Generating StaticLayout For DynamicLayout");
            try {
                recycle.generate(this, mIncludePad, trackpadding);
            } finally {
                Trace.endSection();
            }
            return recycle;
        }

@@ -689,7 +695,12 @@ public class StaticLayout extends Layout {
        mLeftIndents = b.mLeftIndents;
        mRightIndents = b.mRightIndents;

        Trace.beginSection("Constructing StaticLayout");
        try {
            generate(b, b.mIncludePad, trackPadding);
        } finally {
            Trace.endSection();
        }
    }

    private static int getBaseHyphenationFrequency(int frequency) {