Package org.robolectric.shadows
Class ShadowNativeBitmapFactory
java.lang.Object
org.robolectric.shadows.ShadowNativeBitmapFactory
@Implements(value=android.graphics.BitmapFactory.class,
minSdk=26,
shadowPicker=Picker.class,
isInAndroidSdk=false,
callNativeMethodsByDefault=true)
public class ShadowNativeBitmapFactory
extends Object
Shadow for
BitmapFactory
that is backed by native code-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static Bitmap
decodeResource
(Resources res, int id, BitmapFactory.Options options) protected static Bitmap
decodeStream
(InputStream is, Rect outPadding, BitmapFactory.Options opts) The real implementation ofBitmapFactory.decodeStream(InputStream, Rect, Options)
checks if the stream is anAssetManager.AssetInputStream
object and subsequently passes in native asset ids into native code.protected static Bitmap
nativeDecodeAsset
(long nativeAsset, Rect padding, BitmapFactory.Options opts) protected static Bitmap
nativeDecodeAsset
(long nativeAsset, Rect padding, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) protected static Bitmap
nativeDecodeByteArray
(byte[] data, int offset, int length, BitmapFactory.Options opts) protected static Bitmap
nativeDecodeByteArray
(byte[] data, int offset, int length, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) protected static Bitmap
nativeDecodeFileDescriptor
(FileDescriptor fd, Rect padding, BitmapFactory.Options opts) protected static Bitmap
nativeDecodeFileDescriptor
(FileDescriptor fd, Rect padding, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) protected static Bitmap
nativeDecodeStream
(InputStream is, byte[] storage, Rect padding, BitmapFactory.Options opts) protected static Bitmap
nativeDecodeStream
(InputStream is, byte[] storage, Rect padding, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) protected static boolean
-
Constructor Details
-
ShadowNativeBitmapFactory
public ShadowNativeBitmapFactory()
-
-
Method Details
-
decodeResource
@Implementation protected static Bitmap decodeResource(Resources res, int id, BitmapFactory.Options options) -
decodeStream
@Implementation protected static Bitmap decodeStream(InputStream is, Rect outPadding, BitmapFactory.Options opts) The real implementation ofBitmapFactory.decodeStream(InputStream, Rect, Options)
checks if the stream is anAssetManager.AssetInputStream
object and subsequently passes in native asset ids into native code. Until native resources are implemented, this has to be shadowed. -
nativeDecodeStream
@Implementation(minSdk=29, maxSdk=34) protected static Bitmap nativeDecodeStream(InputStream is, byte[] storage, Rect padding, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) -
nativeDecodeStream
@Implementation(maxSdk=28) protected static Bitmap nativeDecodeStream(InputStream is, byte[] storage, Rect padding, BitmapFactory.Options opts) -
nativeDecodeFileDescriptor
@Implementation(minSdk=29, maxSdk=34) protected static Bitmap nativeDecodeFileDescriptor(FileDescriptor fd, Rect padding, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) -
nativeDecodeFileDescriptor
@Implementation(maxSdk=28) protected static Bitmap nativeDecodeFileDescriptor(FileDescriptor fd, Rect padding, BitmapFactory.Options opts) -
nativeDecodeAsset
@Implementation(minSdk=29, maxSdk=34) protected static Bitmap nativeDecodeAsset(long nativeAsset, Rect padding, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) -
nativeDecodeAsset
@Implementation(maxSdk=28) protected static Bitmap nativeDecodeAsset(long nativeAsset, Rect padding, BitmapFactory.Options opts) -
nativeDecodeByteArray
@Implementation(minSdk=29, maxSdk=34) protected static Bitmap nativeDecodeByteArray(byte[] data, int offset, int length, BitmapFactory.Options opts, long inBitmapHandle, long colorSpaceHandle) -
nativeDecodeByteArray
@Implementation(maxSdk=28) protected static Bitmap nativeDecodeByteArray(byte[] data, int offset, int length, BitmapFactory.Options opts) -
nativeIsSeekable
-