@@ -801,11 +801,36 @@ class PlatformDispatcher {
801801 ///
802802 /// * [SchedulerBinding] , the Flutter framework class which manages the
803803 /// scheduling of frames.
804+ /// * [forceSyncFrame] , a similar method that is used in rare cases that
805+ /// a frame must be rendered immediately.
804806 void scheduleFrame () => _scheduleFrame ();
805807
806808 @Native < Void Function ()> (symbol: 'PlatformConfigurationNativeApi::ScheduleFrame' )
807809 external static void _scheduleFrame ();
808810
811+ /// Immediately render a frame by invoking the [onBeginFrame] and
812+ /// [onDrawFrame] callbacks synchronously.
813+ ///
814+ /// This method performs the same computation for a frame as [scheduleFrame]
815+ /// does, but instead of doing so at an appropriate opportunity, the render is
816+ /// completed synchronously within this call.
817+ ///
818+ /// Prefer [scheduleFrame] to update the display in normal operation. The
819+ /// [forceSyncFrame] method is designed for situations that require a frame is
820+ /// rendered as soon as possible, even at the cost of rendering quality. An
821+ /// example of using this method is [SchedulerBinding.scheduleWarmUpFrame] ,
822+ /// which is called during application startup so that the first frame can be
823+ /// presented to the screen a few extra milliseconds earlier.
824+ ///
825+ /// See also:
826+ ///
827+ /// * [SchedulerBinding.scheduleWarmUpFrame] , which uses this method.
828+ /// * [scheduleFrame] .
829+ void forceSyncFrame () => _forceSyncFrame ();
830+
831+ @Native < Void Function ()> (symbol: 'PlatformConfigurationNativeApi::ForceSyncFrame' )
832+ external static void _forceSyncFrame ();
833+
809834 /// Additional accessibility features that may be enabled by the platform.
810835 AccessibilityFeatures get accessibilityFeatures => _configuration.accessibilityFeatures;
811836
0 commit comments