Jackson Gardner 38b42c9f14 Fix async image loading issues in skwasm. (flutter/engine#47117)
This fixes https://github.com/flutter/flutter/issues/134045

There were a few different issues here:
* We need to do our own message passing for rendering pictures. The async methods provided by emscripten have their own queue that can drain synchronously, so basically it's not guaranteed to be FIFO with other messages sent to the web worker or main thread.
* When we drop frames, we should only drop intermediate frames, so that when the rendering flurry stops that the frame that is displayed is the last one that was actually requested.
* We need to reset the GL context after lazy image creation, otherwise skia's renderer gets into a bad state for that frame.
2023-10-20 18:30:33 +00:00
..