Fix the first frame logic in tracing and driver (#35297)
This should fix https://github.com/flutter/flutter/issues/31442 and https://github.com/flutter/flutter/issues/34867
This commit is contained in:
@@ -13,6 +13,9 @@ void main() {
|
||||
|
||||
setUpAll(() async {
|
||||
driver = await FlutterDriver.connect();
|
||||
|
||||
// TODO(liyuqian): enable the following once it's proved to be non-flaky by transition_perf_test.dart.
|
||||
// await driver.waitUntilFirstFrameRasterized();
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
|
||||
@@ -183,6 +183,9 @@ void main([List<String> args = const <String>[]]) {
|
||||
setUpAll(() async {
|
||||
driver = await FlutterDriver.connect();
|
||||
|
||||
// Wait for the first frame to be rasterized.
|
||||
await driver.waitUntilFirstFrameRasterized();
|
||||
|
||||
if (args.contains('--with_semantics')) {
|
||||
print('Enabeling semantics...');
|
||||
await driver.setSemantics(true);
|
||||
@@ -200,7 +203,6 @@ void main([List<String> args = const <String>[]]) {
|
||||
});
|
||||
|
||||
test('all demos', () async {
|
||||
|
||||
// Collect timeline data for just a limited set of demos to avoid OOMs.
|
||||
final Timeline timeline = await driver.traceAction(
|
||||
() async {
|
||||
|
||||
Reference in New Issue
Block a user