Flutter: Manually resizing of surface?

34 views
Skip to first unread message

Matej Knopp

unread,
Mar 23, 2021, 2:14:34 PMMar 23
to 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

unread,
Mar 23, 2021, 2:21:12 PMMar 23
to 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

unread,
Mar 23, 2021, 2:25:05 PMMar 23
to 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
Reply all
Reply to author
Forward
0 new messages