Remove references to Window, and switch usages to PlatformDispatcher or SingletonFlutterWindow (#69617)
* Remove references to dart:ui.Window, and point usages to PlatformDispatcher or SingletonFlutterWindow, as appropriate * remove new test platform dispatchers * Amend documentation
This commit is contained in:
@@ -217,15 +217,16 @@ abstract class SceneBuilderRecorder extends Recorder {
|
||||
Profile get profile => _profile;
|
||||
Profile _profile;
|
||||
|
||||
/// Called from [Window.onBeginFrame].
|
||||
/// Called from [dart:ui.PlatformDispatcher.onBeginFrame].
|
||||
@mustCallSuper
|
||||
void onBeginFrame() {}
|
||||
|
||||
/// Called on every frame.
|
||||
///
|
||||
/// An implementation should exercise the [sceneBuilder] to build a frame.
|
||||
/// However, it must not call [SceneBuilder.build] or [Window.render].
|
||||
/// Instead the benchmark harness will call them and time them appropriately.
|
||||
/// However, it must not call [SceneBuilder.build] or
|
||||
/// [dart:ui.FlutterView.render]. Instead the benchmark harness will call them
|
||||
/// and time them appropriately.
|
||||
void onDrawFrame(SceneBuilder sceneBuilder);
|
||||
|
||||
@override
|
||||
|
||||
@@ -41,8 +41,9 @@ Future<void> main() async {
|
||||
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
|
||||
// We are waiting for the GPU to rasterize a frame here. This makes this flaky,
|
||||
// we can rely on a more deterministic such as `Window.onReportTimings` once
|
||||
// We are waiting for the GPU to rasterize a frame here. This makes this
|
||||
// flaky, we can rely on a more deterministic source such as
|
||||
// PlatformDispatcher.onReportTimings once
|
||||
// https://github.com/flutter/flutter/issues/26154 is addressed.
|
||||
await Future<void>.delayed(const Duration(milliseconds: 50));
|
||||
debugPrint('==== MEMORY BENCHMARK ==== READY ====');
|
||||
|
||||
Reference in New Issue
Block a user