1 Star 1 Fork 3

chenjim/android-blur

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

RenderScriptMigration Sample

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 migrate, this sample is created to demonstrate how to apply image filtering to a bitmap with Renderscript Intrinsics, Renderscript Scripts, Vulkan compute pipeline, GLSL compute (in Kotlin). Since the two effects demonstrated can also be implemented using the platform RenderEffect, this is also demonstrated. The sample creates a common ImageProcessor interface 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.

Both tasks are implemented with RenderScript (intrinsics & custom scripts), GLSL, and Vulkan to demonstrate the migration from RenderScript to Vulkan or GLSL Compute pipelines.

Pre-requisites

  • Android Studio Flamingo 2022.2.1+
  • SDK Build Tools 34.0.0+
  • NDK 22.0.7026061
  • Android API 33+

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

Support

We highly recommend to use Stack Overflow to get help from the Android community.

If you've found an error in this sample, please file an issue: https://github.com/android/renderscript-samples

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenjim/android-blur.git
git@gitee.com:chenjim/android-blur.git
chenjim
android-blur
android-blur
blur

搜索帮助