diff options
| author | Jason Sams <jsams@google.com> | 2012-03-23 13:51:56 -0700 |
|---|---|---|
| committer | Jason Sams <jsams@google.com> | 2012-03-23 13:51:56 -0700 |
| commit | 03d2d00dc8ce40528d232fdf81eb0b05e92023a7 (patch) | |
| tree | 634ba348639d64ba437708eb52f5b1adde55c2f9 /graphics/java/android/renderscript | |
| parent | cbe55a1c93056cf2878007ebf823a0ac2ad168b1 (diff) | |
| download | frameworks_base-03d2d00dc8ce40528d232fdf81eb0b05e92023a7.zip frameworks_base-03d2d00dc8ce40528d232fdf81eb0b05e92023a7.tar.gz frameworks_base-03d2d00dc8ce40528d232fdf81eb0b05e92023a7.tar.bz2 | |
Cleanup Allocation docs and getter funcs.
Change-Id: Ic6fb92e0675d64016f0d471c1d9e5328101e4b36
Diffstat (limited to 'graphics/java/android/renderscript')
| -rw-r--r-- | graphics/java/android/renderscript/Allocation.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index adeeaca..5a54647 100644 --- a/graphics/java/android/renderscript/Allocation.java +++ b/graphics/java/android/renderscript/Allocation.java @@ -188,6 +188,29 @@ public class Allocation extends BaseObj { return getID(); } + + /** + * Get the element of the type of the Allocation. + * + * @hide + * @return Element + * + */ + public Element getElement() { + return mType.getElement(); + } + + /** + * Get the usage flags of the Allocation. + * + * @hide + * @return usage + * + */ + public int getUsage() { + return mUsage; + } + private void updateCacheInfo(Type t) { mCurrentDimX = t.getX(); mCurrentDimY = t.getY(); @@ -294,10 +317,21 @@ public class Allocation extends BaseObj { } } + /** + * Get the type of the Allocation. + * + * @return Type + * + */ public Type getType() { return mType; } + /** + * Propogate changes from one usage of the allocation to the + * remaining usages of the allocation. + * + */ public void syncAll(int srcLocation) { switch (srcLocation) { case USAGE_SCRIPT: @@ -343,6 +377,11 @@ public class Allocation extends BaseObj { mRS.nAllocationIoReceive(getID()); } + /** + * Copy an array of RS objects to the allocation + * + * @param d Source array. + */ public void copyFrom(BaseObj[] d) { mRS.validate(); validateIsObject(); |
