From 52e1e93f9d8c7048d1f6fb822a1a7fc8c4f3ceea Mon Sep 17 00:00:00 2001 From: len Date: Fri, 28 Oct 2016 19:26:47 +0200 Subject: [PATCH] Added another image decoder. It should be faster than Rapid and more reliable than Skia. --- app/build.gradle | 4 ++-- .../tachiyomi/ui/reader/viewer/base/BaseReader.kt | 13 +++++++++++-- app/src/main/res/values-es/strings.xml | 2 -- app/src/main/res/values-pt/strings.xml | 2 -- app/src/main/res/values/arrays.xml | 6 ++++-- app/src/main/res/values/strings.xml | 2 -- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 352969657b..4af28c2dda 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -93,7 +93,7 @@ android { dependencies { // Modified dependencies - compile 'com.github.inorichi:subsampling-scale-image-view:a2a14ef' + compile 'com.github.inorichi:subsampling-scale-image-view:96d2c7f' compile 'com.github.inorichi:ReactiveNetwork:69092ed' // Android support library @@ -108,7 +108,7 @@ dependencies { compile 'com.android.support:multidex:1.0.1' - compile 'com.google.android.gms:play-services-gcm:9.6.1' + compile 'com.google.android.gms:play-services-gcm:9.8.0' // ReactiveX compile 'io.reactivex:rxandroid:1.2.1' diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt index 411c495198..7ec34b4061 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt @@ -24,6 +24,11 @@ abstract class BaseReader : BaseFragment() { * Skia decoder. */ const val SKIA_DECODER = 1 + + /** + * Image decoder. + */ + const val IMAGE_DECODER = 2 } /** @@ -201,12 +206,16 @@ abstract class BaseReader : BaseFragment() { fun setDecoderClass(value: Int) { when (value) { RAPID_DECODER -> { - regionDecoderClass = RapidImageRegionDecoder::class.java bitmapDecoderClass = RapidImageDecoder::class.java + regionDecoderClass = RapidImageRegionDecoder::class.java } SKIA_DECODER -> { - regionDecoderClass = SkiaImageRegionDecoder::class.java bitmapDecoderClass = SkiaImageDecoder::class.java + regionDecoderClass = SkiaImageRegionDecoder::class.java + } + IMAGE_DECODER -> { + bitmapDecoderClass = IImageDecoder::class.java + regionDecoderClass = IImageRegionDecoder::class.java } } } diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 553e0a232b..171fa27850 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -114,8 +114,6 @@ Vertical Webtoon Decodificador de imagen - Rapid - Skia Tipo de escalado Ajustar a la pantalla Estirado diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index e4eee38cfe..f0f8973eb9 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -119,8 +119,6 @@ Vertical Webtoon Descodificador de imagem - Rapid - Skia Tipo de escala Ajustar ao ecrã Esticar diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 1b61924f6e..100ebec7f6 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -67,13 +67,15 @@ - @string/rapid_decoder - @string/skia_decoder + Rapid + Skia + Image 0 1 + 2 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 91b4af0914..89900da3ca 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -123,8 +123,6 @@ Vertical Webtoon Image decoder - Rapid - Skia Scale type Fit screen Stretch