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:
@@ -132,6 +132,26 @@ class WaitUntilNoPendingFrame extends Command {
|
||||
String get kind => 'waitUntilNoPendingFrame';
|
||||
}
|
||||
|
||||
/// A Flutter Driver command that waits until the Flutter engine rasterizes the
|
||||
/// first frame.
|
||||
///
|
||||
/// {@template flutter.frame_rasterized_vs_presented}
|
||||
/// Usually, the time that a frame is rasterized is very close to the time that
|
||||
/// it gets presented on the display. Specifically, rasterization is the last
|
||||
/// expensive phase of a frame that's still in Flutter's control.
|
||||
/// {@endtemplate}
|
||||
class WaitUntilFirstFrameRasterized extends Command {
|
||||
/// Creates this command.
|
||||
const WaitUntilFirstFrameRasterized({ Duration timeout }) : super(timeout: timeout);
|
||||
|
||||
/// Deserializes this command from the value generated by [serialize].
|
||||
WaitUntilFirstFrameRasterized.deserialize(Map<String, String> json)
|
||||
: super.deserialize(json);
|
||||
|
||||
@override
|
||||
String get kind => 'waitUntilFirstFrameRasterized';
|
||||
}
|
||||
|
||||
/// Base class for Flutter Driver finders, objects that describe how the driver
|
||||
/// should search for elements.
|
||||
abstract class SerializableFinder {
|
||||
|
||||
Reference in New Issue
Block a user