Class ShadowNativeBitmap

    • Constructor Detail

      • ShadowNativeBitmap

        public ShadowNativeBitmap()
    • Method Detail

      • nativeCreate

        @Implementation(minSdk=29)
        protected static Bitmap nativeCreate​(int[] colors,
                                             int offset,
                                             int stride,
                                             int width,
                                             int height,
                                             int nativeConfig,
                                             boolean mutable,
                                             long nativeColorSpace)
      • nativeCreate

        @Implementation(minSdk=26,
                        maxSdk=28)
        protected static Bitmap nativeCreate​(int[] colors,
                                             int offset,
                                             int stride,
                                             int width,
                                             int height,
                                             int nativeConfig,
                                             boolean mutable,
                                             float[] xyzD50,
                                             ColorSpace.Rgb.TransferParameters p)
      • nativeCopy

        @Implementation(minSdk=21)
        protected static Bitmap nativeCopy​(long nativeSrcBitmap,
                                           int nativeConfig,
                                           boolean isMutable)
      • nativeCopyAshmem

        @Implementation(minSdk=23)
        protected static Bitmap nativeCopyAshmem​(long nativeSrcBitmap)
      • nativeCopyAshmemConfig

        @Implementation(minSdk=24)
        protected static Bitmap nativeCopyAshmemConfig​(long nativeSrcBitmap,
                                                       int nativeConfig)
      • nativeGetNativeFinalizer

        @Implementation(minSdk=24)
        protected static long nativeGetNativeFinalizer()
      • nativeRecycle

        @Implementation(minSdk=21)
        protected static Object nativeRecycle​(Object nativeBitmap)
      • nativeReconfigure

        @Implementation(minSdk=26)
        protected static void nativeReconfigure​(long nativeBitmap,
                                                int width,
                                                int height,
                                                int config,
                                                boolean isPremultiplied)
      • nativeCompress

        @Implementation(minSdk=21)
        protected static boolean nativeCompress​(long nativeBitmap,
                                                int format,
                                                int quality,
                                                OutputStream stream,
                                                byte[] tempStorage)
      • nativeErase

        @Implementation(minSdk=21)
        protected static void nativeErase​(long nativeBitmap,
                                          int color)
      • nativeErase

        @Implementation(minSdk=29)
        protected static void nativeErase​(long nativeBitmap,
                                          long colorSpacePtr,
                                          long color)
      • nativeRowBytes

        @Implementation(minSdk=21)
        protected static int nativeRowBytes​(long nativeBitmap)
      • nativeConfig

        @Implementation(minSdk=21)
        protected static int nativeConfig​(long nativeBitmap)
      • nativeGetPixel

        @Implementation(minSdk=21)
        protected static int nativeGetPixel​(long nativeBitmap,
                                            int x,
                                            int y)
      • nativeGetColor

        @Implementation(minSdk=29)
        protected static long nativeGetColor​(long nativeBitmap,
                                             int x,
                                             int y)
      • nativeGetPixels

        @Implementation(minSdk=21)
        protected static void nativeGetPixels​(long nativeBitmap,
                                              int[] pixels,
                                              int offset,
                                              int stride,
                                              int x,
                                              int y,
                                              int width,
                                              int height)
      • nativeSetPixel

        @Implementation(minSdk=21)
        protected static void nativeSetPixel​(long nativeBitmap,
                                             int x,
                                             int y,
                                             int color)
      • nativeSetPixels

        @Implementation(minSdk=21)
        protected static void nativeSetPixels​(long nativeBitmap,
                                              int[] colors,
                                              int offset,
                                              int stride,
                                              int x,
                                              int y,
                                              int width,
                                              int height)
      • nativeCopyPixelsToBuffer

        @Implementation
        protected static void nativeCopyPixelsToBuffer​(long nativeBitmap,
                                                       Buffer dst)
      • nativeCopyPixelsFromBuffer

        @Implementation
        protected static void nativeCopyPixelsFromBuffer​(long nativeBitmap,
                                                         Buffer src)
      • nativeGenerationId

        @Implementation
        protected static int nativeGenerationId​(long nativeBitmap)
      • nativeExtractAlpha

        @Implementation
        protected static Bitmap nativeExtractAlpha​(long nativeBitmap,
                                                   long nativePaint,
                                                   int[] offsetXY)
      • nativeHasAlpha

        @Implementation
        protected static boolean nativeHasAlpha​(long nativeBitmap)
      • nativeIsPremultiplied

        @Implementation(minSdk=21)
        protected static boolean nativeIsPremultiplied​(long nativeBitmap)
      • nativeSetPremultiplied

        @Implementation(minSdk=21)
        protected static void nativeSetPremultiplied​(long nativeBitmap,
                                                     boolean isPremul)
      • nativeSetHasAlpha

        @Implementation(minSdk=21)
        protected static void nativeSetHasAlpha​(long nativeBitmap,
                                                boolean hasAlpha,
                                                boolean requestPremul)
      • nativeHasMipMap

        @Implementation(minSdk=17)
        protected static boolean nativeHasMipMap​(long nativeBitmap)
      • nativeSetHasMipMap

        @Implementation(minSdk=17)
        protected static void nativeSetHasMipMap​(long nativeBitmap,
                                                 boolean hasMipMap)
      • nativeSameAs

        @Implementation
        protected static boolean nativeSameAs​(long nativeBitmap0,
                                              long nativeBitmap1)
      • nativePrepareToDraw

        @Implementation(minSdk=25)
        protected static void nativePrepareToDraw​(long nativeBitmap)
      • nativeGetAllocationByteCount

        @Implementation(minSdk=26)
        protected static int nativeGetAllocationByteCount​(long nativeBitmap)
      • nativeCopyPreserveInternalConfig

        @Implementation(minSdk=26)
        protected static Bitmap nativeCopyPreserveInternalConfig​(long nativeBitmap)
      • nativeWrapHardwareBufferBitmap

        @Implementation(minSdk=29)
        protected static Bitmap nativeWrapHardwareBufferBitmap​(HardwareBuffer buffer,
                                                               long nativeColorSpace)
      • nativeGetHardwareBuffer

        @Implementation(minSdk=30)
        protected static HardwareBuffer nativeGetHardwareBuffer​(long nativeBitmap)
      • nativeGetColorSpace

        @Implementation(minSdk=26,
                        maxSdk=28)
        protected static boolean nativeGetColorSpace​(long nativePtr,
                                                     float[] xyz,
                                                     float[] params)
      • nativeComputeColorSpace

        @Implementation(minSdk=29)
        protected static ColorSpace nativeComputeColorSpace​(long nativePtr)
      • nativeSetColorSpace

        @Implementation(minSdk=29)
        protected static void nativeSetColorSpace​(long nativePtr,
                                                  long nativeColorSpace)
      • nativeIsSRGB

        @Implementation(minSdk=26)
        protected static boolean nativeIsSRGB​(long nativePtr)
      • nativeIsSRGBLinear

        @Implementation(minSdk=28)
        protected static boolean nativeIsSRGBLinear​(long nativePtr)
      • nativeSetImmutable

        @Implementation(minSdk=29)
        protected static void nativeSetImmutable​(long nativePtr)
      • nativeIsImmutable

        @Implementation(minSdk=29)
        protected static boolean nativeIsImmutable​(long nativePtr)
      • nativeIsBackedByAshmem

        @Implementation(minSdk=31)
        protected static boolean nativeIsBackedByAshmem​(long nativePtr)
      • writeToParcel

        @Implementation
        protected void writeToParcel​(Parcel p,
                                     int flags)
      • nativeCreateFromParcel

        @Implementation
        protected static Bitmap nativeCreateFromParcel​(Parcel p)
      • getCreatedFromBitmap

        public Bitmap getCreatedFromBitmap()
        Description copied from class: ShadowBitmap
        Reference to original Bitmap from which this Bitmap was created. null if this Bitmap was not copied from another instance.
        Specified by:
        getCreatedFromBitmap in class ShadowBitmap
        Returns:
        Original Bitmap from which this Bitmap was created.
      • getCreatedFromResId

        public int getCreatedFromResId()
        Resource ID from which this Bitmap was created.
        Specified by:
        getCreatedFromResId in class ShadowBitmap
        Returns:
        Resource ID from which this Bitmap was created, or 0 if this Bitmap was not created from a resource.
      • getCreatedFromPath

        public String getCreatedFromPath()
        Description copied from class: ShadowBitmap
        Path from which this Bitmap was created. null if this Bitmap was not create from a path.
        Specified by:
        getCreatedFromPath in class ShadowBitmap
        Returns:
        Path from which this Bitmap was created.
      • getCreatedFromBytes

        public byte[] getCreatedFromBytes()
        Description copied from class: ShadowBitmap
        Bytes from which this Bitmap was created. null if this Bitmap was not created from bytes.
        Specified by:
        getCreatedFromBytes in class ShadowBitmap
        Returns:
        Bytes from which this Bitmap was created.
      • getCreatedFromColors

        public int[] getCreatedFromColors()
        Description copied from class: ShadowBitmap
        Color array from which this Bitmap was created. null if this Bitmap was not created from a color array.
        Specified by:
        getCreatedFromColors in class ShadowBitmap
        Returns:
        Color array from which this Bitmap was created.
      • getCreatedFromMatrix

        public Matrix getCreatedFromMatrix()
        Description copied from class: ShadowBitmap
        Matrix from which this Bitmap's content was transformed, or null.
        Specified by:
        getCreatedFromMatrix in class ShadowBitmap
        Returns:
        Matrix from which this Bitmap's content was transformed, or null.
      • getCreatedFromFilter

        public boolean getCreatedFromFilter()
        Description copied from class: ShadowBitmap
        true if this Bitmap was created with filtering.
        Specified by:
        getCreatedFromFilter in class ShadowBitmap
        Returns:
        true if this Bitmap was created with filtering.
      • reset

        @Resetter
        public static void reset()