summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2012-03-22 16:59:38 -0700
committerAlex Sakhartchouk <alexst@google.com>2012-03-22 16:59:38 -0700
commitdc60cc4253e43bacd0a52e47d03c73a5b0203b6e (patch)
treeeee4cc4c43cf663e7277893b6a8d189d35bde2d5 /libs
parent043f5ced1bf82d8cf2df82a92a655afd26534df4 (diff)
downloadframeworks_base-dc60cc4253e43bacd0a52e47d03c73a5b0203b6e.zip
frameworks_base-dc60cc4253e43bacd0a52e47d03c73a5b0203b6e.tar.gz
frameworks_base-dc60cc4253e43bacd0a52e47d03c73a5b0203b6e.tar.bz2
Wrapping new api's with proper RS_VERSION
Change-Id: Ib8656cb2b6d0b8adeab15edfd704620451ce56ad
Diffstat (limited to 'libs')
-rw-r--r--libs/rs/scriptc/rs_allocation.rsh48
-rw-r--r--libs/rs/scriptc/rs_core.rsh25
-rw-r--r--libs/rs/scriptc/rs_element.rsh29
-rw-r--r--libs/rs/scriptc/rs_mesh.rsh29
-rw-r--r--libs/rs/scriptc/rs_program.rsh29
-rw-r--r--libs/rs/scriptc/rs_sampler.rsh29
-rw-r--r--libs/rs/scriptc/rs_types.rsh6
7 files changed, 48 insertions, 147 deletions
diff --git a/libs/rs/scriptc/rs_allocation.rsh b/libs/rs/scriptc/rs_allocation.rsh
index 392a3ef..b0840a0 100644
--- a/libs/rs/scriptc/rs_allocation.rsh
+++ b/libs/rs/scriptc/rs_allocation.rsh
@@ -14,31 +14,6 @@
* limitations under the License.
*/
-/*! \mainpage notitle
- *
- * Renderscript is a high-performance runtime that provides graphics rendering and
- * compute operations at the native level. Renderscript code is compiled on devices
- * at runtime to allow platform-independence as well.
- * This reference documentation describes the Renderscript runtime APIs, which you
- * can utilize to write Renderscript code in C99. The Renderscript header
- * files are automatically included for you, except for the rs_graphics.rsh header. If
- * you are doing graphics rendering, include the graphics header file like this:
- *
- * <code>#include "rs_graphics.rsh"</code>
- *
- * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here
- * as well as the Android framework APIs for Renderscript.
- * For documentation on the Android framework APIs, see the <a target="_parent" href=
- * "http://developer.android.com/reference/android/renderscript/package-summary.html">
- * android.renderscript</a> package reference.
- * For more information on how to develop with Renderscript and how the runtime and
- * Android framework APIs interact, see the <a target="_parent" href=
- * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript
- * developer guide</a> and the <a target="_parent" href=
- * "http://developer.android.com/resources/samples/RenderScript/index.html">
- * Renderscript samples</a>.
- */
-
/** @file rs_allocation.rsh
* \brief Allocation routines
*
@@ -168,6 +143,8 @@ extern const void * __attribute__((overloadable))
extern const void * __attribute__((overloadable))
rsGetElementAt(rs_allocation, uint32_t x, uint32_t y, uint32_t z);
+#if (defined(RS_VERSION) && (RS_VERSION >= 16))
+
/**
* @param a allocation to get data from
* @return element describing allocation layout
@@ -216,26 +193,7 @@ extern const float4 __attribute__((overloadable))
extern const float4 __attribute__((overloadable))
rsSample(rs_allocation a, rs_sampler s, float2 location, float lod);
-/**
- * Fetch allocation in a way described by the sampler
- * @param a 3D allocation to sample from
- * @param s sampler state
- * @param location to sample from
- */
-extern const float4 __attribute__((overloadable))
- rsSample(rs_allocation a, rs_sampler s, float3 location);
-
-/**
- * Fetch allocation in a way described by the sampler
- * @param a 3D allocation to sample from
- * @param s sampler state
- * @param location to sample from
- * @param lod mip level to sample from, for fractional values
- * mip levels will be interpolated if
- * RS_SAMPLER_LINEAR_MIP_LINEAR is used
- */
-extern const float4 __attribute__((overloadable))
- rsSample(rs_allocation a, rs_sampler s, float3 location, float lod);
+#endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
#endif
diff --git a/libs/rs/scriptc/rs_core.rsh b/libs/rs/scriptc/rs_core.rsh
index 5072e18..1b0f9db 100644
--- a/libs/rs/scriptc/rs_core.rsh
+++ b/libs/rs/scriptc/rs_core.rsh
@@ -14,6 +14,31 @@
* limitations under the License.
*/
+ /*! \mainpage notitle
+ *
+ * Renderscript is a high-performance runtime that provides graphics rendering and
+ * compute operations at the native level. Renderscript code is compiled on devices
+ * at runtime to allow platform-independence as well.
+ * This reference documentation describes the Renderscript runtime APIs, which you
+ * can utilize to write Renderscript code in C99. The Renderscript header
+ * files are automatically included for you, except for the rs_graphics.rsh header. If
+ * you are doing graphics rendering, include the graphics header file like this:
+ *
+ * <code>#include "rs_graphics.rsh"</code>
+ *
+ * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here
+ * as well as the Android framework APIs for Renderscript.
+ * For documentation on the Android framework APIs, see the <a target="_parent" href=
+ * "http://developer.android.com/reference/android/renderscript/package-summary.html">
+ * android.renderscript</a> package reference.
+ * For more information on how to develop with Renderscript and how the runtime and
+ * Android framework APIs interact, see the <a target="_parent" href=
+ * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript
+ * developer guide</a> and the <a target="_parent" href=
+ * "http://developer.android.com/resources/samples/RenderScript/index.html">
+ * Renderscript samples</a>.
+ */
+
/** @file rs_core.rsh
* \brief todo-jsams
*
diff --git a/libs/rs/scriptc/rs_element.rsh b/libs/rs/scriptc/rs_element.rsh
index 72cb51c..1a4cdb75 100644
--- a/libs/rs/scriptc/rs_element.rsh
+++ b/libs/rs/scriptc/rs_element.rsh
@@ -14,31 +14,6 @@
* limitations under the License.
*/
-/*! \mainpage notitle
- *
- * Renderscript is a high-performance runtime that provides graphics rendering and
- * compute operations at the native level. Renderscript code is compiled on devices
- * at runtime to allow platform-independence as well.
- * This reference documentation describes the Renderscript runtime APIs, which you
- * can utilize to write Renderscript code in C99. The Renderscript header
- * files are automatically included for you, except for the rs_graphics.rsh header. If
- * you are doing graphics rendering, include the graphics header file like this:
- *
- * <code>#include "rs_graphics.rsh"</code>
- *
- * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here
- * as well as the Android framework APIs for Renderscript.
- * For documentation on the Android framework APIs, see the <a target="_parent" href=
- * "http://developer.android.com/reference/android/renderscript/package-summary.html">
- * android.renderscript</a> package reference.
- * For more information on how to develop with Renderscript and how the runtime and
- * Android framework APIs interact, see the <a target="_parent" href=
- * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript
- * developer guide</a> and the <a target="_parent" href=
- * "http://developer.android.com/resources/samples/RenderScript/index.html">
- * Renderscript samples</a>.
- */
-
/** @file rs_element.rsh
* \brief Element routines
*
@@ -48,6 +23,8 @@
#ifndef __RS_ELEMENT_RSH__
#define __RS_ELEMENT_RSH__
+#if (defined(RS_VERSION) && (RS_VERSION >= 16))
+
/**
* @param e element to get data from
* @return number of sub-elements in this element
@@ -130,5 +107,7 @@ extern rs_data_kind __attribute__((overloadable))
extern uint32_t __attribute__((overloadable))
rsElementGetVectorSize(rs_element e);
+#endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
+
#endif // __RS_ELEMENT_RSH__
diff --git a/libs/rs/scriptc/rs_mesh.rsh b/libs/rs/scriptc/rs_mesh.rsh
index b606c1c..87ffd33 100644
--- a/libs/rs/scriptc/rs_mesh.rsh
+++ b/libs/rs/scriptc/rs_mesh.rsh
@@ -14,31 +14,6 @@
* limitations under the License.
*/
-/*! \mainpage notitle
- *
- * Renderscript is a high-performance runtime that provides graphics rendering and
- * compute operations at the native level. Renderscript code is compiled on devices
- * at runtime to allow platform-independence as well.
- * This reference documentation describes the Renderscript runtime APIs, which you
- * can utilize to write Renderscript code in C99. The Renderscript header
- * files are automatically included for you, except for the rs_graphics.rsh header. If
- * you are doing graphics rendering, include the graphics header file like this:
- *
- * <code>#include "rs_graphics.rsh"</code>
- *
- * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here
- * as well as the Android framework APIs for Renderscript.
- * For documentation on the Android framework APIs, see the <a target="_parent" href=
- * "http://developer.android.com/reference/android/renderscript/package-summary.html">
- * android.renderscript</a> package reference.
- * For more information on how to develop with Renderscript and how the runtime and
- * Android framework APIs interact, see the <a target="_parent" href=
- * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript
- * developer guide</a> and the <a target="_parent" href=
- * "http://developer.android.com/resources/samples/RenderScript/index.html">
- * Renderscript samples</a>.
- */
-
/** @file rs_mesh.rsh
* \brief Mesh routines
*
@@ -48,6 +23,8 @@
#ifndef __RS_MESH_RSH__
#define __RS_MESH_RSH__
+#if (defined(RS_VERSION) && (RS_VERSION >= 16))
+
/**
* @param m mesh to get data from
* @return number of allocations in the mesh that contain vertex
@@ -89,5 +66,7 @@ extern rs_allocation __attribute__((overloadable))
extern rs_primitive __attribute__((overloadable))
rsgMeshGetPrimitive(rs_mesh m, uint32_t index);
+#endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
+
#endif // __RS_MESH_RSH__
diff --git a/libs/rs/scriptc/rs_program.rsh b/libs/rs/scriptc/rs_program.rsh
index 7434a77..6a9929e 100644
--- a/libs/rs/scriptc/rs_program.rsh
+++ b/libs/rs/scriptc/rs_program.rsh
@@ -14,31 +14,6 @@
* limitations under the License.
*/
-/*! \mainpage notitle
- *
- * Renderscript is a high-performance runtime that provides graphics rendering and
- * compute operations at the native level. Renderscript code is compiled on devices
- * at runtime to allow platform-independence as well.
- * This reference documentation describes the Renderscript runtime APIs, which you
- * can utilize to write Renderscript code in C99. The Renderscript header
- * files are automatically included for you, except for the rs_graphics.rsh header. If
- * you are doing graphics rendering, include the graphics header file like this:
- *
- * <code>#include "rs_graphics.rsh"</code>
- *
- * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here
- * as well as the Android framework APIs for Renderscript.
- * For documentation on the Android framework APIs, see the <a target="_parent" href=
- * "http://developer.android.com/reference/android/renderscript/package-summary.html">
- * android.renderscript</a> package reference.
- * For more information on how to develop with Renderscript and how the runtime and
- * Android framework APIs interact, see the <a target="_parent" href=
- * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript
- * developer guide</a> and the <a target="_parent" href=
- * "http://developer.android.com/resources/samples/RenderScript/index.html">
- * Renderscript samples</a>.
- */
-
/** @file rs_program.rsh
* \brief Program object routines
*
@@ -48,6 +23,8 @@
#ifndef __RS_PROGRAM_RSH__
#define __RS_PROGRAM_RSH__
+#if (defined(RS_VERSION) && (RS_VERSION >= 16))
+
/**
* @hide
* Get program store depth function
@@ -146,7 +123,7 @@ extern bool __attribute__((overloadable))
extern rs_cull_mode __attribute__((overloadable))
rsgProgramRasterGetCullMode(rs_program_raster pr);
-
+#endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
#endif // __RS_PROGRAM_RSH__
diff --git a/libs/rs/scriptc/rs_sampler.rsh b/libs/rs/scriptc/rs_sampler.rsh
index 130eca0..c8948c7 100644
--- a/libs/rs/scriptc/rs_sampler.rsh
+++ b/libs/rs/scriptc/rs_sampler.rsh
@@ -14,31 +14,6 @@
* limitations under the License.
*/
-/*! \mainpage notitle
- *
- * Renderscript is a high-performance runtime that provides graphics rendering and
- * compute operations at the native level. Renderscript code is compiled on devices
- * at runtime to allow platform-independence as well.
- * This reference documentation describes the Renderscript runtime APIs, which you
- * can utilize to write Renderscript code in C99. The Renderscript header
- * files are automatically included for you, except for the rs_graphics.rsh header. If
- * you are doing graphics rendering, include the graphics header file like this:
- *
- * <code>#include "rs_graphics.rsh"</code>
- *
- * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here
- * as well as the Android framework APIs for Renderscript.
- * For documentation on the Android framework APIs, see the <a target="_parent" href=
- * "http://developer.android.com/reference/android/renderscript/package-summary.html">
- * android.renderscript</a> package reference.
- * For more information on how to develop with Renderscript and how the runtime and
- * Android framework APIs interact, see the <a target="_parent" href=
- * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript
- * developer guide</a> and the <a target="_parent" href=
- * "http://developer.android.com/resources/samples/RenderScript/index.html">
- * Renderscript samples</a>.
- */
-
/** @file rs_sampler.rsh
* \brief Sampler routines
*
@@ -48,6 +23,8 @@
#ifndef __RS_SAMPLER_RSH__
#define __RS_SAMPLER_RSH__
+#if (defined(RS_VERSION) && (RS_VERSION >= 16))
+
/**
* @hide
* Get sampler minification value
@@ -93,5 +70,7 @@ extern rs_sampler_value __attribute__((overloadable))
extern float __attribute__((overloadable))
rsSamplerGetAnisotropy(rs_sampler s);
+#endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
+
#endif // __RS_SAMPLER_RSH__
diff --git a/libs/rs/scriptc/rs_types.rsh b/libs/rs/scriptc/rs_types.rsh
index f8c2657..10617d8 100644
--- a/libs/rs/scriptc/rs_types.rsh
+++ b/libs/rs/scriptc/rs_types.rsh
@@ -402,6 +402,8 @@ typedef enum {
#endif //defined(RS_VERSION) && (RS_VERSION >= 14)
+#if (defined(RS_VERSION) && (RS_VERSION >= 16))
+
/**
* Describes the way mesh vertex data is interpreted when rendering
*
@@ -552,4 +554,6 @@ typedef enum {
RS_SAMPLER_INVALID = 100,
} rs_sampler_value;
-#endif
+#endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
+
+#endif // __RS_TYPES_RSH__