Fix TextViewPRecomputedTextPerfTest

Bug: N/A
Test: manually
Change-Id: I22c135b246ce288f1729b1622e4307d68af6b61a
This commit is contained in:
Seigo Nonaka
2018-11-09 17:03:37 -08:00
parent 25eb63ac4a
commit d39ded7376

View File

@@ -343,13 +343,14 @@ public class TextViewPrecomputedTextPerfTest {
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
final RecordingCanvas c = node.start(
final RecordingCanvas c = node.startRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
node.endRecording();
}
}
@@ -369,13 +370,14 @@ public class TextViewPrecomputedTextPerfTest {
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
final RecordingCanvas c = node.start(
final RecordingCanvas c = node.startRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
node.endRecording();
}
}
@@ -397,13 +399,14 @@ public class TextViewPrecomputedTextPerfTest {
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
final RecordingCanvas c = node.start(
final RecordingCanvas c = node.startRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
node.endRecording();
}
}
@@ -426,13 +429,14 @@ public class TextViewPrecomputedTextPerfTest {
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
final RecordingCanvas c = node.start(
final RecordingCanvas c = node.startRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
node.endRecording();
}
}
}