mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Don't recycle scaled bitmap if it's the same one
This commit is contained in:
@@ -199,7 +199,7 @@ fun Bitmap.scaleDownTo(size: Size, keepOriginal: Boolean = false): Bitmap {
|
||||
if (size.width > width || size.height > height) return this
|
||||
|
||||
val newBitmap = Bitmap.createScaledBitmap(this, size.width, size.height, true)
|
||||
if (!keepOriginal) {
|
||||
if (newBitmap != this && !keepOriginal) {
|
||||
recycle()
|
||||
}
|
||||
return newBitmap
|
||||
|
||||
Reference in New Issue
Block a user