Skip to content

Benchmark of RenderScript, RenderEffect, Vulkan and OpenGL ES in the same Android app

Notifications You must be signed in to change notification settings

RobbWatershed/renderscript-alternatives-benchmark

Repository files navigation

RenderScript Alternatives benchmark

Credits and inspiration :

Introduction

RenderScript is being deprecated since Android 12. We recommend computationally intensive applications to use Vulkan, the cross platform industry standard API. Please refer to the RenderScript Migration Guide for more details.

To help developers for the migration, this sample is created to demonstrate how to apply the image filtering to a bitmap with the Vulkan compute pipeline. The sample creates a common ImageProcessor interface, on the top of Vulkan Compute and RenderScript, that performs two compute tasks:

  • HUE rotation: A simple compute task with a single compute kernel.
  • Blur: A more complex compute task which executes two compute kernels sequentially.
  • Resize

All tasks are implemented with

  • RenderScript (intrinsics & custom scripts)
  • Vulkan
  • OpenGL ES 2.0
  • RenderEffect

to demonstrate the migration from RenderScript to Vulkan Compute pipeline.

Pre-requisites

  • Android Studio Arctic Fox 2020.3.1+
  • SDK Build Tools 31.0.0+
  • NDK r20+
  • Android API 29+

Getting Started

  1. Download Android Studio.
  2. Launch Android Studio.
  3. Open the sample directory.
  4. Click Tools/Android/Sync Project with Gradle Files.
  5. Click Run/Run 'app'.

Screenshots

Screenshot of Hue Rotation

Screenshot of Blur

About

Benchmark of RenderScript, RenderEffect, Vulkan and OpenGL ES in the same Android app

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published