BlurView icon indicating copy to clipboard operation
BlurView copied to clipboard

Have you considered to add Vulkan or google's toolkit implementation?

Open Danubis-Luo opened this issue 3 years ago • 4 comments

For devices under Android 31, google recommends using their toolkit or Vulkan to replace depreciated RenderScript for better performance. Have you considered to add those implementations to your library?

Danubis-Luo avatar Mar 24 '23 20:03 Danubis-Luo

There's a RenderEffectBlur to replace RenderscriptBlur on newer APIs. Hope that works for you.

It's way simpler than the Vulkan or OpenGL approach, so I'm not really considering them

Dimezis avatar Mar 24 '23 20:03 Dimezis

But RenderEffect does not work on devices under Android 31.

Danubis-Luo avatar Mar 25 '23 03:03 Danubis-Luo

Ah, by "under" you meant before Android 31. No, I'm not planning anything. I don't think it's worth the effort

Dimezis avatar Mar 25 '23 08:03 Dimezis

The Toolkit could be integrated more or less painlessly, but there are still a couple of problems with it.

  1. It allocates a bitmap on each blur call, which is not good, but could be avoided easily if forked
  2. It's not clear if it's actually better than Renderscript, since it's also executed on the CPU. With Renderscript, there's at least a chance that a given device might still have RS GPU support. The Toolkit always runs on CPU though, so there's no good way to guess what algorithm would be faster on any particular device.

Dimezis avatar Mar 25 '23 10:03 Dimezis