Lines Matching defs:usage

35  * <p>An Allocation also contains a set of usage flags that denote how the
36 * Allocation could be used. For example, an Allocation may have usage flags
83 * The usage of the Allocation. These signal to RenderScript where to place
102 * consumer. This usage will cause the Allocation to be created as
182 * Get the usage flags of the Allocation.
184 * @return usage this Allocation's set of the USAGE_* flags OR'd together
221 Allocation(int id, RenderScript rs, Type t, int usage) {
223 if ((usage & ~(USAGE_SCRIPT |
228 throw new RSIllegalArgumentException("Unknown usage specified.");
231 if ((usage & USAGE_IO_INPUT) != 0) {
234 if ((usage & ~(USAGE_IO_INPUT |
237 throw new RSIllegalArgumentException("Invalid usage combination.");
242 mUsage = usage;
324 * Propagate changes from one usage of the Allocation to the
334 throw new RSIllegalArgumentException("Source must be exactly one usage type.");
350 "Can only send buffer if IO_OUTPUT usage specified.");
372 "Can only receive if IO_INPUT usage specified.");
1201 * android.support.v8.renderscript.Type}, mipmap flag, and usage flags.
1206 * @param usage bit field specifying how the Allocation is
1209 static public Allocation createTyped(RenderScript rs, Type type, MipmapControl mips, int usage) {
1212 return AllocationThunker.createTyped(rst, type, mips, usage);
1218 int id = rs.nAllocationCreateTyped(type.getID(rs), mips.mID, usage, 0);
1222 return new Allocation(id, rs, type, usage);
1231 * @param usage bit field specifying how the allocation is
1236 static public Allocation createTyped(RenderScript rs, Type type, int usage) {
1237 return createTyped(rs, type, MipmapControl.MIPMAP_NONE, usage);
1259 * @param usage bit field specifying how the Allocation is
1265 int count, int usage) {
1268 return AllocationThunker.createSized(rs, e, count, usage);
1275 int id = rs.nAllocationCreateTyped(t.getID(rs), MipmapControl.MIPMAP_NONE.mID, usage, 0);
1279 return new Allocation(id, rs, t, usage);
1329 * @param usage bit field specifying how the allocation is
1337 int usage) {
1340 return AllocationThunker.createFromBitmap(rst, b, mips, usage);
1346 if ((usage & USAGE_SHARED) != 0) {
1352 return createFromBitmap(rs, newBitmap, mips, usage);
1357 // enable optimized bitmap path only with no mipmap and script-only usage
1360 usage == (USAGE_SHARED | USAGE_SCRIPT | USAGE_GRAPHICS_TEXTURE)) {
1361 int id = rs.nAllocationCreateBitmapBackedAllocation(t.getID(rs), mips.mID, b, usage);
1367 Allocation alloc = new Allocation(id, rs, t, usage);
1373 int id = rs.nAllocationCreateFromBitmap(t.getID(rs), mips.mID, b, usage);
1377 return new Allocation(id, rs, t, usage);
1407 * @param usage bit field specifying how the cubemap is utilized
1414 int usage) {
1439 int id = rs.nAllocationCubeCreateFromBitmap(t.getID(rs), mips.mID, b, usage);
1443 return new Allocation(id, rs, t, usage);
1478 * @param usage bit field specifying how the cubemap is utilized
1491 int usage) {
1514 Allocation cubemap = Allocation.createTyped(rs, t, mips, usage);
1573 * @param usage bit field specifying how the allocation is
1583 int usage) {
1586 if ((usage & (USAGE_SHARED | USAGE_IO_INPUT | USAGE_IO_OUTPUT)) != 0) {
1587 throw new RSIllegalArgumentException("Unsupported usage specified.");
1590 Allocation alloc = createFromBitmap(rs, b, mips, usage);
1622 * @param usage bit field specifying how the allocaiton is
1628 int usage) {
1633 Allocation alloc = Allocation.createSized(rs, Element.U8(rs), allocArray.length, usage);