summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/Program.java
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2012-01-06 10:36:06 -0800
committerAlex Sakhartchouk <alexst@google.com>2012-01-06 10:36:06 -0800
commitd5a62bb802887134ed652b01fa6a3159a5c6ad0e (patch)
tree9ce48d0bf5514a4c2f273fe6d3f5083245258823 /graphics/java/android/renderscript/Program.java
parent95853e4e2b77eece34f33edd062308aa16459eb7 (diff)
Adding getters to rs program obejcts.
Change-Id: Iff8ccc1835109d303201d6a1adb6e5cbde8ba634
Diffstat (limited to 'graphics/java/android/renderscript/Program.java')
-rw-r--r--graphics/java/android/renderscript/Program.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java
index a1b1ba3dac23..3f769eecdd97 100644
--- a/graphics/java/android/renderscript/Program.java
+++ b/graphics/java/android/renderscript/Program.java
@@ -77,6 +77,40 @@ public class Program extends BaseObj {
}
/**
+ * @hide
+ */
+ public int getConstantCount() {
+ return mConstants != null ? mConstants.length : 0;
+ }
+
+ /**
+ * @hide
+ */
+ public Type getConstant(int slot) {
+ if (slot < 0 || slot >= mConstants.length) {
+ throw new IllegalArgumentException("Slot ID out of range.");
+ }
+ return mConstants[slot];
+ }
+
+ /**
+ * @hide
+ */
+ public int getTextureCount() {
+ return mTextureCount;
+ }
+
+ /**
+ * @hide
+ */
+ public TextureType getTextureType(int slot) {
+ if ((slot < 0) || (slot >= mTextureCount)) {
+ throw new IllegalArgumentException("Slot ID out of range.");
+ }
+ return mTextures[slot];
+ }
+
+ /**
* Binds a constant buffer to be used as uniform inputs to the
* program
*