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

Commit 70355ec3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove use of SkBitmap::copyTo()"

parents 2541b1c3 1350a5f4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1504,7 +1504,11 @@ static void nativeSetCustomPointerIcon(JNIEnv* env, jclass /* clazz */,
    }

    SpriteIcon spriteIcon;
    pointerIcon.bitmap.copyTo(&spriteIcon.bitmap, kN32_SkColorType);
    SkImageInfo spriteInfo = pointerIcon.bitmap.info().makeColorType(kN32_SkColorType);
    if (spriteIcon.bitmap.tryAllocPixels(spriteInfo)) {
        pointerIcon.bitmap.readPixels(spriteInfo, spriteIcon.bitmap.getPixels(),
                spriteIcon.bitmap.rowBytes(), 0, 0);
    }
    spriteIcon.hotSpotX = pointerIcon.hotSpotX;
    spriteIcon.hotSpotY = pointerIcon.hotSpotY;
    im->setCustomPointerIcon(spriteIcon);