Do not render any frames when just initializing Bindings (#39535)

This commit is contained in:
Michael Goderbauer
2019-09-05 17:08:50 -07:00
committed by GitHub
parent e26be94e7a
commit e2325600ea
8 changed files with 71 additions and 16 deletions

View File

@@ -834,8 +834,6 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
@override
void initInstances() {
super.initInstances();
window.onBeginFrame = null;
window.onDrawFrame = null;
_mockFlutterAssets();
}
@@ -978,6 +976,13 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
});
}
@override
void ensureFrameCallbacksRegistered() {
// Leave Window alone, do nothing.
assert(window.onDrawFrame == null);
assert(window.onBeginFrame == null);
}
@override
void scheduleWarmUpFrame() {
// We override the default version of this so that the application-startup warm-up frame
@@ -1361,7 +1366,7 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
onNeedPaint: _handleViewNeedsPaint,
window: window,
);
renderView.scheduleInitialFrame();
renderView.prepareInitialFrame();
}
@override