Flutter Engine
The Flutter Engine
|
#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. More... | |
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. More... | |
void | Clear () |
Remove all entires from the image cache. More... | |
Definition at line 24 of file image_lru.h.
|
default |
|
default |
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.
void flutter::ImageLRU::Clear | ( | ) |
Remove all entires from the image cache.
Definition at line 60 of file image_lru.cc.
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.