Package org.robolectric.shadows
Class ShadowRenderScript
java.lang.Object
org.robolectric.shadows.ShadowRenderScript
Shadow for
RenderScript. The main purpose of this shadow is to allow creation of
RenderScript objects without crashing. Note that RenderScript will never run on Robolectric,
because it requires a GPU, and is deprecated.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddestroy()protected static RenderScriptinternalCreate(Context ctx, int sdkVersion, RenderScript.ContextType ct, int flags) The real implementation of this method spawns a new background thread, so we shadow at this level to prevent this from happening.booleanprotected longrsnAllocationCreateBitmapBackedAllocation(long con, long type, int mip, Bitmap bmp, int usage) protected longrsnAllocationCreateBitmapBackedAllocationPreQ(long con, long type, int mip, Bitmap bmp, int usage) protected longrsnAllocationCreateBitmapBackedAllocationQ(long con, long type, int mip, long bitmapHandle, int usage) protected longrsnAllocationCreateFromBitmap(long con, long type, int mip, Bitmap bmp, int usage) protected longrsnAllocationCreateFromBitmapPreQ(long con, long type, int mip, Bitmap bmp, int usage) protected longrsnAllocationCreateFromBitmapQ(long con, long type, int mip, long bitmapHandle, int usage) protected longrsnAllocationCreateTyped(long con, long type, int mip, int usage, long pointer) protected longrsnElementCreate(long con, long type, int kind, boolean norm, int vecSize) protected longrsnScriptIntrinsicCreate(long con, int id, long eid) protected longrsnTypeCreate(long con, long eid, int x, int y, int z, boolean mips, boolean faces, int yuv)
-
Constructor Details
-
ShadowRenderScript
public ShadowRenderScript()
-
-
Method Details
-
internalCreate
@Implementation protected static RenderScript internalCreate(Context ctx, int sdkVersion, RenderScript.ContextType ct, int flags) The real implementation of this method spawns a new background thread, so we shadow at this level to prevent this from happening. -
rsnElementCreate
@Implementation protected long rsnElementCreate(long con, long type, int kind, boolean norm, int vecSize) -
rsnScriptIntrinsicCreate
-
rsnAllocationCreateFromBitmap
@Implementation(minSdk=30) protected long rsnAllocationCreateFromBitmap(long con, long type, int mip, Bitmap bmp, int usage) -
rsnAllocationCreateFromBitmapQ
@Implementation(minSdk=29, maxSdk=29, methodName="rsnAllocationCreateFromBitmap") protected long rsnAllocationCreateFromBitmapQ(long con, long type, int mip, long bitmapHandle, int usage) -
rsnAllocationCreateFromBitmapPreQ
@Implementation(maxSdk=28, methodName="rsnAllocationCreateFromBitmap") protected long rsnAllocationCreateFromBitmapPreQ(long con, long type, int mip, Bitmap bmp, int usage) -
rsnAllocationCreateBitmapBackedAllocation
@Implementation(minSdk=30) protected long rsnAllocationCreateBitmapBackedAllocation(long con, long type, int mip, Bitmap bmp, int usage) -
rsnAllocationCreateBitmapBackedAllocationQ
@Implementation(minSdk=29, maxSdk=29, methodName="rsnAllocationCreateBitmapBackedAllocation") protected long rsnAllocationCreateBitmapBackedAllocationQ(long con, long type, int mip, long bitmapHandle, int usage) -
rsnAllocationCreateBitmapBackedAllocationPreQ
@Implementation(maxSdk=28, methodName="rsnAllocationCreateBitmapBackedAllocation") protected long rsnAllocationCreateBitmapBackedAllocationPreQ(long con, long type, int mip, Bitmap bmp, int usage) -
rsnTypeCreate
@Implementation protected long rsnTypeCreate(long con, long eid, int x, int y, int z, boolean mips, boolean faces, int yuv) -
rsnAllocationCreateTyped
@Implementation protected long rsnAllocationCreateTyped(long con, long type, int mip, int usage, long pointer) -
destroy
-
isDestroyed
public boolean isDestroyed()
-