Fix race condition and data race in FrameInfoContainsValidWidthAndHeight. (#20706)
The data race: gl_surface_fbo_frame_infos_ in the test context to was appended to on the raster task runner but read on the platform task runner. This is now sidestepped by using a callback and pushing that responsibility to the test. Setting the callback is guarded behind a mutex. The race condition: The assertions were previously run when the UI thread was done generating the frames. However, the assertions were run on the results collected on the raster thread in response the frame requests from UI thread. Just run the assertions on the raster thread directly. Fixes https://github.com/flutter/flutter/issues/64344
Showing
想要评论请 注册 或 登录