Unverified Commit 8ca7c4cb authored by liyuqian's avatar liyuqian Committed by GitHub

Simplify toImage future handling (#30876)

Thanks to cbracken@'s suggestion on another Google-internal change.
parent a5dd074b
......@@ -87,9 +87,8 @@ abstract class ShaderWarmUp {
final ui.Picture picture = recorder.endRecording();
final TimelineTask shaderWarmUpTask = TimelineTask();
shaderWarmUpTask.start('Warm-up shader');
picture.toImage(size.width.ceil(), size.height.ceil()).then((ui.Image image) {
shaderWarmUpTask.finish();
});
await picture.toImage(size.width.ceil(), size.height.ceil());
shaderWarmUpTask.finish();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment