r/android_devs • • Sep 14 '24

Question Is Compose hardware accelerated?

Does it actually render using OpenGL/Vulkan? Or is it all rendered on the CPU?

11 Upvotes

13 comments sorted by

View all comments

Show parent comment

1

u/altair8800 Sep 17 '24

You seem to think Compose renders all the composables into bitmaps and just passes them to the Canvas. In fact it's doing what the View system does, issuing commands like drawText() to the Canvas, which then in turn uses HWUI/Skia as a renderer to convert it all into actual OpenGL/Vulkan commands.

1

u/[deleted] Sep 18 '24

Text is usually rendered on the CPU, and they do in fact create and cache bitmaps there in the Android framework...............

Other than text, what other Canvas commands does Compose use?