0
点赞
收藏
分享

微信扫一扫

iTOP4412|Android-4.0.3_r1 HardwareRenderer

seuleyang 2022-05-03 阅读 57

0 前言

    本文重点分析HardwareRenderer的实现和应用。

1 类图

2 初始化

HardwareRenderer.GlRenderer.initialize(SurfaceHolder holder)
|-->if (isRequested() && !isEnabled())
|	|-->initializeEgl()
|	|	|-->if (sEgl == null && sEglConfig == null)
|	|	|	|-->sEgl = (EGL10) EGLContext.getEGL()
|	|	|	|
|	|	|	| // Get to the default display.
|	|	|	|-->sEglDisplay = sEgl.eglGetDisplay(EGL_DEFAULT_DISPLAY)
|	|	|	|-->if (sEglDisplay == EGL_NO_DISPLAY)
|	|	|	|	|-->throw new RuntimeException("eglGetDisplay failed " + GLUtils.getEGLErrorString(sEgl.eglGetError()));
|	|	|	|
|	|	|	| // We can now initialize EGL for that display
|	|	|	|-->int[] version = new int[2]
|	|	|	|-->if (!sEgl.eglInitialize(sEglDisplay, version))
|	|	|	|	|-->throw new RuntimeException("eglInitialize failed " + GLUtils.getEGLErrorString(sEgl.eglGetError()))
|	|	|	|
|	|	|	|-->
举报

相关推荐

0 条评论