├── .gitignore ├── .travis.yml ├── BlurBenchmark ├── .gitignore ├── build.gradle ├── libs │ └── GraphView-3.1.1.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── at │ │ └── favre │ │ └── app │ │ └── blurbenchmark │ │ ├── BenchmarkStorage.java │ │ ├── BlurBenchmarkTask.java │ │ ├── SettingsController.java │ │ ├── activities │ │ ├── BenchmarkResultActivity.java │ │ ├── DebugActivity.java │ │ └── MainActivity.java │ │ ├── adapter │ │ ├── BenchmarkResultAdapter.java │ │ ├── BenchmarkResultHolder.java │ │ └── ResultTableAdapter.java │ │ ├── blur │ │ ├── BlurKernels.java │ │ ├── EBlurAlgorithm.java │ │ ├── IBlur.java │ │ └── algorithms │ │ │ ├── BoxBlur.java │ │ │ ├── GaussianFastBlur.java │ │ │ ├── RenderScriptBox3x3Blur.java │ │ │ ├── RenderScriptBox5x5Blur.java │ │ │ ├── RenderScriptGaussian5x5Blur.java │ │ │ ├── RenderScriptGaussianBlur.java │ │ │ ├── RenderScriptStackBlur.java │ │ │ ├── StackBlur.java │ │ │ └── SuperFastBlur.java │ │ ├── fragments │ │ ├── BenchmarkDetailsDialog.java │ │ ├── BenchmarkResultFragment.java │ │ ├── BlurBenchmarkFragment.java │ │ ├── IFragmentWithBlurSettings.java │ │ ├── LiveBlurFragment.java │ │ ├── ResultsBrowserFragment.java │ │ ├── ResultsDiagramFragment.java │ │ └── StaticBlurFragment.java │ │ ├── models │ │ ├── BenchmarkImage.java │ │ ├── BenchmarkResultDatabase.java │ │ ├── BenchmarkResultList.java │ │ ├── BenchmarkWrapper.java │ │ ├── ResultTableModel.java │ │ └── StatInfo.java │ │ ├── util │ │ ├── Average.java │ │ ├── BenchmarkUtil.java │ │ ├── BitmapUtil.java │ │ ├── BlurUtil.java │ │ ├── GraphUtil.java │ │ ├── HidingScrollListener.java │ │ ├── JsonUtil.java │ │ ├── StringJoiner.java │ │ └── TranslucentLayoutUtil.java │ │ └── view │ │ └── ObservableScrollView.java │ ├── res │ ├── anim │ │ ├── alpha_fadein.xml │ │ ├── alpha_fadeout.xml │ │ ├── slide_in_from_top.xml │ │ └── slide_out_from_top.xml │ ├── animator │ │ ├── card_flip_left_in.xml │ │ ├── card_flip_left_out.xml │ │ ├── card_flip_right_in.xml │ │ └── card_flip_right_out.xml │ ├── color │ │ └── nav_color_selector.xml │ ├── drawable-hdpi │ │ ├── ic_action_action_view_column.png │ │ ├── ic_action_content_new_picture.png │ │ ├── ic_action_content_remove.png │ │ ├── ic_action_editor_insert_chart.png │ │ ├── ic_action_image_blur_linear.png │ │ ├── ic_action_image_blur_on.png │ │ ├── ic_content_discard.png │ │ ├── ic_fastfwd.png │ │ └── ic_play_circle_outline_white_36dp.png │ ├── drawable-mdpi │ │ ├── benchmark_bg.png │ │ ├── cell_bg.xml │ │ ├── cell_bg_selector.xml │ │ ├── column_header_bg.xml │ │ ├── corner_cell_bg.xml │ │ ├── default_selector.xml │ │ ├── ic_action_action_view_column.png │ │ ├── ic_action_content_new_picture.png │ │ ├── ic_action_content_remove.png │ │ ├── ic_action_editor_insert_chart.png │ │ ├── ic_action_image_blur_linear.png │ │ ├── ic_action_image_blur_on.png │ │ ├── ic_content_discard.png │ │ ├── ic_fastfwd.png │ │ ├── ic_play_circle_outline_white_36dp.png │ │ ├── placeholder.png │ │ ├── row_header_bg.xml │ │ └── spinner_popup_dark.xml │ ├── drawable-nodpi │ │ ├── test_100x100_2.png │ │ ├── test_200x200_2.png │ │ ├── test_300x300_2.png │ │ ├── test_400x400_2.webp │ │ ├── test_500x500_2.webp │ │ └── test_600x600_2.webp │ ├── drawable-xhdpi │ │ ├── ic_action_action_view_column.png │ │ ├── ic_action_collections_view_as_list.png │ │ ├── ic_action_content_new_picture.png │ │ ├── ic_action_content_remove.png │ │ ├── ic_action_editor_insert_chart.png │ │ ├── ic_action_image_blur_linear.png │ │ ├── ic_action_image_blur_on.png │ │ ├── ic_action_list.png │ │ ├── ic_action_picture.png │ │ ├── ic_action_settings.png │ │ ├── ic_content_discard.png │ │ ├── ic_fastfwd.png │ │ └── ic_play_circle_outline_white_36dp.png │ ├── drawable-xxhdpi │ │ ├── ic_action_action_view_column.png │ │ ├── ic_action_collections_view_as_list.png │ │ ├── ic_action_content_new_picture.png │ │ ├── ic_action_content_remove.png │ │ ├── ic_action_editor_insert_chart.png │ │ ├── ic_action_image_blur_linear.png │ │ ├── ic_action_image_blur_on.png │ │ ├── ic_content_discard.png │ │ ├── ic_fastfwd.png │ │ ├── ic_play_circle_outline_white_36dp.png │ │ ├── mask.png │ │ ├── photo1.webp │ │ ├── photo1_med.webp │ │ ├── photo2_med.webp │ │ ├── photo3_med.webp │ │ └── photo4_med.webp │ ├── drawable-xxxhdpi │ │ ├── ic_action_action_view_column.png │ │ ├── ic_action_content_new_picture.png │ │ ├── ic_action_content_remove.png │ │ ├── ic_action_editor_insert_chart.png │ │ ├── ic_action_image_blur_linear.png │ │ ├── ic_action_image_blur_on.png │ │ └── ic_play_circle_outline_white_36dp.png │ ├── layout │ │ ├── activity_benchmark_result.xml │ │ ├── activity_main.xml │ │ ├── dialog_benchmark_details.xml │ │ ├── fragment_bechmark_settings.xml │ │ ├── fragment_benchmark_results.xml │ │ ├── fragment_liveblur.xml │ │ ├── fragment_resultbrowser.xml │ │ ├── fragment_resultsdiagram.xml │ │ ├── fragment_staticblur.xml │ │ ├── inc_algorithm_checkbox.xml │ │ ├── inc_custom_img.xml │ │ ├── inc_debugview.xml │ │ ├── inc_listview.xml │ │ ├── inc_nav_drawer.xml │ │ ├── inc_result_cell.xml │ │ ├── inc_result_column_header.xml │ │ ├── inc_result_row_header.xml │ │ ├── inc_scrollview.xml │ │ ├── inc_settings.xml │ │ ├── inc_spinner_light.xml │ │ ├── inc_toolbar.xml │ │ ├── list_benchmark_header.xml │ │ ├── list_benchmark_result.xml │ │ └── list_nav_item.xml │ ├── menu │ │ ├── dawer_menu.xml │ │ ├── main_menu.xml │ │ └── results_menu.xml │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ ├── values-v21 │ │ ├── colors.xml │ │ └── styles.xml │ └── values │ │ ├── colors.xml │ │ ├── config.xml │ │ ├── dimen.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── rs │ ├── contrast.rs │ ├── ip.rsh │ └── stackblur.rs ├── CHANGELOG ├── LICENSE ├── README.md ├── build.gradle ├── credentials.tar.enc ├── gradle.properties ├── gradle ├── common-build.gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── misc ├── blur_icon.psd ├── blur_icon2.psd ├── ic_launcher.png ├── playstore_badge_new.png └── readme │ ├── readme_screen01.png │ ├── readme_screen02.png │ ├── readme_screen03.png │ ├── readme_screen04.png │ ├── readme_screen05.png │ └── readme_screen06.png ├── ne10blur ├── build.gradle └── src │ └── main │ ├── .gitignore │ ├── AndroidManifest.xml │ ├── java │ └── ru0xdc │ │ └── ne10 │ │ └── Blur.java │ └── jni │ ├── Android.mk │ ├── Application.mk │ ├── NE10_boxfilter.c │ ├── NE10_boxfilter_neon.c │ ├── NE10_macros.h │ ├── NE10_types.h │ └── blur.c ├── settings.gradle └── tablefixedheader ├── .gitignore ├── build.gradle ├── proguard-rules.txt └── src └── main ├── AndroidManifest.xml ├── java └── com │ └── inqbarna │ └── tablefixheaders │ ├── Recycler.java │ ├── TableFixHeaders.java │ └── adapters │ ├── BaseTableAdapter.java │ └── TableAdapter.java └── res ├── drawable-mdpi ├── shadow_bottom.xml ├── shadow_left.xml ├── shadow_right.xml └── shadow_top.xml └── values ├── colors.xml ├── dimens.xml ├── ids.xml └── strings.xml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .settings 3 | .metadata 4 | bin 5 | gen 6 | NewFile.* 7 | lint.xml 8 | local.properties 9 | app.properties 10 | junit-report.xml 11 | build 12 | target 13 | 14 | *.dex 15 | *.apk 16 | *.ap_ 17 | *.class 18 | 19 | out 20 | proguard 21 | /RemoteSystemsTempFiles 22 | .gradle 23 | Thumbs.db 24 | 25 | # ignored intellij 26 | .idea 27 | *.iml 28 | *.ipr 29 | 30 | 31 | # Eclipse project files 32 | .classpath 33 | .project 34 | 35 | signing.properties 36 | /*.tar -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Possible Issues: 2 | # 3 | # .gradlw permission denied: 4 | # git update-index --chmod=+x gradlew //http://stackoverflow.com/questions/33820638/travis-yml-gradlew-permission-denied 5 | 6 | language: android 7 | dist: trusty 8 | 9 | android: 10 | components: 11 | - tools # to get the new `repository-11.xml` 12 | - platform-tools 13 | - tools # to install Android SDK tools 25.1.x (x = 6 right now) 14 | - build-tools-29.0.2 15 | - android-29 16 | - extra-google-m2repository 17 | - extra-android-m2repository 18 | 19 | licenses: 20 | - 'android-sdk-preview-license-.+' 21 | - 'android-sdk-license-.+' 22 | - 'google-gdk-license-.+' 23 | 24 | 25 | before_install: 26 | - openssl aes-256-cbc -K $encrypted_600b0ce86913_key -iv $encrypted_600b0ce86913_iv -in credentials.tar.enc -out credentials.tar -d 27 | - tar xvf credentials.tar 28 | 29 | script: 30 | - ./gradlew clean 31 | - ./gradlew assemble --stacktrace 32 | - ./gradlew lint --stacktrace 33 | 34 | deploy: 35 | - provider: releases 36 | api_key: 37 | secure: "uAYry0oy46Tye7xoS6dvlCX8EoI/i7o3vKYAV5XvFlqSN6JUH6aryXVEs9+rQeEMMchyDyNyIG2LbVocVHpt3y2eqElCNToVj6zx/MuG9IbElhfjroVOSc703iFfE3zbSYrVM9whncBwSF18e1aZdAmNDouAYNaUXf5h6uU9KB7aZwIOIgxxha3NK9/vXKjweYFAfUaQajrKsQq9HvZXPGCWpkPsiNaD90BH2IjKd7NTwzXBFnU/6g7zM4UDyUaFb2+l7+rFFOVo4jsxYDeAVc2bfQudKQCszFO0/wucX7Mi2dTXtEMNAAWaqLXzhvnFIY98xdeNSknamv8fioZ9xA38ANWPv26XN2ijUBrbjo69MZZ3uDL77piUjgqINI3haS7UEXkBtm3p2qS2PCbT20Py6F5J5psLK6cmiEdVitvAFPoWF5IHHNw0BuhPuZZN/23LzDr2N86rxH5qObfix0+6K50MU8AokX0Z0EI5us65l4F1Q0U+xtsjl6h0ZUx7qs//tosyXUReHMYHwuMb79RJ9aetj2gBJLorFiYN9Sp+H4HNzTyQxiTiwyALkQBf8fimK4Eywb78OxU2wxZetVMkv2I/G2Wg+aErU74peMTnj0ZYcnZglGmmo1V/wBO3n+LPH28NAuzlGAQjHz/S5uyvgjxk6O3DFfHmYW91Eu4=" 38 | file_glob: true 39 | file: 40 | - 'BlurBenchmark/build/outputs/apk/release/BlurBenchmark-release*.apk' 41 | skip_cleanup: true 42 | on: 43 | branch: master 44 | tags: true 45 | 46 | before_cache: 47 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock 48 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ 49 | 50 | cache: 51 | directories: 52 | - $HOME/.gradle/caches/ 53 | - $HOME/.gradle/wrapper/ 54 | - $HOME/.android/build-cache 55 | 56 | notifications: 57 | slack: 58 | secure: "pbRymMs5bhpPxLPRLVZ4hpISCvJhfFn60p27X/P82TUUqA3akLlRqt8zsPBgkANi8ViSJLPqb5EpvpjeVCW1sv6oOCKbgZKXOsnEIFIRkJqXFW3HAxOT2WkbeQNq/bo42e9Ok4WTbBPcnGRv6Lm0jSEgaL/1iPL22GVsfN489PwKymso63LppOjmXpl1KEjwYbsAQIhM3EJ+05P/hyE6J6QCyuO2HaR2PkqaOW8RwPYC+BConJndwShrK6YbWOwrukhUOjUajR1lYZ0Bgc2hQGrniqRyaxXKNP1waT2qjBVCvR+iPkIwEimeGznXV9AEfDHcSb4JYNJhczKW04f+wtqCwSOcOAxrXP16asy+qH9jJ28vrxVJ45VM2ppzgLGHamgudzM8yD4QH1oDDgB1+dmZwqhB+ZDhUPxDpkdjGkvTPVJa/+ZB6D2rKrg3AOxeeu4W+yzVupJkrkMyDcMhBgge2RVEfRrvud2Tuf4mv1F9ivK7sU0FXqtNF2O7ET8ihMhmBi2sOCq3jie4D3wARxFcfiKEOY1lQR6x4Qva5hN2fKPPMYqEPZQz7IzH96EILS+fpfJhyCe0BVFZfC1mK1+tUwErjzVNVCL2xp9eixy8tumob0FOPbOcMUbbxyrH8PY9wBLWyJh03O5epCT73jPwxslFdH8k9OLd4DWAD6k=" 59 | email: false 60 | -------------------------------------------------------------------------------- /BlurBenchmark/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /BlurBenchmark/build.gradle: -------------------------------------------------------------------------------- 1 | Properties localProps = getSigningProperties() 2 | 3 | apply plugin: 'com.android.application' 4 | 5 | android { 6 | compileSdkVersion rootProject.ext.compileSdkVersion 7 | buildToolsVersion rootProject.ext.buildToolsVersion 8 | 9 | signingConfigs { 10 | release { 11 | storeFile file(localProps.getProperty('RELEASE_KEYSTORE_PATH','fillhere')) 12 | storePassword localProps.getProperty('RELEASE_KEYSTORE_PW','') 13 | keyAlias localProps.getProperty('RELEASE_KEY_ALIAS','') 14 | keyPassword localProps.getProperty('RELEASE_KEY_PW','') 15 | } 16 | } 17 | 18 | defaultConfig { 19 | minSdkVersion rootProject.ext.minSdkVersion 20 | targetSdkVersion rootProject.ext.targetSdkVersion 21 | versionCode rootProject.ext.versionCode 22 | versionName rootProject.ext.versionName 23 | renderscriptTargetApi 20 24 | renderscriptSupportModeEnabled true 25 | 26 | buildConfigField "String", "GIT_REV", "\"" + getGitRev() + "\"" 27 | buildConfigField "String", "GIT_BRANCH", "\"" + getGitBranch() + "\"" 28 | buildConfigField "String", "GIT_DATE", "\"" + getGitCommitDate() + "\"" 29 | buildConfigField "String", "BUILD_NUMBER", "\"" + getCiBuildNumber() + "\"" 30 | buildConfigField "String", "BUILD_DATE", "\"" + getBuildTime() + "\"" 31 | buildConfigField "boolean", "IS_CI_BUILD", "${isCiBuild()}" 32 | // ndk { 33 | // moduleName "libblur" 34 | // cFlags "-fvisibility=hidden -W -Wall -ffast-math -O3 -funroll-loops" 35 | // ldLibs "log", "jnigraphics" 36 | // } 37 | 38 | ndkVersion "21.3.6528147" 39 | ndk { 40 | abiFilters 'arm64-v8a', 'x86_64', "x86", "armeabi-v7a" 41 | } 42 | } 43 | 44 | buildTypes { 45 | debug { 46 | applicationIdSuffix '.debug' 47 | minifyEnabled false 48 | //jniDebuggable true 49 | } 50 | release { 51 | minifyEnabled true 52 | proguardFiles getDefaultProguardFile("proguard-android.txt"), 'proguard-rules.pro' 53 | signingConfig signingConfigs.release 54 | } 55 | } 56 | 57 | packagingOptions { 58 | exclude 'META-INF/NOTICE' 59 | exclude 'META-INF/LICENSE' 60 | } 61 | 62 | lintOptions { 63 | abortOnError false 64 | } 65 | 66 | applicationVariants.all { variant -> 67 | variant.outputs.all { 68 | outputFileName = "${project.name}-${variant.name}-${variant.versionName}.apk" 69 | } 70 | } 71 | } 72 | 73 | dependencies { 74 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 75 | implementation 'androidx.annotation:annotation:1.1.0' 76 | implementation 'androidx.legacy:legacy-support-v13:1.0.0' 77 | implementation 'androidx.appcompat:appcompat:1.1.0' 78 | implementation 'androidx.cardview:cardview:1.0.0' 79 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 80 | implementation 'com.google.android.material:material:1.1.0' 81 | 82 | implementation 'com.squareup.picasso:picasso:2.5.2' 83 | 84 | implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.2' 85 | implementation 'com.fasterxml.jackson.core:jackson-core:2.9.2' 86 | implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.2' 87 | 88 | implementation('at.favre.lib.hood:hood-extended:0.7.0') 89 | 90 | implementation project(':tablefixedheader') 91 | // compile project(':paralloid') 92 | // compile project(':ne10blur') 93 | implementation fileTree(dir: 'libs', include: ['*.jar']) 94 | } 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /BlurBenchmark/libs/GraphView-3.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/libs/GraphView-3.1.1.jar -------------------------------------------------------------------------------- /BlurBenchmark/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:/Program Files/android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the ProGuard 5 | # include property in project.properties. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | 20 | #keep jackson 21 | -keepnames class com.fasterxml.jackson.** { *; } 22 | -dontwarn com.fasterxml.jackson.databind.** 23 | 24 | #keep picasso 25 | -keep class com.jjoe64.** { *; } 26 | -keep interface com.jjoe64.** { *; } 27 | 28 | #keep picasso 29 | -keep class com.squareup.** { *; } 30 | -keep interface com.squareup.** { *; } 31 | -dontwarn com.squareup.okhttp.** 32 | 33 | #keep renderscript 34 | -keep class androidx.renderscript.** { 35 | native ; 36 | } 37 | 38 | -keep class at.favre.app.blurbenchmark.models.** {*;} 39 | -keep class at.favre.app.blurbenchmark.blur.** {*;} 40 | 41 | #-keep interface at.favre.app.** {*;} 42 | #-keep interface at.favre.app.** {*;} 43 | 44 | # get rid of the logging stuff 45 | -assumenosideeffects class android.util.Log { 46 | public static int v(...); 47 | public static int d(...); 48 | } 49 | 50 | -keep public class at.favre.app.blurbenchmark.BuildConfig {public static *;} 51 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/BenchmarkStorage.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.os.AsyncTask; 6 | import android.util.Log; 7 | 8 | import java.io.File; 9 | import java.util.List; 10 | 11 | import at.favre.app.blurbenchmark.models.BenchmarkResultDatabase; 12 | import at.favre.app.blurbenchmark.models.BenchmarkWrapper; 13 | import at.favre.app.blurbenchmark.util.BitmapUtil; 14 | import at.favre.app.blurbenchmark.util.JsonUtil; 15 | 16 | /** 17 | * This is responsible for storeing and retrieving the benchmark data. 18 | * As of now, this is a hack, since it stores the data in json format in 19 | * the shared preference and loads it as a whole in memory. This 20 | * appoach was used because it is easier to implement than a sophisticated 21 | * DB solution. 22 | * 23 | * @author pfavre 24 | */ 25 | public class BenchmarkStorage { 26 | private static final String TAG = BenchmarkStorage.class.getSimpleName(); 27 | private static final String PREF_NAME = "at.favre.app.blurbenchmark.sharedpref"; 28 | private static final String PREF_RESULTS = "results"; 29 | private static final int MAX_SAVED_BENCHMARKS = 3; 30 | 31 | private static BenchmarkStorage ourInstance; 32 | 33 | public static BenchmarkStorage getInstance(Context ctx) { 34 | if (ourInstance == null) { 35 | ourInstance = new BenchmarkStorage(ctx); 36 | } 37 | return ourInstance; 38 | } 39 | 40 | private BenchmarkStorage(Context ctx) { 41 | this.ctx = ctx; 42 | } 43 | 44 | private BenchmarkResultDatabase db; 45 | private Context ctx; 46 | 47 | private void resetCache() { 48 | db = null; 49 | } 50 | 51 | public void saveTest(final List wrapperList) { 52 | new AsyncTask() { 53 | @Override 54 | protected Void doInBackground(Void... voids) { 55 | // Restore preferences 56 | SharedPreferences settings = ctx.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); 57 | String resultsString = settings.getString(PREF_RESULTS, null); 58 | BenchmarkResultDatabase db; 59 | 60 | if (resultsString == null) { 61 | db = new BenchmarkResultDatabase(); 62 | } else { 63 | db = JsonUtil.fromJsonString(resultsString, BenchmarkResultDatabase.class); 64 | } 65 | 66 | for (BenchmarkWrapper benchmarkWrapper : wrapperList) { 67 | if (!benchmarkWrapper.getStatInfo().isError()) { 68 | BenchmarkResultDatabase.BenchmarkEntry benchmarkEntry = new BenchmarkResultDatabase.BenchmarkEntry(benchmarkWrapper); 69 | if (db.getEntryList().contains(benchmarkEntry)) { 70 | db.getEntryList().get(db.getEntryList().indexOf(benchmarkEntry)).getWrapper().add(benchmarkWrapper); 71 | } else { 72 | while (benchmarkEntry.getWrapper().size() > MAX_SAVED_BENCHMARKS) { 73 | benchmarkEntry.getWrapper().remove(0); 74 | } 75 | 76 | benchmarkEntry.getWrapper().add(benchmarkWrapper); 77 | db.getEntryList().add(benchmarkEntry); 78 | } 79 | } 80 | } 81 | 82 | settings.edit().putString(PREF_RESULTS, JsonUtil.toJsonString(db)).commit(); 83 | resetCache(); 84 | return null; 85 | } 86 | }.execute(); 87 | 88 | } 89 | 90 | public void deleteData() { 91 | SharedPreferences settings = ctx.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); 92 | settings.edit().putString(PREF_RESULTS, JsonUtil.toJsonString(new BenchmarkResultDatabase())).commit(); 93 | BitmapUtil.clearCacheDir(new File(BitmapUtil.getCacheDir(ctx))); 94 | resetCache(); 95 | } 96 | 97 | public BenchmarkResultDatabase loadResultsDB() { 98 | if (db == null) { 99 | Log.d(TAG, "start load db"); 100 | SharedPreferences settings = ctx.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); 101 | String resultsString = settings.getString(PREF_RESULTS, null); 102 | if (resultsString != null) { 103 | db = JsonUtil.fromJsonString(resultsString, BenchmarkResultDatabase.class); 104 | Log.d(TAG, "done load db"); 105 | } else { 106 | Log.d(TAG, "done load db"); 107 | } 108 | } 109 | return db; 110 | } 111 | 112 | public static class AsyncLoadResults extends AsyncTask { 113 | @Override 114 | protected BenchmarkResultDatabase doInBackground(Context... ctx) { 115 | return BenchmarkStorage.getInstance(ctx[0]).loadResultsDB(); 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/activities/BenchmarkResultActivity.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.activities; 2 | 3 | import android.app.ActivityManager; 4 | import android.app.FragmentTransaction; 5 | import android.graphics.BitmapFactory; 6 | import android.os.Build; 7 | import android.os.Bundle; 8 | import android.view.MenuItem; 9 | 10 | import androidx.appcompat.app.AppCompatActivity; 11 | import androidx.appcompat.widget.Toolbar; 12 | import androidx.core.app.NavUtils; 13 | 14 | import at.favre.app.blurbenchmark.R; 15 | import at.favre.app.blurbenchmark.fragments.BenchmarkResultFragment; 16 | import at.favre.app.blurbenchmark.models.BenchmarkResultList; 17 | import at.favre.app.blurbenchmark.util.JsonUtil; 18 | 19 | /** 20 | * Created by PatrickF on 16.04.2014. 21 | */ 22 | public class BenchmarkResultActivity extends AppCompatActivity { 23 | public static final String BENCHMARK_LIST_KEY = "benchmark_list"; 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | 29 | setContentView(R.layout.activity_benchmark_result); 30 | 31 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 32 | setTaskDescription(new ActivityManager.TaskDescription(getString(R.string.app_name), BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher), getResources().getColor(R.color.color_primary_dark))); 33 | } 34 | 35 | if (savedInstanceState == null) { 36 | FragmentTransaction t = getFragmentManager().beginTransaction(); 37 | t.add(R.id.root, BenchmarkResultFragment.createInstance(JsonUtil.fromJsonString(getIntent().getStringExtra(BENCHMARK_LIST_KEY), BenchmarkResultList.class)), BenchmarkResultFragment.class.getSimpleName()); 38 | t.commit(); 39 | } 40 | } 41 | 42 | @Override 43 | protected void onResume() { 44 | super.onResume(); 45 | 46 | if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) { 47 | findViewById(R.id.root).requestLayout(); 48 | findViewById(R.id.root).invalidate(); 49 | } 50 | } 51 | 52 | @Override 53 | public boolean onOptionsItemSelected(MenuItem item) { 54 | switch (item.getItemId()) { 55 | case android.R.id.home: 56 | if (Build.VERSION.SDK_INT >= 16) { 57 | NavUtils.navigateUpFromSameTask(this); 58 | } else { 59 | finish(); 60 | } 61 | return true; 62 | } 63 | return super.onOptionsItemSelected(item); 64 | } 65 | 66 | public void setupToolbar(Toolbar toolbar) { 67 | setSupportActionBar(toolbar); 68 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 69 | getSupportActionBar().setTitle("Benchmark Results"); 70 | getSupportActionBar().setElevation(getResources().getDimension(R.dimen.toolbar_elevation)); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/activities/DebugActivity.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.activities; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import at.favre.app.blurbenchmark.BuildConfig; 6 | import at.favre.lib.hood.extended.PopHoodActivity; 7 | import at.favre.lib.hood.interfaces.Config; 8 | import at.favre.lib.hood.interfaces.Page; 9 | import at.favre.lib.hood.interfaces.Pages; 10 | import at.favre.lib.hood.util.PackageInfoAssembler; 11 | import at.favre.lib.hood.util.defaults.DefaultProperties; 12 | 13 | public class DebugActivity extends PopHoodActivity { 14 | @NonNull 15 | @Override 16 | public Pages getPageData(@NonNull Pages pages) { 17 | Page page = pages.addNewPage(); 18 | page.add(DefaultProperties.createSectionSourceControlAndCI(BuildConfig.GIT_REV, BuildConfig.GIT_BRANCH, BuildConfig.GIT_DATE, BuildConfig.BUILD_NUMBER, null, BuildConfig.BUILD_DATE)); 19 | page.add(DefaultProperties.createSectionBasicDeviceInfo()); 20 | page.add(DefaultProperties.createDetailedDeviceInfo(this)); 21 | page.add(DefaultProperties.createSectionAppVersionInfoFromBuildConfig(BuildConfig.class)); 22 | page.add(new PackageInfoAssembler(PackageInfoAssembler.Type.PERMISSIONS, 23 | PackageInfoAssembler.Type.SIGNATURE, 24 | PackageInfoAssembler.Type.USES_FEATURE).createSection(this)); 25 | 26 | return pages; 27 | } 28 | 29 | @NonNull 30 | @Override 31 | public Config getConfig() { 32 | return Config.newBuilder().setShowZebra(false).build(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/adapter/BenchmarkResultAdapter.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.adapter; 2 | 3 | import android.app.FragmentManager; 4 | import android.content.Context; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | import androidx.recyclerview.widget.RecyclerView; 10 | 11 | import java.util.List; 12 | 13 | import at.favre.app.blurbenchmark.R; 14 | import at.favre.app.blurbenchmark.models.BenchmarkWrapper; 15 | 16 | /** 17 | * Created by PatrickF on 25.05.2015. 18 | */ 19 | public class BenchmarkResultAdapter extends RecyclerView.Adapter { 20 | 21 | private List results; 22 | private FragmentManager fragmentManager; 23 | 24 | public BenchmarkResultAdapter(List results, FragmentManager fragmentManager) { 25 | this.results = results; 26 | this.fragmentManager = fragmentManager; 27 | } 28 | 29 | @Override 30 | public BenchmarkResultHolder onCreateViewHolder(ViewGroup viewGroup, int i) { 31 | LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); 32 | View convertView = inflater.inflate(R.layout.list_benchmark_result, viewGroup, false); 33 | return new BenchmarkResultHolder(convertView, fragmentManager); 34 | } 35 | 36 | @Override 37 | public void onBindViewHolder(BenchmarkResultHolder benchmarkResultHolder, int i) { 38 | benchmarkResultHolder.onBind(results.get(i)); 39 | } 40 | 41 | @Override 42 | public int getItemCount() { 43 | return results.size(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/adapter/ResultTableAdapter.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.adapter; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.TextView; 8 | 9 | import androidx.appcompat.app.AppCompatActivity; 10 | 11 | import com.inqbarna.tablefixheaders.adapters.BaseTableAdapter; 12 | 13 | import at.favre.app.blurbenchmark.R; 14 | import at.favre.app.blurbenchmark.activities.MainActivity; 15 | import at.favre.app.blurbenchmark.fragments.BenchmarkDetailsDialog; 16 | import at.favre.app.blurbenchmark.models.BenchmarkResultDatabase; 17 | import at.favre.app.blurbenchmark.models.ResultTableModel; 18 | 19 | /** 20 | * Created by PatrickF on 18.04.2014. 21 | */ 22 | public class ResultTableAdapter extends BaseTableAdapter { 23 | 24 | private ResultTableModel model; 25 | private ResultTableModel.DataType dataType; 26 | private Context ctx; 27 | 28 | public ResultTableAdapter(Context ctx, BenchmarkResultDatabase db, ResultTableModel.DataType dataType) { 29 | this.dataType = dataType; 30 | model = new ResultTableModel(db); 31 | this.ctx = ctx; 32 | } 33 | 34 | @Override 35 | public int getRowCount() { 36 | return model.getRows().size(); 37 | } 38 | 39 | @Override 40 | public int getColumnCount() { 41 | return model.getColumns().size(); 42 | } 43 | 44 | @Override 45 | public View getView(int row, int column, View convertView, ViewGroup parent) { 46 | int viewType = getItemViewType(row, column); 47 | 48 | if (convertView == null) { 49 | LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 50 | int layoutId; 51 | 52 | switch (viewType) { 53 | case 0: 54 | layoutId = R.layout.inc_result_column_header; 55 | break; 56 | case 1: 57 | layoutId = R.layout.inc_result_row_header; 58 | break; 59 | case 2: 60 | layoutId = R.layout.inc_result_cell; 61 | break; 62 | default: 63 | throw new IllegalArgumentException("Could not get layout for table cell"); 64 | } 65 | convertView = inflater.inflate(layoutId, parent, false); 66 | } 67 | convertView.setOnClickListener(null); 68 | if (viewType == 2) { 69 | switch (model.getRelativeType(row, column, dataType, dataType.isMinIsBest())) { 70 | case BEST: 71 | ((TextView) convertView.findViewById(R.id.text)).setTextColor(ctx.getResources().getColor(R.color.graphBgGreen)); 72 | break; 73 | case WORST: 74 | ((TextView) convertView.findViewById(R.id.text)).setTextColor(ctx.getResources().getColor(R.color.graphBgRed)); 75 | break; 76 | default: 77 | ((TextView) convertView.findViewById(R.id.text)).setTextColor(ctx.getResources().getColor(R.color.tableCellTextColor)); 78 | break; 79 | } 80 | BenchmarkResultDatabase.BenchmarkEntry value = model.getCell(row, column); 81 | convertView.setTag(value); 82 | if (BenchmarkResultDatabase.getRecentWrapper(value) != null) { 83 | convertView.setOnClickListener(new View.OnClickListener() { 84 | @Override 85 | public void onClick(View view) { 86 | BenchmarkDetailsDialog dialog = BenchmarkDetailsDialog.createInstance(BenchmarkResultDatabase.getRecentWrapper((BenchmarkResultDatabase.BenchmarkEntry) view.getTag())); 87 | dialog.show(((AppCompatActivity) ctx).getFragmentManager(), MainActivity.DIALOG_TAG); 88 | 89 | } 90 | }); 91 | } 92 | } 93 | 94 | ((TextView) convertView.findViewById(R.id.text)).setText(getText(row, column)); 95 | return convertView; 96 | } 97 | 98 | public String getText(int row, int column) { 99 | if (row < 0 && column < 0) { 100 | return ""; 101 | } else if (row < 0) { 102 | return model.getColumns().get(column); 103 | } else if (column < 0) { 104 | return model.getRows().get(row); 105 | } else { 106 | return model.getValue(row, column, dataType); 107 | } 108 | } 109 | 110 | @Override 111 | public int getWidth(int column) { 112 | if (column < 0) { 113 | return (int) ctx.getResources().getDimension(R.dimen.table_row_header_width); 114 | } else { 115 | return (int) ctx.getResources().getDimension(R.dimen.table_cell_width); 116 | } 117 | } 118 | 119 | @Override 120 | public int getHeight(int row) { 121 | if (row < 0) { 122 | return (int) ctx.getResources().getDimension(R.dimen.table_column_header_height); 123 | } else { 124 | return (int) ctx.getResources().getDimension(R.dimen.table_cell_height); 125 | } 126 | } 127 | 128 | @Override 129 | public int getItemViewType(int row, int column) { 130 | if (row < 0) { 131 | return 0; 132 | } 133 | if (column < 0) { 134 | return 1; 135 | } else { 136 | return 2; 137 | } 138 | } 139 | 140 | @Override 141 | public int getViewTypeCount() { 142 | return 3; 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/BlurKernels.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur; 2 | 3 | /** 4 | * Blur kernels for convolve matrix algorithms 5 | * 6 | * @author pfavre 7 | */ 8 | public interface BlurKernels { 9 | float[] GAUSSIAN_5x5 = new float[]{ 10 | 0.0030f, 0.0133f, 0.0219f, 0.0133f, 0.0030f, 11 | 0.0133f, 0.0596f, 0.0983f, 0.0596f, 0.0133f, 12 | 0.0219f, 0.0983f, 0.1621f, 0.0983f, 0.0219f, 13 | 0.0133f, 0.0596f, 0.0983f, 0.0596f, 0.0133f, 14 | 0.0030f, 0.0133f, 0.0219f, 0.0133f, 0.0030f 15 | }; 16 | 17 | float[] BOX_5x5 = new float[]{ 18 | 0.04f, 0.04f, 0.04f, 0.04f, 0.04f, 19 | 0.04f, 0.04f, 0.04f, 0.04f, 0.04f, 20 | 0.04f, 0.0425f, 0.05f, 0.0425f, 0.04f, 21 | 0.04f, 0.04f, 0.04f, 0.04f, 0.04f, 22 | 0.04f, 0.04f, 0.04f, 0.04f, 0.04f 23 | }; 24 | 25 | float[] BOX_3x3 = new float[]{ 26 | 0.111111111111111111111111112f, 0.111111111111111111111111112f, 0.111111111111111111111111112f, 27 | 0.111111111111111111111111112f, 0.13f, 0.111111111111111111111111112f, 28 | 0.111111111111111111111111112f, 0.111111111111111111111111112f, 0.111111111111111111111111112f 29 | }; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/EBlurAlgorithm.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import at.favre.app.blurbenchmark.R; 7 | 8 | /** 9 | * Enum of all supported algorithms 10 | * 11 | * @author pfavre 12 | */ 13 | public enum EBlurAlgorithm { 14 | RS_GAUSS_FAST(R.color.graphBgGreen), RS_BOX_5x5(R.color.graphBlue), 15 | RS_GAUSS_5x5(R.color.graphBgWhite), RS_STACKBLUR(R.color.graphBgViolet), 16 | // NDK_STACKBLUR(R.color.graphBgOrange), 17 | // NDK_NE10_BOX_BLUR(R.color.graphBgSkyBlue), 18 | STACKBLUR(R.color.graphBgYellow), 19 | GAUSS_FAST(R.color.graphBgRed), BOX_BLUR(R.color.graphBgTurquoise), 20 | SUPER_FAST_BLUR(R.color.graphBgSandyBrown), NONE(R.color.graphBgBlack); 21 | 22 | /** 23 | * Color used in graphs 24 | */ 25 | private final int colorResId; 26 | 27 | EBlurAlgorithm(int colorResId) { 28 | this.colorResId = colorResId; 29 | } 30 | 31 | public int getColorResId() { 32 | return colorResId; 33 | } 34 | 35 | public static List getAllAlgorithms() { 36 | List algorithms = new ArrayList(); 37 | for (EBlurAlgorithm algorithm : values()) { 38 | if (!algorithm.equals(NONE)) { 39 | algorithms.add(algorithm); 40 | } 41 | } 42 | return algorithms; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/IBlur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | /** 6 | * Interface for a blur algorithm 7 | */ 8 | public interface IBlur { 9 | //threshold for live blurring 10 | int MS_THRESHOLD_FOR_SMOOTH = 16; 11 | 12 | /** 13 | * Takes a bitmap and blurs it with the given blur radius. This will NOT copy the original 14 | * but reuses it, so if this instance will be used somewhere else, manual copying is needed. 15 | * 16 | * @param radius blurradius, keep in mind some algorithms don't take all values (e.g. ScriptIntrinsicBlur will only take 1-25) 17 | * @param original 18 | * @return blurred original bitmap 19 | */ 20 | Bitmap blur(int radius, Bitmap original); 21 | } 22 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/BoxBlur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.Canvas; 5 | import android.graphics.Color; 6 | 7 | import at.favre.app.blurbenchmark.blur.IBlur; 8 | 9 | /** 10 | * http://stackoverflow.com/questions/8218438 11 | * by saarraz1 12 | */ 13 | public class BoxBlur implements IBlur { 14 | @Override 15 | public Bitmap blur(int radius, Bitmap bmp) { 16 | assert (radius & 1) == 0 : "Range must be odd."; 17 | 18 | Bitmap blurred = Bitmap.createBitmap(bmp.getWidth(), bmp.getHeight(), 19 | Bitmap.Config.ARGB_8888); 20 | Canvas c = new Canvas(blurred); 21 | 22 | int w = bmp.getWidth(); 23 | int h = bmp.getHeight(); 24 | 25 | int[] pixels = new int[bmp.getWidth() * bmp.getHeight()]; 26 | bmp.getPixels(pixels, 0, w, 0, 0, w, h); 27 | 28 | boxBlurHorizontal(pixels, w, h, radius / 2); 29 | boxBlurVertical(pixels, w, h, radius / 2); 30 | 31 | c.drawBitmap(pixels, 0, w, 0.0F, 0.0F, w, h, true, null); 32 | 33 | return blurred; 34 | } 35 | 36 | private static void boxBlurHorizontal(int[] pixels, int w, int h, 37 | int halfRange) { 38 | int index = 0; 39 | int[] newColors = new int[w]; 40 | 41 | for (int y = 0; y < h; y++) { 42 | int hits = 0; 43 | long r = 0; 44 | long g = 0; 45 | long b = 0; 46 | for (int x = -halfRange; x < w; x++) { 47 | int oldPixel = x - halfRange - 1; 48 | if (oldPixel >= 0) { 49 | int color = pixels[index + oldPixel]; 50 | if (color != 0) { 51 | r -= Color.red(color); 52 | g -= Color.green(color); 53 | b -= Color.blue(color); 54 | } 55 | hits--; 56 | } 57 | 58 | int newPixel = x + halfRange; 59 | if (newPixel < w) { 60 | int color = pixels[index + newPixel]; 61 | if (color != 0) { 62 | r += Color.red(color); 63 | g += Color.green(color); 64 | b += Color.blue(color); 65 | } 66 | hits++; 67 | } 68 | 69 | if (x >= 0) { 70 | newColors[x] = Color.argb(0xFF, (int) (r / hits), (int) (g / hits), (int) (b / hits)); 71 | } 72 | } 73 | 74 | System.arraycopy(newColors, 0, pixels, index + 0, w); 75 | 76 | index += w; 77 | } 78 | } 79 | 80 | private static void boxBlurVertical(int[] pixels, int w, int h, 81 | int halfRange) { 82 | 83 | int[] newColors = new int[h]; 84 | int oldPixelOffset = -(halfRange + 1) * w; 85 | int newPixelOffset = (halfRange) * w; 86 | 87 | for (int x = 0; x < w; x++) { 88 | int hits = 0; 89 | long r = 0; 90 | long g = 0; 91 | long b = 0; 92 | int index = -halfRange * w + x; 93 | for (int y = -halfRange; y < h; y++) { 94 | int oldPixel = y - halfRange - 1; 95 | if (oldPixel >= 0) { 96 | int color = pixels[index + oldPixelOffset]; 97 | if (color != 0) { 98 | r -= Color.red(color); 99 | g -= Color.green(color); 100 | b -= Color.blue(color); 101 | } 102 | hits--; 103 | } 104 | 105 | int newPixel = y + halfRange; 106 | if (newPixel < h) { 107 | int color = pixels[index + newPixelOffset]; 108 | if (color != 0) { 109 | r += Color.red(color); 110 | g += Color.green(color); 111 | b += Color.blue(color); 112 | } 113 | hits++; 114 | } 115 | 116 | if (y >= 0) { 117 | newColors[y] = Color.argb(0xFF, (int) (r / hits), (int) (g / hits), (int) (b / hits)); 118 | } 119 | 120 | index += w; 121 | } 122 | 123 | for (int y = 0; y < h; y++) { 124 | pixels[y * w + x] = newColors[y]; 125 | } 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/GaussianFastBlur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import at.favre.app.blurbenchmark.blur.IBlur; 6 | 7 | /** 8 | * http://stackoverflow.com/a/13436737/774398 9 | * by gordi 10 | */ 11 | public class GaussianFastBlur implements IBlur { 12 | @Override 13 | public Bitmap blur(int radius, Bitmap original) { 14 | int w = original.getWidth(); 15 | int h = original.getHeight(); 16 | int[] pix = new int[w * h]; 17 | original.getPixels(pix, 0, w, 0, 0, w, h); 18 | 19 | for (int r = radius; r >= 1; r /= 2) { 20 | for (int i = r; i < h - r; i++) { 21 | for (int j = r; j < w - r; j++) { 22 | int tl = pix[(i - r) * w + j - r]; 23 | int tr = pix[(i - r) * w + j + r]; 24 | int tc = pix[(i - r) * w + j]; 25 | int bl = pix[(i + r) * w + j - r]; 26 | int br = pix[(i + r) * w + j + r]; 27 | int bc = pix[(i + r) * w + j]; 28 | int cl = pix[i * w + j - r]; 29 | int cr = pix[i * w + j + r]; 30 | 31 | pix[(i * w) + j] = 0xFF000000 | 32 | (((tl & 0xFF) + (tr & 0xFF) + (tc & 0xFF) + (bl & 0xFF) + (br & 0xFF) + (bc & 0xFF) + (cl & 0xFF) + (cr & 0xFF)) >> 3) & 0xFF | 33 | (((tl & 0xFF00) + (tr & 0xFF00) + (tc & 0xFF00) + (bl & 0xFF00) + (br & 0xFF00) + (bc & 0xFF00) + (cl & 0xFF00) + (cr & 0xFF00)) >> 3) & 0xFF00 | 34 | (((tl & 0xFF0000) + (tr & 0xFF0000) + (tc & 0xFF0000) + (bl & 0xFF0000) + (br & 0xFF0000) + (bc & 0xFF0000) + (cl & 0xFF0000) + (cr & 0xFF0000)) >> 3) & 0xFF0000; 35 | } 36 | } 37 | } 38 | original.setPixels(pix, 0, w, 0, 0, w, h); 39 | return original; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/RenderScriptBox3x3Blur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import androidx.renderscript.Allocation; 6 | import androidx.renderscript.Element; 7 | import androidx.renderscript.RenderScript; 8 | import androidx.renderscript.ScriptIntrinsicConvolve3x3; 9 | 10 | import at.favre.app.blurbenchmark.blur.BlurKernels; 11 | import at.favre.app.blurbenchmark.blur.IBlur; 12 | 13 | /** 14 | * This is a convolve matrix based blur algorithms powered by Renderscript's ScriptIntrinsicConvolve class. This uses a box kernel. 15 | * Instead of radius it uses passes, so a radius parameter of 16 makes the convolve algorithm applied 16 times onto the image. 16 | */ 17 | public class RenderScriptBox3x3Blur implements IBlur { 18 | private RenderScript rs; 19 | 20 | public RenderScriptBox3x3Blur(RenderScript rs) { 21 | this.rs = rs; 22 | } 23 | 24 | @Override 25 | public Bitmap blur(int radius, Bitmap bitmapOriginal) { 26 | Allocation input = Allocation.createFromBitmap(rs, bitmapOriginal); 27 | final Allocation output = Allocation.createTyped(rs, input.getType()); 28 | final ScriptIntrinsicConvolve3x3 script = ScriptIntrinsicConvolve3x3.create(rs, Element.U8_4(rs)); 29 | script.setCoefficients(BlurKernels.BOX_3x3); 30 | for (int i = 0; i < radius; i++) { 31 | script.setInput(input); 32 | script.forEach(output); 33 | input = output; 34 | } 35 | output.copyTo(bitmapOriginal); 36 | return bitmapOriginal; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/RenderScriptBox5x5Blur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import androidx.renderscript.Allocation; 6 | import androidx.renderscript.Element; 7 | import androidx.renderscript.RenderScript; 8 | import androidx.renderscript.ScriptIntrinsicConvolve5x5; 9 | 10 | import at.favre.app.blurbenchmark.blur.BlurKernels; 11 | import at.favre.app.blurbenchmark.blur.IBlur; 12 | 13 | /** 14 | * This is a convolve matrix based blur algorithms powered by Renderscript's ScriptIntrinsicConvolve class. This uses a box kernel. 15 | * Instead of radius it uses passes, so a radius parameter of 16 makes the convolve algorithm applied 16 times onto the image. 16 | */ 17 | public class RenderScriptBox5x5Blur implements IBlur { 18 | private RenderScript rs; 19 | 20 | public RenderScriptBox5x5Blur(RenderScript rs) { 21 | this.rs = rs; 22 | } 23 | 24 | @Override 25 | public Bitmap blur(int radius, Bitmap bitmapOriginal) { 26 | Allocation input = Allocation.createFromBitmap(rs, bitmapOriginal); 27 | final Allocation output = Allocation.createTyped(rs, input.getType()); 28 | final ScriptIntrinsicConvolve5x5 script = ScriptIntrinsicConvolve5x5.create(rs, Element.U8_4(rs)); 29 | script.setCoefficients(BlurKernels.BOX_5x5); 30 | for (int i = 0; i < radius; i++) { 31 | script.setInput(input); 32 | script.forEach(output); 33 | input = output; 34 | } 35 | output.copyTo(bitmapOriginal); 36 | return bitmapOriginal; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/RenderScriptGaussian5x5Blur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import androidx.renderscript.Allocation; 6 | import androidx.renderscript.Element; 7 | import androidx.renderscript.RenderScript; 8 | import androidx.renderscript.ScriptIntrinsicConvolve5x5; 9 | 10 | import at.favre.app.blurbenchmark.blur.BlurKernels; 11 | import at.favre.app.blurbenchmark.blur.IBlur; 12 | 13 | /** 14 | * This is a convolve matrix based blur algorithms powered by Renderscript's ScriptIntrinsicConvolve class. This uses a gaussian kernel. 15 | * Instead of radius it uses passes, so a radius parameter of 16 makes the convolve algorithm applied 16 times onto the image. 16 | */ 17 | public class RenderScriptGaussian5x5Blur implements IBlur { 18 | private RenderScript rs; 19 | 20 | public RenderScriptGaussian5x5Blur(RenderScript rs) { 21 | this.rs = rs; 22 | } 23 | 24 | @Override 25 | public Bitmap blur(int radius, Bitmap bitmapOriginal) { 26 | Allocation input = Allocation.createFromBitmap(rs, bitmapOriginal); 27 | final Allocation output = Allocation.createTyped(rs, input.getType()); 28 | final ScriptIntrinsicConvolve5x5 script = ScriptIntrinsicConvolve5x5.create(rs, Element.U8_4(rs)); 29 | script.setCoefficients(BlurKernels.GAUSSIAN_5x5); 30 | for (int i = 0; i < radius; i++) { 31 | script.setInput(input); 32 | script.forEach(output); 33 | input = output; 34 | } 35 | output.copyTo(bitmapOriginal); 36 | return bitmapOriginal; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/RenderScriptGaussianBlur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import androidx.renderscript.Allocation; 6 | import androidx.renderscript.Element; 7 | import androidx.renderscript.RenderScript; 8 | import androidx.renderscript.ScriptIntrinsicBlur; 9 | 10 | import at.favre.app.blurbenchmark.blur.IBlur; 11 | 12 | /** 13 | * Simple example of ScriptIntrinsicBlur Renderscript gaussion blur. 14 | * In production always use this algorithm as it is the fastest on Android. 15 | */ 16 | public class RenderScriptGaussianBlur implements IBlur { 17 | private RenderScript rs; 18 | 19 | public RenderScriptGaussianBlur(RenderScript rs) { 20 | this.rs = rs; 21 | } 22 | 23 | @Override 24 | public Bitmap blur(int radius, Bitmap bitmapOriginal) { 25 | final Allocation input = Allocation.createFromBitmap(rs, bitmapOriginal); 26 | final Allocation output = Allocation.createTyped(rs, input.getType()); 27 | final ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); 28 | script.setRadius(radius); 29 | script.setInput(input); 30 | script.forEach(output); 31 | output.copyTo(bitmapOriginal); 32 | return bitmapOriginal; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/RenderScriptStackBlur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | 6 | import androidx.renderscript.Allocation; 7 | import androidx.renderscript.Element; 8 | import androidx.renderscript.RenderScript; 9 | 10 | import at.favre.app.blurbenchmark.ScriptC_stackblur; 11 | import at.favre.app.blurbenchmark.blur.IBlur; 12 | 13 | /** 14 | * by kikoso 15 | * from https://github.com/kikoso/android-stackblur/blob/master/StackBlur/src/blur.rs 16 | */ 17 | public class RenderScriptStackBlur implements IBlur { 18 | private RenderScript _rs; 19 | private Context ctx; 20 | 21 | public RenderScriptStackBlur(RenderScript rs, Context ctx) { 22 | this.ctx = ctx; 23 | this._rs = rs; 24 | } 25 | 26 | @Override 27 | public Bitmap blur(int radius, Bitmap blurred) { 28 | int width = blurred.getWidth(); 29 | int height = blurred.getHeight(); 30 | 31 | ScriptC_stackblur blurScript = new ScriptC_stackblur(_rs); 32 | Allocation inAllocation = Allocation.createFromBitmap(_rs, blurred); 33 | 34 | blurScript.set_gIn(inAllocation); 35 | blurScript.set_width(width); 36 | blurScript.set_height(height); 37 | blurScript.set_radius(radius); 38 | 39 | int[] row_indices = new int[height]; 40 | for (int i = 0; i < height; i++) { 41 | row_indices[i] = i; 42 | } 43 | 44 | Allocation rows = Allocation.createSized(_rs, Element.U32(_rs), height, Allocation.USAGE_SCRIPT); 45 | rows.copyFrom(row_indices); 46 | 47 | row_indices = new int[width]; 48 | for (int i = 0; i < width; i++) { 49 | row_indices[i] = i; 50 | } 51 | 52 | Allocation columns = Allocation.createSized(_rs, Element.U32(_rs), width, Allocation.USAGE_SCRIPT); 53 | columns.copyFrom(row_indices); 54 | 55 | blurScript.forEach_blur_h(rows); 56 | blurScript.forEach_blur_v(columns); 57 | inAllocation.copyTo(blurred); 58 | 59 | return blurred; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/blur/algorithms/SuperFastBlur.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.blur.algorithms; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import at.favre.app.blurbenchmark.blur.IBlur; 6 | 7 | /** 8 | * Super Fast Blur by Mario Klingemann
9 | * Resource: http://incubator.quasimondo.com/processing/superfast_blur.php
10 | * StackOverflow - Understanding super fast blur algorithm: http://stackoverflow.com/questions/21418892/understanding-super-fast-blur-algorithm
11 | */ 12 | public class SuperFastBlur implements IBlur { 13 | @Override 14 | public Bitmap blur(int radius, Bitmap original) { 15 | int w = original.getWidth(); 16 | int h = original.getHeight(); 17 | int wm = w - 1; 18 | int hm = h - 1; 19 | int wh = w * h; 20 | int div = radius + radius + 1; 21 | int r[] = new int[wh]; 22 | int g[] = new int[wh]; 23 | int b[] = new int[wh]; 24 | int rsum, gsum, bsum, x, y, i, p, p1, p2, yp, yi, yw; 25 | int vmin[] = new int[Math.max(w, h)]; 26 | int vmax[] = new int[Math.max(w, h)]; 27 | int[] pix = new int[w * h]; 28 | 29 | original.getPixels(pix, 0, w, 0, 0, w, h); 30 | 31 | int dv[] = new int[256 * div]; 32 | for (i = 0; i < 256 * div; i++) { 33 | dv[i] = (i / div); 34 | } 35 | 36 | yw = yi = 0; 37 | 38 | for (y = 0; y < h; y++) { 39 | rsum = gsum = bsum = 0; 40 | for (i = -radius; i <= radius; i++) { 41 | p = pix[yi + Math.min(wm, Math.max(i, 0))]; 42 | rsum += (p & 0xff0000) >> 16; 43 | gsum += (p & 0x00ff00) >> 8; 44 | bsum += p & 0x0000ff; 45 | } 46 | for (x = 0; x < w; x++) { 47 | 48 | r[yi] = dv[rsum]; 49 | g[yi] = dv[gsum]; 50 | b[yi] = dv[bsum]; 51 | 52 | if (y == 0) { 53 | vmin[x] = Math.min(x + radius + 1, wm); 54 | vmax[x] = Math.max(x - radius, 0); 55 | } 56 | p1 = pix[yw + vmin[x]]; 57 | p2 = pix[yw + vmax[x]]; 58 | 59 | rsum += ((p1 & 0xff0000) - (p2 & 0xff0000)) >> 16; 60 | gsum += ((p1 & 0x00ff00) - (p2 & 0x00ff00)) >> 8; 61 | bsum += (p1 & 0x0000ff) - (p2 & 0x0000ff); 62 | yi++; 63 | } 64 | yw += w; 65 | } 66 | 67 | for (x = 0; x < w; x++) { 68 | rsum = gsum = bsum = 0; 69 | yp = -radius * w; 70 | for (i = -radius; i <= radius; i++) { 71 | yi = Math.max(0, yp) + x; 72 | rsum += r[yi]; 73 | gsum += g[yi]; 74 | bsum += b[yi]; 75 | yp += w; 76 | } 77 | yi = x; 78 | for (y = 0; y < h; y++) { 79 | pix[yi] = 0xff000000 | (dv[rsum] << 16) | (dv[gsum] << 8) | dv[bsum]; 80 | if (x == 0) { 81 | vmin[y] = Math.min(y + radius + 1, hm) * w; 82 | vmax[y] = Math.max(y - radius, 0) * w; 83 | } 84 | p1 = x + vmin[y]; 85 | p2 = x + vmax[y]; 86 | 87 | rsum += r[p1] - r[p2]; 88 | gsum += g[p1] - g[p2]; 89 | bsum += b[p1] - b[p2]; 90 | 91 | yi += w; 92 | } 93 | } 94 | 95 | original.setPixels(pix, 0, w, 0, 0, w, h); 96 | 97 | return original; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/fragments/BenchmarkDetailsDialog.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.fragments; 2 | 3 | import android.app.DialogFragment; 4 | import android.content.res.Resources; 5 | import android.graphics.Paint; 6 | import android.os.Bundle; 7 | import android.util.TypedValue; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.view.Window; 12 | import android.widget.FrameLayout; 13 | 14 | import com.jjoe64.graphview.CustomLabelFormatter; 15 | import com.jjoe64.graphview.GraphView; 16 | import com.jjoe64.graphview.GraphViewSeries; 17 | import com.jjoe64.graphview.LineGraphView; 18 | import com.squareup.picasso.Picasso; 19 | 20 | import at.favre.app.blurbenchmark.R; 21 | import at.favre.app.blurbenchmark.blur.IBlur; 22 | import at.favre.app.blurbenchmark.models.BenchmarkWrapper; 23 | import at.favre.app.blurbenchmark.util.GraphUtil; 24 | import at.favre.app.blurbenchmark.util.JsonUtil; 25 | 26 | /** 27 | * A dialog showing the blurred image and a graph 28 | * representing it's performance 29 | * 30 | * @author pfavre 31 | */ 32 | public class BenchmarkDetailsDialog extends DialogFragment { 33 | private static final String WRAPPER_KEY = "wrapperKey"; 34 | 35 | private BenchmarkWrapper wrapper; 36 | 37 | public static BenchmarkDetailsDialog createInstance(BenchmarkWrapper wrapper) { 38 | BenchmarkDetailsDialog dialog = new BenchmarkDetailsDialog(); 39 | dialog.setWrapper(wrapper); 40 | return dialog; 41 | } 42 | 43 | public BenchmarkDetailsDialog() { 44 | } 45 | 46 | @Override 47 | public void onCreate(Bundle savedInstanceState) { 48 | super.onCreate(savedInstanceState); 49 | 50 | if (savedInstanceState != null) { 51 | wrapper = JsonUtil.fromJsonString(savedInstanceState.getString(WRAPPER_KEY), BenchmarkWrapper.class); 52 | } 53 | } 54 | 55 | @Override 56 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 57 | View v = inflater.inflate(R.layout.dialog_benchmark_details, container, false); 58 | Picasso.with(getActivity()).load(wrapper.getBitmapAsFile()).into((android.widget.ImageView) v.findViewById(R.id.image)); 59 | 60 | FrameLayout layout = v.findViewById(R.id.graph); 61 | layout.addView(createGraph(wrapper)); 62 | getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE); 63 | return v; 64 | } 65 | 66 | private GraphView createGraph(BenchmarkWrapper wrapper) { 67 | Resources res = getResources(); 68 | int lineThicknessPx = (int) Math.ceil(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, res.getDisplayMetrics())); 69 | 70 | GraphView.GraphViewData[] data = new GraphView.GraphViewData[wrapper.getStatInfo().getBenchmarkData().size()]; 71 | for (int j = 0; j < wrapper.getStatInfo().getBenchmarkData().size(); j++) { 72 | data[j] = new GraphView.GraphViewData(j, wrapper.getStatInfo().getBenchmarkData().get(j)); 73 | } 74 | 75 | LineGraphView graphView = new LineGraphView(getActivity(), ""); 76 | GraphViewSeries.GraphViewSeriesStyle seriesStyle = new GraphViewSeries.GraphViewSeriesStyle(res.getColor(R.color.graphBgGreen), lineThicknessPx); 77 | 78 | if (wrapper.getStatInfo().getAsAvg().getMin() <= IBlur.MS_THRESHOLD_FOR_SMOOTH) { 79 | graphView.addSeries(GraphUtil.getStraightLine(IBlur.MS_THRESHOLD_FOR_SMOOTH, wrapper.getStatInfo().getBenchmarkData().size() - 1, "16ms", new GraphViewSeries.GraphViewSeriesStyle(res.getColor(R.color.graphBgRed), lineThicknessPx))); 80 | } 81 | graphView.addSeries(GraphUtil.getStraightLine((int) wrapper.getStatInfo().getAsAvg().getAvg(), wrapper.getStatInfo().getBenchmarkData().size() - 1, "Avg", new GraphViewSeries.GraphViewSeriesStyle(res.getColor(R.color.graphBlue), lineThicknessPx))); 82 | graphView.addSeries(new GraphViewSeries("Blur", seriesStyle, data)); 83 | graphView.setScrollable(true); 84 | graphView.setScalable(true); 85 | graphView.setManualYAxis(true); 86 | graphView.getGraphViewStyle().setGridColor(res.getColor(R.color.transparent)); 87 | graphView.setCustomLabelFormatter(new CustomLabelFormatter() { 88 | @Override 89 | public String formatLabel(double value, boolean isValueX) { 90 | if (!isValueX) { 91 | return Math.round(value) + "ms"; 92 | } else { 93 | return null; 94 | } 95 | } 96 | }); 97 | graphView.setManualYAxisBounds(wrapper.getStatInfo().getAsAvg().getMax(), Math.max(0, wrapper.getStatInfo().getAsAvg().getMin() - 3l)); 98 | graphView.setDrawBackground(false); 99 | graphView.setShowLegend(true); 100 | 101 | graphView.getGraphViewStyle().setHorizontalLabelsColor(res.getColor(R.color.transparent)); 102 | graphView.getGraphViewStyle().setNumHorizontalLabels(0); 103 | graphView.getGraphViewStyle().setVerticalLabelsColor(res.getColor(R.color.optionsTextColorDark)); 104 | graphView.getGraphViewStyle().setNumVerticalLabels(4); 105 | graphView.getGraphViewStyle().setVerticalLabelsAlign(Paint.Align.CENTER); 106 | graphView.getGraphViewStyle().setVerticalLabelsWidth((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 32, res.getDisplayMetrics())); 107 | graphView.getGraphViewStyle().setTextSize((int) Math.ceil(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, res.getDisplayMetrics()))); 108 | 109 | return graphView; 110 | } 111 | 112 | public void setWrapper(BenchmarkWrapper wrapper) { 113 | this.wrapper = wrapper; 114 | } 115 | 116 | @Override 117 | public void onSaveInstanceState(Bundle outState) { 118 | super.onSaveInstanceState(outState); 119 | outState.putString(WRAPPER_KEY, JsonUtil.toJsonString(wrapper)); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/fragments/BenchmarkResultFragment.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.fragments; 2 | 3 | import android.app.Fragment; 4 | import android.graphics.Bitmap; 5 | import android.graphics.Point; 6 | import android.graphics.drawable.BitmapDrawable; 7 | import android.graphics.drawable.ColorDrawable; 8 | import android.graphics.drawable.Drawable; 9 | import android.graphics.drawable.LayerDrawable; 10 | import android.os.AsyncTask; 11 | import android.os.Bundle; 12 | import android.util.Log; 13 | import android.view.LayoutInflater; 14 | import android.view.View; 15 | import android.view.ViewGroup; 16 | 17 | import androidx.appcompat.widget.Toolbar; 18 | import androidx.recyclerview.widget.LinearLayoutManager; 19 | import androidx.recyclerview.widget.RecyclerView; 20 | 21 | import com.squareup.picasso.Picasso; 22 | 23 | import java.io.IOException; 24 | 25 | import at.favre.app.blurbenchmark.R; 26 | import at.favre.app.blurbenchmark.activities.BenchmarkResultActivity; 27 | import at.favre.app.blurbenchmark.adapter.BenchmarkResultAdapter; 28 | import at.favre.app.blurbenchmark.adapter.BenchmarkResultHolder; 29 | import at.favre.app.blurbenchmark.models.BenchmarkResultList; 30 | import at.favre.app.blurbenchmark.util.JsonUtil; 31 | 32 | /** 33 | * This will show the result of a benchmark in a ListView 34 | * with some statistics. 35 | * 36 | * @author pfavre 37 | */ 38 | public class BenchmarkResultFragment extends Fragment { 39 | private static final String TAG = BenchmarkResultFragment.class.getSimpleName(); 40 | 41 | private BenchmarkResultList benchmarkResultList = new BenchmarkResultList(); 42 | 43 | private RecyclerView.Adapter adapter; 44 | private RecyclerView recyclerView; 45 | private Toolbar toolbar; 46 | 47 | public BenchmarkResultFragment() { 48 | } 49 | 50 | public static BenchmarkResultFragment createInstance(BenchmarkResultList resultList) { 51 | BenchmarkResultFragment fragment = new BenchmarkResultFragment(); 52 | fragment.setBenchmarkResultList(resultList); 53 | return fragment; 54 | } 55 | 56 | public void setBenchmarkResultList(BenchmarkResultList benchmarkResultList) { 57 | this.benchmarkResultList = benchmarkResultList; 58 | } 59 | 60 | @Override 61 | public void onCreate(Bundle savedInstanceState) { 62 | super.onCreate(savedInstanceState); 63 | 64 | if (savedInstanceState != null) { 65 | benchmarkResultList = JsonUtil.fromJsonString(savedInstanceState.getString(BenchmarkResultActivity.BENCHMARK_LIST_KEY), BenchmarkResultList.class); 66 | } 67 | 68 | } 69 | 70 | @Override 71 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 72 | View v = inflater.inflate(R.layout.fragment_benchmark_results, container, false); 73 | 74 | toolbar = v.findViewById(R.id.toolbar); 75 | 76 | recyclerView = v.findViewById(R.id.recycler_view); 77 | recyclerView.setHasFixedSize(true); 78 | recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); 79 | setUpListView(); 80 | return v; 81 | } 82 | 83 | private void setUpListView() { 84 | if (!benchmarkResultList.getBenchmarkWrappers().isEmpty()) { 85 | adapter = new BenchmarkResultAdapter(benchmarkResultList.getBenchmarkWrappers(), getActivity().getFragmentManager()); 86 | recyclerView.setAdapter(adapter); 87 | } 88 | } 89 | 90 | @Override 91 | public void onActivityCreated(Bundle savedInstanceState) { 92 | super.onActivityCreated(savedInstanceState); 93 | ((BenchmarkResultActivity) getActivity()).setupToolbar(toolbar); 94 | } 95 | 96 | @Override 97 | public void onResume() { 98 | super.onResume(); 99 | setBackground(); 100 | } 101 | 102 | private void setBackground() { 103 | if (!benchmarkResultList.getBenchmarkWrappers().isEmpty() && !benchmarkResultList.getBenchmarkWrappers().get(benchmarkResultList.getBenchmarkWrappers().size() - 1).getStatInfo().isError()) { 104 | new AsyncTask() { 105 | @Override 106 | protected Bitmap doInBackground(Void... voids) { 107 | try { 108 | Point size = new Point(); 109 | getActivity().getWindowManager().getDefaultDisplay().getSize(size); 110 | return Picasso.with(getActivity()).load(benchmarkResultList.getBenchmarkWrappers().get(benchmarkResultList.getBenchmarkWrappers().size() - 1).getBitmapAsFile()).noFade().resize(size.x, size.y).centerCrop().get(); 111 | } catch (IOException e) { 112 | Log.w(TAG, "Could not set background", e); 113 | return null; 114 | } 115 | } 116 | 117 | @Override 118 | protected void onPostExecute(Bitmap bitmap) { 119 | if (getView() != null) { 120 | BitmapDrawable bitmapDrawable = new BitmapDrawable(getActivity().getResources(), bitmap); 121 | getView().getRootView().setBackgroundDrawable(new LayerDrawable(new Drawable[]{bitmapDrawable, new ColorDrawable(getResources().getColor(R.color.transparent))})); 122 | } 123 | } 124 | }.execute(); 125 | } 126 | } 127 | 128 | @Override 129 | public void onSaveInstanceState(Bundle outState) { 130 | super.onSaveInstanceState(outState); 131 | outState.putString(BenchmarkResultActivity.BENCHMARK_LIST_KEY, JsonUtil.toJsonString(benchmarkResultList)); 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/fragments/IFragmentWithBlurSettings.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.fragments; 2 | 3 | /** 4 | * Used by the to mark fragments that can use SettingsController 5 | * 6 | * @author pfavre 7 | */ 8 | public interface IFragmentWithBlurSettings { 9 | void switchShowSettings(); 10 | } 11 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/fragments/ResultsBrowserFragment.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.fragments; 2 | 3 | import android.app.Fragment; 4 | import android.os.Build; 5 | import android.os.Bundle; 6 | import android.view.Gravity; 7 | import android.view.LayoutInflater; 8 | import android.view.Menu; 9 | import android.view.MenuInflater; 10 | import android.view.MenuItem; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.AdapterView; 14 | import android.widget.ArrayAdapter; 15 | import android.widget.Spinner; 16 | 17 | import androidx.appcompat.app.AppCompatActivity; 18 | 19 | import com.inqbarna.tablefixheaders.TableFixHeaders; 20 | 21 | import at.favre.app.blurbenchmark.BenchmarkStorage; 22 | import at.favre.app.blurbenchmark.R; 23 | import at.favre.app.blurbenchmark.adapter.ResultTableAdapter; 24 | import at.favre.app.blurbenchmark.models.BenchmarkResultDatabase; 25 | import at.favre.app.blurbenchmark.models.ResultTableModel; 26 | import at.favre.app.blurbenchmark.util.TranslucentLayoutUtil; 27 | 28 | /** 29 | * A table view that shows misc. statistics for the benchmark categories (size& blur radius) 30 | * 31 | * @author pfavre 32 | */ 33 | public class ResultsBrowserFragment extends Fragment { 34 | private static final String TAG = ResultsBrowserFragment.class.getSimpleName(); 35 | 36 | private TableFixHeaders table; 37 | private ResultTableModel.DataType dataType = ResultTableModel.DataType.AVG; 38 | private BenchmarkResultDatabase db; 39 | 40 | public ResultsBrowserFragment() { 41 | } 42 | 43 | @Override 44 | public void onCreate(Bundle savedInstanceState) { 45 | super.onCreate(savedInstanceState); 46 | setHasOptionsMenu(true); 47 | } 48 | 49 | @Override 50 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 51 | final View v = inflater.inflate(R.layout.fragment_resultbrowser, container, false); 52 | table = v.findViewById(R.id.table); 53 | table.setVisibility(View.GONE); 54 | 55 | v.findViewById(R.id.progressBar).setVisibility(View.VISIBLE); 56 | 57 | new BenchmarkStorage.AsyncLoadResults() { 58 | @Override 59 | protected void onPostExecute(BenchmarkResultDatabase benchmarkResultDatabase) { 60 | if (isAdded() && isVisible()) { 61 | v.findViewById(R.id.progressBar).setVisibility(View.GONE); 62 | if (benchmarkResultDatabase == null) { 63 | table.setVisibility(View.GONE); 64 | v.findViewById(R.id.tv_noresults).setVisibility(View.VISIBLE); 65 | } else { 66 | table.setVisibility(View.VISIBLE); 67 | table.setAdapter(new ResultTableAdapter(getActivity(), benchmarkResultDatabase, dataType)); 68 | TranslucentLayoutUtil.setTranslucentThemeInsets(getActivity(), v.findViewById(R.id.tableWrapper)); 69 | } 70 | } 71 | } 72 | }.execute(getActivity()); 73 | 74 | return v; 75 | } 76 | 77 | @Override 78 | public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { 79 | super.onCreateOptionsMenu(menu, inflater); 80 | inflater.inflate(R.menu.results_menu, menu); 81 | Spinner spinner = (Spinner) menu.findItem(R.id.action_select_datatype).getActionView(); 82 | ArrayAdapter adapter = new ArrayAdapter<>(((AppCompatActivity) getActivity()).getSupportActionBar().getThemedContext(), R.layout.inc_spinner_light, ResultTableModel.DataType.values()); 83 | spinner.setAdapter(adapter); 84 | if (Build.VERSION.SDK_INT >= 16) { 85 | spinner.setPopupBackgroundDrawable(getResources().getDrawable(R.drawable.spinner_popup_dark)); 86 | } else if (Build.VERSION.SDK_INT >= 21) { 87 | spinner.setPopupBackgroundDrawable(getResources().getDrawable(R.drawable.spinner_popup_dark, getActivity().getTheme())); 88 | } 89 | spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { 90 | @Override 91 | public void onItemSelected(AdapterView adapterView, View view, int i, long l) { 92 | setNewDataType((ResultTableModel.DataType) adapterView.getAdapter().getItem(i)); 93 | } 94 | 95 | @Override 96 | public void onNothingSelected(AdapterView adapterView) { 97 | 98 | } 99 | }); 100 | spinner.setGravity(Gravity.RIGHT); 101 | } 102 | 103 | private void setNewDataType(ResultTableModel.DataType type) { 104 | dataType = type; 105 | table.setAdapter(new ResultTableAdapter(getActivity(), BenchmarkStorage.getInstance(getActivity()).loadResultsDB(), dataType)); 106 | } 107 | 108 | @Override 109 | public boolean onOptionsItemSelected(MenuItem item) { 110 | switch (item.getItemId()) { 111 | case R.id.action_delete: 112 | deleteData(); 113 | return true; 114 | default: 115 | return super.onOptionsItemSelected(item); 116 | } 117 | } 118 | 119 | private void deleteData() { 120 | BenchmarkStorage.getInstance(getActivity()).deleteData(); 121 | table.setAdapter(new ResultTableAdapter(getActivity(), BenchmarkStorage.getInstance(getActivity()).loadResultsDB(), dataType)); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/models/BenchmarkImage.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.models; 2 | 3 | /** 4 | * Wrapper for an image, that either holds a file path or resource id 5 | * 6 | * @author pfavre 7 | */ 8 | public class BenchmarkImage { 9 | private int resId; 10 | private String absolutePath; 11 | 12 | public BenchmarkImage(int resId) { 13 | this.resId = resId; 14 | } 15 | 16 | public BenchmarkImage(String absolutePath) { 17 | this.absolutePath = absolutePath; 18 | } 19 | 20 | public int getResId() { 21 | return resId; 22 | } 23 | 24 | public String getAbsolutePath() { 25 | return absolutePath; 26 | } 27 | 28 | public boolean isResId() { 29 | return absolutePath == null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/models/BenchmarkResultList.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.models; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * Simple wrapper for easier json serialization. 8 | * 9 | * @author pfavre 10 | */ 11 | public class BenchmarkResultList { 12 | private List benchmarkWrappers = new ArrayList(); 13 | 14 | public BenchmarkResultList() { 15 | } 16 | 17 | public List getBenchmarkWrappers() { 18 | return benchmarkWrappers; 19 | } 20 | 21 | public void setBenchmarkWrappers(List benchmarkWrappers) { 22 | this.benchmarkWrappers = benchmarkWrappers; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/models/BenchmarkWrapper.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | 5 | import java.io.File; 6 | import java.util.Date; 7 | 8 | /** 9 | * Info assembled after one benchmark 10 | * 11 | * @author pfavre 12 | */ 13 | public class BenchmarkWrapper implements Comparable { 14 | private String bitmapPath; 15 | private String flippedBitmapPath; 16 | private StatInfo statInfo; 17 | private boolean additionalInfoVisibility = false; 18 | private boolean customPic = false; 19 | 20 | public BenchmarkWrapper() { 21 | } 22 | 23 | public BenchmarkWrapper(File bitmapFile, File flippedBitmapFile, StatInfo statInfo, boolean customPic) { 24 | if (bitmapFile != null && flippedBitmapFile != null) { 25 | this.bitmapPath = bitmapFile.getAbsolutePath(); 26 | this.flippedBitmapPath = flippedBitmapFile.getAbsolutePath(); 27 | } 28 | this.statInfo = statInfo; 29 | this.customPic = customPic; 30 | if (bitmapPath == null) { 31 | statInfo.setError(true); 32 | } 33 | 34 | } 35 | 36 | public StatInfo getStatInfo() { 37 | return statInfo; 38 | } 39 | 40 | public String getBitmapPath() { 41 | return bitmapPath; 42 | } 43 | 44 | public void setBitmapPath(String bitmapPath) { 45 | this.bitmapPath = bitmapPath; 46 | } 47 | 48 | public void setStatInfo(StatInfo statInfo) { 49 | this.statInfo = statInfo; 50 | } 51 | 52 | public boolean isCustomPic() { 53 | return customPic; 54 | } 55 | 56 | public void setCustomPic(boolean customPic) { 57 | this.customPic = customPic; 58 | } 59 | 60 | public boolean isAdditionalInfoVisibility() { 61 | return additionalInfoVisibility; 62 | } 63 | 64 | public void setAdditionalInfoVisibility(boolean additionalInfoVisibility) { 65 | this.additionalInfoVisibility = additionalInfoVisibility; 66 | } 67 | 68 | public String getFlippedBitmapPath() { 69 | return flippedBitmapPath; 70 | } 71 | 72 | public void setFlippedBitmapPath(String flippedBitmapPath) { 73 | this.flippedBitmapPath = flippedBitmapPath; 74 | } 75 | 76 | @JsonIgnore 77 | public File getBitmapAsFile() { 78 | return new File(bitmapPath); 79 | } 80 | 81 | @JsonIgnore 82 | public File getFlippedBitmapAsFile() { 83 | return new File(flippedBitmapPath); 84 | } 85 | 86 | @Override 87 | public int compareTo(BenchmarkWrapper benchmarkWrapper) { 88 | return new Date(getStatInfo().getDate()).compareTo(new Date(benchmarkWrapper.getStatInfo().getDate())) * -1; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/models/StatInfo.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | 5 | import java.util.ArrayList; 6 | import java.util.Date; 7 | import java.util.List; 8 | 9 | import at.favre.app.blurbenchmark.blur.EBlurAlgorithm; 10 | import at.favre.app.blurbenchmark.util.Average; 11 | import at.favre.app.blurbenchmark.util.BenchmarkUtil; 12 | 13 | /** 14 | * Wrapper for all statistic info on a benchmark 15 | * 16 | * @author pfavre 17 | */ 18 | public class StatInfo { 19 | private List benchmarkData; 20 | private long benchmarkDuration; 21 | private long loadBitmap; 22 | private int bitmapHeight; 23 | private int bitmapWidth; 24 | private int blurRadius; 25 | private int rounds; 26 | private EBlurAlgorithm algorithm; 27 | private boolean error = false; 28 | private String errorDescription; 29 | private long date; 30 | private Integer byteAllocation; 31 | 32 | private Average avg; 33 | 34 | public StatInfo() { 35 | } 36 | 37 | public StatInfo(int bitmapHeight, int bitmapWidth, int blurRadius, EBlurAlgorithm algorithm, int rounds, Integer byteAllocation) { 38 | this.bitmapHeight = bitmapHeight; 39 | this.bitmapWidth = bitmapWidth; 40 | this.blurRadius = blurRadius; 41 | this.algorithm = algorithm; 42 | this.rounds = rounds; 43 | benchmarkData = new ArrayList(); 44 | date = new Date().getTime(); 45 | this.byteAllocation = byteAllocation; 46 | } 47 | 48 | public long getLoadBitmap() { 49 | return loadBitmap; 50 | } 51 | 52 | public void setLoadBitmap(long loadBitmap) { 53 | this.loadBitmap = loadBitmap; 54 | } 55 | 56 | public List getBenchmarkData() { 57 | avg = null; 58 | return benchmarkData; 59 | } 60 | 61 | public void setBenchmarkData(List benchmarkData) { 62 | avg = null; 63 | this.benchmarkData = benchmarkData; 64 | } 65 | 66 | public int getBitmapHeight() { 67 | return bitmapHeight; 68 | } 69 | 70 | public int getBitmapWidth() { 71 | return bitmapWidth; 72 | } 73 | 74 | public long getBenchmarkDuration() { 75 | return benchmarkDuration; 76 | } 77 | 78 | public void setBenchmarkDuration(long benchmarkDuration) { 79 | this.benchmarkDuration = benchmarkDuration; 80 | } 81 | 82 | public void setException(Throwable throwable) { 83 | setError(true); 84 | setErrorDescription(throwable.toString()); 85 | } 86 | 87 | public boolean isError() { 88 | return error; 89 | } 90 | 91 | public void setError(boolean error) { 92 | this.error = error; 93 | } 94 | 95 | public String getErrorDescription() { 96 | return errorDescription; 97 | } 98 | 99 | public void setErrorDescription(String errorDescription) { 100 | this.errorDescription = errorDescription; 101 | } 102 | 103 | public int getBlurRadius() { 104 | return blurRadius; 105 | } 106 | 107 | public void setBlurRadius(int blurRadius) { 108 | this.blurRadius = blurRadius; 109 | } 110 | 111 | public EBlurAlgorithm getAlgorithm() { 112 | return algorithm; 113 | } 114 | 115 | public void setAlgorithm(EBlurAlgorithm algorithm) { 116 | this.algorithm = algorithm; 117 | } 118 | 119 | public void setBitmapHeight(int bitmapHeight) { 120 | this.bitmapHeight = bitmapHeight; 121 | } 122 | 123 | public void setBitmapWidth(int bitmapWidth) { 124 | this.bitmapWidth = bitmapWidth; 125 | } 126 | 127 | public int getRounds() { 128 | return rounds; 129 | } 130 | 131 | public void setRounds(int rounds) { 132 | this.rounds = rounds; 133 | } 134 | 135 | public long getDate() { 136 | return date; 137 | } 138 | 139 | public void setDate(long date) { 140 | this.date = date; 141 | } 142 | 143 | public long getByteAllocation() { 144 | if (byteAllocation == null) { 145 | return byteAllocation = bitmapWidth * bitmapHeight; 146 | } 147 | return byteAllocation; 148 | } 149 | 150 | public void setByteAllocation(int byteAllocation) { 151 | this.byteAllocation = byteAllocation; 152 | } 153 | 154 | @JsonIgnore 155 | public Average getAvg() { 156 | return avg; 157 | } 158 | 159 | @JsonIgnore 160 | public void setAvg(Average avg) { 161 | this.avg = avg; 162 | } 163 | 164 | @JsonIgnore 165 | public double getThroughputMPixelsPerSec() { 166 | return (double) bitmapWidth * (double) bitmapHeight / getAsAvg().getAvg() * 1000d / 1000000d; 167 | } 168 | 169 | @JsonIgnore 170 | public String getKeyString() { 171 | return bitmapHeight + "x" + bitmapWidth + "_" + algorithm + "_" + String.format("%02d", blurRadius) + "px"; 172 | } 173 | 174 | @JsonIgnore 175 | public String getCategoryString() { 176 | return getImageSizeCategoryString() + " / " + BenchmarkUtil.formatNum(blurRadius, "00") + "px"; 177 | } 178 | 179 | @JsonIgnore 180 | public String getImageSizeCategoryString() { 181 | return bitmapHeight + "x" + bitmapWidth; 182 | } 183 | 184 | @JsonIgnore 185 | public String getBitmapByteSize() { 186 | if (byteAllocation == null) { 187 | return BenchmarkUtil.getScalingUnitByteSize(bitmapHeight * bitmapWidth); 188 | } else { 189 | return BenchmarkUtil.getScalingUnitByteSize(byteAllocation); 190 | } 191 | } 192 | 193 | @JsonIgnore 194 | public String getMegaPixels() { 195 | return String.valueOf((double) Math.round((double) (bitmapHeight * bitmapWidth) / 1000000d * 100d) / 100d) + "MP"; 196 | } 197 | 198 | @JsonIgnore 199 | public Average getAsAvg() { 200 | if (avg == null) { 201 | avg = new Average(benchmarkData); 202 | } 203 | return avg; 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/Average.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collection; 5 | import java.util.HashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | import java.util.TreeSet; 9 | 10 | /** 11 | * Helper class for calculating some simple statistics 12 | * data. It uses a cache for better performance, but sacrificeing 13 | * a little memory efficiency. 14 | * 15 | * @author pfavre 16 | */ 17 | public class Average { 18 | 19 | private Double avg; 20 | private Double normalizedAvg; 21 | private Double variance; 22 | private Double mean; 23 | private Map cache; 24 | private TreeSet data; 25 | 26 | public Average(Collection data) { 27 | this(); 28 | this.data = new TreeSet(data); 29 | } 30 | 31 | public Average() { 32 | data = new TreeSet(); 33 | reset(); 34 | } 35 | 36 | public void add(T elem) { 37 | data.add(elem); 38 | reset(); 39 | } 40 | 41 | public void addAll(Collection data) { 42 | this.data.addAll(data); 43 | reset(); 44 | } 45 | 46 | private void reset() { 47 | cache = new HashMap(); 48 | avg = variance = mean = null; 49 | } 50 | 51 | public double getAvg() { 52 | if (avg == null) { 53 | double sum = 0; 54 | for (T t : data) { 55 | sum += t.doubleValue(); 56 | } 57 | avg = sum / (double) data.size(); 58 | } 59 | return avg; 60 | } 61 | 62 | public double getMedian() { 63 | if (mean == null) { 64 | List array = new ArrayList(data); 65 | int middle = array.size() / 2; 66 | if (array.size() % 2 == 0) { 67 | T left = array.get(middle - 1); 68 | T right = array.get(middle); 69 | mean = (left.doubleValue() + right.doubleValue()) / 2d; 70 | } else { 71 | mean = array.get(middle).doubleValue(); 72 | } 73 | } 74 | return mean; 75 | } 76 | 77 | public ConfidenceIntervall get80PercentConfidenceIntervall() { 78 | return getConfidenceIntervall(1.28d); 79 | } 80 | 81 | public ConfidenceIntervall get90PercentConfidenceIntervall() { 82 | return getConfidenceIntervall(1.645d); 83 | } 84 | 85 | public ConfidenceIntervall get95PercentConfidenceIntervall() { 86 | return getConfidenceIntervall(1.96d); 87 | } 88 | 89 | public ConfidenceIntervall get99PercentConfidenceIntervall() { 90 | return getConfidenceIntervall(2.58d); 91 | } 92 | 93 | private ConfidenceIntervall getConfidenceIntervall(double confidenceLevel) { 94 | if (!cache.containsKey(confidenceLevel)) { 95 | double stddev = Math.sqrt(getVariance()); 96 | double stdErr = confidenceLevel * stddev; 97 | cache.put(confidenceLevel, new ConfidenceIntervall(getAvg(), stdErr)); 98 | } 99 | return cache.get(confidenceLevel); 100 | } 101 | 102 | public double getVariance() { 103 | if (variance == null) { 104 | double xxbar = 0.0d; 105 | for (T t : data) { 106 | xxbar += Math.pow(t.doubleValue() - getAvg(), 2); 107 | } 108 | 109 | variance = xxbar / (data.size() - 1); 110 | } 111 | return variance; 112 | } 113 | 114 | public T getMax() { 115 | return data.last(); 116 | } 117 | 118 | public T getMin() { 119 | return data.first(); 120 | } 121 | 122 | public List getValuesGreaterThanGiven(double lowerLimit) { 123 | List overList = new ArrayList(); 124 | for (T t : data) { 125 | if (lowerLimit < t.doubleValue()) { 126 | overList.add(t); 127 | } 128 | } 129 | return overList; 130 | } 131 | 132 | public double getPercentageOverGivenValue(double lowerLimit) { 133 | double overCount = getValuesGreaterThanGiven(lowerLimit).size(); 134 | double wholeCount = data.size(); 135 | 136 | return (overCount * 100) / wholeCount; 137 | } 138 | 139 | public static class ConfidenceIntervall { 140 | private final double avg; 141 | private final double stdError; 142 | 143 | public ConfidenceIntervall(double avg, double stdError) { 144 | this.avg = avg; 145 | this.stdError = stdError; 146 | } 147 | 148 | public double getAvg() { 149 | return avg; 150 | } 151 | 152 | public double getStdError() { 153 | return stdError; 154 | } 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/BenchmarkUtil.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | import android.os.SystemClock; 6 | 7 | import java.io.File; 8 | import java.math.RoundingMode; 9 | import java.text.DecimalFormat; 10 | import java.text.DecimalFormatSymbols; 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | import java.util.Locale; 14 | 15 | /** 16 | * Created by PatrickF on 16.04.2014. 17 | */ 18 | public class BenchmarkUtil { 19 | private static final DecimalFormat format = new DecimalFormat("#.0"); 20 | private static final String fileSeperator = ";"; 21 | 22 | static { 23 | format.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ENGLISH)); 24 | format.setRoundingMode(RoundingMode.HALF_UP); 25 | } 26 | 27 | @TargetApi(17) 28 | public static long elapsedRealTimeNanos() { 29 | if (Build.VERSION.SDK_INT >= 17) { 30 | return SystemClock.elapsedRealtimeNanos(); 31 | } 32 | return SystemClock.elapsedRealtime() * 1000000l; 33 | } 34 | 35 | public static String formatNum(double number) { 36 | return format.format(number); 37 | } 38 | 39 | public static String formatNum(double number, String formatString) { 40 | final DecimalFormat format = new DecimalFormat(formatString); 41 | format.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ENGLISH)); 42 | format.setRoundingMode(RoundingMode.HALF_UP); 43 | return format.format(number); 44 | } 45 | 46 | public static String saveFiles(List files) { 47 | StringJoiner joiner = new StringJoiner(fileSeperator); 48 | for (File file : files) { 49 | joiner.add(file.getAbsolutePath()); 50 | } 51 | return joiner.toString(); 52 | } 53 | 54 | public static List getAsFiles(String filestring) { 55 | String[] files = filestring.split(fileSeperator); 56 | List fileArrayList = new ArrayList(); 57 | for (String absPath : files) { 58 | File f = new File(absPath); 59 | if (f.isFile() && !f.getAbsolutePath().isEmpty()) { 60 | fileArrayList.add(f); 61 | } 62 | } 63 | return fileArrayList; 64 | } 65 | 66 | public static String getScalingUnitByteSize(int byteSize) { 67 | double scaledByteSize = (double) byteSize; 68 | String unit = "byte"; 69 | 70 | if (scaledByteSize < 1024) { 71 | return formatNum(scaledByteSize, "0.##") + unit; 72 | } else { 73 | unit = "KiB"; 74 | scaledByteSize /= 1024d; 75 | 76 | if (scaledByteSize < 1024) { 77 | return formatNum(scaledByteSize, "0.##") + unit; 78 | } else { 79 | unit = "MiB"; 80 | scaledByteSize /= 1024d; 81 | if (scaledByteSize < 1024) { 82 | return formatNum(scaledByteSize, "0.##") + unit; 83 | } else { 84 | unit = "GiB"; 85 | scaledByteSize /= 1024d; 86 | return formatNum(scaledByteSize, "0.##") + unit; 87 | } 88 | } 89 | } 90 | 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/BitmapUtil.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.graphics.Bitmap; 6 | import android.graphics.Canvas; 7 | import android.graphics.ColorMatrix; 8 | import android.graphics.ColorMatrixColorFilter; 9 | import android.graphics.Matrix; 10 | import android.graphics.Paint; 11 | import android.os.Build; 12 | import android.os.Environment; 13 | import android.util.Log; 14 | 15 | import java.io.File; 16 | import java.io.FileOutputStream; 17 | 18 | /** 19 | * Created by PatrickF on 15.04.2014. 20 | */ 21 | public class BitmapUtil { 22 | private static final String TAG = BitmapUtil.class.getSimpleName(); 23 | 24 | public static void clearCacheDir(File cacheDir) { 25 | File[] files = cacheDir.listFiles(); 26 | 27 | if (files != null) { 28 | for (File file : files) 29 | file.delete(); 30 | } 31 | } 32 | 33 | public static File saveBitmapDownscaled(Bitmap bitmap, String filename, String path, boolean recycle, int maxWidth, int maxHeight) { 34 | float heightScaleFactor = 1; 35 | float widthScaleFactor = 1; 36 | float scaleFactor = 1; 37 | 38 | if (bitmap.getHeight() > maxHeight) { 39 | heightScaleFactor = (float) maxHeight / (float) bitmap.getHeight(); 40 | } 41 | 42 | if (bitmap.getWidth() > maxWidth) { 43 | widthScaleFactor = (float) maxWidth / (float) bitmap.getWidth(); 44 | } 45 | if (heightScaleFactor < 1 || widthScaleFactor < 1) { 46 | scaleFactor = Math.min(heightScaleFactor, widthScaleFactor); 47 | } 48 | bitmap = Bitmap.createScaledBitmap(bitmap, (int) (bitmap.getWidth() * scaleFactor), (int) (bitmap.getHeight() * scaleFactor), true); 49 | return saveBitmap(bitmap, filename, path, recycle); 50 | } 51 | 52 | public static File saveBitmap(Bitmap bitmap, String filename, String path, boolean recycle) { 53 | FileOutputStream out = null; 54 | try { 55 | File f = new File(path, filename); 56 | if (!f.exists()) { 57 | f.createNewFile(); 58 | } 59 | out = new FileOutputStream(f); 60 | if (bitmap.compress(Bitmap.CompressFormat.PNG, 90, out)) { 61 | return f; 62 | } 63 | } catch (Exception e) { 64 | Log.e(TAG, "Could not save bitmap", e); 65 | } finally { 66 | try { 67 | out.close(); 68 | } catch (Throwable ignore) { 69 | } 70 | if (recycle) { 71 | bitmap.recycle(); 72 | } 73 | } 74 | return null; 75 | } 76 | 77 | public static String getCacheDir(Context ctx) { 78 | return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) || !Environment.isExternalStorageRemovable() ? 79 | ctx.getExternalCacheDir().getPath() : ctx.getCacheDir().getPath(); 80 | } 81 | 82 | public static Bitmap flip(Bitmap src) { 83 | Matrix m = new Matrix(); 84 | m.preScale(-1, 1); 85 | return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), m, false); 86 | } 87 | 88 | @TargetApi(Build.VERSION_CODES.KITKAT) 89 | public static int sizeOf(Bitmap data) { 90 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR1) { 91 | return data.getRowBytes() * data.getHeight(); 92 | } else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { 93 | return data.getByteCount(); 94 | } else { 95 | return data.getAllocationByteCount(); 96 | } 97 | } 98 | 99 | /** 100 | * @param bmp input bitmap 101 | * @param contrast 0..10 1 is default 102 | * @param brightness -255..255 0 is default 103 | * @return new bitmap 104 | */ 105 | public static Bitmap changeBitmapContrastBrightness(Bitmap bmp, float contrast, float brightness) { 106 | ColorMatrix cm = new ColorMatrix(new float[] 107 | { 108 | contrast, 0, 0, 0, brightness, 109 | 0, contrast, 0, 0, brightness, 110 | 0, 0, contrast, 0, brightness, 111 | 0, 0, 0, 1, 0 112 | }); 113 | 114 | Bitmap ret = Bitmap.createBitmap(bmp.getWidth(), bmp.getHeight(), bmp.getConfig()); 115 | 116 | Canvas canvas = new Canvas(ret); 117 | 118 | Paint paint = new Paint(); 119 | paint.setColorFilter(new ColorMatrixColorFilter(cm)); 120 | canvas.drawBitmap(bmp, 0, 0, paint); 121 | 122 | return ret; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/BlurUtil.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.os.Build; 6 | 7 | import androidx.renderscript.Allocation; 8 | import androidx.renderscript.Element; 9 | import androidx.renderscript.RenderScript; 10 | import androidx.renderscript.ScriptIntrinsicBlend; 11 | 12 | import at.favre.app.blurbenchmark.blur.EBlurAlgorithm; 13 | import at.favre.app.blurbenchmark.blur.algorithms.BoxBlur; 14 | import at.favre.app.blurbenchmark.blur.algorithms.GaussianFastBlur; 15 | import at.favre.app.blurbenchmark.blur.algorithms.RenderScriptBox5x5Blur; 16 | import at.favre.app.blurbenchmark.blur.algorithms.RenderScriptGaussian5x5Blur; 17 | import at.favre.app.blurbenchmark.blur.algorithms.RenderScriptGaussianBlur; 18 | import at.favre.app.blurbenchmark.blur.algorithms.RenderScriptStackBlur; 19 | import at.favre.app.blurbenchmark.blur.algorithms.StackBlur; 20 | import at.favre.app.blurbenchmark.blur.algorithms.SuperFastBlur; 21 | 22 | /** 23 | * Created by PatrickF on 07.04.2014. 24 | */ 25 | public class BlurUtil { 26 | 27 | public static Bitmap blur(RenderScript rs, Context ctx, Bitmap bitmap, int radius, EBlurAlgorithm algorithm) { 28 | switch (algorithm) { 29 | case RS_GAUSS_FAST: 30 | return new RenderScriptGaussianBlur(rs).blur(radius, bitmap); 31 | case RS_BOX_5x5: 32 | return new RenderScriptBox5x5Blur(rs).blur(radius, bitmap); 33 | case RS_GAUSS_5x5: 34 | return new RenderScriptGaussian5x5Blur(rs).blur(radius, bitmap); 35 | case RS_STACKBLUR: 36 | return new RenderScriptStackBlur(rs, ctx).blur(radius, bitmap); 37 | case STACKBLUR: 38 | return new StackBlur().blur(radius, bitmap); 39 | case GAUSS_FAST: 40 | return new GaussianFastBlur().blur(radius, bitmap); 41 | case BOX_BLUR: 42 | return new BoxBlur().blur(radius, bitmap); 43 | // case NDK_STACKBLUR: 44 | // return NdkStackBlur.create().blur(radius, bitmap); 45 | // case NDK_NE10_BOX_BLUR: 46 | // return new Blur().blur(radius, bitmap); 47 | case SUPER_FAST_BLUR: 48 | return new SuperFastBlur().blur(radius, bitmap); 49 | default: 50 | return bitmap; 51 | } 52 | } 53 | 54 | public static Bitmap blendRenderScript(RenderScript rs, Bitmap bitmap1, Bitmap bitmap2) { 55 | if (Build.VERSION.SDK_INT >= 17) { 56 | final Allocation input1 = Allocation.createFromBitmap(rs, bitmap1, Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); 57 | final Allocation input2 = Allocation.createFromBitmap(rs, bitmap2, Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); 58 | final ScriptIntrinsicBlend blendScript = ScriptIntrinsicBlend.create(rs, Element.U8_4(rs)); 59 | blendScript.forEachAdd(input1, input2); 60 | input2.copyTo(bitmap1); 61 | return bitmap1; 62 | 63 | } else { 64 | throw new IllegalStateException("Renderscript needs sdk >= 17"); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/GraphUtil.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import com.jjoe64.graphview.GraphView; 4 | import com.jjoe64.graphview.GraphViewSeries; 5 | 6 | /** 7 | * Created by PatrickF on 23.04.2014. 8 | */ 9 | public class GraphUtil { 10 | 11 | public static GraphViewSeries getStraightLine(int heightY, int maxX, String name, GraphViewSeries.GraphViewSeriesStyle seriesStyle) { 12 | GraphView.GraphViewData[] data = new GraphView.GraphViewData[2]; 13 | data[0] = new GraphView.GraphViewData(0, heightY); 14 | data[1] = new GraphView.GraphViewData(maxX, heightY); 15 | return new GraphViewSeries(name, seriesStyle, data); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/HidingScrollListener.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import android.content.res.Resources; 4 | import android.util.TypedValue; 5 | 6 | import androidx.recyclerview.widget.LinearLayoutManager; 7 | import androidx.recyclerview.widget.RecyclerView; 8 | 9 | /** 10 | * Created by PatrickF on 27.05.2015. 11 | */ 12 | public abstract class HidingScrollListener extends RecyclerView.OnScrollListener { 13 | private static final int HIDE_THRESHOLD = getHideThreshold(60); 14 | private int scrolledDistance = 0; 15 | private boolean controlsVisible = true; 16 | 17 | @Override 18 | public void onScrolled(RecyclerView recyclerView, int dx, int dy) { 19 | super.onScrolled(recyclerView, dx, dy); 20 | 21 | int firstVisibleItem = ((LinearLayoutManager) recyclerView.getLayoutManager()).findFirstVisibleItemPosition(); 22 | //show views if first item is first visible position and views are hidden 23 | if (firstVisibleItem == 0) { 24 | if (!controlsVisible) { 25 | onShow(); 26 | controlsVisible = true; 27 | } 28 | } else { 29 | if (scrolledDistance > HIDE_THRESHOLD && controlsVisible) { 30 | onHide(); 31 | controlsVisible = false; 32 | scrolledDistance = 0; 33 | } else if (scrolledDistance < -HIDE_THRESHOLD && !controlsVisible) { 34 | onShow(); 35 | controlsVisible = true; 36 | scrolledDistance = 0; 37 | } 38 | } 39 | 40 | if ((controlsVisible && dy > 0) || (!controlsVisible && dy < 0)) { 41 | scrolledDistance += dy; 42 | } 43 | } 44 | 45 | public static int getHideThreshold(int valueInDP) { 46 | return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, valueInDP, Resources.getSystem().getDisplayMetrics())); 47 | } 48 | 49 | public abstract void onHide(); 50 | 51 | public abstract void onShow(); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/JsonUtil.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | 5 | import java.io.IOException; 6 | 7 | /** 8 | * Created by PatrickF on 16.04.2014. 9 | */ 10 | public class JsonUtil { 11 | private static ObjectMapper defaultMapper = new ObjectMapper(); 12 | 13 | public static String toJsonString(Object obj) { 14 | return toJsonString(obj, defaultMapper); 15 | } 16 | 17 | public static String toJsonString(Object obj, ObjectMapper mapper) { 18 | try { 19 | return mapper.writeValueAsString(obj); 20 | } catch (Exception e) { 21 | throw new JsonSerializeException(e); 22 | } 23 | } 24 | 25 | public static T fromJsonString(String json, Class clazz) { 26 | return fromJsonString(json, clazz, defaultMapper); 27 | } 28 | 29 | public static T fromJsonString(String json, Class clazz, ObjectMapper mapper) { 30 | try { 31 | return mapper.readValue(json, clazz); 32 | } catch (IOException e) { 33 | throw new JsonDeserializeException(e); 34 | } 35 | } 36 | 37 | public static class JsonSerializeException extends RuntimeException { 38 | public JsonSerializeException(Throwable throwable) { 39 | super(throwable); 40 | } 41 | } 42 | 43 | public static class JsonDeserializeException extends RuntimeException { 44 | public JsonDeserializeException(Throwable throwable) { 45 | super(throwable); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/util/TranslucentLayoutUtil.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.util; 2 | 3 | import android.app.Activity; 4 | import android.view.View; 5 | 6 | /** 7 | * Created by PatrickF on 22.04.2014. 8 | */ 9 | public class TranslucentLayoutUtil { 10 | public static void setTranslucentThemeInsets(Activity context, View view) { 11 | 12 | // SystemBarTintManager tintManager = new SystemBarTintManager(context); 13 | // SystemBarTintManager.SystemBarConfig config = tintManager.getConfig(); 14 | // 15 | // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { 16 | // view.setPadding(0, config.getPixelInsetTop(true) + config.getStatusBarHeight(), config.getPixelInsetRight(), config.getPixelInsetBottom()); 17 | // } else { 18 | // view.setPadding(0, context.getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_height), 0, 0); 19 | // } 20 | } 21 | 22 | public static void setTranslucentThemeInsetsWithoutActionbarHeight(Activity context, View view, boolean addAdditionalStatusBarHeight) { 23 | // if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return; 24 | // 25 | // SystemBarTintManager tintManager = new SystemBarTintManager(context); 26 | // SystemBarTintManager.SystemBarConfig config = tintManager.getConfig(); 27 | // view.setPadding(0, config.getPixelInsetTop(false)+ (addAdditionalStatusBarHeight ? config.getStatusBarHeight(): 0), config.getPixelInsetRight(), config.getPixelInsetBottom()); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/java/at/favre/app/blurbenchmark/view/ObservableScrollView.java: -------------------------------------------------------------------------------- 1 | package at.favre.app.blurbenchmark.view; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.ScrollView; 6 | 7 | /** 8 | * This is a simple extension to the scrollView that 9 | * allows to set a scrollListener 10 | */ 11 | public class ObservableScrollView extends ScrollView { 12 | private ScrollViewListener scrollViewListener = null; 13 | 14 | public ObservableScrollView(Context context) { 15 | super(context); 16 | } 17 | 18 | public ObservableScrollView(Context context, AttributeSet attrs, int defStyle) { 19 | super(context, attrs, defStyle); 20 | } 21 | 22 | public ObservableScrollView(Context context, AttributeSet attrs) { 23 | super(context, attrs); 24 | } 25 | 26 | public void setScrollViewListener(ScrollViewListener scrollViewListener) { 27 | this.scrollViewListener = scrollViewListener; 28 | } 29 | 30 | @Override 31 | protected void onScrollChanged(int x, int y, int oldx, int oldy) { 32 | super.onScrollChanged(x, y, oldx, oldy); 33 | if (scrollViewListener != null) { 34 | scrollViewListener.onScrollChanged(this, x, y, oldx, oldy); 35 | } 36 | } 37 | 38 | public interface ScrollViewListener { 39 | void onScrollChanged(ObservableScrollView scrollView, int x, int y, int oldx, int oldy); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/anim/alpha_fadein.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/anim/alpha_fadeout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/anim/slide_in_from_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 12 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/anim/slide_out_from_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 27 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/animator/card_flip_left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 16 | 17 | 18 | 24 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/animator/card_flip_left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 17 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/animator/card_flip_right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 16 | 17 | 18 | 24 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/animator/card_flip_right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 17 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/color/nav_color_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_action_action_view_column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_action_action_view_column.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_action_content_new_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_action_content_new_picture.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_action_content_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_action_content_remove.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_action_editor_insert_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_action_editor_insert_chart.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_action_image_blur_linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_action_image_blur_linear.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_action_image_blur_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_action_image_blur_on.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_content_discard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_content_discard.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_fastfwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_fastfwd.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-hdpi/ic_play_circle_outline_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-hdpi/ic_play_circle_outline_white_36dp.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/benchmark_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/benchmark_bg.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/cell_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/cell_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/column_header_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/corner_cell_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/default_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_action_action_view_column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_action_action_view_column.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_action_content_new_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_action_content_new_picture.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_action_content_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_action_content_remove.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_action_editor_insert_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_action_editor_insert_chart.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_action_image_blur_linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_action_image_blur_linear.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_action_image_blur_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_action_image_blur_on.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_content_discard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_content_discard.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_fastfwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_fastfwd.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/ic_play_circle_outline_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/ic_play_circle_outline_white_36dp.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-mdpi/placeholder.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/row_header_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-mdpi/spinner_popup_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-nodpi/test_100x100_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-nodpi/test_100x100_2.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-nodpi/test_200x200_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-nodpi/test_200x200_2.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-nodpi/test_300x300_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-nodpi/test_300x300_2.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-nodpi/test_400x400_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-nodpi/test_400x400_2.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-nodpi/test_500x500_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-nodpi/test_500x500_2.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-nodpi/test_600x600_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-nodpi/test_600x600_2.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_action_view_column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_action_view_column.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_collections_view_as_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_collections_view_as_list.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_content_new_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_content_new_picture.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_content_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_content_remove.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_editor_insert_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_editor_insert_chart.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_image_blur_linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_image_blur_linear.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_image_blur_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_image_blur_on.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_list.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_picture.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_action_settings.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_content_discard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_content_discard.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_fastfwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_fastfwd.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xhdpi/ic_play_circle_outline_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xhdpi/ic_play_circle_outline_white_36dp.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_action_view_column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_action_view_column.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_collections_view_as_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_collections_view_as_list.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_content_new_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_content_new_picture.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_content_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_content_remove.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_editor_insert_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_editor_insert_chart.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_image_blur_linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_image_blur_linear.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_image_blur_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_action_image_blur_on.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_content_discard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_content_discard.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_fastfwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_fastfwd.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/ic_play_circle_outline_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/ic_play_circle_outline_white_36dp.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/mask.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/photo1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/photo1.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/photo1_med.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/photo1_med.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/photo2_med.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/photo2_med.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/photo3_med.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/photo3_med.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxhdpi/photo4_med.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxhdpi/photo4_med.webp -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_action_view_column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_action_view_column.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_content_new_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_content_new_picture.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_content_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_content_remove.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_editor_insert_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_editor_insert_chart.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_image_blur_linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_image_blur_linear.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_image_blur_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_action_image_blur_on.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_play_circle_outline_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickfav/BlurTestAndroid/4678e6d515272089ff97ecb3d0943bb5b1628274/BlurBenchmark/src/main/res/drawable-xxxhdpi/ic_play_circle_outline_white_36dp.png -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/activity_benchmark_result.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/dialog_benchmark_details.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 20 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/fragment_benchmark_results.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 14 | 15 | 18 | 19 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/fragment_liveblur.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 17 | 18 | 19 | 24 | 25 | 30 | 31 | 32 | 33 | 37 | 38 | 39 | 40 | 41 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/fragment_resultbrowser.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 17 | 18 | 23 | 24 | 25 | 31 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/fragment_resultsdiagram.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 17 | 18 | 23 | 24 | 35 | 36 | 41 | 42 | 43 | 48 | 49 | 58 | 59 | 64 | 65 | 66 | 71 | 72 | 81 | 82 | 87 | 88 | 89 | 90 | 91 | 97 | 98 | 99 | 105 | 106 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/fragment_staticblur.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 17 | 23 | 24 | 25 | 29 | 40 | 41 | 42 | 43 | 44 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_algorithm_checkbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_custom_img.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 18 | 28 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_debugview.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_listview.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_nav_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 21 | 22 | 28 | 29 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_result_cell.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_result_column_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 16 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_result_row_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 16 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_scrollview.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 19 | 25 | 30 | 36 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BlurBenchmark/src/main/res/layout/inc_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 19 | 26 | 34 | 45 | 46 | 47 | 48 | 55 | 62 | 70 | 81 | 82 | 88 | 89 | 97 | 98 |