You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, windows are rendered as platform views. This works very well for our internal usecase (embedded with a low number of windows), but might not work as well if the goal is to implement a general purpose window manager.
Using platform views could cause the GPU memory usage to get up to (Size of fullscreen texture) * ((Number of surfaces on screen) + 1).
There are multiple potential solutions for this, each with its own advantages and disadvantages:
Switch from platform views to textures
Advantage: Memory usage greatly reduced
Advantage: Filters like blur will work since skia controls the rendering
Disadvantage: Each time a client surface is damaged, the flutter engine will need to be asked to redraw
This is also tricky to implement, and will likely require changes to wlroots internals because textures can't be destroyed until the flutter render is done with them.
Draw surfaces on top of the flutter texture, communicate details through an out of band channel.
Advantage: Memory usage greatly reduced
Disadvantage: We are basically working against how flutter does rendering, this will be complicated
Disadvantage: Layering stuff from the in process flutter program will be impossible
Hybrid approach between platform views and 2. Render all windows on a single platform view.
Advantage/Disadvantage: Memory usage is worse than 1. and 2., but will not go above (Size of fullscreen texture) * 2.
Disadvantage: We are basically working against how flutter does rendering, this will be complicated
Depending on how flutter optimizes its output layers, we might already be mostly at option 3. If this is the case, then this issue is much less of a problem, and things will simply require some consideration when writing a shell in flutter. This should be checked/validated before any other approach is started.
The text was updated successfully, but these errors were encountered:
Currently, windows are rendered as platform views. This works very well for our internal usecase (embedded with a low number of windows), but might not work as well if the goal is to implement a general purpose window manager.
Using platform views could cause the GPU memory usage to get up to
(Size of fullscreen texture) * ((Number of surfaces on screen) + 1)
.There are multiple potential solutions for this, each with its own advantages and disadvantages:
(Size of fullscreen texture) * 2
.Depending on how flutter optimizes its output layers, we might already be mostly at option 3. If this is the case, then this issue is much less of a problem, and things will simply require some consideration when writing a shell in flutter. This should be checked/validated before any other approach is started.
The text was updated successfully, but these errors were encountered: