Lines Matching refs:rs
386 Allocation(long id, RenderScript rs, Type t, int usage) { in Allocation() argument
387 super(id, rs); in Allocation()
428 … Allocation(long id, RenderScript rs, Type t, boolean owningType, int usage, MipmapControl mips) { in Allocation() argument
429 this(id, rs, t, usage); in Allocation()
2668 … static public Allocation createTyped(RenderScript rs, Type type, MipmapControl mips, int usage) { in createTyped() argument
2671 rs.validate(); in createTyped()
2672 if (type.getID(rs) == 0) { in createTyped()
2676 long id = rs.nAllocationCreateTyped(type.getID(rs), mips.mID, usage, 0); in createTyped()
2680 return new Allocation(id, rs, type, false, usage, mips); in createTyped()
2697 static public Allocation createTyped(RenderScript rs, Type type, int usage) { in createTyped() argument
2698 return createTyped(rs, type, MipmapControl.MIPMAP_NONE, usage); in createTyped()
2710 static public Allocation createTyped(RenderScript rs, Type type) { in createTyped() argument
2711 return createTyped(rs, type, MipmapControl.MIPMAP_NONE, USAGE_SCRIPT); in createTyped()
2725 static public Allocation createSized(RenderScript rs, Element e, in createSized() argument
2729 rs.validate(); in createSized()
2730 Type.Builder b = new Type.Builder(rs, e); in createSized()
2734 … long id = rs.nAllocationCreateTyped(t.getID(rs), MipmapControl.MIPMAP_NONE.mID, usage, 0); in createSized()
2738 return new Allocation(id, rs, t, true, usage, MipmapControl.MIPMAP_NONE); in createSized()
2753 static public Allocation createSized(RenderScript rs, Element e, int count) { in createSized() argument
2754 return createSized(rs, e, count, USAGE_SCRIPT); in createSized()
2757 static Element elementFromBitmap(RenderScript rs, Bitmap b) { in elementFromBitmap() argument
2760 return Element.A_8(rs); in elementFromBitmap()
2763 return Element.RGBA_4444(rs); in elementFromBitmap()
2766 return Element.RGBA_8888(rs); in elementFromBitmap()
2769 return Element.RGB_565(rs); in elementFromBitmap()
2774 static Type typeFromBitmap(RenderScript rs, Bitmap b, in typeFromBitmap() argument
2776 Element e = elementFromBitmap(rs, b); in typeFromBitmap()
2777 Type.Builder tb = new Type.Builder(rs, e); in typeFromBitmap()
2797 static public Allocation createFromBitmap(RenderScript rs, Bitmap b, in createFromBitmap() argument
2802 rs.validate(); in createFromBitmap()
2812 return createFromBitmap(rs, newBitmap, mips, usage); in createFromBitmap()
2815 Type t = typeFromBitmap(rs, b, mips); in createFromBitmap()
2819 t.getElement().isCompatible(Element.RGBA_8888(rs)) && in createFromBitmap()
2821 … long id = rs.nAllocationCreateBitmapBackedAllocation(t.getID(rs), mips.mID, b, usage); in createFromBitmap()
2827 Allocation alloc = new Allocation(id, rs, t, true, usage, mips); in createFromBitmap()
2833 long id = rs.nAllocationCreateFromBitmap(t.getID(rs), mips.mID, b, usage); in createFromBitmap()
2837 return new Allocation(id, rs, t, true, usage, mips); in createFromBitmap()
2890 public static Allocation[] createAllocations(RenderScript rs, Type t, int usage, int numAlloc) { in createAllocations() argument
2893 rs.validate(); in createAllocations()
2894 if (t.getID(rs) == 0) { in createAllocations()
2899 mAllocationArray[0] = createTyped(rs, t, usage); in createAllocations()
2910 mAllocationArray[i] = createFromAllocation(rs, mAllocationArray[0]); in createAllocations()
2929 static Allocation createFromAllocation(RenderScript rs, Allocation alloc) { in createFromAllocation() argument
2932 rs.validate(); in createFromAllocation()
2933 if (alloc.getID(rs) == 0) { in createFromAllocation()
2940 long id = rs.nAllocationCreateTyped(type.getID(rs), mips.mID, usage, 0); in createFromAllocation()
2944 Allocation outAlloc = new Allocation(id, rs, type, false, usage, mips); in createFromAllocation()
3065 static public Allocation createFromBitmap(RenderScript rs, Bitmap b) { in createFromBitmap() argument
3066 if (rs.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) { in createFromBitmap()
3067 return createFromBitmap(rs, b, MipmapControl.MIPMAP_NONE, in createFromBitmap()
3070 return createFromBitmap(rs, b, MipmapControl.MIPMAP_NONE, in createFromBitmap()
3089 static public Allocation createCubemapFromBitmap(RenderScript rs, Bitmap b, in createCubemapFromBitmap() argument
3092 rs.validate(); in createCubemapFromBitmap()
3108 Element e = elementFromBitmap(rs, b); in createCubemapFromBitmap()
3109 Type.Builder tb = new Type.Builder(rs, e); in createCubemapFromBitmap()
3116 long id = rs.nAllocationCubeCreateFromBitmap(t.getID(rs), mips.mID, b, usage); in createCubemapFromBitmap()
3120 return new Allocation(id, rs, t, true, usage, mips); in createCubemapFromBitmap()
3136 static public Allocation createCubemapFromBitmap(RenderScript rs, in createCubemapFromBitmap() argument
3138 return createCubemapFromBitmap(rs, b, MipmapControl.MIPMAP_NONE, in createCubemapFromBitmap()
3160 static public Allocation createCubemapFromCubeFaces(RenderScript rs, in createCubemapFromCubeFaces() argument
3183 Element e = elementFromBitmap(rs, xpos); in createCubemapFromCubeFaces()
3184 Type.Builder tb = new Type.Builder(rs, e); in createCubemapFromCubeFaces()
3190 Allocation cubemap = Allocation.createTyped(rs, t, mips, usage); in createCubemapFromCubeFaces()
3192 AllocationAdapter adapter = AllocationAdapter.create2D(rs, cubemap); in createCubemapFromCubeFaces()
3226 static public Allocation createCubemapFromCubeFaces(RenderScript rs, in createCubemapFromCubeFaces() argument
3233 return createCubemapFromCubeFaces(rs, xpos, xneg, ypos, yneg, in createCubemapFromCubeFaces()
3253 static public Allocation createFromBitmapResource(RenderScript rs, in createFromBitmapResource() argument
3259 rs.validate(); in createFromBitmapResource()
3264 Allocation alloc = createFromBitmap(rs, b, mips, usage); in createFromBitmapResource()
3285 static public Allocation createFromBitmapResource(RenderScript rs, in createFromBitmapResource() argument
3288 if (rs.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) { in createFromBitmapResource()
3289 return createFromBitmapResource(rs, res, id, in createFromBitmapResource()
3293 return createFromBitmapResource(rs, res, id, in createFromBitmapResource()
3307 static public Allocation createFromString(RenderScript rs, in createFromString() argument
3310 rs.validate(); in createFromString()
3314 Allocation alloc = Allocation.createSized(rs, Element.U8(rs), allocArray.length, usage); in createFromString()