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:
@@ -499,6 +499,14 @@ class FlutterDriver {
|
||||
await _sendCommand(WaitUntilNoTransientCallbacks(timeout: timeout));
|
||||
}
|
||||
|
||||
/// Waits until the next [Window.onReportTimings] is called.
|
||||
///
|
||||
/// Use this method to wait for the first frame to be rasterized during the
|
||||
/// app launch.
|
||||
Future<void> waitUntilFirstFrameRasterized() async {
|
||||
await _sendCommand(const WaitUntilFirstFrameRasterized());
|
||||
}
|
||||
|
||||
Future<DriverOffset> _getOffset(SerializableFinder finder, OffsetType type, { Duration timeout }) async {
|
||||
final GetOffset command = GetOffset(finder, type, timeout: timeout);
|
||||
final GetOffsetResult result = GetOffsetResult.fromJson(await _sendCommand(command));
|
||||
|
||||
Reference in New Issue
Block a user