Code example for Allocation

Methods: copyTo

0
		return view;
	} 
 
	protected void goMono() { 
		mScript.invoke_filter();
		mOutAllocation.copyTo(mBitmapOut);
	} 
 
	private void createScript() { 
		mRS = RenderScript.create(getActivity());
 
		mInAllocation = Allocation.createFromBitmap(mRS, mBitmapIn,
				Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT);
		mOutAllocation = Allocation.createTyped(mRS, mInAllocation.getType());
 
		mScript = new ScriptC_monochrome(mRS, getResources(), R.raw.monochrome);
 
		mScript.set_gIn(mInAllocation);
		mScript.set_gOut(mOutAllocation);
		mScript.set_gScript(mScript);