summaryrefslogtreecommitdiffstats
path: root/graphics/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/java/android')
-rw-r--r--graphics/java/android/renderscript/Allocation.java2
-rw-r--r--graphics/java/android/renderscript/Element.java182
-rw-r--r--graphics/java/android/renderscript/RenderScript.java35
3 files changed, 218 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index eeab9b4..e900584 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -79,7 +79,7 @@ public class Allocation extends BaseObj {
/**
* GRAPHICS_TEXTURE The allcation will be used as a texture
- * source by one or more graphcics programs.
+ * source by one or more graphics programs.
*
*/
public static final int USAGE_GRAPHICS_TEXTURE = 0x0002;
diff --git a/graphics/java/android/renderscript/Element.java b/graphics/java/android/renderscript/Element.java
index 5a72dbe..f844331 100644
--- a/graphics/java/android/renderscript/Element.java
+++ b/graphics/java/android/renderscript/Element.java
@@ -383,6 +383,41 @@ public class Element extends BaseObj {
return rs.mElement_FLOAT_4;
}
+ public static Element F64_2(RenderScript rs) {
+ if(rs.mElement_DOUBLE_2 == null) {
+ rs.mElement_DOUBLE_2 = createVector(rs, DataType.FLOAT_64, 2);
+ }
+ return rs.mElement_DOUBLE_2;
+ }
+
+ public static Element F64_3(RenderScript rs) {
+ if(rs.mElement_DOUBLE_3 == null) {
+ rs.mElement_DOUBLE_3 = createVector(rs, DataType.FLOAT_64, 3);
+ }
+ return rs.mElement_DOUBLE_3;
+ }
+
+ public static Element F64_4(RenderScript rs) {
+ if(rs.mElement_DOUBLE_4 == null) {
+ rs.mElement_DOUBLE_4 = createVector(rs, DataType.FLOAT_64, 4);
+ }
+ return rs.mElement_DOUBLE_4;
+ }
+
+ public static Element U8_2(RenderScript rs) {
+ if(rs.mElement_UCHAR_2 == null) {
+ rs.mElement_UCHAR_2 = createVector(rs, DataType.UNSIGNED_8, 2);
+ }
+ return rs.mElement_UCHAR_2;
+ }
+
+ public static Element U8_3(RenderScript rs) {
+ if(rs.mElement_UCHAR_3 == null) {
+ rs.mElement_UCHAR_3 = createVector(rs, DataType.UNSIGNED_8, 3);
+ }
+ return rs.mElement_UCHAR_3;
+ }
+
public static Element U8_4(RenderScript rs) {
if(rs.mElement_UCHAR_4 == null) {
rs.mElement_UCHAR_4 = createVector(rs, DataType.UNSIGNED_8, 4);
@@ -390,6 +425,153 @@ public class Element extends BaseObj {
return rs.mElement_UCHAR_4;
}
+ public static Element I8_2(RenderScript rs) {
+ if(rs.mElement_CHAR_2 == null) {
+ rs.mElement_CHAR_2 = createVector(rs, DataType.SIGNED_8, 2);
+ }
+ return rs.mElement_CHAR_2;
+ }
+
+ public static Element I8_3(RenderScript rs) {
+ if(rs.mElement_CHAR_3 == null) {
+ rs.mElement_CHAR_3 = createVector(rs, DataType.SIGNED_8, 3);
+ }
+ return rs.mElement_CHAR_3;
+ }
+
+ public static Element I8_4(RenderScript rs) {
+ if(rs.mElement_CHAR_4 == null) {
+ rs.mElement_CHAR_4 = createVector(rs, DataType.SIGNED_8, 4);
+ }
+ return rs.mElement_CHAR_4;
+ }
+
+ public static Element U16_2(RenderScript rs) {
+ if(rs.mElement_USHORT_2 == null) {
+ rs.mElement_USHORT_2 = createVector(rs, DataType.UNSIGNED_16, 2);
+ }
+ return rs.mElement_USHORT_2;
+ }
+
+ public static Element U16_3(RenderScript rs) {
+ if(rs.mElement_USHORT_3 == null) {
+ rs.mElement_USHORT_3 = createVector(rs, DataType.UNSIGNED_16, 3);
+ }
+ return rs.mElement_USHORT_3;
+ }
+
+ public static Element U16_4(RenderScript rs) {
+ if(rs.mElement_USHORT_4 == null) {
+ rs.mElement_USHORT_4 = createVector(rs, DataType.UNSIGNED_16, 4);
+ }
+ return rs.mElement_USHORT_4;
+ }
+
+ public static Element I16_2(RenderScript rs) {
+ if(rs.mElement_SHORT_2 == null) {
+ rs.mElement_SHORT_2 = createVector(rs, DataType.SIGNED_16, 2);
+ }
+ return rs.mElement_SHORT_2;
+ }
+
+ public static Element I16_3(RenderScript rs) {
+ if(rs.mElement_SHORT_3 == null) {
+ rs.mElement_SHORT_3 = createVector(rs, DataType.SIGNED_16, 3);
+ }
+ return rs.mElement_SHORT_3;
+ }
+
+ public static Element I16_4(RenderScript rs) {
+ if(rs.mElement_SHORT_4 == null) {
+ rs.mElement_SHORT_4 = createVector(rs, DataType.SIGNED_16, 4);
+ }
+ return rs.mElement_SHORT_4;
+ }
+
+ public static Element U32_2(RenderScript rs) {
+ if(rs.mElement_UINT_2 == null) {
+ rs.mElement_UINT_2 = createVector(rs, DataType.UNSIGNED_32, 2);
+ }
+ return rs.mElement_UINT_2;
+ }
+
+ public static Element U32_3(RenderScript rs) {
+ if(rs.mElement_UINT_3 == null) {
+ rs.mElement_UINT_3 = createVector(rs, DataType.UNSIGNED_32, 3);
+ }
+ return rs.mElement_UINT_3;
+ }
+
+ public static Element U32_4(RenderScript rs) {
+ if(rs.mElement_UINT_4 == null) {
+ rs.mElement_UINT_4 = createVector(rs, DataType.UNSIGNED_32, 4);
+ }
+ return rs.mElement_UINT_4;
+ }
+
+ public static Element I32_2(RenderScript rs) {
+ if(rs.mElement_INT_2 == null) {
+ rs.mElement_INT_2 = createVector(rs, DataType.SIGNED_32, 2);
+ }
+ return rs.mElement_INT_2;
+ }
+
+ public static Element I32_3(RenderScript rs) {
+ if(rs.mElement_INT_3 == null) {
+ rs.mElement_INT_3 = createVector(rs, DataType.SIGNED_32, 3);
+ }
+ return rs.mElement_INT_3;
+ }
+
+ public static Element I32_4(RenderScript rs) {
+ if(rs.mElement_INT_4 == null) {
+ rs.mElement_INT_4 = createVector(rs, DataType.SIGNED_32, 4);
+ }
+ return rs.mElement_INT_4;
+ }
+
+ public static Element U64_2(RenderScript rs) {
+ if(rs.mElement_ULONG_2 == null) {
+ rs.mElement_ULONG_2 = createVector(rs, DataType.UNSIGNED_64, 2);
+ }
+ return rs.mElement_ULONG_2;
+ }
+
+ public static Element U64_3(RenderScript rs) {
+ if(rs.mElement_ULONG_3 == null) {
+ rs.mElement_ULONG_3 = createVector(rs, DataType.UNSIGNED_64, 3);
+ }
+ return rs.mElement_ULONG_3;
+ }
+
+ public static Element U64_4(RenderScript rs) {
+ if(rs.mElement_ULONG_4 == null) {
+ rs.mElement_ULONG_4 = createVector(rs, DataType.UNSIGNED_64, 4);
+ }
+ return rs.mElement_ULONG_4;
+ }
+
+ public static Element I64_2(RenderScript rs) {
+ if(rs.mElement_LONG_2 == null) {
+ rs.mElement_LONG_2 = createVector(rs, DataType.SIGNED_64, 2);
+ }
+ return rs.mElement_LONG_2;
+ }
+
+ public static Element I64_3(RenderScript rs) {
+ if(rs.mElement_LONG_3 == null) {
+ rs.mElement_LONG_3 = createVector(rs, DataType.SIGNED_64, 3);
+ }
+ return rs.mElement_LONG_3;
+ }
+
+ public static Element I64_4(RenderScript rs) {
+ if(rs.mElement_LONG_4 == null) {
+ rs.mElement_LONG_4 = createVector(rs, DataType.SIGNED_64, 4);
+ }
+ return rs.mElement_LONG_4;
+ }
+
public static Element MATRIX_4X4(RenderScript rs) {
if(rs.mElement_MATRIX_4X4 == null) {
rs.mElement_MATRIX_4X4 = createUser(rs, DataType.MATRIX_4X4);
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 2110e37..9941827 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -613,8 +613,43 @@ public class RenderScript {
Element mElement_FLOAT_2;
Element mElement_FLOAT_3;
Element mElement_FLOAT_4;
+
+ Element mElement_DOUBLE_2;
+ Element mElement_DOUBLE_3;
+ Element mElement_DOUBLE_4;
+
+ Element mElement_UCHAR_2;
+ Element mElement_UCHAR_3;
Element mElement_UCHAR_4;
+ Element mElement_CHAR_2;
+ Element mElement_CHAR_3;
+ Element mElement_CHAR_4;
+
+ Element mElement_USHORT_2;
+ Element mElement_USHORT_3;
+ Element mElement_USHORT_4;
+
+ Element mElement_SHORT_2;
+ Element mElement_SHORT_3;
+ Element mElement_SHORT_4;
+
+ Element mElement_UINT_2;
+ Element mElement_UINT_3;
+ Element mElement_UINT_4;
+
+ Element mElement_INT_2;
+ Element mElement_INT_3;
+ Element mElement_INT_4;
+
+ Element mElement_ULONG_2;
+ Element mElement_ULONG_3;
+ Element mElement_ULONG_4;
+
+ Element mElement_LONG_2;
+ Element mElement_LONG_3;
+ Element mElement_LONG_4;
+
Element mElement_MATRIX_4X4;
Element mElement_MATRIX_3X3;
Element mElement_MATRIX_2X2;