Loading apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java +8 −4 Original line number Original line Diff line number Diff line Loading @@ -343,13 +343,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } Loading @@ -369,13 +370,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } Loading @@ -397,13 +399,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } Loading @@ -426,13 +429,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } } } Loading
apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java +8 −4 Original line number Original line Diff line number Diff line Loading @@ -343,13 +343,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } Loading @@ -369,13 +370,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } Loading @@ -397,13 +399,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } Loading @@ -426,13 +429,14 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.setText(text); textView.measure(width, height); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.start( final RecordingCanvas c = node.startRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Canvas.freeTextLayoutCaches(); state.resumeTiming(); state.resumeTiming(); textView.onDraw(c); textView.onDraw(c); node.endRecording(); } } } } } }