0a8b89af42f976ccc2d2842a8837b446e7a8fd02
CreateMockVulkanContext() thread-safe (flutter/engine#45687)
I started using `CreateMockVulkanContext()` in https://github.com/flutter/engine/pull/45654, and discovered that it was not thread-safe. This PR does a little bit of refactoring/TLC to ensure that functions and buffers can be accessed across threads (like the _real_ `ContextVK`). The attached test (_test for a test fixture, hoorah!_) fails consistently before the changes, and passes after. Note that if you try testing this with `--gtest_repeat=10000` (at least that's the threshold for me), it'll fail - that's actually due to https://github.com/flutter/flutter/issues/134482 which in turn is being fixed in https://github.com/flutter/engine/pull/45686. (Unblocks https://github.com/flutter/flutter/issues/133198) --------- Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
Description
Languages
Dart
75.4%
C++
16.4%
Objective-C++
2.7%
Java
2.7%
Objective-C
0.6%
Other
1.8%