forked from firka/flutter
259217c7aa672406ce22360c844407b92cd809aa
A mistake was introduced in https://github.com/flutter/engine/pull/39498 where the maskViews are already recycles each frame. Sometimes a PlatformView does not need to be re-composite: (https://github.com/flutter/engine/blob/main/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm#L398-L401), so the mask view for such PlatformView should not be recycled. This PR changed the `recycleMaskViews` API to allow individual maskviews to be recycled. `ApplyMutator` then only recycle the maskView for that particular PlatformView. The MaskViewPool is also reworked to be simpler. - The pool now contains a single set of mask views, there is no index counter needed. - When a maskView is needed, try to get it from the pool. - If pool is empty, create a new view. - If pool has an available maskview, remove it from the pool. - When a PlatformView starts to `applyMutator`, it removes current the maskView, insert the maskView to the pool. - When the above PlatformView needs to a maskView, it grabs one from the pool. fixes: https://github.com/flutter/flutter/issues/125620 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Description
No description provided
Languages
Dart
75.4%
C++
16.4%
Objective-C++
2.7%
Java
2.7%
Objective-C
0.6%
Other
1.8%