我正在创建一个自定义视图并在单缓冲模式下设置 SurfaceTexture,如下所示:
public class CustomTextureView extends TextureView
{
public CustomTextureView(Context context)
{
super(context);
initializeView();
}
public void initializeView()
{
mSurfaceTexture = new SurfaceTexture(mSingleBuffered);
setSurfaceTexture(mSurfaceTexture);
setSurfaceTextureListener(new CustomSurfaceTextureListener(this));
}
}
https://issuetracker.google.com/issues/175718927帖子告诉不要TextureView
与单缓冲一起使用SurfaceTexture
。我想知道它是什么原因,因为它没有在文档中提到。另外,有没有一种方法可以创建单个缓冲SurfaceTexture
并创建一个view hierarchy
?