FileDocCategorySizeDatePackage
UT_refcount.javaAPI DocAndroid 5.1 API1640Thu Mar 12 22:22:54 GMT 2015com.android.rs.test_compat

UT_refcount

public class UT_refcount extends UnitTest

Fields Summary
private android.content.res.Resources
mRes
Constructors Summary
protected UT_refcount(RSTestCore rstc, android.content.res.Resources res, android.content.Context ctx)

        super(rstc, "Refcount", ctx);
        mRes = res;
    
Methods Summary
private voidinitializeGlobals(RenderScript RS, ScriptC_refcount s)

        Type.Builder typeBuilder = new Type.Builder(RS, Element.I32(RS));
        int X = 500;
        int Y = 700;
        typeBuilder.setX(X).setY(Y);
        Allocation A = Allocation.createTyped(RS, typeBuilder.create());
        s.set_globalA(A);
    
public voidrun()

        RenderScript pRS = RenderScript.create(mCtx);
        pRS.setMessageHandler(mRsMessage);
        ScriptC_refcount s = new ScriptC_refcount(pRS);
        initializeGlobals(pRS, s);
        s.invoke_refcount_test();
        pRS.finish();
        waitForMessage();
        pRS.destroy();