Understanding of Surface, SurfaceView and SurfaceHolder

 Surface、SurfaceView和SurfaceHolder的理解

SurfaceView is an inherited class of View. A Surface dedicated to drawing is nested in SurfaceView. Surface is behind SurfaceView. SurfaceView provides a visible area to display Surface. SurfaceView is like a beam of light, only illuminated by SurfaceView. Surface can be displayed on the screen. Surface should be controlled by SurfaceHolder, including size, form, etc.
At the same time, when using SurfaceView for video playback, you must call surfaceholder.setFormat(int format) in the same thread, otherwise the surfaceview cannot be displayed normally.

Guess you like

Origin blog.csdn.net/skateboard1/article/details/44514579