Package org.robolectric.shadows
Class ShadowNativeImageDecoder
- java.lang.Object
-
- org.robolectric.shadows.ShadowNativeImageDecoder
-
@Implements(value=android.graphics.ImageDecoder.class, minSdk=28, shadowPicker=Picker.class) public class ShadowNativeImageDecoder extends Object
Shadow forImageDecoderthat is backed by native code
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShadowNativeImageDecoder.PickerShadow picker forImageDecoder.
-
Constructor Summary
Constructors Constructor Description ShadowNativeImageDecoder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static ImageDecodercreateFromAsset(AssetManager.AssetInputStream ais, boolean preferAnimation, ImageDecoder.Source source)protected static ImageDecodercreateFromAsset(AssetManager.AssetInputStream ais, ImageDecoder.Source source)protected static voidnClose(long nativePtr)protected static ImageDecodernCreate(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src)protected static ImageDecodernCreate(byte[] data, int offset, int length, ImageDecoder.Source src)protected static ImageDecodernCreate(long asset, boolean preferAnimation, ImageDecoder.Source src)protected static ImageDecodernCreate(long asset, ImageDecoder.Source src)protected static ImageDecodernCreate(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src)protected static ImageDecodernCreate(FileDescriptor fd, ImageDecoder.Source src)protected static ImageDecodernCreate(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src)protected static ImageDecodernCreate(InputStream is, byte[] storage, ImageDecoder.Source src)protected static ImageDecodernCreate(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src)protected static ImageDecodernCreate(ByteBuffer buffer, int position, int limit, ImageDecoder.Source src)protected static BitmapnDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, long desiredColorSpace, boolean extended)protected static BitmapnDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, ColorSpace desiredColorSpace)protected static ColorSpacenGetColorSpace(long nativePtr)protected static StringnGetMimeType(long nativePtr)protected static voidnGetPadding(long nativePtr, Rect outRect)protected static SizenGetSampledSize(long nativePtr, int sampleSize)
-
-
-
Method Detail
-
createFromAsset
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder createFromAsset(AssetManager.AssetInputStream ais, ImageDecoder.Source source) throws IOException- Throws:
IOException
-
createFromAsset
@Implementation(minSdk=30) protected static ImageDecoder createFromAsset(AssetManager.AssetInputStream ais, boolean preferAnimation, ImageDecoder.Source source) throws IOException
- Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(long asset, ImageDecoder.Source src) throws IOException- Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(long asset, boolean preferAnimation, ImageDecoder.Source src) throws IOException
- Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(ByteBuffer buffer, int position, int limit, ImageDecoder.Source src) throws IOException- Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src) throws IOException
- Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(byte[] data, int offset, int length, ImageDecoder.Source src) throws IOException- Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src) throws IOException
- Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(InputStream is, byte[] storage, ImageDecoder.Source src) throws IOException- Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src) throws IOException
- Throws:
IOException
-
nCreate
@Implementation(maxSdk=29) protected static ImageDecoder nCreate(FileDescriptor fd, ImageDecoder.Source src) throws IOException
- Throws:
IOException
-
nCreate
@Implementation(minSdk=31) protected static ImageDecoder nCreate(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src) throws IOException
- Throws:
IOException
-
nDecodeBitmap
@Implementation(minSdk=28, maxSdk=28) protected static Bitmap nDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, ColorSpace desiredColorSpace) throws IOException- Throws:
IOException
-
nDecodeBitmap
@Implementation(minSdk=29) protected static Bitmap nDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, long desiredColorSpace, boolean extended) throws IOException
- Throws:
IOException
-
nGetSampledSize
@Implementation protected static Size nGetSampledSize(long nativePtr, int sampleSize)
-
nGetPadding
@Implementation protected static void nGetPadding(long nativePtr, Rect outRect)
-
nClose
@Implementation protected static void nClose(long nativePtr)
-
nGetMimeType
@Implementation protected static String nGetMimeType(long nativePtr)
-
nGetColorSpace
@Implementation protected static ColorSpace nGetColorSpace(long nativePtr)
-
-