Are Android Views backed by OpenGL?

♀尐吖头ヾ 提交于 2020-06-17 09:10:47

问题


Do native Android views (View class and everything that extends it, i.e. TextView, ImageView, etc...), use OpenGL under the hood?

If not, are there any advantages to using OpenGL to the average Android Developer as opposed to using the regular views for custom UI components?


回答1:


Do native Android views (View class and everything that extends it, i.e. TextView, ImageView, etc...), use OpenGL under the hood?

Basically yes, OpenGL ES is the API used by the display hardware system to draw things on the screen. More recently Vulkan is gaining support as an alternate API and would be using a project like ANGLE to provide support for OpenGL ES.

As the Android Open Source Project already has a document on Graphics system in Android you should look there for more detail.

Are there any advantages to using OpenGL to the average Android Developer as opposed to using the regular views for custom UI components?

If you want complete control over what you are rendering which is the use case for games, 3D modeling, or a UI framework like Flutter then OpenGL ES or Vulkan would be appropriate.

Otherwise for regular Android apps writing custom UI View(s) which uses the Android UI Framework would be appropriate as that would take advantage of all of the work that is described in the Google IO presentation: Drawn out: how Android renders (Google I/O '18)



来源:https://stackoverflow.com/questions/60197470/are-android-views-backed-by-opengl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!