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

Commit e9048f39 authored by John Reck's avatar John Reck
Browse files

Fix regression to drawBitmapArray

253f2c21 accidentally
broke drawBitmapArray with hasAlpha=false. Revert the change
made as we have no need to support colorspaces in this
deprecated API

Change-Id: If858fad870faee33cc32e3361d0869351f6b0857
Fixes: 77310904
Test: sample app in bug
parent ae202c6f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -448,8 +448,9 @@ static void drawBitmapArray(JNIEnv* env, jobject, jlong canvasHandle,
                            jboolean hasAlpha, jlong paintHandle) {
    // Note: If hasAlpha is false, kRGB_565_SkColorType will be used, which will
    // correct the alphaType to kOpaque_SkAlphaType.
    SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType,
            GraphicsJNI::defaultColorSpace());
    SkImageInfo info = SkImageInfo::Make(width, height,
                           hasAlpha ? kN32_SkColorType : kRGB_565_SkColorType,
                           kPremul_SkAlphaType);
    SkBitmap bitmap;
    bitmap.setInfo(info);
    sk_sp<Bitmap> androidBitmap = Bitmap::allocateHeapBitmap(&bitmap);