summaryrefslogtreecommitdiffstats
path: root/rs
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2015-03-30 15:31:26 -0700
committerJason Sams <jsams@google.com>2015-03-30 15:31:26 -0700
commit6a420b5e0be235d35f319118eb4920f74a61dc5e (patch)
tree40ce8c50e651594cec8e16aafb1e8b6ff468382d /rs
parent469d94490ed9cf3e08610250a3358bdd83d618a6 (diff)
downloadframeworks_base-6a420b5e0be235d35f319118eb4920f74a61dc5e.zip
frameworks_base-6a420b5e0be235d35f319118eb4920f74a61dc5e.tar.gz
frameworks_base-6a420b5e0be235d35f319118eb4920f74a61dc5e.tar.bz2
unhide RS apis
Change-Id: I30c3349c9222765ad7850890e0431bc6a6d3757a
Diffstat (limited to 'rs')
-rw-r--r--rs/java/android/renderscript/Element.java15
-rw-r--r--rs/java/android/renderscript/RenderScript.java10
-rw-r--r--rs/java/android/renderscript/Script.java9
-rw-r--r--rs/java/android/renderscript/Type.java23
4 files changed, 20 insertions, 37 deletions
diff --git a/rs/java/android/renderscript/Element.java b/rs/java/android/renderscript/Element.java
index 60ff996..4b3e30f 100644
--- a/rs/java/android/renderscript/Element.java
+++ b/rs/java/android/renderscript/Element.java
@@ -119,9 +119,6 @@ public class Element extends BaseObj {
*/
public enum DataType {
NONE (0, 0),
- /**
- * @hide
- */
FLOAT_16 (1, 2),
FLOAT_32 (2, 4),
FLOAT_64 (3, 8),
@@ -390,9 +387,6 @@ public class Element extends BaseObj {
return rs.mElement_I64;
}
- /**
- * @hide
- */
public static Element F16(RenderScript rs) {
if(rs.mElement_F16 == null) {
rs.mElement_F16 = createUser(rs, DataType.FLOAT_16);
@@ -534,9 +528,6 @@ public class Element extends BaseObj {
return rs.mElement_RGBA_8888;
}
- /**
- * @hide
- */
public static Element F16_2(RenderScript rs) {
if(rs.mElement_HALF_2 == null) {
rs.mElement_HALF_2 = createVector(rs, DataType.FLOAT_16, 2);
@@ -544,9 +535,6 @@ public class Element extends BaseObj {
return rs.mElement_HALF_2;
}
- /**
- * @hide
- */
public static Element F16_3(RenderScript rs) {
if(rs.mElement_FLOAT_3 == null) {
rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_16, 3);
@@ -554,9 +542,6 @@ public class Element extends BaseObj {
return rs.mElement_HALF_3;
}
- /**
- * @hide
- */
public static Element F16_4(RenderScript rs) {
if(rs.mElement_HALF_4 == null) {
rs.mElement_HALF_4 = createVector(rs, DataType.FLOAT_16, 4);
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index e8e942c..7ef17a7 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -139,7 +139,8 @@ public class RenderScript {
* Returns an identifier that can be used to identify a particular
* minor version of RS.
*
- * @hide
+ * @return The minor RenderScript version number
+ *
*/
public static long getMinorID() {
return sMinorID;
@@ -1321,7 +1322,6 @@ public class RenderScript {
/**
* Create a RenderScript context.
*
- * @hide
* @param ctx The context.
* @return RenderScript
*/
@@ -1418,14 +1418,13 @@ public class RenderScript {
/**
* Gets or creates a RenderScript context of the specified type.
*
- * @hide
* @param ctx The context.
* @param ct The type of context to be created.
* @param sdkVersion The target SDK Version.
* @param flags The OR of the CREATE_FLAG_* options desired
* @return RenderScript
*/
- public static RenderScript create(Context ctx, int sdkVersion, ContextType ct, int flags) {
+ private static RenderScript create(Context ctx, int sdkVersion, ContextType ct, int flags) {
if (sdkVersion < 23) {
return internalCreate(ctx, sdkVersion, ct, flags);
}
@@ -1448,8 +1447,6 @@ public class RenderScript {
}
/**
- * @hide
- *
* Releases all the process contexts. This is the same as
* calling .destroy() on each unique context retreived with
* create(...). If no contexts have been created this
@@ -1486,7 +1483,6 @@ public class RenderScript {
*
* If you need a single context please use create()
*
- * @hide
* @param ctx The context.
* @return RenderScript
*/
diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java
index 65056ac..44a8a27 100644
--- a/rs/java/android/renderscript/Script.java
+++ b/rs/java/android/renderscript/Script.java
@@ -66,7 +66,6 @@ public class Script extends BaseObj {
}
/**
- * @hide Pending API review
* InvokeID is an identifier for an invoke function. It is used
* as an identifier for ScriptGroup creation.
*
@@ -86,7 +85,6 @@ public class Script extends BaseObj {
private final SparseArray<InvokeID> mIIDs = new SparseArray<InvokeID>();
/**
- * @hide Pending API review
* Only to be used by generated reflected classes.
*/
protected InvokeID createInvokeID(int slot) {
@@ -222,22 +220,21 @@ public class Script extends BaseObj {
/**
* Only intended for use by generated reflected code.
- *
- * @hide
*/
protected void forEach(int slot, Allocation[] ains, Allocation aout,
FieldPacker v) {
+
+ // FieldPacker is kept here to support regular params in the future.
forEach(slot, ains, aout, v, null);
}
/**
* Only intended for use by generated reflected code.
- *
- * @hide
*/
protected void forEach(int slot, Allocation[] ains, Allocation aout,
FieldPacker v, LaunchOptions sc) {
// TODO: Is this necessary if nScriptForEach calls validate as well?
+ // FieldPacker is kept here to support regular params in the future.
mRS.validate();
if (ains != null) {
for (Allocation ain : ains) {
diff --git a/rs/java/android/renderscript/Type.java b/rs/java/android/renderscript/Type.java
index a58e42c..cc9b58b 100644
--- a/rs/java/android/renderscript/Type.java
+++ b/rs/java/android/renderscript/Type.java
@@ -150,24 +150,29 @@ public class Type extends BaseObj {
}
/**
- * @hide
- */
- public int getArray(int dim) {
- if ((dim < 0) || (dim >= mMaxArrays)) {
+ * Return the dimension of the specified array.
+ *
+ * @param arrayNum The array dimension to query
+ * @return int
+ */
+ public int getArray(int arrayNum) {
+ if ((arrayNum < 0) || (arrayNum >= mMaxArrays)) {
throw new RSIllegalArgumentException("Array dimension out of range.");
}
- if (mArrays == null || dim >= mArrays.length) {
+ if (mArrays == null || arrayNum >= mArrays.length) {
// Dimension in range but no array for that dimension allocated
return 0;
}
- return mArrays[dim];
+ return mArrays[arrayNum];
}
/**
- * @hide
- */
+ * Return the number of array dimensions.
+ *
+ * @return int
+ */
public int getArrayCount() {
if (mArrays != null) return mArrays.length;
return 0;
@@ -377,7 +382,7 @@ public class Type extends BaseObj {
}
/**
- * @hide
+ * Adds an array dimension to the builder
*
* @param dim
* @param value