diff options
author | Jason Sams <jsams@google.com> | 2013-04-19 13:17:10 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-19 13:17:10 -0700 |
commit | 6a341fc793db2ea1360332720644df018f2c279f (patch) | |
tree | dc51da4b4f487485305a29dc1b15d2df935e01ed /graphics | |
parent | 14ee0eead6cb7c76a7d77dab3b29d7050c4beed5 (diff) | |
parent | dd240d9a30578930bbf63b6bd9998e940dd16160 (diff) | |
download | frameworks_base-6a341fc793db2ea1360332720644df018f2c279f.zip frameworks_base-6a341fc793db2ea1360332720644df018f2c279f.tar.gz frameworks_base-6a341fc793db2ea1360332720644df018f2c279f.tar.bz2 |
am dd240d9a: am 0935f258: Merge "Updating API based on feedback" into jb-mr2-dev
* commit 'dd240d9a30578930bbf63b6bd9998e940dd16160':
Updating API based on feedback
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/renderscript/Allocation.java | 4 | ||||
-rw-r--r-- | graphics/java/android/renderscript/FieldPacker.java | 4 | ||||
-rw-r--r-- | graphics/java/android/renderscript/Script.java | 98 |
3 files changed, 97 insertions, 9 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index 5d1990a..773328c 100644 --- a/graphics/java/android/renderscript/Allocation.java +++ b/graphics/java/android/renderscript/Allocation.java @@ -1711,6 +1711,8 @@ public class Allocation extends BaseObj { } /** + * @hide + * * Interface to handle notification when new buffers are * available via USAGE_IO_INPUT. An application will receive * one notification when a buffer is available. Additional @@ -1722,6 +1724,8 @@ public class Allocation extends BaseObj { } /** + * @hide + * * Set a notification handler for USAGE_IO_INPUT * * @param callback instance of the IoInputNotifier class to be called diff --git a/graphics/java/android/renderscript/FieldPacker.java b/graphics/java/android/renderscript/FieldPacker.java index decd0c7..730d973 100644 --- a/graphics/java/android/renderscript/FieldPacker.java +++ b/graphics/java/android/renderscript/FieldPacker.java @@ -23,6 +23,10 @@ import java.util.BitSet; * Utility class for packing arguments and structures from Android system objects to * Renderscript objects. * + * This class is only intended to be used to support the + * reflected code generated by the RS tool chain. It should not + * be called directly. + * **/ public class FieldPacker { public FieldPacker(int len) { diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java index b4ba943..f0579ca 100644 --- a/graphics/java/android/renderscript/Script.java +++ b/graphics/java/android/renderscript/Script.java @@ -166,6 +166,15 @@ public class Script extends BaseObj { mRS.nScriptForEach(getID(mRS), slot, in_id, out_id, params); } + /** + * Only intended for use by generated reflected code. + * + * @param slot + * @param ain + * @param aout + * @param v + * @param sc + */ protected void forEach(int slot, Allocation ain, Allocation aout, FieldPacker v, LaunchOptions sc) { if (ain == null && aout == null) { throw new RSIllegalArgumentException( @@ -310,6 +319,12 @@ public class Script extends BaseObj { mRS.nScriptSetVarVE(getID(mRS), index, v.getData(), e.getID(mRS), dims); } + /** + * Only intended for use by generated reflected code. + * + * @param index + * @param v + */ public void getVarV(int index, FieldPacker v) { mRS.nScriptGetVarV(getID(mRS), index, v.getData()); } @@ -332,6 +347,10 @@ public class Script extends BaseObj { } + /** + * Only intended for use by generated reflected code. + * + */ public static class FieldBase { protected Element mElement; protected Allocation mAllocation; @@ -364,16 +383,29 @@ public class Script extends BaseObj { } } - public static final class LaunchOptions { - protected int xstart = 0; - protected int ystart = 0; - protected int xend = 0; - protected int yend = 0; - protected int zstart = 0; - protected int zend = 0; - - protected int strategy; + /** + * Class used to specify clipping for a kernel launch. + * + */ + public static final class LaunchOptions { + private int xstart = 0; + private int ystart = 0; + private int xend = 0; + private int yend = 0; + private int zstart = 0; + private int zend = 0; + private int strategy; + + /** + * Set the X range. If the end value is set to 0 the X dimension is not + * clipped. + * + * @param xstartArg Must be >= 0 + * @param xendArg Must be >= xstartArg + * + * @return LaunchOptions + */ public LaunchOptions setX(int xstartArg, int xendArg) { if (xstartArg < 0 || xendArg <= xstartArg) { throw new RSIllegalArgumentException("Invalid dimensions"); @@ -383,6 +415,15 @@ public class Script extends BaseObj { return this; } + /** + * Set the Y range. If the end value is set to 0 the Y dimension is not + * clipped. + * + * @param ystartArg Must be >= 0 + * @param yendArg Must be >= ystartArg + * + * @return LaunchOptions + */ public LaunchOptions setY(int ystartArg, int yendArg) { if (ystartArg < 0 || yendArg <= ystartArg) { throw new RSIllegalArgumentException("Invalid dimensions"); @@ -392,6 +433,15 @@ public class Script extends BaseObj { return this; } + /** + * Set the Z range. If the end value is set to 0 the Z dimension is not + * clipped. + * + * @param zstartArg Must be >= 0 + * @param zendArg Must be >= zstartArg + * + * @return LaunchOptions + */ public LaunchOptions setZ(int zstartArg, int zendArg) { if (zstartArg < 0 || zendArg <= zstartArg) { throw new RSIllegalArgumentException("Invalid dimensions"); @@ -402,21 +452,51 @@ public class Script extends BaseObj { } + /** + * Returns the current X start + * + * @return int current value + */ public int getXStart() { return xstart; } + /** + * Returns the current X end + * + * @return int current value + */ public int getXEnd() { return xend; } + /** + * Returns the current Y start + * + * @return int current value + */ public int getYStart() { return ystart; } + /** + * Returns the current Y end + * + * @return int current value + */ public int getYEnd() { return yend; } + /** + * Returns the current Z start + * + * @return int current value + */ public int getZStart() { return zstart; } + /** + * Returns the current Z end + * + * @return int current value + */ public int getZEnd() { return zend; } |