5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_FENCE_WAITER_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_FENCE_WAITER_VK_H_
8 #include <condition_variable>
13 #include "flutter/fml/closure.h"
21 using WaitSet = std::vector<std::shared_ptr<WaitSetEntry>>;
31 bool AddFence(vk::UniqueFence fence,
const fml::closure& callback);
36 std::weak_ptr<DeviceHolderVK> device_holder_;
37 std::unique_ptr<std::thread> waiter_thread_;
38 std::mutex wait_set_mutex_;
39 std::condition_variable wait_set_cv_;
41 bool terminate_ =
false;
43 explicit FenceWaiterVK(std::weak_ptr<DeviceHolderVK> device_holder);
48 void WaitUntilEmpty();
bool AddFence(vk::UniqueFence fence, const fml::closure &callback)
bool Main(const fml::CommandLine &command_line)
std::vector< std::shared_ptr< WaitSetEntry > > WaitSet