Class BitmapNatives

java.lang.Object
org.robolectric.nativeruntime.BitmapNatives

public final class BitmapNatives extends Object
Native methods for Bitmap JNI registration.

Native method signatures are derived from https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/graphics/java/android/graphics/Bitmap.java

  • Method Details

    • nativeCreate

      public static Bitmap nativeCreate(int[] colors, int offset, int stride, int width, int height, int nativeConfig, boolean mutable, long nativeColorSpace)
    • nativeCopy

      public static Bitmap nativeCopy(long nativeSrcBitmap, int nativeConfig, boolean isMutable)
    • nativeCopyAshmem

      public static Bitmap nativeCopyAshmem(long nativeSrcBitmap)
    • nativeCopyAshmemConfig

      public static Bitmap nativeCopyAshmemConfig(long nativeSrcBitmap, int nativeConfig)
    • nativeGetNativeFinalizer

      public static long nativeGetNativeFinalizer()
    • nativeRecycle

      public static void nativeRecycle(long nativeBitmap)
    • nativeReconfigure

      public static void nativeReconfigure(long nativeBitmap, int width, int height, int config, boolean isPremultiplied)
    • nativeCompress

      public static boolean nativeCompress(long nativeBitmap, int format, int quality, OutputStream stream, byte[] tempStorage)
    • nativeErase

      public static void nativeErase(long nativeBitmap, int color)
    • nativeErase

      public static void nativeErase(long nativeBitmap, long colorSpacePtr, long color)
    • nativeRowBytes

      public static int nativeRowBytes(long nativeBitmap)
    • nativeConfig

      public static int nativeConfig(long nativeBitmap)
    • nativeGetPixel

      public static int nativeGetPixel(long nativeBitmap, int x, int y)
    • nativeGetColor

      public static long nativeGetColor(long nativeBitmap, int x, int y)
    • nativeGetPixels

      public static void nativeGetPixels(long nativeBitmap, int[] pixels, int offset, int stride, int x, int y, int width, int height)
    • nativeSetPixel

      public static void nativeSetPixel(long nativeBitmap, int x, int y, int color)
    • nativeSetPixels

      public static void nativeSetPixels(long nativeBitmap, int[] colors, int offset, int stride, int x, int y, int width, int height)
    • nativeCopyPixelsToBuffer

      public static void nativeCopyPixelsToBuffer(long nativeBitmap, Buffer dst)
    • nativeCopyPixelsFromBuffer

      public static void nativeCopyPixelsFromBuffer(long nativeBitmap, Buffer src)
    • nativeGenerationId

      public static int nativeGenerationId(long nativeBitmap)
    • nativeCreateFromParcel

      public static Bitmap nativeCreateFromParcel(Parcel p)
    • nativeWriteToParcel

      public static boolean nativeWriteToParcel(long nativeBitmap, int density, Parcel p)
    • nativeExtractAlpha

      public static Bitmap nativeExtractAlpha(long nativeBitmap, long nativePaint, int[] offsetXY)
    • nativeHasAlpha

      public static boolean nativeHasAlpha(long nativeBitmap)
    • nativeIsPremultiplied

      public static boolean nativeIsPremultiplied(long nativeBitmap)
    • nativeSetPremultiplied

      public static void nativeSetPremultiplied(long nativeBitmap, boolean isPremul)
    • nativeSetHasAlpha

      public static void nativeSetHasAlpha(long nativeBitmap, boolean hasAlpha, boolean requestPremul)
    • nativeHasMipMap

      public static boolean nativeHasMipMap(long nativeBitmap)
    • nativeSetHasMipMap

      public static void nativeSetHasMipMap(long nativeBitmap, boolean hasMipMap)
    • nativeSameAs

      public static boolean nativeSameAs(long nativeBitmap0, long nativeBitmap1)
    • nativePrepareToDraw

      public static void nativePrepareToDraw(long nativeBitmap)
    • nativeGetAllocationByteCount

      public static int nativeGetAllocationByteCount(long nativeBitmap)
    • nativeCopyPreserveInternalConfig

      public static Bitmap nativeCopyPreserveInternalConfig(long nativeBitmap)
    • nativeWrapHardwareBufferBitmap

      public static Bitmap nativeWrapHardwareBufferBitmap(HardwareBuffer buffer, long nativeColorSpace)
    • nativeGetHardwareBuffer

      public static HardwareBuffer nativeGetHardwareBuffer(long nativeBitmap)
    • nativeComputeColorSpace

      public static ColorSpace nativeComputeColorSpace(long nativePtr)
    • nativeSetColorSpace

      public static void nativeSetColorSpace(long nativePtr, long nativeColorSpace)
    • nativeIsSRGB

      public static boolean nativeIsSRGB(long nativePtr)
    • nativeIsSRGBLinear

      public static boolean nativeIsSRGBLinear(long nativePtr)
    • nativeSetImmutable

      public static void nativeSetImmutable(long nativePtr)
    • nativeIsImmutable

      public static boolean nativeIsImmutable(long nativePtr)
    • nativeIsBackedByAshmem

      public static boolean nativeIsBackedByAshmem(long nativePtr)
    • nativeCopyColorSpaceP

      public static void nativeCopyColorSpaceP(long srcBitmap, long dstBitmap)