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

Commit eefe3fb0 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

NDK: Report RGBA_F16 as appropriate

Bug: 135133301
Test: Id904c8cb4b22505635744ab271a639ace24ddbab

I3c17faf174b109b7c31c2eb5d1249bc881923b10 adds a new AndroidBitmapFormat
which corresponds to Bitmap.Config.RGBA_F16. Report it if that is the
format of the Bitmap.

Remove unnecessary SkASSERTs, which are turned off for Android builds.

Change-Id: Id05497d0bcbfa5ccb3109e2819eecbbf84d35149
parent ced64357
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -238,10 +238,6 @@ Bitmap& toBitmap(jlong bitmapHandle) {
}

void imageInfo(JNIEnv* env, jobject bitmap, AndroidBitmapInfo* info) {
    SkASSERT(info);
    SkASSERT(env);
    SkASSERT(bitmap);
    SkASSERT(env->IsInstanceOf(bitmap, gBitmap_class));
    jlong bitmapHandle = env->GetLongField(bitmap, gBitmap_nativePtr);
    LocalScopedBitmap localBitmap(bitmapHandle);

@@ -263,6 +259,9 @@ void imageInfo(JNIEnv* env, jobject bitmap, AndroidBitmapInfo* info) {
        case kAlpha_8_SkColorType:
            info->format = ANDROID_BITMAP_FORMAT_A_8;
            break;
        case kRGBA_F16_SkColorType:
            info->format = ANDROID_BITMAP_FORMAT_RGBA_F16;
            break;
        default:
            info->format = ANDROID_BITMAP_FORMAT_NONE;
            break;