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

Method getResized

valdi/src/valdi/snap_drawing/ImageLoading/ImageCacheItem.cpp:90–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90Valdi::Ref<ImageCacheItem> ImageCacheItem::getResized(const String& url, int width, int height) {
91 _variants++;
92 auto strongRef = Valdi::strongSmallRef(this);
93 return Valdi::makeShared<ImageCacheItem>(url, strongRef, _image->resized(width, height));
94}
95
96bool ImageCacheItem::isExpired(snap::utils::time::Duration<std::chrono::steady_clock> time) const {
97 return time >= _lastAccessed;

Callers 1

getResizedImageMethod · 0.80

Calls 2

strongSmallRefFunction · 0.85
resizedMethod · 0.80

Tested by

no test coverage detected