Unverified Commit b63c4a6d authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Ensure that the engine frame callbacks are installed if the first scheduled...

Ensure that the engine frame callbacks are installed if the first scheduled frame is a forced frame (#101544)

See https://github.com/flutter/flutter/issues/98419
parent 221235c7
......@@ -825,6 +825,7 @@ mixin SchedulerBinding on BindingBase {
debugPrintStack(label: 'scheduleForcedFrame() called. Current phase is $schedulerPhase.');
return true;
}());
ensureFrameCallbacksRegistered();
platformDispatcher.scheduleFrame();
_hasScheduledFrame = true;
}
......
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/scheduler.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
test('scheduleForcedFrame sets up frame callbacks', () async {
SchedulerBinding.instance.scheduleForcedFrame();
expect(SchedulerBinding.instance.platformDispatcher.onBeginFrame, isNotNull);
});
}
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