#include <fence_waiter_vk.h>
|
| | ~FenceWaiterVK () |
| |
| bool | IsValid () const |
| |
| void | Terminate () |
| |
| fml::Status | AddFence (vk::UniqueFence fence, const std::function< fml::Status(vk::Fence)> &submit_callback, fml::closure completion_callback) |
| | Invokes the [submit_callback] synchronously and adds the fence to the wait set if it succeeds. The [completion_callback] will be called when the submitted command completes and the fence is signaled. More...
|
| |
Definition at line 25 of file fence_waiter_vk.h.
◆ ~FenceWaiterVK()
| impeller::FenceWaiterVK::~FenceWaiterVK |
( |
| ) |
|
◆ AddFence()
| fml::Status impeller::FenceWaiterVK::AddFence |
( |
vk::UniqueFence |
fence, |
|
|
const std::function< fml::Status(vk::Fence)> & |
submit_callback, |
|
|
fml::closure |
completion_callback |
|
) |
| |
Invokes the [submit_callback] synchronously and adds the fence to the wait set if it succeeds. The [completion_callback] will be called when the submitted command completes and the fence is signaled.
Definition at line 63 of file fence_waiter_vk.cc.
67 if (!fence || !submit_callback || !completion_callback) {
68 return fml::Status(fml::StatusCode::kInvalidArgument,
"Invalid arguments");
72 std::scoped_lock lock(wait_set_mutex_);
74 return fml::Status(fml::StatusCode::kCancelled,
75 "Fence waiter is terminated");
77 auto submit_status = submit_callback(fence.get());
78 if (!submit_status.ok()) {
81 wait_set_.emplace_back(
84 wait_set_cv_.notify_one();
static std::shared_ptr< WaitSetEntry > Create(vk::UniqueFence p_fence, fml::closure p_callback)
References impeller::WaitSetEntry::Create().
◆ IsValid()
| bool impeller::FenceWaiterVK::IsValid |
( |
| ) |
const |
◆ Terminate()
| void impeller::FenceWaiterVK::Terminate |
( |
| ) |
|
Definition at line 213 of file fence_waiter_vk.cc.
215 std::scoped_lock lock(wait_set_mutex_);
221 wait_set_cv_.notify_one();
222 waiter_thread_->join();
Referenced by ~FenceWaiterVK().
◆ ContextVK
The documentation for this class was generated from the following files: