FileDocCategorySizeDatePackage
SimpleAppView.javaAPI DocAndroid 5.1 API1861Thu Mar 12 22:22:44 GMT 2015com.android.testapp

SimpleAppView

public class SimpleAppView extends android.renderscript.RSSurfaceView

Fields Summary
private android.renderscript.RenderScriptGL
mRS
SimpleAppRS
mRender
Constructors Summary
public SimpleAppView(android.content.Context context)

        super(context);
    
Methods Summary
protected voidonDetachedFromWindow()

        if (mRS != null) {
            mRender = null;
            mRS = null;
            destroyRenderScriptGL();
        }
    
public voidsurfaceChanged(android.view.SurfaceHolder holder, int format, int w, int h)

        super.surfaceChanged(holder, format, w, h);
        if (mRS == null) {
            RenderScriptGL.SurfaceConfig sc = new RenderScriptGL.SurfaceConfig();
            sc.setDepth(16, 24);
            sc.setSamples(1, 2, 1);
            mRS = createRenderScriptGL(sc);
            mRS.setSurface(holder, w, h);
            mRender = new SimpleAppRS();
            mRender.init(mRS, getResources(), w, h);
        }