public class OperationCacheHolder extends java.lang.Object implements AbstractOperation.ResultHolder, AbstractOperation.SourceHolder
| Modifier and Type | Class and Description |
|---|---|
static class |
OperationCacheHolder.CACHE_TYPE |
| Constructor and Description |
|---|
OperationCacheHolder(java.lang.String identifier) |
| Modifier and Type | Method and Description |
|---|---|
void |
disableInvalidatable()
disable this state can be became invalid state.
|
android.graphics.Bitmap |
getBlurPreview()
Get source
|
protected android.graphics.Bitmap |
getCache(OperationCacheHolder.CACHE_TYPE typeProperty) |
protected java.lang.String |
getCacheId(OperationCacheHolder.CACHE_TYPE typeProperty) |
int |
getFullHeight()
Get source image height.
|
android.graphics.Bitmap |
getFullPreview()
Get source
|
int |
getFullWidth()
Get source image width.
|
java.lang.String |
getIdentifier()
Get Identifier.
|
android.graphics.Bitmap |
getSharpPreview()
Get sharp preview source.
|
android.graphics.Rect |
getSharpRect()
Get the Sharp Region that need to bie preview in a higher resolution.
|
boolean |
hasBlurPreview()
Has a source bitmap
|
boolean |
hasFullPreview()
Has a source bitmap
|
boolean |
hasSharpPreview()
Has a sharp region bitmap
|
void |
invalidateAll() |
void |
invalidateFullPreview() |
void |
invalidateSharpPreview() |
void |
invalidateType(OperationCacheHolder.CACHE_TYPE type) |
boolean |
isInvalid(OperationCacheHolder.CACHE_TYPE type) |
boolean |
needRenderFullResult()
Check if this operation need to render full region
|
boolean |
needRenderSharpResult()
Check if this operation need to render sharp preview.
|
void |
recycle()
Free Memory
|
static void |
releaseAll() |
protected void |
removeCache(OperationCacheHolder.CACHE_TYPE typeProperty) |
void |
setBlurResult(android.graphics.Bitmap blurPreview)
Set the bitmap blur result for the focus preview.
|
protected void |
setCache(OperationCacheHolder.CACHE_TYPE typeProperty,
android.graphics.Bitmap bitmap) |
void |
setFullResult(android.graphics.Bitmap fullPreview)
Set the bitmap result.
|
void |
setSharpRegionResult(android.graphics.Bitmap sharpRegion,
android.graphics.Rect sharpRect)
Set the sharp region bitmap result and his region.
|
public static void releaseAll()
public java.lang.String getIdentifier()
AbstractOperation.HoldergetIdentifier in interface AbstractOperation.Holder@NonNull
protected java.lang.String getCacheId(@NonNull
OperationCacheHolder.CACHE_TYPE typeProperty)
protected void setCache(@NonNull
OperationCacheHolder.CACHE_TYPE typeProperty,
@Nullable
android.graphics.Bitmap bitmap)
protected android.graphics.Bitmap getCache(@NonNull
OperationCacheHolder.CACHE_TYPE typeProperty)
protected void removeCache(@NonNull
OperationCacheHolder.CACHE_TYPE typeProperty)
public void disableInvalidatable()
AbstractOperation.ResultHolderdisableInvalidatable in interface AbstractOperation.ResultHolderpublic void invalidateAll()
invalidateAll in interface AbstractOperation.ResultHolderpublic void invalidateType(@NonNull
OperationCacheHolder.CACHE_TYPE type)
public boolean isInvalid(@NonNull
OperationCacheHolder.CACHE_TYPE type)
public void recycle()
AbstractOperation.Holderrecycle in interface AbstractOperation.Holderpublic void invalidateFullPreview()
invalidateFullPreview in interface AbstractOperation.ResultHolderpublic void invalidateSharpPreview()
invalidateSharpPreview in interface AbstractOperation.ResultHolder@Nullable public android.graphics.Rect getSharpRect()
AbstractOperation.SourceHoldergetSharpRect in interface AbstractOperation.SourceHolderpublic void setFullResult(@Nullable
android.graphics.Bitmap fullPreview)
AbstractOperation.ResultHoldersetFullResult in interface AbstractOperation.ResultHolderfullPreview - the full previewpublic void setBlurResult(android.graphics.Bitmap blurPreview)
AbstractOperation.ResultHoldersetBlurResult in interface AbstractOperation.ResultHolderblurPreview - the full previewpublic android.graphics.Bitmap getFullPreview()
AbstractOperation.SourceHoldergetFullPreview in interface AbstractOperation.SourceHolderpublic android.graphics.Bitmap getBlurPreview()
AbstractOperation.SourceHoldergetBlurPreview in interface AbstractOperation.SourceHolderpublic boolean needRenderSharpResult()
AbstractOperation.ResultHolderneedRenderSharpResult in interface AbstractOperation.ResultHolderpublic boolean needRenderFullResult()
AbstractOperation.ResultHolderneedRenderFullResult in interface AbstractOperation.ResultHolderpublic boolean hasFullPreview()
AbstractOperation.SourceHolderhasFullPreview in interface AbstractOperation.SourceHolderpublic boolean hasBlurPreview()
AbstractOperation.SourceHolderhasBlurPreview in interface AbstractOperation.SourceHolderpublic boolean hasSharpPreview()
AbstractOperation.SourceHolderhasSharpPreview in interface AbstractOperation.SourceHolderpublic android.graphics.Bitmap getSharpPreview()
AbstractOperation.SourceHoldergetSharpPreview in interface AbstractOperation.SourceHolderpublic void setSharpRegionResult(android.graphics.Bitmap sharpRegion,
android.graphics.Rect sharpRect)
AbstractOperation.ResultHoldersetSharpRegionResult in interface AbstractOperation.ResultHoldersharpRegion - sharp region bitmapsharpRect - sharp region, should be the source region or a bigger region.public int getFullWidth()
AbstractOperation.SourceHoldergetFullWidth in interface AbstractOperation.SourceHolderpublic int getFullHeight()
AbstractOperation.SourceHoldergetFullHeight in interface AbstractOperation.SourceHolder