mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fixes https://github.com/flutter/flutter/issues/128126 I scared myself looking into the recent Vulkan driver issues and decided to fix this to follow best-practices. In addition to the comments, see the linked issue for the article on how this works. I didn't perform the data hashing because we use ::rename in fml::WriteAtomically and I am not as concerned about that. But we can add it later if needed. We also don't have a good utility to hash data. This also gets rid of one intermediate allocation. We could also write directly into the file mapping but FML has no utilities to msync. Something to fix later if needed.