#include <image_lru.h>
Public Member Functions | |
| ImageLRU ()=default | |
| ~ImageLRU ()=default | |
| sk_sp< flutter::DlImage > | FindImage (std::optional< HardwareBufferKey > key) |
| Retrieve the image associated with the given [key], or nullptr. | |
| HardwareBufferKey | AddImage (const sk_sp< flutter::DlImage > &image, HardwareBufferKey key) |
| Add a new image to the cache with a key, returning the key of the LRU entry that was removed. | |
| void | Clear () |
| Remove all entires from the image cache. | |
Definition at line 24 of file image_lru.h.
|
default |
|
default |
References flutter::Data(), key, and value.
| HardwareBufferKey flutter::ImageLRU::AddImage | ( | const sk_sp< flutter::DlImage > & | image, |
| HardwareBufferKey | key | ||
| ) |
Add a new image to the cache with a key, returning the key of the LRU entry that was removed.
The value may be 0, in which case nothing was removed.
Definition at line 42 of file image_lru.cc.
References flutter::Data(), i, image, key, and flutter::kImageReaderSwapchainSize.
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::ImageExternalTextureGL::UpdateImage().
| void flutter::ImageLRU::Clear | ( | ) |
Remove all entires from the image cache.
Definition at line 60 of file image_lru.cc.
References flutter::Data(), i, and flutter::kImageReaderSwapchainSize.
Referenced by flutter::ImageExternalTextureGL::Detach(), and flutter::testing::TEST().
| sk_sp< flutter::DlImage > flutter::ImageLRU::FindImage | ( | std::optional< HardwareBufferKey > | key | ) |
Retrieve the image associated with the given [key], or nullptr.
Definition at line 9 of file image_lru.cc.
References i, key, and flutter::kImageReaderSwapchainSize.
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::ImageExternalTextureGL::UpdateImage().