Deem images safe if they're within the view dimensions

Some pages present flickering due to having dimensions that surpass those calculated in SubsamplingScaleImageView.
This commit is contained in:
Raikuha 2024-11-05 02:06:21 -03:00 committed by GitHub
parent 701a77a2d7
commit 541a29099e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,14 +50,13 @@ class TachiyomiImageDecoder(private val resources: ImageSource, private val opti
decoder.recycle()
check(bitmap != null) { "Failed to decode image" }
if (
options.bitmapConfig == Bitmap.Config.HARDWARE &&
maxOf(bitmap.width, bitmap.height) <= GLUtil.maxTextureSize
) {
if (
bitmap.height*1.1 <= GLUtil.maxTextureSize &&
bitmap.width < 1100 || !fallbackForLongStrips
!fallbackForLongStrips || bitmap.width < dstWidth && bitmap.height*1.1 <= GLUtil.maxTextureSize
) {
val hwBitmap = bitmap.copy(Bitmap.Config.HARDWARE, false)
if (hwBitmap != null) {