Flutter: Manually resizing of surface?

Visto 41 veces
Saltar al primer mensaje no leído

Matej Knopp

no leída,
23 mar 2021, 14:14:3423/3/21
a angleproject
Bit of a background first: In Flutter, we have window resizing synchronization logic, which ensures that surface is resized and swapped with new contents BEFORE returning from the WM_SIZE message. This mostly results in good resizing performance where content update is synchronized with window size.

This however can not be done with default Angle surface resizing behavior, where it checks HWND size during swap and resizes underlying surface automatically. This is just too unpredictable and results in artifacts during resizing.

As a workaround, we create fixed size surface (EGL_FIXED_SIZE_ANGLE) and recreate it during every resizing step. This works well as long as direct composition is not used. Unfortunately with direct composition (and possibly UWP), recreating the surface (and thus entire swapchain) during resizing results in occasional flicker where entire window is briefly transparent. So instead, we would need a way to manually trigger resizing of underlying surface.

We tried calling eglPostSubBufferNV during resizing, and that does result in the surface being resized, however it also causes two additional SwapChain->Present calls, which in some cases causes artifacts during resizing.

Cheers,
Matt

Thomas Burkhart

no leída,
23 mar 2021, 14:21:1223/3/21
a angleproject
Hi Matt.
are you aware of my work with Angle and Flutter https://github.com/FlutterGL/flutter_web_gl
In which context are you using it with Flutter? Happy to chat Twitter: @thomasburkhartb
Cheers
Thomas

Matej Knopp

no leída,
23 mar 2021, 14:25:0523/3/21
a angleproject

Hi Thomas,

this is related to window resizing handling in Windows embedder. We would need a way to manually trigger resizing of the underlying surface.

-Matt
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos