java.lang.Object | |
↳ | com.facebook.fresco.animation.bitmap.cache.NoOpCache |
No-op bitmap cache that doesn't do anything.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NoOpCache() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
clear()
Clear the cache.
| ||||||||||
CloseableReference<Bitmap> |
getBitmapToReuseForFrame(int frameNumber, int width, int height)
Return a reusable bitmap that should be used to render the given frame.
| ||||||||||
CloseableReference<Bitmap> |
getCachedFrame(int frameNumber)
Get the cached frame for the given frame number.
| ||||||||||
CloseableReference<Bitmap> |
getFallbackFrame(int frameNumber)
Get a fallback frame for the given frame number.
| ||||||||||
int | getSizeInBytes() | ||||||||||
void |
onFrameRendered(int frameNumber, CloseableReference<Bitmap> bitmap, int frameType)
Callback when the given bitmap has been drawn to a canvas.
| ||||||||||
void |
setFrameCacheListener(BitmapFrameCache.FrameCacheListener frameCacheListener)
Set a frame cache listener that gets notified about caching events.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Clear the cache.
Return a reusable bitmap that should be used to render the given frame.
frameNumber | the frame number to be rendered |
---|---|
width | the width of the target bitmap |
height | the height of the target bitmap |
Get the cached frame for the given frame number.
frameNumber | the frame number to get the cached frame for |
---|
Get a fallback frame for the given frame number. This method is called if all other attempts to draw a frame failed. The bitmap returned could for example be the last drawn frame (if any).
frameNumber | the frame number to get the fallback |
---|
Callback when the given bitmap has been drawn to a canvas.
This bitmap can either be a reused bitmap returned by
getBitmapToReuseForFrame(int, int, int)
or a new bitmap.
Note: the implementation of this interface has to manually clone the given bitmap reference
if it wants to hold on to the bitmap.
The original reference will be automatically closed after this call.
frameNumber | the frame number that has been rendered |
---|---|
bitmap | the bitmap that has been rendered |
frameType | the frame type that has been rendered |
Set a frame cache listener that gets notified about caching events.
frameCacheListener | the listener to use |
---|