mirror of
https://github.com/mihonapp/mihon.git
synced 2025-04-09 07:08:44 +00:00
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:
parent
701a77a2d7
commit
541a29099e
1 changed files with 2 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue