fix: use preserveDrawingBuffer=true on web

using createImageFromImageBitmap to import the canvas directly into a Flutter app results in flickering unless this is set to true (as the drawing buffer is otherwise cleared after each render, which may not line up with Flutter's ticker
This commit is contained in:
Nick Fisher
2024-06-21 11:18:05 +08:00
parent cc3020c268
commit fd19fc1c68

View File

@@ -125,7 +125,7 @@ extern "C"
attr.stencil = EM_FALSE;
attr.antialias = EM_FALSE;
attr.explicitSwapControl = EM_FALSE;
attr.preserveDrawingBuffer = EM_FALSE;
attr.preserveDrawingBuffer = EM_TRUE;
attr.proxyContextToMainThread = EMSCRIPTEN_WEBGL_CONTEXT_PROXY_DISALLOW;
attr.enableExtensionsByDefault = EM_TRUE;
attr.renderViaOffscreenBackBuffer = EM_FALSE;