SurfaceTexture,SurfaceControl,SurfaceHolder

SurfaceTexture would hold the TextureView

SurfaceControl would hold the Normal View

SurfaceHolder would hold the SurfaceView

what's the different?



ActiveView need the TextureView to create the VirtualDisplay for multiwindow.

Captures frames from an image stream as an OpenGL ES texture.

The image stream may come from either camera preview or video decode. A SurfaceTexture may be used in place of a SurfaceHolder when specifying the output destination of a Camera orMediaPlayer object. Doing so will cause all the frames from the image stream to be sent to the SurfaceTexture object rather than to the device's display.

So if you want to capture the camera preview and don't want to show to the device's display, you can replace the SurfaceHolder by SurfaceTexture.

and For ActivityView, it shows the apk's UI to SufaceTexture,then SurfaceFlinger would compositor them to device's display.

1 How to create the SurfaceTexture? and it's BufferQueue?

2 How to create the SurfaceControl? and it's BufferQueue?



你可能感兴趣的:(Android)