lazy stroke preview rendering

This commit is contained in:
2019-04-23 12:17:46 +02:00
parent 042ad503d2
commit b4a9061cc4
7 changed files with 71 additions and 34 deletions

View File

@@ -198,6 +198,14 @@ public:
}
get_cv.notify_one();
}
void Remove(T pkt)
{
std::unique_lock<std::mutex> lock(mutex);
auto it = std::find_if(q.begin(), q.end(), [&pkt](auto const& x) { return x.first == pkt; });
if (it != q.end())
q.erase(it);
if (Max > 0) post_cv.notify_all();
}
T Get()
{
static T emptyT{};