Class ShadowRenderScript

java.lang.Object
org.robolectric.shadows.ShadowRenderScript

@Implements(android.renderscript.RenderScript.class) public class ShadowRenderScript extends Object
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 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

      @Implementation protected long rsnScriptIntrinsicCreate(long con, int id, long eid)
    • 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

      @Filter protected void destroy()
    • isDestroyed

      public boolean isDestroyed()