From 541a29099e6089f69befdc83ab0358eb9c6be083 Mon Sep 17 00:00:00 2001 From: Raikuha <65867276+Raikuha@users.noreply.github.com> Date: Tue, 5 Nov 2024 02:06:21 -0300 Subject: [PATCH] Deem images safe if they're within the view dimensions Some pages present flickering due to having dimensions that surpass those calculated in SubsamplingScaleImageView. --- .../eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt b/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt index 38fc5d075..57a2eea36 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt @@ -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) {