public class LutColorFilter extends ImageFilter implements ImageFilter.FilterConfigIntensity
ImageFilter.FilterConfigIntensity
AbstractConfig.BindData
Modifier and Type | Field and Description |
---|---|
static <any> |
CREATOR |
DEFAULT_ATTRIB_POSITION, DEFAULT_ATTRIB_TEXTURE_COORDINATE, DEFAULT_UNIFORM_SAMPLER, DEFAULT_VERTEX_SHADER, TARGET_PLACEHOLDER, VERTICES_DATA_POS_OFFSET, VERTICES_DATA_POS_SIZE, VERTICES_DATA_STRIDE_BYTES, VERTICES_DATA_UV_OFFSET, VERTICES_DATA_UV_SIZE
isDirty, ORIGINAL_THUMBNAIL_SIZE
Modifier | Constructor and Description |
---|---|
|
LutColorFilter(int name,
int thumbnailRes,
int lutResource) |
protected |
LutColorFilter(Parcel in) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
Bitmap |
getLutBitmap()
Return the Lut as Bitmap.
|
android.support.v8.renderscript.Allocation |
getLutCube(android.support.v8.renderscript.RenderScript rs)
Return the Renderscript LUT Allocation
|
Bitmap |
getThumbnailBitmap(int maxWidth)
Return the Thumbnail, do not call in Main Thread and use #getThumbnailResId() if #hasStaticThumbnail
|
int |
hashCode() |
boolean |
hasResourceLut() |
boolean |
hasStaticThumbnail()
Check if it has a static thumbnail drawable.
|
void |
onDraw() |
void |
release()
Release the shader program and texture
|
void |
renderImage(android.support.v8.renderscript.Allocation allocationIn,
android.support.v8.renderscript.Allocation allocationOut,
float intensity,
boolean previewMode) |
Bitmap |
renderImage(Bitmap bitmap,
float intensity,
boolean previewMode)
Render the filter
|
protected void |
setup(int texTarget) |
void |
writeToParcel(Parcel dest,
int flags) |
createTargetShader, createViewHolder, draw, getHandle, getLayout, hasIntensityConfig, isSelectable, releaseProgram, renderImage, useProgram
generateBindData, generateBindDataAsync, getName, getThumbnailBitmap, getThumbnailResId, getThumbnailSource, getTitle, getVerticalLayout, isClickable, isDirty, setDirtyFlag
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
generateBindData, generateBindDataAsync, getName, getVerticalLayout, isDirty, setDirtyFlag
public LutColorFilter(@StringRes int name, @DrawableRes int thumbnailRes, @DrawableRes @RawRes int lutResource)
protected LutColorFilter(Parcel in)
public int describeContents()
describeContents
in class ImageFilter
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
@Nullable public Bitmap getLutBitmap()
@NonNull public android.support.v8.renderscript.Allocation getLutCube(@NonNull android.support.v8.renderscript.RenderScript rs)
rs
- reference to the renderscript.@Nullable public Bitmap getThumbnailBitmap(int maxWidth)
AbstractConfig
getThumbnailBitmap
in class ImageFilter
maxWidth
- Size the drawable should be limited to.public int hashCode()
hashCode
in class java.lang.Object
public boolean hasResourceLut()
public boolean hasStaticThumbnail()
AbstractConfig
hasStaticThumbnail
in class ImageFilter
AbstractConfig.getThumbnailBitmap()
public void onDraw()
onDraw
in class ImageFilter
public void release()
ImageFilter
release
in interface ImageFilterInterface
release
in class ImageFilter
public void renderImage(android.support.v8.renderscript.Allocation allocationIn, android.support.v8.renderscript.Allocation allocationOut, float intensity, boolean previewMode)
@Nullable public Bitmap renderImage(@Nullable Bitmap bitmap, float intensity, boolean previewMode)
renderImage
in interface ImageFilter.FilterConfigIntensity
renderImage
in interface ImageFilterInterface
renderImage
in class ImageFilter
bitmap
- sourceTypeintensity
- filter intensitypreviewMode
- true if the renderer can reduce the quality to improve speed.protected void setup(int texTarget)
setup
in class ImageFilter
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in class ImageFilter