-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Here is example application that has 4 platform views interleaved with Flutter content:
It uses a total of 5 surfaces, each one has size of entire window (because resizing surfaces is expensive). However there is no content directly painted over platform view so this entire scene could be rendered to the background surface and the end result would be same, saving 4 surfaces.
Another example - 4 platform views with Flutter content painted above the views:
This still uses 5 surfaces, but the same visual result can be represented by only two surfaces - content that is painted below platform views in first surface and content that is painted above platform views in second surface.
Same scene, painted with https://flutter.dev/go/optimized-platform-view-layers:
optimized-platform-view-layers.mov
Initially, there are two surface, but as they move to not paint over platform views, only one surface remains.