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

Method enqueueCachedBitmap

snap_drawing/src/snap_drawing/cpp/Utils/ImageQueue.cpp:123–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void ImageQueue::enqueueCachedBitmap(const Ref<Valdi::IBitmap>& sourceBitmap) {
124 std::lock_guard<Valdi::Mutex> lock(_mutex);
125 auto bitmapInfo = sourceBitmap->getInfo();
126 if (!isCacheCompatibleWithBitmapInfo(bitmapInfo) || _cachedBitmaps.size() >= kImageQueueMaxPoolSize) {
127 return;
128 }
129 _cachedBitmaps.emplace_back(sourceBitmap);
130}
131
132size_t ImageQueue::getQueueSize() const {
133 std::lock_guard<Valdi::Mutex> lock(_mutex);

Callers 1

doDisposeMethod · 0.80

Calls 2

getInfoMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected