@@ -308,29 +308,6 @@ class PlatformDispatcher {
308
308
_invoke (onMetricsChanged, _onMetricsChangedZone);
309
309
}
310
310
311
- // A debug-only variable that stores the [FlutterView]s for which
312
- // [FlutterView.render] has already been called during the current
313
- // [onBeginFrame]/[onDrawFrame] callback sequence.
314
- //
315
- // It is null outside the scope of those callbacks indicating that calls to
316
- // [FlutterView.render] must be ignored. Furthermore, if a given [FlutterView]
317
- // is already present in this set when its [FlutterView.render] is called
318
- // again, that call must be ignored as a duplicate.
319
- //
320
- // Between [onBeginFrame] and [onDrawFrame] the properties value is
321
- // temporarily stored in `_renderedViewsBetweenCallbacks` so that it survives
322
- // the gap between the two callbacks.
323
- //
324
- // In release build, this variable is null, and therefore the calling rule is
325
- // not enforced. This is because the check might hurt cold startup delay;
326
- // see https://github.com/flutter/engine/pull/46919.
327
- Set <FlutterView >? _debugRenderedViews;
328
- // A debug-only variable that temporarily stores the `_renderedViews` value
329
- // between `_beginFrame` and `_drawFrame`.
330
- //
331
- // In release build, this variable is null.
332
- Set <FlutterView >? _debugRenderedViewsBetweenCallbacks;
333
-
334
311
/// A callback invoked when any view begins a frame.
335
312
///
336
313
/// A callback that is invoked to notify the application that it is an
@@ -351,26 +328,11 @@ class PlatformDispatcher {
351
328
352
329
// Called from the engine, via hooks.dart
353
330
void _beginFrame (int microseconds) {
354
- assert (_debugRenderedViews == null );
355
- assert (_debugRenderedViewsBetweenCallbacks == null );
356
- assert (() {
357
- _debugRenderedViews = < FlutterView > {};
358
- return true ;
359
- }());
360
-
361
331
_invoke1 <Duration >(
362
332
onBeginFrame,
363
333
_onBeginFrameZone,
364
334
Duration (microseconds: microseconds),
365
335
);
366
-
367
- assert (_debugRenderedViews != null );
368
- assert (_debugRenderedViewsBetweenCallbacks == null );
369
- assert (() {
370
- _debugRenderedViewsBetweenCallbacks = _debugRenderedViews;
371
- _debugRenderedViews = null ;
372
- return true ;
373
- }());
374
336
}
375
337
376
338
/// A callback that is invoked for each frame after [onBeginFrame] has
@@ -388,22 +350,7 @@ class PlatformDispatcher {
388
350
389
351
// Called from the engine, via hooks.dart
390
352
void _drawFrame () {
391
- assert (_debugRenderedViews == null );
392
- assert (_debugRenderedViewsBetweenCallbacks != null );
393
- assert (() {
394
- _debugRenderedViews = _debugRenderedViewsBetweenCallbacks;
395
- _debugRenderedViewsBetweenCallbacks = null ;
396
- return true ;
397
- }());
398
-
399
353
_invoke (onDrawFrame, _onDrawFrameZone);
400
-
401
- assert (_debugRenderedViews != null );
402
- assert (_debugRenderedViewsBetweenCallbacks == null );
403
- assert (() {
404
- _debugRenderedViews = null ;
405
- return true ;
406
- }());
407
354
}
408
355
409
356
/// A callback that is invoked when pointer data is available.
0 commit comments