mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
DisposeView happens every frame before laying out PlatformViews, with the order specified in `composition_order_`. Because `view_to_dispose_` is determined on UI thread and `composition_order_` is determined on the platform thread, there could be a race if the dart code on the UI thread runs faster than the rasterizer on the Platform thread, causing a view in `view_to_dispose_` is still in the `composition_order_`. This PR delays the views in the `composition_order_` being disposed and wait for the next frame to dispose them. fixes https://github.com/flutter/flutter/issues/125223 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style