Code example for Allocation

Methods: copyTo

0
        mScript.set_radius(mRadius);
 
        mScript.invoke_filter();
        mRS.finish();
 
        long t = java.lang.System.currentTimeMillis();
 
        mScript.invoke_filter();
        mOutPixelsAllocation.copyTo(mBitmapOut);
 
        t = java.lang.System.currentTimeMillis() - t;
        Log.v(TAG, "getBenchmark: Renderscript frame time core ms " + t);
        mRadius = oldRadius;
        mScript.set_radius(mRadius);
 
        mScript.invoke_filter();
        mOutPixelsAllocation.copyTo(mBitmapOut);
        return t;
    } 
}