revert: "feat: Use coil pipeline if bitmap did not exceed texture max size"

This reverts commit f851c585a7.
This commit is contained in:
Ahmad Ansori Palembani 2024-05-25 13:55:22 +07:00
parent f851c585a7
commit adc513bbd9
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.ui.reader.viewer
import android.app.Activity
import android.content.Context
import android.graphics.BitmapFactory
import android.graphics.PointF
import android.graphics.drawable.Animatable
import android.graphics.drawable.BitmapDrawable
@ -225,16 +224,7 @@ open class ReaderPageImageView @JvmOverloads constructor(
},
)
var useCoilPipeline = false
if (isWebtoon && data is InputStream) {
val opts = BitmapFactory.Options()
opts.inJustDecodeBounds = true
val bitmap = BitmapFactory.decodeStream(data, null, opts)
if (bitmap != null)
useCoilPipeline = bitmap.width <= GLUtil.maxTextureSize && bitmap.height <= GLUtil.maxTextureSize
}
val useCoilPipeline = false // FIXME: "Bitmap too large to be uploaded into a texture"
if (isWebtoon && useCoilPipeline) {
val request = ImageRequest.Builder(context)
.data(data)