Android视图是否受OpenGL支持? [英] Are Android Views backed by OpenGL?

查看:170
本文介绍了Android视图是否受OpenGL支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本机Android视图(View类及其扩展的所有内容,即TextView,ImageView等...)是否在后台使用OpenGL?

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

如果没有,那么将OpenGL用于普通的Android开发人员,相对于将常规视图用于自定义UI组件,有什么优势吗?

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?

推荐答案

原生Android视图(View类及其扩展的所有内容,即TextView,ImageView等)是否在后台使用OpenGL?

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

基本上是, OpenGL ES 是显示硬件系统用来在上面绘制内容的API屏幕.最近, Vulkan 作为备用API受到了支持,并且将使用角度以提供对OpenGL ES的支持.

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.

由于 Android开放源项目

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

对于普通的Android开发人员而言,使用OpenGL相对于将常规视图用于自定义UI组件有什么优势吗?

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

如果您想完全控制要渲染的内容,这是游戏,3D建模或一个类似Flutter的UI框架,那么OpenGL ES或Vulkan将是合适的.

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.

否则,对于常规的Android应用程序而言,编写使用Android UI框架的自定义UI视图将是适当的,因为这将利用Google IO演示文稿中描述的所有工作:

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)

这篇关于Android视图是否受OpenGL支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆