Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9192d5e8 authored by John Reck's avatar John Reck
Browse files

Remove unused method

Test: builds

Change-Id: I8ad660f083a57f30db5ed0e2fe777286720033ca
parent 99449eea
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -1195,13 +1195,6 @@ static jboolean Bitmap_sameAs(JNIEnv* env, jobject, jlong bm0Handle,
    return JNI_TRUE;
}

static jlong Bitmap_refPixelRef(JNIEnv* env, jobject, jlong bitmapHandle) {
    LocalScopedBitmap bitmap(bitmapHandle);
    SkPixelRef& pixelRef = bitmap->bitmap();
    pixelRef.ref();
    return reinterpret_cast<jlong>(&pixelRef);
}

static void Bitmap_prepareToDraw(JNIEnv* env, jobject, jlong bitmapPtr) {
    LocalScopedBitmap bitmapHandle(bitmapPtr);
    if (!bitmapHandle.valid()) return;
@@ -1269,7 +1262,6 @@ static const JNINativeMethod gBitmapMethods[] = {
    {   "nativeCopyPixelsFromBuffer", "(JLjava/nio/Buffer;)V",
                                            (void*)Bitmap_copyPixelsFromBuffer },
    {   "nativeSameAs",             "(JJ)Z", (void*)Bitmap_sameAs },
    {   "nativeRefPixelRef",        "(J)J", (void*)Bitmap_refPixelRef },
    {   "nativePrepareToDraw",      "(J)V", (void*)Bitmap_prepareToDraw },
    {   "nativeGetAllocationByteCount", "(J)I", (void*)Bitmap_getAllocationByteCount },
};
+0 −11
Original line number Diff line number Diff line
@@ -1655,16 +1655,6 @@ public final class Bitmap implements Parcelable {
        nativePrepareToDraw(mNativePtr);
    }

    /**
     * Refs the underlying SkPixelRef and returns a pointer to it.
     *
     * @hide
     * */
    public final long refSkPixelRef() {
        checkRecycled("Can't refSkPixelRef on a recycled bitmap!");
        return nativeRefPixelRef(mNativePtr);
    }

    //////////// native methods

    private static native Bitmap nativeCreate(int[] colors, int offset,
@@ -1721,7 +1711,6 @@ public final class Bitmap implements Parcelable {
    private static native boolean nativeHasMipMap(long nativeBitmap);
    private static native void nativeSetHasMipMap(long nativeBitmap, boolean hasMipMap);
    private static native boolean nativeSameAs(long nativeBitmap0, long nativeBitmap1);
    private static native long nativeRefPixelRef(long nativeBitmap);
    private static native void nativePrepareToDraw(long nativeBitmap);
    private static native int nativeGetAllocationByteCount(long nativeBitmap);
}
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public final class Canvas_Delegate {
    /*package*/ static long initRaster(@Nullable Bitmap bitmap) {
        long nativeBitmapOrZero = 0;
        if (bitmap != null) {
            nativeBitmapOrZero = bitmap.refSkPixelRef();
            nativeBitmapOrZero = bitmap.getNativeInstance();
        }
        if (nativeBitmapOrZero > 0) {
            // get the Bitmap from the int