How many Android devices support GLSurfaceView.setPreserveEGLContextOnPause today?

你。 提交于 2019-12-07 02:35:56

问题


I don't need the exact number, the percentage would be enough. For example, if I develop an app with 4.0 min SDK version, how can I assure that the context will be preserved? May it depend on the OpenGL-ES version?

I tried to find information about chips with limited EGL context but couldn't find any.

The reason I need to know - I don't want to implement a special cache subsystem which will reload my textures after the app is resumed. I'm ready to drop some devices that don't support preserving the context (if less than 5-7%).


回答1:


Seems that OpenGL-ES 2.0 and forward all allow multiple EGL contexts. That is what the GLSurfaceView.GLThreadManager.checkGLESVersion() method assumes. And if you have multiple contexts, it is not necessary to terminate the EGL when pausing, neither release the EGL context when pausing.

Also, from the GLSurfaceView.GLThreadManager source code (around line 1908), we have the following comment, just after the checkGLESVersion() method:

// This check was required for some pre-Android-3.0 hardware. 
// Android 3.0 provides support for hardware-accelerated views, 
// therefore multiple EGL contexts are supported on all Android 3.0+ EGL drivers.

See more details at Grepcode GLSurfaceView.GLThreadManager.




回答2:


since API function is level 11 so Honeycomb. its 94.0% of devices according to Android Site Android Platform versions



来源:https://stackoverflow.com/questions/31068726/how-many-android-devices-support-glsurfaceview-setpreserveeglcontextonpause-toda

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