FileDocCategorySizeDatePackage
BlockingGLTextureView.javaAPI DocAndroid 5.1 API13982Thu Mar 12 22:22:42 GMT 2015com.android.photos.views

BlockingGLTextureView

public class BlockingGLTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener
A TextureView that supports blocking rendering for synchronous drawing

Fields Summary
private RenderThread
mRenderThread
Constructors Summary
public BlockingGLTextureView(android.content.Context context)

        super(context);
        setSurfaceTextureListener(this);
    
Methods Summary
public voiddestroy()

        if (mRenderThread != null) {
            mRenderThread.finish();
            mRenderThread = null;
        }
    
protected voidfinalize()

        try {
            destroy();
        } catch (Throwable t) {
            // Ignore
        }
        super.finalize();
    
public voidonSurfaceTextureAvailable(android.graphics.SurfaceTexture surface, int width, int height)

        mRenderThread.setSurface(surface);
        mRenderThread.setSize(width, height);
    
public booleanonSurfaceTextureDestroyed(android.graphics.SurfaceTexture surface)

        if (mRenderThread != null) {
            mRenderThread.setSurface(null);
        }
        return false;
    
public voidonSurfaceTextureSizeChanged(android.graphics.SurfaceTexture surface, int width, int height)

        mRenderThread.setSize(width, height);
    
public voidonSurfaceTextureUpdated(android.graphics.SurfaceTexture surface)

    
public voidrender()

        mRenderThread.render();
    
public voidsetRenderer(android.opengl.GLSurfaceView.Renderer renderer)

        if (mRenderThread != null) {
            throw new IllegalArgumentException("Renderer already set");
        }
        mRenderThread = new RenderThread(renderer);