@@ -213,10 +213,6 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
213213 }
214214 }
215215
216- /// A set of views which have rendered in the current `onBeginFrame` or
217- /// `onDrawFrame` scope.
218- Set <ui.FlutterView >? _viewsRenderedInCurrentFrame;
219-
220216 /// A callback invoked when any window begins a frame.
221217 ///
222218 /// A callback that is invoked to notify the application that it is an
@@ -239,9 +235,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
239235 /// Engine code should use this method instead of the callback directly.
240236 /// Otherwise zones won't work properly.
241237 void invokeOnBeginFrame (Duration duration) {
242- _viewsRenderedInCurrentFrame = < ui.FlutterView > {};
243238 invoke1 <Duration >(_onBeginFrame, _onBeginFrameZone, duration);
244- _viewsRenderedInCurrentFrame = null ;
245239 }
246240
247241 /// A callback that is invoked for each frame after [onBeginFrame] has
@@ -262,9 +256,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
262256 /// Engine code should use this method instead of the callback directly.
263257 /// Otherwise zones won't work properly.
264258 void invokeOnDrawFrame () {
265- _viewsRenderedInCurrentFrame = < ui.FlutterView > {};
266259 invoke (_onDrawFrame, _onDrawFrameZone);
267- _viewsRenderedInCurrentFrame = null ;
268260 }
269261
270262 /// A callback that is invoked when pointer data is available.
@@ -761,23 +753,14 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
761753 /// * [RendererBinding] , the Flutter framework class which manages layout and
762754 /// painting.
763755 @override
764- Future < void > render (ui.Scene scene, [ui.FlutterView ? view]) async {
756+ void render (ui.Scene scene, [ui.FlutterView ? view]) {
765757 assert (view != null || implicitView != null ,
766758 'Calling render without a FlutterView' );
767759 if (view == null && implicitView == null ) {
768760 // If there is no view to render into, then this is a no-op.
769761 return ;
770762 }
771- final ui.FlutterView viewToRender = view ?? implicitView! ;
772-
773- // Only render in an `onDrawFrame` or `onBeginFrame` scope. This is checked
774- // by checking if the `_viewsRenderedInCurrentFrame` is non-null and this
775- // view hasn't been rendered already in this scope.
776- final bool shouldRender =
777- _viewsRenderedInCurrentFrame? .add (viewToRender) ?? false ;
778- if (shouldRender) {
779- await renderer.renderScene (scene, viewToRender);
780- }
763+ renderer.renderScene (scene, view ?? implicitView! );
781764 }
782765
783766 /// Additional accessibility features that may be enabled by the platform.
@@ -1292,8 +1275,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
12921275 String get defaultRouteName {
12931276 // TODO(mdebbar): What should we do in multi-view mode?
12941277 // https://github.com/flutter/flutter/issues/139174
1295- return _defaultRouteName ?? =
1296- implicitView? .browserHistory.currentPath ?? '/' ;
1278+ return _defaultRouteName ?? = implicitView? .browserHistory.currentPath ?? '/' ;
12971279 }
12981280
12991281 /// Lazily initialized when the `defaultRouteName` getter is invoked.
0 commit comments