MCPcopy Create free account
hub / github.com/Snapchat/Valdi / clearQueueUpToSize

Method clearQueueUpToSize

snap_drawing/src/snap_drawing/cpp/Utils/ImageQueue.cpp:73–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void ImageQueue::clearQueueUpToSize(size_t maxSize, std::unique_lock<Valdi::Mutex>& lock) {
74 while (_queue.size() > maxSize) {
75 auto image = std::move(_queue.front());
76 _queue.pop_front();
77
78 lock.unlock();
79 image = nullptr;
80 lock.lock();
81 }
82}
83
84bool ImageQueue::isCacheCompatibleWithBitmapInfo(const Valdi::BitmapInfo& bitmapInfo) const {
85 if (!_cacheBitmapInfo) {

Callers

nothing calls this directly

Calls 4

frontMethod · 0.80
sizeMethod · 0.45
unlockMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected