From edc3bb661e9c8964d3926cbd7344793a32a2c2cd Mon Sep 17 00:00:00 2001
From: Xia Wang To support versions lower than {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2},
+ * you can use the support library's {@link android.support.v4.text.BidiFormatter} class.
+ *
+ * These APIs provides the following functionality:
*
* 1. Bidi Wrapping
* When text in one language is mixed into a document in another, opposite-directionality language,
@@ -370,6 +374,7 @@ public final class BidiFormatter {
*
* @param str The input string.
* @param heuristic The algorithm to be used to estimate the string's overall direction.
+ * See {@link TextDirectionHeuristics} for pre-defined heuristics.
* @param isolate Whether to directionally isolate the string to prevent it from garbling the
* content around it
* @return Input string after applying the above processing.
@@ -401,6 +406,7 @@ public final class BidiFormatter {
*
* @param str The input string.
* @param heuristic The algorithm to be used to estimate the string's overall direction.
+ * See {@link TextDirectionHeuristics} for pre-defined heuristics.
* @return Input string after applying the above processing.
*/
public String unicodeWrap(String str, TextDirectionHeuristic heuristic) {
diff --git a/core/java/android/text/TextDirectionHeuristics.java b/core/java/android/text/TextDirectionHeuristics.java
index 7d7e3a935f94f..866137cc3a63f 100644
--- a/core/java/android/text/TextDirectionHeuristics.java
+++ b/core/java/android/text/TextDirectionHeuristics.java
@@ -22,7 +22,14 @@ import android.view.View;
import java.nio.CharBuffer;
/**
- * Some objects that implement TextDirectionHeuristic.
+ * Some objects that implement {@link TextDirectionHeuristic}. Use these with
+ * the {@link BidiFormatter#unicodeWrap unicodeWrap()} methods in {@link BidiFormatter}.
+ * Also notice that these direction heuristics correspond to the same types of constants
+ * provided in the {@link android.view.View} class for {@link android.view.View#setTextDirection
+ * setTextDirection()}, such as {@link android.view.View#TEXT_DIRECTION_RTL}.
+ * To support versions lower than {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2},
+ * you can use the support library's {@link android.support.v4.text.TextDirectionHeuristicsCompat}
+ * class.
*
*/
public class TextDirectionHeuristics {
From 1a0a50e7c23fb0ec5fe818a7069b890f22632691 Mon Sep 17 00:00:00 2001
From: Scott Main The reach of accessibility service APIs has been significantly increased in Android 4.1. It now
allows you to build services that monitor and respond to more input events, such as complex gestures
From 99700bfee02dd99e47bca5f0ab4e841239deda04 Mon Sep 17 00:00:00 2001
From: Scott Main Table 2, below, lists examples of video encoding profiles and parameters that the Android media framework supports for playback. In addition to these encoding parameter recommendations, a device's available video recording profiles can be used as a proxy for media playback capabilities. These profiles can be inspected using the {@link android.media.CamcorderProfile CamcorderProfile} class, which is available since API level 8. Table 2, below, lists examples of video encoding profiles and parameters that the Android
+media framework supports for playback in the H.264 Baseline Profile codec. While
+table 3 lists examples that the framework supports for playback in the VP8 media codec. Table 2. Examples of supported video encoding parameters. In addition to these encoding parameter recommendations,
+a device's available video recording profiles can be used as a proxy for media playback
+capabilities. These profiles can be inspected using the {@link android.media.CamcorderProfile
+CamcorderProfile} class, which is available since API level 8. Table 2.
+Examples of supported video encoding parameters for the H.264 Baseline Profile codec. Table 3.
+Examples of supported video encoding parameters for the VP8 codec. For video content that is streamed over HTTP or RTSP, there are additional requirements: 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. 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 android.renderscript package reference. For more information on how to develop with Renderscript and how the runtime and Android framework APIs interact, see the Renderscript developer guide and the Renderscript SDK samples. RenderScript is a high-performance runtime that provides 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 compute header files are automatically included for you. 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 android.renderscript package reference. For more information on how to develop with RenderScript and how the runtime and Android framework APIs interact, see the RenderScript developer guide and the RenderScript samples. true to allow MotionEvents to be split and dispatched to multiple
* child views. false to only allow one child view to be the target of
* any MotionEvent received by this ViewGroup.
+ * @attr ref android.R.styleable#ViewGroup_splitMotionEvents
*/
public void setMotionEventSplittingEnabled(boolean split) {
// TODO Applications really shouldn't change this setting mid-touch event,
@@ -4816,6 +4819,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* @param layoutMode the layout mode to use during layout operations
*
* @see #getLayoutMode()
+ * @attr ref android.R.styleable#ViewGroup_layoutMode
*/
public void setLayoutMode(int layoutMode) {
if (mLayoutMode != layoutMode) {
From e442662330c972aa96986e6f09305be836b6a7f4 Mon Sep 17 00:00:00 2001
From: Scott Main In this document
-
-
In this document
+
+ show more
+
+
+
@@ -492,7 +551,7 @@ device becomes connected to Wi-Fi).
Accessibility
-Accessibility service APIs
+Accessibility service APIs
VP8
-
+•
(Android 4.3+)•
(Android 2.3.3+)Streamable only in Android 4.0 and above
@@ -272,9 +272,17 @@ rates for raw PCM recordings at 8000, 16000 and 44100 Hz.
Video Encoding Recommendations
-
@@ -282,16 +290,10 @@ rates for raw PCM recordings at 8000, 16000 and 44100 Hz.
+
+
+
SD (Low quality)
SD (High quality)
- HD (Not available on all devices)
+ HD 720p (N/A on all devices)
-
-
Video codec
- H.264 Baseline Profile
- H.264 Baseline Profile
- H.264 Baseline Profile
-
Video resolution
176 x 144 px
@@ -331,6 +333,49 @@ rates for raw PCM recordings at 8000, 16000 and 44100 Hz.
+
+
+
+
+
+
+
+
+
+
+ SD (Low quality)
+ SD (High quality)
+ HD 720p (N/A on all devices)
+ HD 1080p (N/A on all devices)
+
+
+ Video resolution
+ 320 x 180 px
+ 640 x 360 px
+ 1280 x 720 px
+ 1920 x 1080 px
+
+
+ Video frame rate
+ 30 fps
+ 30 fps
+ 30 fps
+ 30 fps
+
+
+
+Video bitrate
+ 800 Kbps
+ 2 Mbps
+ 4 Mbps
+ 10 Mbps
+
From 65a90d0709db61455ac593b53602c34d8e69f2fd Mon Sep 17 00:00:00 2001
From: Wink Saville
+
diff --git a/docs/html/reference/renderscript/rs__allocation_8rsh.html b/docs/html/reference/renderscript/rs__allocation_8rsh.html index 9dd06d3d354c2..31736a6876ba9 100644 --- a/docs/html/reference/renderscript/rs__allocation_8rsh.html +++ b/docs/html/reference/renderscript/rs__allocation_8rsh.html @@ -3,7 +3,7 @@
-
+
@@ -27,7 +27,7 @@
+
Allocation routines.
Definition in file rs_allocation.rsh.
| void rsAllocationCopy1DRange | +( | +rs_allocation | +dstAlloc, | +
| + | + | uint32_t | +dstOff, | +
| + | + | uint32_t | +dstMip, | +
| + | + | uint32_t | +count, | +
| + | + | rs_allocation | +srcAlloc, | +
| + | + | uint32_t | +srcOff, | +
| + | + | uint32_t | +srcMip | +
| + | ) | ++ |
Copy part of an allocation from another allocation.
+| dstAlloc | Allocation to copy data into. |
| dstOff | The offset of the first element to be copied in the destination allocation. |
| dstMip | Mip level in the destination allocation. |
| count | The number of elements to be copied. |
| srcAlloc | The source data allocation. |
| srcOff | The offset of the first element in data to be copied in the source allocation. |
| srcMip | Mip level in the source allocation. |
| void rsAllocationCopy2DRange | +( | +rs_allocation | +dstAlloc, | +
| + | + | uint32_t | +dstXoff, | +
| + | + | uint32_t | +dstYoff, | +
| + | + | uint32_t | +dstMip, | +
| + | + | rs_allocation_cubemap_face | +dstFace, | +
| + | + | uint32_t | +width, | +
| + | + | uint32_t | +height, | +
| + | + | rs_allocation | +srcAlloc, | +
| + | + | uint32_t | +srcXoff, | +
| + | + | uint32_t | +srcYoff, | +
| + | + | uint32_t | +srcMip, | +
| + | + | rs_allocation_cubemap_face | +srcFace | +
| + | ) | ++ |
Copy a rectangular region into the allocation from another allocation.
+| dstAlloc | allocation to copy data into. |
| dstXoff | X offset of the region to update in the destination allocation. |
| dstYoff | Y offset of the region to update in the destination allocation. |
| dstMip | Mip level in the destination allocation. |
| dstFace | Cubemap face of the destination allocation, ignored for allocations that aren't cubemaps. |
| width | Width of the incoming region to update. |
| height | Height of the incoming region to update. |
| srcAlloc | The source data allocation. |
| srcXoff | X offset in data of the source allocation. |
| srcYoff | Y offset in data of the source allocation. |
| srcMip | Mip level in the source allocation. |
| srcFace | Cubemap face of the source allocation, ignored for allocations that aren't cubemaps. |
Query the dimension of an allocation.
| rs_element rsAllocationGetElement | +( | +rs_allocation | +a | ) | ++ |
Get the element object describing the allocation's layout
+| a | allocation to get data from |
| const void rsAllocationIoReceive | +( | +rs_allocation | +a | ) | ++ |
Receive a new set of contents from the queue.
+| a | allocation to work on |
| const void rsAllocationIoSend | +( | +rs_allocation | +a | ) | ++ |
Send the contents of the Allocation to the queue.
+| a | allocation to work on |
Returns the Allocation for a given pointer. The pointer should point within a valid allocation. The results are undefined if the pointer is not from a valid allocation.
+Returns the Allocation for a given pointer. The pointer should point within a valid allocation. The results are undefined if the pointer is not from a valid allocation.
+This function is deprecated and will be removed in the SDK from a future release.
| const void* rsGetElementAt | ( | rs_allocation | -, | +a, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @@ -189,7 +450,7 @@ Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const void* rsGetElementAt | ( | rs_allocation | -, | +a, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @@ -223,7 +484,7 @@ Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const void* rsGetElementAt | ( | rs_allocation | -, | +a, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @@ -261,6 +522,294 @@ Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const uchar rsGetElementAtYuv_uchar_U | +( | +rs_allocation | +a, | +
| + | + | uint32_t | +x, | +
| + | + | uint32_t | +y | +
| + | ) | ++ |
Extract a single element from an allocation.
+Coordinates are in the dimensions of the Y plane
+ +| const uchar rsGetElementAtYuv_uchar_V | +( | +rs_allocation | +a, | +
| + | + | uint32_t | +x, | +
| + | + | uint32_t | +y | +
| + | ) | ++ |
Extract a single element from an allocation.
+Coordinates are in the dimensions of the Y plane
+ +| const uchar rsGetElementAtYuv_uchar_Y | +( | +rs_allocation | +a, | +
| + | + | uint32_t | +x, | +
| + | + | uint32_t | +y | +
| + | ) | ++ |
Extract a single element from an allocation.
+ +| const float4 rsSample | +( | +rs_allocation | +a, | +
| + | + | rs_sampler | +s, | +
| + | + | float | +location | +
| + | ) | ++ |
Fetch allocation in a way described by the sampler
+| a | 1D allocation to sample from |
| s | sampler state |
| location | to sample from |
Fetch allocation in a way described by the sampler
+| a | 2D allocation to sample from |
| s | sampler state |
| location | to sample from |
| const float4 rsSample | +( | +rs_allocation | +a, | +
| + | + | rs_sampler | +s, | +
| + | + | float | +location, | +
| + | + | float | +lod | +
| + | ) | ++ |
Fetch allocation in a way described by the sampler
+| a | 1D allocation to sample from |
| s | sampler state |
| location | to sample from |
| lod | mip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used |
Fetch allocation in a way described by the sampler
+| a | 2D allocation to sample from |
| s | sampler state |
| location | to sample from |
| lod | mip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used |
| void rsSetElementAt | +( | +rs_allocation | +a, | +
| + | + | void * | +ptr, | +
| + | + | uint32_t | +x | +
| + | ) | ++ |
Set single element of an allocation.
+ +| void rsSetElementAt | +( | +rs_allocation | +a, | +
| + | + | void * | +ptr, | +
| + | + | uint32_t | +x, | +
| + | + | uint32_t | +y | +
| + | ) | ++ |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
+00001 /* @@ -46,81 +46,221 @@ 00023 #ifndef __RS_ALLOCATION_RSH__ 00024 #define __RS_ALLOCATION_RSH__ 00025 -00031 extern rs_allocation __attribute__((overloadable)) -00032 rsGetAllocation(const void *); -00033 -00039 extern uint32_t __attribute__((overloadable)) -00040 rsAllocationGetDimX(rs_allocation); -00041 -00047 extern uint32_t __attribute__((overloadable)) -00048 rsAllocationGetDimY(rs_allocation); -00049 -00055 extern uint32_t __attribute__((overloadable)) -00056 rsAllocationGetDimZ(rs_allocation); -00057 -00063 extern uint32_t __attribute__((overloadable)) -00064 rsAllocationGetDimLOD(rs_allocation); -00065 -00071 extern uint32_t __attribute__((overloadable)) -00072 rsAllocationGetDimFaces(rs_allocation); -00073 -00074 #if (defined(RS_VERSION) && (RS_VERSION >= 14)) -00075 -00089 extern void __attribute__((overloadable)) -00090 rsAllocationCopy1DRange(rs_allocation dstAlloc, -00091 uint32_t dstOff, uint32_t dstMip, -00092 uint32_t count, -00093 rs_allocation srcAlloc, -00094 uint32_t srcOff, uint32_t srcMip); -00095 -00117 extern void __attribute__((overloadable)) -00118 rsAllocationCopy2DRange(rs_allocation dstAlloc, -00119 uint32_t dstXoff, uint32_t dstYoff, -00120 uint32_t dstMip, -00121 rs_allocation_cubemap_face dstFace, -00122 uint32_t width, uint32_t height, -00123 rs_allocation srcAlloc, -00124 uint32_t srcXoff, uint32_t srcYoff, -00125 uint32_t srcMip, -00126 rs_allocation_cubemap_face srcFace); -00127 -00128 #endif //defined(RS_VERSION) && (RS_VERSION >= 14) -00129 -00133 extern const void * __attribute__((overloadable)) -00134 rsGetElementAt(rs_allocation, uint32_t x); -00138 extern const void * __attribute__((overloadable)) -00139 rsGetElementAt(rs_allocation, uint32_t x, uint32_t y); -00143 extern const void * __attribute__((overloadable)) -00144 rsGetElementAt(rs_allocation, uint32_t x, uint32_t y, uint32_t z); -00145 -00146 // New API's -00147 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) -00148 -00153 extern const void __attribute__((overloadable)) -00154 rsAllocationIoSend(rs_allocation a); -00155 -00160 extern const void __attribute__((overloadable)) -00161 rsAllocationIoReceive(rs_allocation a); -00162 -00163 -00169 extern rs_element __attribute__((overloadable)) -00170 rsAllocationGetElement(rs_allocation a); -00171 -00178 extern const float4 __attribute__((overloadable)) -00179 rsSample(rs_allocation a, rs_sampler s, float location); -00189 extern const float4 __attribute__((overloadable)) -00190 rsSample(rs_allocation a, rs_sampler s, float location, float lod); -00191 -00198 extern const float4 __attribute__((overloadable)) -00199 rsSample(rs_allocation a, rs_sampler s, float2 location); -00200 -00210 extern const float4 __attribute__((overloadable)) -00211 rsSample(rs_allocation a, rs_sampler s, float2 location, float lod); -00212 -00213 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) -00214 -00215 #endif +00034 extern rs_allocation __attribute__((overloadable)) +00035 rsGetAllocation(const void *); +00036 +00042 extern uint32_t __attribute__((overloadable)) +00043 rsAllocationGetDimX(rs_allocation); +00044 +00050 extern uint32_t __attribute__((overloadable)) +00051 rsAllocationGetDimY(rs_allocation); +00052 +00058 extern uint32_t __attribute__((overloadable)) +00059 rsAllocationGetDimZ(rs_allocation); +00060 +00066 extern uint32_t __attribute__((overloadable)) +00067 rsAllocationGetDimLOD(rs_allocation); +00068 +00074 extern uint32_t __attribute__((overloadable)) +00075 rsAllocationGetDimFaces(rs_allocation); +00076 +00077 #if (defined(RS_VERSION) && (RS_VERSION >= 14)) +00078 +00092 extern void __attribute__((overloadable)) +00093 rsAllocationCopy1DRange(rs_allocation dstAlloc, +00094 uint32_t dstOff, uint32_t dstMip, +00095 uint32_t count, +00096 rs_allocation srcAlloc, +00097 uint32_t srcOff, uint32_t srcMip); +00098 +00120 extern void __attribute__((overloadable)) +00121 rsAllocationCopy2DRange(rs_allocation dstAlloc, +00122 uint32_t dstXoff, uint32_t dstYoff, +00123 uint32_t dstMip, +00124 rs_allocation_cubemap_face dstFace, +00125 uint32_t width, uint32_t height, +00126 rs_allocation srcAlloc, +00127 uint32_t srcXoff, uint32_t srcYoff, +00128 uint32_t srcMip, +00129 rs_allocation_cubemap_face srcFace); +00130 +00131 #endif //defined(RS_VERSION) && (RS_VERSION >= 14) +00132 +00136 extern const void * __attribute__((overloadable)) +00137 rsGetElementAt(rs_allocation a, uint32_t x); +00141 extern const void * __attribute__((overloadable)) +00142 rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y); +00146 extern const void * __attribute__((overloadable)) +00147 rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +00148 +00149 +00150 #if (defined(RS_VERSION) && (RS_VERSION >= 18)) +00151 #define GET_ELEMENT_AT(T) \ +00152 extern T __attribute__((overloadable)) \ +00153 rsGetElementAt_##T(rs_allocation a, uint32_t x); \ +00154 extern T __attribute__((overloadable)) \ +00155 rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y); \ +00156 extern T __attribute__((overloadable)) \ +00157 rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +00158 #else +00159 #define GET_ELEMENT_AT(T) \ +00160 static inline T __attribute__((overloadable)) \ +00161 rsGetElementAt_##T(rs_allocation a, uint32_t x) { \ +00162 return ((T *)rsGetElementAt(a, x))[0]; \ +00163 } \ +00164 static inline T __attribute__((overloadable)) \ +00165 rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y) { \ +00166 return ((T *)rsGetElementAt(a, x, y))[0]; \ +00167 } \ +00168 static inline T __attribute__((overloadable)) \ +00169 rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z) { \ +00170 return ((T *)rsGetElementAt(a, x, y, z))[0]; \ +00171 } +00172 #endif +00173 +00174 GET_ELEMENT_AT(char) +00175 GET_ELEMENT_AT(char2) +00176 GET_ELEMENT_AT(char3) +00177 GET_ELEMENT_AT(char4) +00178 GET_ELEMENT_AT(uchar) +00179 GET_ELEMENT_AT(uchar2) +00180 GET_ELEMENT_AT(uchar3) +00181 GET_ELEMENT_AT(uchar4) +00182 GET_ELEMENT_AT(short) +00183 GET_ELEMENT_AT(short2) +00184 GET_ELEMENT_AT(short3) +00185 GET_ELEMENT_AT(short4) +00186 GET_ELEMENT_AT(ushort) +00187 GET_ELEMENT_AT(ushort2) +00188 GET_ELEMENT_AT(ushort3) +00189 GET_ELEMENT_AT(ushort4) +00190 GET_ELEMENT_AT(int) +00191 GET_ELEMENT_AT(int2) +00192 GET_ELEMENT_AT(int3) +00193 GET_ELEMENT_AT(int4) +00194 GET_ELEMENT_AT(uint) +00195 GET_ELEMENT_AT(uint2) +00196 GET_ELEMENT_AT(uint3) +00197 GET_ELEMENT_AT(uint4) +00198 GET_ELEMENT_AT(long) +00199 GET_ELEMENT_AT(long2) +00200 GET_ELEMENT_AT(long3) +00201 GET_ELEMENT_AT(long4) +00202 GET_ELEMENT_AT(ulong) +00203 GET_ELEMENT_AT(ulong2) +00204 GET_ELEMENT_AT(ulong3) +00205 GET_ELEMENT_AT(ulong4) +00206 GET_ELEMENT_AT(float) +00207 GET_ELEMENT_AT(float2) +00208 GET_ELEMENT_AT(float3) +00209 GET_ELEMENT_AT(float4) +00210 GET_ELEMENT_AT(double) +00211 GET_ELEMENT_AT(double2) +00212 GET_ELEMENT_AT(double3) +00213 GET_ELEMENT_AT(double4) +00214 +00215 #undef GET_ELEMENT_AT 00216 +00217 // Jelly Bean +00218 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) +00219 +00224 extern const void __attribute__((overloadable)) +00225 rsAllocationIoSend(rs_allocation a); +00226 +00231 extern const void __attribute__((overloadable)) +00232 rsAllocationIoReceive(rs_allocation a); +00233 +00234 +00240 extern rs_element __attribute__((overloadable)) +00241 rsAllocationGetElement(rs_allocation a); +00242 +00249 extern const float4 __attribute__((overloadable)) +00250 rsSample(rs_allocation a, rs_sampler s, float location); +00260 extern const float4 __attribute__((overloadable)) +00261 rsSample(rs_allocation a, rs_sampler s, float location, float lod); +00262 +00269 extern const float4 __attribute__((overloadable)) +00270 rsSample(rs_allocation a, rs_sampler s, float2 location); +00271 +00281 extern const float4 __attribute__((overloadable)) +00282 rsSample(rs_allocation a, rs_sampler s, float2 location, float lod); +00283 +00284 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) +00285 +00286 #if (defined(RS_VERSION) && (RS_VERSION >= 18)) +00287 +00291 extern void __attribute__((overloadable)) +00292 rsSetElementAt(rs_allocation a, void* ptr, uint32_t x); +00293 +00297 extern void __attribute__((overloadable)) +00298 rsSetElementAt(rs_allocation a, void* ptr, uint32_t x, uint32_t y); +00299 +00300 #define SET_ELEMENT_AT(T) \ +00301 extern void __attribute__((overloadable)) \ +00302 rsSetElementAt_##T(rs_allocation a, T val, uint32_t x); \ +00303 extern void __attribute__((overloadable)) \ +00304 rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y); \ +00305 extern void __attribute__((overloadable)) \ +00306 rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y, uint32_t z); +00307 +00308 +00309 SET_ELEMENT_AT(char) +00310 SET_ELEMENT_AT(char2) +00311 SET_ELEMENT_AT(char3) +00312 SET_ELEMENT_AT(char4) +00313 SET_ELEMENT_AT(uchar) +00314 SET_ELEMENT_AT(uchar2) +00315 SET_ELEMENT_AT(uchar3) +00316 SET_ELEMENT_AT(uchar4) +00317 SET_ELEMENT_AT(short) +00318 SET_ELEMENT_AT(short2) +00319 SET_ELEMENT_AT(short3) +00320 SET_ELEMENT_AT(short4) +00321 SET_ELEMENT_AT(ushort) +00322 SET_ELEMENT_AT(ushort2) +00323 SET_ELEMENT_AT(ushort3) +00324 SET_ELEMENT_AT(ushort4) +00325 SET_ELEMENT_AT(int) +00326 SET_ELEMENT_AT(int2) +00327 SET_ELEMENT_AT(int3) +00328 SET_ELEMENT_AT(int4) +00329 SET_ELEMENT_AT(uint) +00330 SET_ELEMENT_AT(uint2) +00331 SET_ELEMENT_AT(uint3) +00332 SET_ELEMENT_AT(uint4) +00333 SET_ELEMENT_AT(long) +00334 SET_ELEMENT_AT(long2) +00335 SET_ELEMENT_AT(long3) +00336 SET_ELEMENT_AT(long4) +00337 SET_ELEMENT_AT(ulong) +00338 SET_ELEMENT_AT(ulong2) +00339 SET_ELEMENT_AT(ulong3) +00340 SET_ELEMENT_AT(ulong4) +00341 SET_ELEMENT_AT(float) +00342 SET_ELEMENT_AT(float2) +00343 SET_ELEMENT_AT(float3) +00344 SET_ELEMENT_AT(float4) +00345 SET_ELEMENT_AT(double) +00346 SET_ELEMENT_AT(double2) +00347 SET_ELEMENT_AT(double3) +00348 SET_ELEMENT_AT(double4) +00349 +00350 #undef SET_ELEMENT_AT +00351 +00352 +00356 extern const uchar __attribute__((overloadable)) +00357 rsGetElementAtYuv_uchar_Y(rs_allocation a, uint32_t x, uint32_t y); +00358 +00364 extern const uchar __attribute__((overloadable)) +00365 rsGetElementAtYuv_uchar_U(rs_allocation a, uint32_t x, uint32_t y); +00366 +00372 extern const uchar __attribute__((overloadable)) +00373 rsGetElementAtYuv_uchar_V(rs_allocation a, uint32_t x, uint32_t y); +00374 +00375 #endif // (defined(RS_VERSION) && (RS_VERSION >= 18)) +00376 +00377 #endif +00378
Atomic routines.
Definition in file rs_atomic.rsh.
-| int32_t rsAtomicAdd | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +value | +
| + | ) | ++ |
Atomic add a value to the value at addr. addr[0] += value
+| addr | Address of value to modify |
| value | Amount to add to the value at addr |
| uint32_t rsAtomicAdd | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +value | +
| + | ) | ++ |
Atomic add a value to the value at addr. addr[0] += value
+| addr | Address of value to modify |
| value | Amount to add to the value at addr |
| int32_t rsAtomicAnd | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +value | +
| + | ) | ++ |
Atomic Bitwise and a value from the value at addr. addr[0] &= value
+| addr | Address of value to modify |
| value | Amount to and with the value at addr |
| uint32_t rsAtomicAnd | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +value | +
| + | ) | ++ |
Atomic Bitwise and a value from the value at addr. addr[0] &= value
+| addr | Address of value to modify |
| value | Amount to and with the value at addr |
| int32_t rsAtomicCas | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +compareValue, | +
| + | + | int32_t | +newValue | +
| + | ) | ++ |
Compare-and-set operation with a full memory barrier.
+If the value at addr matches compareValue then newValue is written.
+| addr | The address to compare and replace if the compare passes. |
| compareValue | The value to test addr[0] against. |
| newValue | The value to write if the test passes. |
| uint32_t rsAtomicCas | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +compareValue, | +
| + | + | uint32_t | +newValue | +
| + | ) | ++ |
Compare-and-set operation with a full memory barrier.
+If the value at addr matches compareValue then newValue is written.
+| addr | The address to compare and replace if the compare passes. |
| compareValue | The value to test addr[0] against. |
| newValue | The value to write if the test passes. |
Atomic subtract one from the value at addr. Equal to rsAtomicSub(addr, 1)
+| addr | Address of value to decrement |
Atomic subtract one from the value at addr. Equal to rsAtomicSub(addr, 1)
+| addr | Address of value to decrement |
Atomic add one to the value at addr. Equal to rsAtomicAdd(addr, 1)
+| addr | Address of value to increment |
Atomic add one to the value at addr. Equal to rsAtomicAdd(addr, 1)
+| addr | Address of value to increment |
| uint32_t rsAtomicMax | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +value | +
| + | ) | ++ |
Atomic Set the value at addr to the max of addr and value addr[0] = rsMax(addr[0], value)
+| addr | Address of value to modify |
| value | comparison value |
| int32_t rsAtomicMax | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +value | +
| + | ) | ++ |
Atomic Set the value at addr to the max of addr and value addr[0] = rsMin(addr[0], value)
+| addr | Address of value to modify |
| value | comparison value |
| uint32_t rsAtomicMin | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +value | +
| + | ) | ++ |
Atomic Set the value at addr to the min of addr and value addr[0] = rsMin(addr[0], value)
+| addr | Address of value to modify |
| value | comparison value |
| int32_t rsAtomicMin | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +value | +
| + | ) | ++ |
Atomic Set the value at addr to the min of addr and value addr[0] = rsMin(addr[0], value)
+| addr | Address of value to modify |
| value | comparison value |
| int32_t rsAtomicOr | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +value | +
| + | ) | ++ |
Atomic Bitwise or a value from the value at addr. addr[0] |= value
+| addr | Address of value to modify |
| value | Amount to or with the value at addr |
| uint32_t rsAtomicOr | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +value | +
| + | ) | ++ |
Atomic Bitwise or a value from the value at addr. addr[0] |= value
+| addr | Address of value to modify |
| value | Amount to or with the value at addr |
| int32_t rsAtomicSub | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +value | +
| + | ) | ++ |
Atomic Subtract a value from the value at addr. addr[0] -= value
+| addr | Address of value to modify |
| value | Amount to subtract from the value at addr |
| uint32_t rsAtomicSub | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +value | +
| + | ) | ++ |
Atomic Subtract a value from the value at addr. addr[0] -= value
+| addr | Address of value to modify |
| value | Amount to subtract from the value at addr |
| uint32_t rsAtomicXor | +( | +volatile uint32_t * | +addr, | +
| + | + | uint32_t | +value | +
| + | ) | ++ |
Atomic Bitwise xor a value from the value at addr. addr[0] ^= value
+| addr | Address of value to modify |
| value | Amount to xor with the value at addr |
| int32_t rsAtomicXor | +( | +volatile int32_t * | +addr, | +
| + | + | int32_t | +value | +
| + | ) | ++ |
Atomic Bitwise xor a value from the value at addr. addr[0] ^= value
+| addr | Address of value to modify |
| value | Amount to xor with the value at addr |
00001 /* @@ -49,55 +49,55 @@ 00026 #if (defined(RS_VERSION) && (RS_VERSION >= 14)) 00027 00036 extern int32_t __attribute__((overloadable)) -00037 rsAtomicInc(volatile int32_t* addr); +00037 rsAtomicInc(volatile int32_t* addr); 00046 extern uint32_t __attribute__((overloadable)) -00047 rsAtomicInc(volatile uint32_t* addr); +00047 rsAtomicInc(volatile uint32_t* addr); 00048 00056 extern int32_t __attribute__((overloadable)) -00057 rsAtomicDec(volatile int32_t* addr); +00057 rsAtomicDec(volatile int32_t* addr); 00065 extern uint32_t __attribute__((overloadable)) -00066 rsAtomicDec(volatile uint32_t* addr); +00066 rsAtomicDec(volatile uint32_t* addr); 00067 00076 extern int32_t __attribute__((overloadable)) -00077 rsAtomicAdd(volatile int32_t* addr, int32_t value); +00077 rsAtomicAdd(volatile int32_t* addr, int32_t value); 00086 extern uint32_t __attribute__((overloadable)) -00087 rsAtomicAdd(volatile uint32_t* addr, uint32_t value); +00087 rsAtomicAdd(volatile uint32_t* addr, uint32_t value); 00088 00097 extern int32_t __attribute__((overloadable)) -00098 rsAtomicSub(volatile int32_t* addr, int32_t value); +00098 rsAtomicSub(volatile int32_t* addr, int32_t value); 00107 extern uint32_t __attribute__((overloadable)) -00108 rsAtomicSub(volatile uint32_t* addr, uint32_t value); +00108 rsAtomicSub(volatile uint32_t* addr, uint32_t value); 00109 00118 extern int32_t __attribute__((overloadable)) -00119 rsAtomicAnd(volatile int32_t* addr, int32_t value); +00119 rsAtomicAnd(volatile int32_t* addr, int32_t value); 00128 extern uint32_t __attribute__((overloadable)) -00129 rsAtomicAnd(volatile uint32_t* addr, uint32_t value); +00129 rsAtomicAnd(volatile uint32_t* addr, uint32_t value); 00130 00139 extern int32_t __attribute__((overloadable)) -00140 rsAtomicOr(volatile int32_t* addr, int32_t value); +00140 rsAtomicOr(volatile int32_t* addr, int32_t value); 00149 extern uint32_t __attribute__((overloadable)) -00150 rsAtomicOr(volatile uint32_t* addr, uint32_t value); +00150 rsAtomicOr(volatile uint32_t* addr, uint32_t value); 00151 00160 extern uint32_t __attribute__((overloadable)) -00161 rsAtomicXor(volatile uint32_t* addr, uint32_t value); +00161 rsAtomicXor(volatile uint32_t* addr, uint32_t value); 00170 extern int32_t __attribute__((overloadable)) -00171 rsAtomicXor(volatile int32_t* addr, int32_t value); +00171 rsAtomicXor(volatile int32_t* addr, int32_t value); 00172 00182 extern uint32_t __attribute__((overloadable)) -00183 rsAtomicMin(volatile uint32_t* addr, uint32_t value); +00183 rsAtomicMin(volatile uint32_t* addr, uint32_t value); 00193 extern int32_t __attribute__((overloadable)) -00194 rsAtomicMin(volatile int32_t* addr, int32_t value); +00194 rsAtomicMin(volatile int32_t* addr, int32_t value); 00195 00205 extern uint32_t __attribute__((overloadable)) -00206 rsAtomicMax(volatile uint32_t* addr, uint32_t value); +00206 rsAtomicMax(volatile uint32_t* addr, uint32_t value); 00216 extern int32_t __attribute__((overloadable)) -00217 rsAtomicMax(volatile int32_t* addr, int32_t value); +00217 rsAtomicMax(volatile int32_t* addr, int32_t value); 00218 00230 extern int32_t __attribute__((overloadable)) -00231 rsAtomicCas(volatile int32_t* addr, int32_t compareValue, int32_t newValue); +00231 rsAtomicCas(volatile int32_t* addr, int32_t compareValue, int32_t newValue); 00232 00244 extern uint32_t __attribute__((overloadable)) -00245 rsAtomicCas(volatile uint32_t* addr, uint32_t compareValue, uint32_t newValue); +00245 rsAtomicCas(volatile uint32_t* addr, uint32_t compareValue, uint32_t newValue); 00246 00247 #endif //defined(RS_VERSION) && (RS_VERSION >= 14) 00248 diff --git a/docs/html/reference/renderscript/rs__cl_8rsh.html b/docs/html/reference/renderscript/rs__cl_8rsh.html index 999fe0d92121a..2a781b67ddf9a 100644 --- a/docs/html/reference/renderscript/rs__cl_8rsh.html +++ b/docs/html/reference/renderscript/rs__cl_8rsh.html @@ -3,7 +3,7 @@ -rs_cl.rsh File Reference +/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh File Reference @@ -27,35 +27,42 @@-+rs_cl.rsh File Reference/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh File Reference
Functions | |
| char2 | convert_char2 (uchar2 v) |
| uchar2 | convert_uchar2 (uchar2 v) |
| short2 | convert_short2 (uchar2 v) |
| ushort2 | convert_ushort2 (uchar2 v) |
| int2 | convert_int2 (uchar2 v) |
| uint2 | convert_uint2 (uchar2 v) |
| float2 | convert_float2 (uchar2 v) |
| float | acos (float) |
| float | acosh (float) |
| _RS_RUNTIME float | acospi (float v) |
| float | acospi (float v) |
| float | asin (float) |
| float | asinh (float) |
| _RS_RUNTIME float | asinpi (float v) |
| float | asinpi (float v) |
| float | atan (float) |
| float | atan2 (float y, float x) |
| float | atanh (float) |
| _RS_RUNTIME float | atanpi (float v) |
| _RS_RUNTIME float | atan2pi (float y, float x) |
| float | atanpi (float v) |
| float | atan2pi (float y, float x) |
| float | cbrt (float) |
| float | ceil (float) |
| float | copysign (float x, float y) |
| float | cos (float) |
| float | cosh (float) |
| _RS_RUNTIME float | cospi (float v) |
| float | cospi (float v) |
| float | erfc (float) |
| float | erf (float) |
| float | exp (float) |
| float | exp2 (float) |
| float | pow (float x, float y) |
| _RS_RUNTIME float | exp10 (float v) |
| float | exp10 (float v) |
| float | expm1 (float) |
| float | fabs (float) |
| float | fdim (float, float) |
| float | fmax (float x, float y) |
| float | fmin (float x, float y) |
| float | fmod (float x, float y) |
| _RS_RUNTIME float | fract (float v, float *iptr) |
| float | fract (float v, float *iptr) |
| static float | fract (float v) |
| float | frexp (float v, int *iptr) |
| float | hypot (float x, float y) |
| int | ilogb (float) |
| float | lgamma (float x, int *y) |
| float | log (float) |
| float | log10 (float) |
| _RS_RUNTIME float | log2 (float v) |
| float | log2 (float v) |
| float | log1p (float v) |
| float | logb (float) |
| float | mad (float a, float b, float c) |
| float | modf (float x, float *iret) |
| float | nextafter (float x, float y) |
| _RS_RUNTIME float | pown (float v, int p) |
| _RS_RUNTIME float | powr (float v, float p) |
| float | pown (float v, int p) |
| float | powr (float v, float p) |
| float | remainder (float x, float y) |
| float | rint (float) |
| _RS_RUNTIME float | rootn (float v, int n) |
| float | rootn (float v, int n) |
| float | round (float) |
| float | sqrt (float) |
| _RS_RUNTIME float | rsqrt (float v) |
| float | rsqrt (float v) |
| float | sin (float v) |
| _RS_RUNTIME float | sincos (float v, float *cosptr) |
| float | sincos (float v, float *cosptr) |
| float | sinh (float) |
| _RS_RUNTIME float | sinpi (float v) |
| float | sinpi (float v) |
| float | tan (float v) |
| float | tanh (float) |
| _RS_RUNTIME float | tanpi (float v) |
| float | tanpi (float v) |
| float | tgamma (float) |
| float | trunc (float) |
| _RS_RUNTIME float | clamp (float amount, float low, float high) |
| _RS_RUNTIME float | degrees (float radians) |
| _RS_RUNTIME float | mix (float start, float stop, float amount) |
| _RS_RUNTIME float | radians (float degrees) |
| _RS_RUNTIME float | step (float edge, float v) |
| _RS_RUNTIME float | sign (float v) |
| _RS_RUNTIME float3 | cross (float3 lhs, float3 rhs) |
| _RS_RUNTIME float | dot (float lhs, float rhs) |
| _RS_RUNTIME float | length (float v) |
| _RS_RUNTIME float | distance (float lhs, float rhs) |
| _RS_RUNTIME float | normalize (float v) |
| uchar | abs (char v) |
| uchar | clz (uchar v) |
| uchar | min (uchar v1, uchar v2) |
| uchar | max (uchar v1, uchar v2) |
| float | clamp (float amount, float low, float high) |
| float | degrees (float radians) |
| float | mix (float start, float stop, float amount) |
| float | radians (float degrees) |
| float | step (float edge, float v) |
| float | sign (float v) |
| float3 | cross (float3 lhs, float3 rhs) |
| float | dot (float lhs, float rhs) |
| float | length (float v) |
| float | distance (float lhs, float rhs) |
| float | normalize (float v) |
| float | half_recip (float) |
| float | half_sqrt (float) |
| float | half_rsqrt (float v) |
| float | fast_length (float v) |
| float | fast_distance (float lhs, float rhs) |
| float | fast_normalize (float v) |
| float | native_exp2 (float v) |
| float | native_exp (float v) |
| float | native_exp10 (float v) |
Basic math functions.
Definition in file rs_cl.rsh.
| uchar abs | +( | +char | +v | ) | ++ |
Return the absolute value of a value.
+Supports 1,2,3,4 components of char, short, int.
+ +| _RS_RUNTIME float acospi | +float acospi | ( | float | v | ) | @@ -208,12 +248,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float asinpi | +float asinpi | ( | float | v | ) | @@ -282,12 +322,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float atan2pi | +float atan2pi | ( | float | y, | @@ -337,12 +377,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float atanpi | +float atanpi | ( | float | v | ) | @@ -394,12 +434,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float4 clamp | +float clamp | ( | float | amount, | @@ -424,9 +464,7 @@ Functions
Return the minimum of two values.
-Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float. Return the maximum of two values.
-Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float. Clamp a value to a specified high and low bound.
+Clamp a value to a specified high and low bound.
| amount | value to be clamped. Supports 1,2,3,4 components | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float cospi | +float cospi | ( | float | v | ) | @@ -531,12 +721,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float4 cross | +float4 cross | ( | float3 | lhs, | @@ -560,12 +750,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float degrees | +float degrees | ( | float | radians | ) | @@ -579,12 +769,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float distance | +float distance | ( | float | lhs, | @@ -608,12 +798,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float dot | +float dot | ( | float | lhs, | @@ -694,12 +884,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float exp10 | +float exp10 | ( | float | v | ) | @@ -768,6 +958,73 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float fast_distance | +( | +float | +lhs, | +
| + | + | float | +rhs | +
| + | ) | ++ |
Compute the approximate distance between two points.
+Supports 1,2,3,4 components
+ +| float fast_length | +( | +float | +v | ) | ++ |
Compute the approximate length of a vector.
+Supports 1,2,3,4 components
+ +| float fast_normalize | +( | +float | +v | ) | ++ |
Approximately normalize a vector.
+Supports 1,2,3,4 components
+| _RS_RUNTIME float fract | +float fract | ( | float | v, | @@ -985,6 +1242,27 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static float4 fract | +( | +float | +v | ) | + [inline, static] |
+
| float half_recip | +( | +float | +) | ++ |
Return the approximate reciprocal of a value.
+Supports 1,2,3,4 components
+ +| float half_rsqrt | +( | +float | +v | ) | ++ |
Return the approximate value of (1 / sqrt(value)).
+Supports 1,2,3,4 components
+ +| float half_sqrt | +( | +float | +) | ++ |
Return the approximate square root of a value.
+Supports 1,2,3,4 components
+| _RS_RUNTIME float length | +float length | ( | float | v | ) | @@ -1235,12 +1570,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float log2 | +float log2 | ( | float | v | ) | @@ -1308,12 +1643,70 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float mix | ( | float | start, | @@ -1367,7 +1760,7 @@ Functions
Return the integral and fractional components of a number Supports 1,2,3,4 components
+Return the integral and fractional components of a number. Supports 1,2,3,4 components
| x | Source value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float native_exp | +( | +float | +v | ) | ++ |
Fast approximate exp valid for inputs -86.f to 86.f Max 8192 ulps of error
+Supports 1,2,3,4 components
+ +| float native_exp10 | +( | +float | +v | ) | ++ |
Fast approximate exp10 valid for inputs -37.f to 37.f Max 8192 ulps of error
+Supports 1,2,3,4 components
+ +| float native_exp2 | +( | +float | +v | ) | ++ |
Fast approximate exp2 valid for inputs -125.f to 125.f Max 8192 ulps of error
+Supports 1,2,3,4 components
+| _RS_RUNTIME float4 normalize | +float normalize | ( | float | v | ) | @@ -1456,12 +1906,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float pown | +float pown | ( | float | v, | @@ -1485,12 +1935,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float powr | +float powr | ( | float | v, | @@ -1520,12 +1970,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float radians | +float radians | ( | float | degrees | ) | @@ -1587,12 +2037,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float rootn | +float rootn | ( | float | v, | @@ -1635,12 +2085,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float rsqrt | +float rsqrt | ( | float | v | ) | @@ -1650,21 +2100,16 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| v | The incoming value in radians Supports 1,2,3,4 components |
Supports 1,2,3,4 components
| _RS_RUNTIME float sign | +float sign | ( | float | v | ) | @@ -1673,6 +2118,7 @@ Functions
Return the sign of a value.
if (v < 0) return -1.f; else if (v > 0) return 1.f; else return 0.f;
Supports 1,2,3,4 components
@@ -1702,12 +2148,12 @@ Functions| _RS_RUNTIME float sincos | +float sincos | ( | float | v, | @@ -1758,12 +2204,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float sinpi | +float sinpi | ( | float | v | ) | @@ -1796,12 +2242,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float4 step | +float step | ( | float | edge, | @@ -1875,12 +2321,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float tanpi | +float tanpi | ( | float | v | ) | diff --git a/docs/html/reference/renderscript/rs__cl_8rsh_source.html b/docs/html/reference/renderscript/rs__cl_8rsh_source.html index 8cc3cb75bf245..ae5f70e9877d5 100644 --- a/docs/html/reference/renderscript/rs__cl_8rsh_source.html +++ b/docs/html/reference/renderscript/rs__cl_8rsh_source.html @@ -3,7 +3,7 @@ -
| bool | rsSendToClient (int cmdID, const void *data, uint len) | ||||
| void | rsSendToClientBlocking (int cmdID) | ||||
| void | rsSendToClientBlocking (int cmdID, const void *data, uint len) | ||||
| void | rsForEach (rs_script script, rs_allocation input, rs_allocation output, const void *usrData, const rs_script_call_t *sc) | ||||
| void | rsForEach (rs_script script, rs_allocation input, rs_allocation output, const void *usrData) | ||||
| void | rsForEach (rs_script script, rs_allocation input, rs_allocation output, const void *usrData, size_t usrDataLen, const rs_script_call_t *) | ||||
| void | rsForEach (rs_script script, rs_allocation input, rs_allocation output, const void *usrData, size_t usrDataLen) | ||||
| void | rsForEach (rs_script script, rs_allocation input, rs_allocation output) |
todo-jsams
+Definition in file rs_core.rsh.
Launch order hint for rsForEach calls. This provides a hint to the system to determine in which order the root function of the target is called with each cell of the allocation.
This is a hint and implementations may not obey the order.
-Definition at line 92 of file rs_core.rsh.
+Definition at line 96 of file rs_core.rsh.
| const void * | usrData, | +|||
| + | + | size_t | +usrDataLen, | +|
| const rs_script_call_t * | -sc | +|||
| @@ -150,6 +158,12 @@ Functions | ||||
| input | The allocation to source data from | |||
| output | the allocation to write date into | |||
| usrData | The user definied params to pass to the root script. May be NULL. | |||
| sc | Extra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL. Make a script to script call to launch work. One of the input or output is required to be a valid object. The input and output must be of the same dimensions. API 14+ | |||
| script | The target script to call | |||
| input | The allocation to source data from | |||
| output | the allocation to write date into | |||
| usrData | The user definied params to pass to the root script. May be NULL. | |||
| usrDataLen | The size of the userData structure. This will be used to perform a shallow copy of the data if necessary. | |||
| sc | Extra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL. |
| const void * | -usrData | +usrData, | + +|
| + | + | size_t | +usrDataLen | +
| + | ) | ++ |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
+ +| void rsForEach | +( | +rs_script | +script, | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| + | + | rs_allocation | +input, | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| + | + | rs_allocation | +output | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| diff --git a/docs/html/reference/renderscript/rs__core_8rsh_source.html b/docs/html/reference/renderscript/rs__core_8rsh_source.html index 888a8b4cffcc3..ddc870df5de43 100644 --- a/docs/html/reference/renderscript/rs__core_8rsh_source.html +++ b/docs/html/reference/renderscript/rs__core_8rsh_source.html @@ -3,7 +3,7 @@ - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Functions | |
| void | rsDebug (const char *, float) |
| void | rsDebug (const char *, float) |
| void | rsDebug (const char *, float, float) |
| void | rsDebug (const char *, float, float, float) |
| void | rsDebug (const char *, float, float, float, float) |
| void | rsDebug (const char *, long) |
| void | rsDebug (const char *, unsigned long) |
| void | rsDebug (const char *, const void *) |
| void | rsDebug (const char *, char) |
| void | rsDebug (const char *, unsigned char) |
| void | rsDebug (const char *, uchar2) |
| void | rsDebug (const char *, short) |
| void | rsDebug (const char *, ushort2) |
| void | rsDebug (const char *, long2) |
| void | rsDebug (const char *, ulong2) |
Utility debugging routines.
@@ -53,12 +60,12 @@ FunctionsDefinition in file rs_debug.rsh.
| _RS_RUNTIME void rsDebug | +void rsDebug | ( | const char * | , | @@ -451,6 +458,202 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void rsDebug | +( | +const char * | +, | +
| + | + | char | ++ |
| + | ) | ++ |
Debug function. Prints a string and value to the log.
+ +| void rsDebug | +( | +const char * | +, | +
| + | + | unsigned | +char | +
| + | ) | ++ |
Debug function. Prints a string and value to the log.
+ +| void rsDebug | +( | +const char * | +, | +
| + | + | uchar2 | ++ |
| + | ) | ++ |
Debug function. Prints a string and value to the log.
+ +| void rsDebug | +( | +const char * | +, | +
| + | + | short | ++ |
| + | ) | ++ |
Debug function. Prints a string and value to the log.
+ +| void rsDebug | +( | +const char * | +, | +
| + | + | ushort2 | ++ |
| + | ) | ++ |
Debug function. Prints a string and value to the log.
+ +| void rsDebug | +( | +const char * | +, | +
| + | + | long2 | ++ |
| + | ) | ++ |
Debug function. Prints a string and value to the log.
+ +| void rsDebug | +( | +const char * | +, | +
| + | + | ulong2 | ++ |
| + | ) | ++ |
Debug function. Prints a string and value to the log.
+00001 /* @@ -47,46 +47,107 @@ 00027 #define __RS_DEBUG_RSH__ 00028 00029 -00030 -00034 extern void __attribute__((overloadable)) -00035 rsDebug(const char *, float); -00039 extern void __attribute__((overloadable)) -00040 rsDebug(const char *, float, float); -00044 extern void __attribute__((overloadable)) -00045 rsDebug(const char *, float, float, float); -00049 extern void __attribute__((overloadable)) -00050 rsDebug(const char *, float, float, float, float); -00054 extern void __attribute__((overloadable)) -00055 rsDebug(const char *, double); -00059 extern void __attribute__((overloadable)) -00060 rsDebug(const char *, const rs_matrix4x4 *); -00064 extern void __attribute__((overloadable)) -00065 rsDebug(const char *, const rs_matrix3x3 *); -00069 extern void __attribute__((overloadable)) -00070 rsDebug(const char *, const rs_matrix2x2 *); -00074 extern void __attribute__((overloadable)) -00075 rsDebug(const char *, int); -00079 extern void __attribute__((overloadable)) -00080 rsDebug(const char *, uint); -00084 extern void __attribute__((overloadable)) -00085 rsDebug(const char *, long); -00089 extern void __attribute__((overloadable)) -00090 rsDebug(const char *, unsigned long); -00094 extern void __attribute__((overloadable)) -00095 rsDebug(const char *, long long); -00099 extern void __attribute__((overloadable)) -00100 rsDebug(const char *, unsigned long long); -00104 extern void __attribute__((overloadable)) -00105 rsDebug(const char *, const void *); -00106 #define RS_DEBUG(a) rsDebug(#a, a) -00107 #define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__) -00108 -00109 -00113 _RS_RUNTIME void __attribute__((overloadable)) rsDebug(const char *s, float2 v); -00117 _RS_RUNTIME void __attribute__((overloadable)) rsDebug(const char *s, float3 v); -00121 _RS_RUNTIME void __attribute__((overloadable)) rsDebug(const char *s, float4 v); -00122 -00123 #endif +00033 extern void __attribute__((overloadable)) +00034 rsDebug(const char *, float); +00038 extern void __attribute__((overloadable)) +00039 rsDebug(const char *, float, float); +00043 extern void __attribute__((overloadable)) +00044 rsDebug(const char *, float, float, float); +00048 extern void __attribute__((overloadable)) +00049 rsDebug(const char *, float, float, float, float); +00053 extern void __attribute__((overloadable)) +00054 rsDebug(const char *, float2); +00058 extern void __attribute__((overloadable)) +00059 rsDebug(const char *, float3); +00063 extern void __attribute__((overloadable)) +00064 rsDebug(const char *, float4); +00068 extern void __attribute__((overloadable)) +00069 rsDebug(const char *, double); +00073 extern void __attribute__((overloadable)) +00074 rsDebug(const char *, const rs_matrix4x4 *); +00078 extern void __attribute__((overloadable)) +00079 rsDebug(const char *, const rs_matrix3x3 *); +00083 extern void __attribute__((overloadable)) +00084 rsDebug(const char *, const rs_matrix2x2 *); +00088 extern void __attribute__((overloadable)) +00089 rsDebug(const char *, int); +00093 extern void __attribute__((overloadable)) +00094 rsDebug(const char *, uint); +00098 extern void __attribute__((overloadable)) +00099 rsDebug(const char *, long); +00103 extern void __attribute__((overloadable)) +00104 rsDebug(const char *, unsigned long); +00108 extern void __attribute__((overloadable)) +00109 rsDebug(const char *, long long); +00113 extern void __attribute__((overloadable)) +00114 rsDebug(const char *, unsigned long long); +00118 extern void __attribute__((overloadable)) +00119 rsDebug(const char *, const void *); +00120 +00121 #if (defined(RS_VERSION) && (RS_VERSION >= 17)) +00122 +00125 extern void __attribute__((overloadable)) +00126 rsDebug(const char *, char); +00130 extern void __attribute__((overloadable)) +00131 rsDebug(const char *, char2); +00135 extern void __attribute__((overloadable)) +00136 rsDebug(const char *, char3); +00140 extern void __attribute__((overloadable)) +00141 rsDebug(const char *, char4); +00145 extern void __attribute__((overloadable)) +00146 rsDebug(const char *, unsigned char); +00150 extern void __attribute__((overloadable)) +00151 rsDebug(const char *, uchar2); +00155 extern void __attribute__((overloadable)) +00156 rsDebug(const char *, uchar3); +00160 extern void __attribute__((overloadable)) +00161 rsDebug(const char *, uchar4); +00165 extern void __attribute__((overloadable)) +00166 rsDebug(const char *, short); +00170 extern void __attribute__((overloadable)) +00171 rsDebug(const char *, short2); +00175 extern void __attribute__((overloadable)) +00176 rsDebug(const char *, short3); +00180 extern void __attribute__((overloadable)) +00181 rsDebug(const char *, short4); +00185 extern void __attribute__((overloadable)) +00186 rsDebug(const char *, unsigned short); +00190 extern void __attribute__((overloadable)) +00191 rsDebug(const char *, ushort2); +00195 extern void __attribute__((overloadable)) +00196 rsDebug(const char *, ushort3); +00200 extern void __attribute__((overloadable)) +00201 rsDebug(const char *, ushort4); +00205 extern void __attribute__((overloadable)) +00206 rsDebug(const char *, int2); +00210 extern void __attribute__((overloadable)) +00211 rsDebug(const char *, int3); +00215 extern void __attribute__((overloadable)) +00216 rsDebug(const char *, int4); +00220 extern void __attribute__((overloadable)) +00221 rsDebug(const char *, uint2); +00225 extern void __attribute__((overloadable)) +00226 rsDebug(const char *, uint3); +00230 extern void __attribute__((overloadable)) +00231 rsDebug(const char *, uint4); +00235 extern void __attribute__((overloadable)) +00236 rsDebug(const char *, long2); +00240 extern void __attribute__((overloadable)) +00241 rsDebug(const char *, long3); +00245 extern void __attribute__((overloadable)) +00246 rsDebug(const char *, long4); +00250 extern void __attribute__((overloadable)) +00251 rsDebug(const char *, ulong2); +00255 extern void __attribute__((overloadable)) +00256 rsDebug(const char *, ulong3); +00260 extern void __attribute__((overloadable)) +00261 rsDebug(const char *, ulong4); +00262 #endif // (defined(RS_VERSION) && (RS_VERSION >= 17)) +00263 +00264 #define RS_DEBUG(a) rsDebug(#a, a) +00265 #define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__) +00266 +00267 #endif
+Functions | |
| uint32_t | rsElementGetSubElementCount (rs_element e) |
| rs_element | rsElementGetSubElement (rs_element, uint32_t index) |
| uint32_t | rsElementGetSubElementNameLength (rs_element e, uint32_t index) |
| uint32_t | rsElementGetSubElementName (rs_element e, uint32_t index, char *name, uint32_t nameLength) |
| uint32_t | rsElementGetSubElementArraySize (rs_element e, uint32_t index) |
| uint32_t | rsElementGetSubElementOffsetBytes (rs_element e, uint32_t index) |
| uint32_t | rsElementGetBytesSize (rs_element e) |
| rs_data_type | rsElementGetDataType (rs_element e) |
| rs_data_kind | rsElementGetDataKind (rs_element e) |
| uint32_t | rsElementGetVectorSize (rs_element e) |
Element routines.
Definition in file rs_element.rsh.
-| uint32_t rsElementGetBytesSize | +( | +rs_element | +e | ) | ++ |
Returns the size of element in bytes
+| e | element to get data from |
| rs_data_kind rsElementGetDataKind | +( | +rs_element | +e | ) | ++ |
Returns the element's data kind
+| e | element to get data from |
| rs_data_type rsElementGetDataType | +( | +rs_element | +e | ) | ++ |
Returns the element's data type
+| e | element to get data from |
| rs_element rsElementGetSubElement | +( | +rs_element | +, | +
| + | + | uint32_t | +index | +
| + | ) | ++ |
For complex elements, this function will return the sub-element at index
+| e | element to get data from |
| index | index of the sub-element to return |
| uint32_t rsElementGetSubElementArraySize | +( | +rs_element | +e, | +
| + | + | uint32_t | +index | +
| + | ) | ++ |
For complex elements, some sub-elements could be statically sized arrays. This function will return the array size for sub-element at index
+| e | element to get data from |
| index | index of the sub-element |
| uint32_t rsElementGetSubElementCount | +( | +rs_element | +e | ) | ++ |
Elements could be simple, such as an int or a float, or a structure with multiple sub elements, such as a collection of floats, float2, float4. This function returns zero for simple elements or the number of sub-elements otherwise.
+| e | element to get data from |
| uint32_t rsElementGetSubElementName | +( | +rs_element | +e, | +
| + | + | uint32_t | +index, | +
| + | + | char * | +name, | +
| + | + | uint32_t | +nameLength | +
| + | ) | ++ |
For complex elements, this function will return the sub-element name at index
+| e | element to get data from |
| index | index of the sub-element |
| name | array to store the name into |
| nameLength | length of the provided name array |
| uint32_t rsElementGetSubElementNameLength | +( | +rs_element | +e, | +
| + | + | uint32_t | +index | +
| + | ) | ++ |
For complex elements, this function will return the length of sub-element name at index
+| e | element to get data from |
| index | index of the sub-element to return |
| uint32_t rsElementGetSubElementOffsetBytes | +( | +rs_element | +e, | +
| + | + | uint32_t | +index | +
| + | ) | ++ |
This function specifies the location of a sub-element within the element
+| e | element to get data from |
| index | index of the sub-element |
| uint32_t rsElementGetVectorSize | +( | +rs_element | +e | ) | ++ |
Returns the element's vector size
+| e | element to get data from |
00001 /* @@ -50,34 +50,34 @@ 00027 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) 00028 00038 extern uint32_t __attribute__((overloadable)) -00039 rsElementGetSubElementCount(rs_element e); +00039 rsElementGetSubElementCount(rs_element e); 00040 -00049 extern rs_element __attribute__((overloadable)) -00050 rsElementGetSubElement(rs_element, uint32_t index); +00049 extern rs_element __attribute__((overloadable)) +00050 rsElementGetSubElement(rs_element, uint32_t index); 00051 00061 extern uint32_t __attribute__((overloadable)) -00062 rsElementGetSubElementNameLength(rs_element e, uint32_t index); +00062 rsElementGetSubElementNameLength(rs_element e, uint32_t index); 00063 00075 extern uint32_t __attribute__((overloadable)) -00076 rsElementGetSubElementName(rs_element e, uint32_t index, char *name, uint32_t nameLength); +00076 rsElementGetSubElementName(rs_element e, uint32_t index, char *name, uint32_t nameLength); 00077 00088 extern uint32_t __attribute__((overloadable)) -00089 rsElementGetSubElementArraySize(rs_element e, uint32_t index); +00089 rsElementGetSubElementArraySize(rs_element e, uint32_t index); 00090 00100 extern uint32_t __attribute__((overloadable)) -00101 rsElementGetSubElementOffsetBytes(rs_element e, uint32_t index); +00101 rsElementGetSubElementOffsetBytes(rs_element e, uint32_t index); 00102 00109 extern uint32_t __attribute__((overloadable)) -00110 rsElementGetBytesSize(rs_element e); +00110 rsElementGetBytesSize(rs_element e); 00111 -00118 extern rs_data_type __attribute__((overloadable)) -00119 rsElementGetDataType(rs_element e); +00118 extern rs_data_type __attribute__((overloadable)) +00119 rsElementGetDataType(rs_element e); 00120 -00127 extern rs_data_kind __attribute__((overloadable)) -00128 rsElementGetDataKind(rs_element e); +00127 extern rs_data_kind __attribute__((overloadable)) +00128 rsElementGetDataKind(rs_element e); 00129 00137 extern uint32_t __attribute__((overloadable)) -00138 rsElementGetVectorSize(rs_element e); +00138 rsElementGetVectorSize(rs_element e); 00139 00140 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) 00141 diff --git a/docs/html/reference/renderscript/rs__math_8rsh.html b/docs/html/reference/renderscript/rs__math_8rsh.html index 96d5e8f0bc7da..7379f54258796 100644 --- a/docs/html/reference/renderscript/rs__math_8rsh.html +++ b/docs/html/reference/renderscript/rs__math_8rsh.html @@ -3,7 +3,7 @@ -rs_math.rsh File Reference +/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference @@ -27,7 +27,7 @@-+rs_math.rsh File Reference/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference
| float | rsRand (float max_value) |
| float | rsRand (float min_value, float max_value) |
| float | rsFrac (float) |
| _RS_RUNTIME uint | rsClamp (uint amount, uint low, uint high) |
| _RS_RUNTIME int | rsClamp (int amount, int low, int high) |
| _RS_RUNTIME ushort | rsClamp (ushort amount, ushort low, ushort high) |
| _RS_RUNTIME short | rsClamp (short amount, short low, short high) |
| _RS_RUNTIME uchar | rsClamp (uchar amount, uchar low, uchar high) |
| _RS_RUNTIME char | rsClamp (char amount, char low, char high) |
| uint | rsClamp (uint amount, uint low, uint high) |
| int | rsClamp (int amount, int low, int high) |
| ushort | rsClamp (ushort amount, ushort low, ushort high) |
| short | rsClamp (short amount, short low, short high) |
| uchar | rsClamp (uchar amount, uchar low, uchar high) |
| char | rsClamp (char amount, char low, char high) |
| static __inline__ void | rsExtractFrustumPlanes (const rs_matrix4x4 *viewProj, float4 *left, float4 *right, float4 *top, float4 *bottom, float4 *near, float4 *far) |
| static __inline__ bool | rsIsSphereInFrustum (float4 *sphere, float4 *left, float4 *right, float4 *top, float4 *bottom, float4 *near, float4 *far) |
| _RS_RUNTIME uchar4 | rsPackColorTo8888 (float r, float g, float b) |
| _RS_RUNTIME uchar4 | rsPackColorTo8888 (float r, float g, float b, float a) |
| _RS_RUNTIME uchar4 | rsPackColorTo8888 (float3 color) |
| _RS_RUNTIME float4 | rsUnpackColor8888 (uchar4 c) |
| uchar4 | rsPackColorTo8888 (float r, float g, float b) |
| uchar4 | rsPackColorTo8888 (float r, float g, float b, float a) |
| uchar4 | rsPackColorTo8888 (float3 color) |
| float4 | rsUnpackColor8888 (uchar4 c) |
todo-jsams
Definition in file rs_math.rsh.
| _RS_RUNTIME uint rsClamp | +uint rsClamp | ( | uint | amount, | @@ -98,12 +98,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME int rsClamp | +int rsClamp | ( | int | amount, | @@ -132,12 +132,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME ushort rsClamp | +ushort rsClamp | ( | ushort | amount, | @@ -166,12 +166,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME short rsClamp | +short rsClamp | ( | short | amount, | @@ -200,12 +200,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME uchar rsClamp | +uchar rsClamp | ( | uchar | amount, | @@ -234,12 +234,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME char rsClamp | +char rsClamp | ( | char | amount, | @@ -430,12 +430,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME uchar4 rsPackColorTo8888 | +uchar4 rsPackColorTo8888 | ( | float | r, | @@ -473,12 +473,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME uchar4 rsPackColorTo8888 | +uchar4 rsPackColorTo8888 | ( | float | r, | @@ -523,12 +523,12 @@ Functions|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME uchar4 rsPackColorTo8888 | +uchar4 rsPackColorTo8888 | ( | float3 | color | ) | @@ -648,12 +648,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float4 rsUnpackColor8888 | +float4 rsUnpackColor8888 | ( | uchar4 | c | ) | diff --git a/docs/html/reference/renderscript/rs__math_8rsh_source.html b/docs/html/reference/renderscript/rs__math_8rsh_source.html index eb4ddacad7693..513ce48dddd6b 100644 --- a/docs/html/reference/renderscript/rs__math_8rsh_source.html +++ b/docs/html/reference/renderscript/rs__math_8rsh_source.html @@ -3,7 +3,7 @@ -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME void | rsMatrixSet (rs_matrix4x4 *m, uint32_t row, uint32_t col, float v) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME void | rsMatrixSet (rs_matrix3x3 *m, uint32_t row, uint32_t col, float v) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME void | rsMatrixSet (rs_matrix2x2 *m, uint32_t row, uint32_t col, float v) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float | rsMatrixGet (const rs_matrix4x4 *m, uint32_t row, uint32_t col) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float | rsMatrixGet (const rs_matrix3x3 *m, uint32_t row, uint32_t col) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float | rsMatrixGet (const rs_matrix2x2 *m, uint32_t row, uint32_t col) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixSet (rs_matrix4x4 *m, uint32_t row, uint32_t col, float v) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixSet (rs_matrix3x3 *m, uint32_t row, uint32_t col, float v) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixSet (rs_matrix2x2 *m, uint32_t row, uint32_t col, float v) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float | rsMatrixGet (const rs_matrix4x4 *m, uint32_t row, uint32_t col) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float | rsMatrixGet (const rs_matrix3x3 *m, uint32_t row, uint32_t col) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float | rsMatrixGet (const rs_matrix2x2 *m, uint32_t row, uint32_t col) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixLoadIdentity (rs_matrix4x4 *m) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixLoadIdentity (rs_matrix3x3 *m) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixLoadIdentity (rs_matrix2x2 *m) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixLoadOrtho (rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixLoadFrustum (rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixLoadPerspective (rs_matrix4x4 *m, float fovy, float aspect, float near, float far) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float4 | rsMatrixMultiply (rs_matrix4x4 *m, float4 in) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float3 | rsMatrixMultiply (rs_matrix3x3 *m, float3 in) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float2 | rsMatrixMultiply (rs_matrix2x2 *m, float2 in) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float4 | rsMatrixMultiply (const rs_matrix4x4 *m, float4 in) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float3 | rsMatrixMultiply (const rs_matrix3x3 *m, float3 in) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| float2 | rsMatrixMultiply (const rs_matrix2x2 *m, float2 in) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bool | rsMatrixInverse (rs_matrix4x4 *m) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bool | rsMatrixInverseTranspose (rs_matrix4x4 *m) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | rsMatrixTranspose (rs_matrix4x4 *m) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float rsMatrixGet | +float rsMatrixGet | ( | const rs_matrix4x4 * | m, | @@ -122,12 +122,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float rsMatrixGet | +float rsMatrixGet | ( | const rs_matrix3x3 * | m, | @@ -156,12 +156,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float rsMatrixGet | +float rsMatrixGet | ( | const rs_matrix2x2 * | m, | @@ -1085,14 +1085,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float4 rsMatrixMultiply | +float4 rsMatrixMultiply | ( | -rs_matrix4x4 * | +const rs_matrix4x4 * | m, |
Multiply a vector by a matrix and return the result vector. API version 10-13
+Multiply a vector by a matrix and return the result vector. API version 14+
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| _RS_RUNTIME float3 rsMatrixMultiply | +float3 rsMatrixMultiply | ( | -rs_matrix3x3 * | +const rs_matrix3x3 * | m, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME float2 rsMatrixMultiply | +float2 rsMatrixMultiply | ( | -rs_matrix2x2 * | +const rs_matrix2x2 * | m, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME void rsMatrixSet | +void rsMatrixSet | ( | rs_matrix4x4 * | m, | @@ -1325,12 +1325,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME void rsMatrixSet | +void rsMatrixSet | ( | rs_matrix3x3 * | m, | @@ -1365,12 +1365,12 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _RS_RUNTIME void rsMatrixSet | +void rsMatrixSet | ( | rs_matrix2x2 * | m, | diff --git a/docs/html/reference/renderscript/rs__matrix_8rsh_source.html b/docs/html/reference/renderscript/rs__matrix_8rsh_source.html index be83c9be4df6d..c1aaeb294def9 100644 --- a/docs/html/reference/renderscript/rs__matrix_8rsh_source.html +++ b/docs/html/reference/renderscript/rs__matrix_8rsh_source.html @@ -3,7 +3,7 @@ -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+Functions | |
| uint32_t | rsgMeshGetVertexAllocationCount (rs_mesh m) |
| uint32_t | rsgMeshGetPrimitiveCount (rs_mesh m) |
| rs_allocation | rsgMeshGetVertexAllocation (rs_mesh m, uint32_t index) |
| rs_allocation | rsgMeshGetIndexAllocation (rs_mesh m, uint32_t index) |
| rs_primitive | rsgMeshGetPrimitive (rs_mesh m, uint32_t index) |
Mesh routines.
Definition in file rs_mesh.rsh.
-| rs_allocation rsgMeshGetIndexAllocation | +( | +rs_mesh | +m, | +
| + | + | uint32_t | +index | +
| + | ) | ++ |
Returns an allocation containing index data or a null allocation if only the primitive is specified
+| m | mesh to get data from |
| index | index of the index allocation |
| rs_primitive rsgMeshGetPrimitive | +( | +rs_mesh | +m, | +
| + | + | uint32_t | +index | +
| + | ) | ++ |
Returns the primitive describing how a part of the mesh is rendered
+| m | mesh to get data from |
| index | index of the primitive |
Meshes could have multiple index sets, this function returns the number.
+| m | mesh to get data from |
| rs_allocation rsgMeshGetVertexAllocation | +( | +rs_mesh | +m, | +
| + | + | uint32_t | +index | +
| + | ) | ++ |
Returns an allocation that is part of the mesh and contains vertex data, e.g. positions, normals, texcoords
+| m | mesh to get data from |
| index | index of the vertex allocation |
Returns the number of allocations in the mesh that contain vertex data
+| m | mesh to get data from |
00001 /* @@ -50,19 +50,19 @@ 00027 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) 00028 00037 extern uint32_t __attribute__((overloadable)) -00038 rsgMeshGetVertexAllocationCount(rs_mesh m); +00038 rsgMeshGetVertexAllocationCount(rs_mesh m); 00039 00049 extern uint32_t __attribute__((overloadable)) -00050 rsgMeshGetPrimitiveCount(rs_mesh m); +00050 rsgMeshGetPrimitiveCount(rs_mesh m); 00051 -00060 extern rs_allocation __attribute__((overloadable)) -00061 rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index); +00060 extern rs_allocation __attribute__((overloadable)) +00061 rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index); 00062 -00071 extern rs_allocation __attribute__((overloadable)) -00072 rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index); +00071 extern rs_allocation __attribute__((overloadable)) +00072 rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index); 00073 -00082 extern rs_primitive __attribute__((overloadable)) -00083 rsgMeshGetPrimitive(rs_mesh m, uint32_t index); +00082 extern rs_primitive __attribute__((overloadable)) +00083 rsgMeshGetPrimitive(rs_mesh m, uint32_t index); 00084 00085 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) 00086 diff --git a/docs/html/reference/renderscript/rs__object_8rsh.html b/docs/html/reference/renderscript/rs__object_8rsh.html index 9ac7bb85fd08c..6ace343973163 100644 --- a/docs/html/reference/renderscript/rs__object_8rsh.html +++ b/docs/html/reference/renderscript/rs__object_8rsh.html @@ -3,7 +3,7 @@ -rs_object.rsh File Reference +/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh File Reference @@ -27,7 +27,7 @@-+rs_object.rsh File Reference/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh File Reference
+Functions | |
| rs_depth_func | rsgProgramStoreGetDepthFunc (rs_program_store ps) |
| bool | rsgProgramStoreIsDepthMaskEnabled (rs_program_store ps) |
| bool | rsgProgramStoreIsColorMaskRedEnabled (rs_program_store ps) |
| bool | rsgProgramStoreIsColorMaskGreenEnabled (rs_program_store ps) |
| bool | rsgProgramStoreIsColorMaskBlueEnabled (rs_program_store ps) |
| bool | rsgProgramStoreIsColorMaskAlphaEnabled (rs_program_store ps) |
| rs_blend_src_func | rsgProgramStoreGetBlendSrcFunc (rs_program_store ps) |
| rs_blend_dst_func | rsgProgramStoreGetBlendDstFunc (rs_program_store ps) |
| bool | rsgProgramStoreIsDitherEnabled (rs_program_store ps) |
| bool | rsgProgramRasterIsPointSpriteEnabled (rs_program_raster pr) |
| rs_cull_mode | rsgProgramRasterGetCullMode (rs_program_raster pr) |
Program object routines.
Definition in file rs_program.rsh.
-| rs_cull_mode rsgProgramRasterGetCullMode | +( | +rs_program_raster | +pr | ) | ++ |
Get program raster cull mode
+| pr | program raster to query |
| bool rsgProgramRasterIsPointSpriteEnabled | +( | +rs_program_raster | +pr | ) | ++ |
Get program raster point sprite state
+| pr | program raster to query |
| rs_blend_dst_func rsgProgramStoreGetBlendDstFunc | +( | +rs_program_store | +ps | ) | ++ |
Get program store blend destination function
+| ps | program store to query |
| rs_blend_src_func rsgProgramStoreGetBlendSrcFunc | +( | +rs_program_store | +ps | ) | ++ |
Get program store blend source function
+| ps | program store to query |
| rs_depth_func rsgProgramStoreGetDepthFunc | +( | +rs_program_store | +ps | ) | ++ |
Get program store depth function
+| ps | program store to query |
| bool rsgProgramStoreIsColorMaskAlphaEnabled | +( | +rs_program_store | +ps | ) | ++ |
Get program store alpha component color mask
+| ps | program store to query |
| bool rsgProgramStoreIsColorMaskBlueEnabled | +( | +rs_program_store | +ps | ) | ++ |
Get program store blur component color mask
+| ps | program store to query |
| bool rsgProgramStoreIsColorMaskGreenEnabled | +( | +rs_program_store | +ps | ) | ++ |
Get program store green component color mask
+| ps | program store to query |
| bool rsgProgramStoreIsColorMaskRedEnabled | +( | +rs_program_store | +ps | ) | ++ |
Get program store red component color mask
+| ps | program store to query |
| bool rsgProgramStoreIsDepthMaskEnabled | +( | +rs_program_store | +ps | ) | ++ |
Get program store depth mask
+| ps | program store to query |
| bool rsgProgramStoreIsDitherEnabled | +( | +rs_program_store | +ps | ) | ++ |
Get program store dither state
+| ps | program store to query |
00001 /* @@ -48,37 +48,37 @@ 00025 00026 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) 00027 -00033 extern rs_depth_func __attribute__((overloadable)) -00034 rsgProgramStoreGetDepthFunc(rs_program_store ps); +00033 extern rs_depth_func __attribute__((overloadable)) +00034 rsgProgramStoreGetDepthFunc(rs_program_store ps); 00035 00041 extern bool __attribute__((overloadable)) -00042 rsgProgramStoreIsDepthMaskEnabled(rs_program_store ps); +00042 rsgProgramStoreIsDepthMaskEnabled(rs_program_store ps); 00048 extern bool __attribute__((overloadable)) -00049 rsgProgramStoreIsColorMaskRedEnabled(rs_program_store ps); +00049 rsgProgramStoreIsColorMaskRedEnabled(rs_program_store ps); 00050 00056 extern bool __attribute__((overloadable)) -00057 rsgProgramStoreIsColorMaskGreenEnabled(rs_program_store ps); +00057 rsgProgramStoreIsColorMaskGreenEnabled(rs_program_store ps); 00058 00064 extern bool __attribute__((overloadable)) -00065 rsgProgramStoreIsColorMaskBlueEnabled(rs_program_store ps); +00065 rsgProgramStoreIsColorMaskBlueEnabled(rs_program_store ps); 00066 00072 extern bool __attribute__((overloadable)) -00073 rsgProgramStoreIsColorMaskAlphaEnabled(rs_program_store ps); +00073 rsgProgramStoreIsColorMaskAlphaEnabled(rs_program_store ps); 00074 00080 extern rs_blend_src_func __attribute__((overloadable)) -00081 rsgProgramStoreGetBlendSrcFunc(rs_program_store ps); +00081 rsgProgramStoreGetBlendSrcFunc(rs_program_store ps); 00082 00088 extern rs_blend_dst_func __attribute__((overloadable)) -00089 rsgProgramStoreGetBlendDstFunc(rs_program_store ps); +00089 rsgProgramStoreGetBlendDstFunc(rs_program_store ps); 00090 00096 extern bool __attribute__((overloadable)) -00097 rsgProgramStoreIsDitherEnabled(rs_program_store ps); +00097 rsgProgramStoreIsDitherEnabled(rs_program_store ps); 00098 00104 extern bool __attribute__((overloadable)) -00105 rsgProgramRasterIsPointSpriteEnabled(rs_program_raster pr); +00105 rsgProgramRasterIsPointSpriteEnabled(rs_program_raster pr); 00106 00112 extern rs_cull_mode __attribute__((overloadable)) -00113 rsgProgramRasterGetCullMode(rs_program_raster pr); +00113 rsgProgramRasterGetCullMode(rs_program_raster pr); 00114 00115 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) 00116 diff --git a/docs/html/reference/renderscript/rs__quaternion_8rsh.html b/docs/html/reference/renderscript/rs__quaternion_8rsh.html index 389b792937ab7..ce94e0485b18e 100644 --- a/docs/html/reference/renderscript/rs__quaternion_8rsh.html +++ b/docs/html/reference/renderscript/rs__quaternion_8rsh.html @@ -3,7 +3,7 @@ -rs_quaternion.rsh File Reference +/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh File Reference @@ -27,7 +27,7 @@-+rs_quaternion.rsh File Reference/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh File Reference
+Functions | |
| rs_sampler_value | rsSamplerGetMinification (rs_sampler s) |
| rs_sampler_value | rsSamplerGetMagnification (rs_sampler s) |
| rs_sampler_value | rsSamplerGetWrapS (rs_sampler s) |
| rs_sampler_value | rsSamplerGetWrapT (rs_sampler s) |
| float | rsSamplerGetAnisotropy (rs_sampler s) |
Sampler routines.
Definition in file rs_sampler.rsh.
-| float rsSamplerGetAnisotropy | +( | +rs_sampler | +s | ) | ++ |
Get sampler anisotropy
+| s | sampler to query |
| rs_sampler_value rsSamplerGetMagnification | +( | +rs_sampler | +s | ) | ++ |
Get sampler magnification value
+| s | sampler to query |
| rs_sampler_value rsSamplerGetMinification | +( | +rs_sampler | +s | ) | ++ |
Get sampler minification value
+| s | sampler to query |
| rs_sampler_value rsSamplerGetWrapS | +( | +rs_sampler | +s | ) | ++ |
Get sampler wrap S value
+| s | sampler to query |
| rs_sampler_value rsSamplerGetWrapT | +( | +rs_sampler | +s | ) | ++ |
Get sampler wrap T value
+| s | sampler to query |
00001 /* @@ -50,19 +50,19 @@ 00027 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) 00028 00035 extern rs_sampler_value __attribute__((overloadable)) -00036 rsSamplerGetMinification(rs_sampler s); +00036 rsSamplerGetMinification(rs_sampler s); 00037 00044 extern rs_sampler_value __attribute__((overloadable)) -00045 rsSamplerGetMagnification(rs_sampler s); +00045 rsSamplerGetMagnification(rs_sampler s); 00046 00053 extern rs_sampler_value __attribute__((overloadable)) -00054 rsSamplerGetWrapS(rs_sampler s); +00054 rsSamplerGetWrapS(rs_sampler s); 00055 00062 extern rs_sampler_value __attribute__((overloadable)) -00063 rsSamplerGetWrapT(rs_sampler s); +00063 rsSamplerGetWrapT(rs_sampler s); 00064 00071 extern float __attribute__((overloadable)) -00072 rsSamplerGetAnisotropy(rs_sampler s); +00072 rsSamplerGetAnisotropy(rs_sampler s); 00073 00074 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) 00075 diff --git a/docs/html/reference/renderscript/rs__time_8rsh.html b/docs/html/reference/renderscript/rs__time_8rsh.html index a3e63d05daa09..8be550a2ee9ef 100644 --- a/docs/html/reference/renderscript/rs__time_8rsh.html +++ b/docs/html/reference/renderscript/rs__time_8rsh.html @@ -3,7 +3,7 @@ -rs_time.rsh File Reference +/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh File Reference @@ -29,7 +29,7 @@ Typedefs | Functions
| float | rsGetDt (void) |
Renderscript time routines.
-This file contains Renderscript functions relating to time and date manipulation.
+RenderScript time routines.
+This file contains RenderScript functions relating to time and date manipulation.
Definition in file rs_time.rsh.
00001 /* diff --git a/docs/html/reference/renderscript/rs__types_8rsh.html b/docs/html/reference/renderscript/rs__types_8rsh.html index c3caa6f093936..cbaa750c3ed58 100644 --- a/docs/html/reference/renderscript/rs__types_8rsh.html +++ b/docs/html/reference/renderscript/rs__types_8rsh.html @@ -3,7 +3,7 @@ -rs_types.rsh File Reference +/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh File Reference @@ -26,9 +26,10 @@-+rs_types.rsh File Reference/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh File Reference
#include "stdbool.h"Define the standard Renderscript types
+Define the standard RenderScript types
Integers 8 bit: char, int8_t 16 bit: short, int16_t 32 bit: int, in32_t 64 bit: long, long long, int64_t
Unsigned Integers 8 bit: uchar, uint8_t 16 bit: ushort, uint16_t 32 bit: uint, uint32_t 64 bit: ulong, uint64_t
Floating point 32 bit: float 64 bit: double
@@ -134,7 +168,7 @@ TypedefsVector version of the basic char type. Provides two char fields packed into a single 16 bit field with 16 bit alignment.
-Definition at line 279 of file rs_types.rsh.
+Definition at line 292 of file rs_types.rsh.
Vector version of the basic char type. Provides three char fields packed into a single 32 bit field with 32 bit alignment.
-Definition at line 284 of file rs_types.rsh.
+Definition at line 297 of file rs_types.rsh.
Vector version of the basic char type. Provides four char fields packed into a single 32 bit field with 32 bit alignment.
-Definition at line 289 of file rs_types.rsh.
+Definition at line 302 of file rs_types.rsh.
Vector version of the basic double type. Provides two double fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 199 of file rs_types.rsh.
+Definition at line 212 of file rs_types.rsh.
Vector version of the basic double type. Provides three double fields packed into a single 256 bit field with 256 bit alignment.
-Definition at line 204 of file rs_types.rsh.
+Definition at line 217 of file rs_types.rsh.
Vector version of the basic double type. Provides four double fields packed into a single 256 bit field with 256 bit alignment.
-Definition at line 209 of file rs_types.rsh.
+Definition at line 222 of file rs_types.rsh.
Vector version of the basic float type. Provides two float fields packed into a single 64 bit field with 64 bit alignment.
-Definition at line 182 of file rs_types.rsh.
+Definition at line 195 of file rs_types.rsh.
Vector version of the basic float type. Provides three float fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 187 of file rs_types.rsh.
+Definition at line 200 of file rs_types.rsh.
Vector version of the basic float type. Provides four float fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 193 of file rs_types.rsh.
+Definition at line 206 of file rs_types.rsh.
16 bit integer type
-Definition at line 54 of file rs_types.rsh.
+Definition at line 67 of file rs_types.rsh.
Vector version of the basic int type. Provides two int fields packed into a single 64 bit field with 64 bit alignment.
-Definition at line 311 of file rs_types.rsh.
+Definition at line 324 of file rs_types.rsh.
Vector version of the basic int type. Provides three int fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 316 of file rs_types.rsh.
+Definition at line 329 of file rs_types.rsh.
32 bit integer type
-Definition at line 58 of file rs_types.rsh.
+Definition at line 71 of file rs_types.rsh.
Vector version of the basic int type. Provides two four fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 321 of file rs_types.rsh.
+Definition at line 334 of file rs_types.rsh.
64 bit integer type
-Definition at line 62 of file rs_types.rsh.
+Definition at line 75 of file rs_types.rsh.
8 bit integer type
-Definition at line 50 of file rs_types.rsh.
+Definition at line 63 of file rs_types.rsh.
Vector version of the basic long type. Provides two long fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 327 of file rs_types.rsh.
+Definition at line 340 of file rs_types.rsh.
Vector version of the basic long type. Provides three long fields packed into a single 256 bit field with 256 bit alignment.
-Definition at line 332 of file rs_types.rsh.
+Definition at line 345 of file rs_types.rsh.
Vector version of the basic long type. Provides four long fields packed into a single 256 bit field with 256 bit alignment.
-Definition at line 337 of file rs_types.rsh.
+Definition at line 350 of file rs_types.rsh.
quaternion type for use with the quaternion functions
-Definition at line 370 of file rs_types.rsh.
+Definition at line 383 of file rs_types.rsh.
Vector version of the basic short type. Provides two short fields packed into a single 32 bit field with 32 bit alignment.
-Definition at line 295 of file rs_types.rsh.
+Definition at line 308 of file rs_types.rsh.
Vector version of the basic short type. Provides three short fields packed into a single 64 bit field with 64 bit alignment.
-Definition at line 300 of file rs_types.rsh.
+Definition at line 313 of file rs_types.rsh.
Vector version of the basic short type. Provides four short fields packed into a single 64 bit field with 64 bit alignment.
-Definition at line 305 of file rs_types.rsh.
+Definition at line 318 of file rs_types.rsh.
Typedef for unsigned int
-Definition at line 98 of file rs_types.rsh.
+Definition at line 111 of file rs_types.rsh.
Typedef for int (use for 32-bit integers)
-Definition at line 102 of file rs_types.rsh.
+Definition at line 115 of file rs_types.rsh.
8 bit unsigned integer type
-Definition at line 82 of file rs_types.rsh.
+Definition at line 95 of file rs_types.rsh.
Vector version of the basic uchar type. Provides two uchar fields packed into a single 16 bit field with 16 bit alignment.
-Definition at line 215 of file rs_types.rsh.
+Definition at line 228 of file rs_types.rsh.
Vector version of the basic uchar type. Provides three uchar fields packed into a single 32 bit field with 32 bit alignment.
-Definition at line 220 of file rs_types.rsh.
+Definition at line 233 of file rs_types.rsh.
Vector version of the basic uchar type. Provides four uchar fields packed into a single 32 bit field with 32 bit alignment.
-Definition at line 225 of file rs_types.rsh.
+Definition at line 238 of file rs_types.rsh.
32 bit unsigned integer type
-Definition at line 90 of file rs_types.rsh.
+Definition at line 103 of file rs_types.rsh.
16 bit unsigned integer type
-Definition at line 70 of file rs_types.rsh.
+Definition at line 83 of file rs_types.rsh.
Vector version of the basic uint type. Provides two uint fields packed into a single 64 bit field with 64 bit alignment.
-Definition at line 247 of file rs_types.rsh.
+Definition at line 260 of file rs_types.rsh.
Vector version of the basic uint type. Provides three uint fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 252 of file rs_types.rsh.
+Definition at line 265 of file rs_types.rsh.
32 bit unsigned integer type
-Definition at line 74 of file rs_types.rsh.
+Definition at line 87 of file rs_types.rsh.
Vector version of the basic uint type. Provides four uint fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 257 of file rs_types.rsh.
+Definition at line 270 of file rs_types.rsh.
64 bit unsigned integer type
-Definition at line 78 of file rs_types.rsh.
+Definition at line 91 of file rs_types.rsh.
8 bit unsigned integer type
-Definition at line 66 of file rs_types.rsh.
+Definition at line 79 of file rs_types.rsh.
Typedef for unsigned long (use for 64-bit unsigned integers)
-Definition at line 94 of file rs_types.rsh.
+Definition at line 107 of file rs_types.rsh.
Vector version of the basic ulong type. Provides two ulong fields packed into a single 128 bit field with 128 bit alignment.
-Definition at line 263 of file rs_types.rsh.
+Definition at line 276 of file rs_types.rsh.
Vector version of the basic ulong type. Provides three ulong fields packed into a single 256 bit field with 256 bit alignment.
-Definition at line 268 of file rs_types.rsh.
+Definition at line 281 of file rs_types.rsh.
Vector version of the basic ulong type. Provides four ulong fields packed into a single 256 bit field with 256 bit alignment.
-Definition at line 273 of file rs_types.rsh.
+Definition at line 286 of file rs_types.rsh.
16 bit unsigned integer type
-Definition at line 86 of file rs_types.rsh.
+Definition at line 99 of file rs_types.rsh.
Vector version of the basic ushort type. Provides two ushort fields packed into a single 32 bit field with 32 bit alignment.
-Definition at line 231 of file rs_types.rsh.
+Definition at line 244 of file rs_types.rsh.
Vector version of the basic ushort type. Provides three ushort fields packed into a single 64 bit field with 64 bit alignment.
-Definition at line 236 of file rs_types.rsh.
+Definition at line 249 of file rs_types.rsh.
Vector version of the basic ushort type. Provides four ushort fields packed into a single 64 bit field with 64 bit alignment.
-Definition at line 241 of file rs_types.rsh.
+Definition at line 254 of file rs_types.rsh.
+ +| enum rs_allocation_usage_type | +
Bitfield to specify the usage types for an allocation.
+These values are ORed together to specify which usages or memory spaces are relevant to an allocation or an operation on an allocation.
+ +Definition at line 408 of file rs_types.rsh.
+ +| enum rs_data_kind | +
Enumeration for possible element data kind.
+The special interpretation of the data if required. This is primarly useful for graphical data. USER indicates no special interpretation is expected. PIXEL is used in conjunction with the standard data types for representing texture formats.
+ +Definition at line 524 of file rs_types.rsh.
+ +| enum rs_data_type | +
Enumeration for possible element data types.
+DataType represents the basic type information for a basic element. The naming convention follows. For numeric types it is FLOAT, SIGNED, or UNSIGNED followed by the _BITS where BITS is the size of the data. BOOLEAN is a true / false (1,0) represented in an 8 bit container. The UNSIGNED variants with multiple bit definitions are for packed graphical data formats and represent vectors with per vector member sizes which are treated as a single unit for packing and alignment purposes.
+MATRIX the three matrix types contain FLOAT_32 elements and are treated as 32 bits for alignment purposes.
+RS_* objects. 32 bit opaque handles.
+ +Definition at line 478 of file rs_types.rsh.
+ +| enum rs_depth_func | +
Definition at line 538 of file rs_types.rsh.
+ +| enum rs_primitive | +
Describes the way mesh vertex data is interpreted when rendering
+Definition at line 425 of file rs_types.rsh.
00001 /* -00002 * Copyright (C) 2011 The Android Open Source Project +00002 * Copyright (C) 2013 The Android Open Source Project 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. @@ -46,238 +46,253 @@ 00041 #ifndef __RS_TYPES_RSH__ 00042 #define __RS_TYPES_RSH__ 00043 -00044 #define M_PI 3.14159265358979323846264338327950288f /* pi */ -00045 -00046 #include "stdbool.h" -00050 typedef char int8_t; -00054 typedef short int16_t; -00058 typedef int int32_t; -00062 typedef long long int64_t; -00066 typedef unsigned char uint8_t; -00070 typedef unsigned short uint16_t; -00074 typedef unsigned int uint32_t; -00078 typedef unsigned long long uint64_t; -00082 typedef uint8_t uchar; -00086 typedef uint16_t ushort; -00090 typedef uint32_t uint; -00094 typedef uint64_t ulong; -00098 typedef uint32_t size_t; -00102 typedef int32_t ssize_t; -00103 -00109 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_element; -00115 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_type; -00121 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_allocation; -00127 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_sampler; -00133 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_script; -00139 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_mesh; -00145 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_path; -00151 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_fragment; -00157 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_vertex; -00163 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_raster; -00169 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_store; -00175 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_font; -00176 -00182 typedef float float2 __attribute__((ext_vector_type(2))); -00187 typedef float float3 __attribute__((ext_vector_type(3))); -00193 typedef float float4 __attribute__((ext_vector_type(4))); -00194 -00199 typedef double double2 __attribute__((ext_vector_type(2))); -00204 typedef double double3 __attribute__((ext_vector_type(3))); -00209 typedef double double4 __attribute__((ext_vector_type(4))); -00210 -00215 typedef uchar uchar2 __attribute__((ext_vector_type(2))); -00220 typedef uchar uchar3 __attribute__((ext_vector_type(3))); -00225 typedef uchar uchar4 __attribute__((ext_vector_type(4))); -00226 -00231 typedef ushort ushort2 __attribute__((ext_vector_type(2))); -00236 typedef ushort ushort3 __attribute__((ext_vector_type(3))); -00241 typedef ushort ushort4 __attribute__((ext_vector_type(4))); -00242 -00247 typedef uint uint2 __attribute__((ext_vector_type(2))); -00252 typedef uint uint3 __attribute__((ext_vector_type(3))); -00257 typedef uint uint4 __attribute__((ext_vector_type(4))); -00258 -00263 typedef ulong ulong2 __attribute__((ext_vector_type(2))); -00268 typedef ulong ulong3 __attribute__((ext_vector_type(3))); -00273 typedef ulong ulong4 __attribute__((ext_vector_type(4))); -00274 -00279 typedef char char2 __attribute__((ext_vector_type(2))); -00284 typedef char char3 __attribute__((ext_vector_type(3))); -00289 typedef char char4 __attribute__((ext_vector_type(4))); -00290 -00295 typedef short short2 __attribute__((ext_vector_type(2))); -00300 typedef short short3 __attribute__((ext_vector_type(3))); -00305 typedef short short4 __attribute__((ext_vector_type(4))); -00306 -00311 typedef int int2 __attribute__((ext_vector_type(2))); -00316 typedef int int3 __attribute__((ext_vector_type(3))); -00321 typedef int int4 __attribute__((ext_vector_type(4))); -00322 -00327 typedef long long2 __attribute__((ext_vector_type(2))); -00332 typedef long long3 __attribute__((ext_vector_type(3))); -00337 typedef long long4 __attribute__((ext_vector_type(4))); -00338 -00345 typedef struct { -00346 float m[16]; -00347 } rs_matrix4x4; -00354 typedef struct { -00355 float m[9]; -00356 } rs_matrix3x3; -00363 typedef struct { -00364 float m[4]; -00365 } rs_matrix2x2; -00366 -00370 typedef float4 rs_quaternion; -00371 -00372 #define RS_PACKED __attribute__((packed, aligned(4))) -00373 #define NULL ((void *)0) -00374 -00375 #if (defined(RS_VERSION) && (RS_VERSION >= 14)) -00376 -00380 typedef enum { -00381 RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0, -00382 RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1, -00383 RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2, -00384 RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3, -00385 RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4, -00386 RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5 -00387 } rs_allocation_cubemap_face; -00388 -00395 typedef enum { -00396 RS_ALLOCATION_USAGE_SCRIPT = 0x0001, -00397 RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002, -00398 RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004, -00399 RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008, -00400 RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010 -00401 } rs_allocation_usage_type; -00402 -00403 #endif //defined(RS_VERSION) && (RS_VERSION >= 14) -00404 -00405 // New API's -00406 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) -00407 -00412 typedef enum { -00416 RS_PRIMITIVE_POINT = 0, -00420 RS_PRIMITIVE_LINE = 1, -00424 RS_PRIMITIVE_LINE_STRIP = 2, -00428 RS_PRIMITIVE_TRIANGLE = 3, -00434 RS_PRIMITIVE_TRIANGLE_STRIP = 4, -00439 RS_PRIMITIVE_TRIANGLE_FAN = 5, -00440 -00444 RS_PRIMITIVE_INVALID = 100, -00445 } rs_primitive; -00446 -00465 typedef enum { -00466 RS_TYPE_NONE = 0, -00467 RS_TYPE_FLOAT_32 = 2, -00468 RS_TYPE_FLOAT_64 = 3, -00469 RS_TYPE_SIGNED_8 = 4, -00470 RS_TYPE_SIGNED_16 = 5, -00471 RS_TYPE_SIGNED_32 = 6, -00472 RS_TYPE_SIGNED_64 = 7, -00473 RS_TYPE_UNSIGNED_8 = 8, -00474 RS_TYPE_UNSIGNED_16 = 9, -00475 RS_TYPE_UNSIGNED_32 = 10, -00476 RS_TYPE_UNSIGNED_64 = 11, -00477 -00478 RS_TYPE_BOOLEAN = 12, -00479 -00480 RS_TYPE_UNSIGNED_5_6_5 = 13, -00481 RS_TYPE_UNSIGNED_5_5_5_1 = 14, -00482 RS_TYPE_UNSIGNED_4_4_4_4 = 15, -00483 -00484 RS_TYPE_MATRIX_4X4 = 16, -00485 RS_TYPE_MATRIX_3X3 = 17, -00486 RS_TYPE_MATRIX_2X2 = 18, -00487 -00488 RS_TYPE_ELEMENT = 1000, -00489 RS_TYPE_TYPE = 1001, -00490 RS_TYPE_ALLOCATION = 1002, -00491 RS_TYPE_SAMPLER = 1003, -00492 RS_TYPE_SCRIPT = 1004, -00493 RS_TYPE_MESH = 1005, -00494 RS_TYPE_PROGRAM_FRAGMENT = 1006, -00495 RS_TYPE_PROGRAM_VERTEX = 1007, -00496 RS_TYPE_PROGRAM_RASTER = 1008, -00497 RS_TYPE_PROGRAM_STORE = 1009, -00498 RS_TYPE_FONT = 1010, -00499 -00500 RS_TYPE_INVALID = 10000, -00501 } rs_data_type; -00502 -00511 typedef enum { -00512 RS_KIND_USER = 0, -00513 -00514 RS_KIND_PIXEL_L = 7, -00515 RS_KIND_PIXEL_A = 8, -00516 RS_KIND_PIXEL_LA = 9, -00517 RS_KIND_PIXEL_RGB = 10, -00518 RS_KIND_PIXEL_RGBA = 11, -00519 RS_KIND_PIXEL_DEPTH = 12, -00520 -00521 RS_KIND_INVALID = 100, -00522 } rs_data_kind; -00523 -00524 typedef enum { -00528 RS_DEPTH_FUNC_ALWAYS = 0, -00533 RS_DEPTH_FUNC_LESS = 1, -00538 RS_DEPTH_FUNC_LEQUAL = 2, -00543 RS_DEPTH_FUNC_GREATER = 3, -00548 RS_DEPTH_FUNC_GEQUAL = 4, -00553 RS_DEPTH_FUNC_EQUAL = 5, -00558 RS_DEPTH_FUNC_NOTEQUAL = 6, -00562 RS_DEPTH_FUNC_INVALID = 100, -00563 } rs_depth_func; -00564 -00565 typedef enum { -00566 RS_BLEND_SRC_ZERO = 0, -00567 RS_BLEND_SRC_ONE = 1, -00568 RS_BLEND_SRC_DST_COLOR = 2, -00569 RS_BLEND_SRC_ONE_MINUS_DST_COLOR = 3, -00570 RS_BLEND_SRC_SRC_ALPHA = 4, -00571 RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA = 5, -00572 RS_BLEND_SRC_DST_ALPHA = 6, -00573 RS_BLEND_SRC_ONE_MINUS_DST_ALPHA = 7, -00574 RS_BLEND_SRC_SRC_ALPHA_SATURATE = 8, -00575 -00576 RS_BLEND_SRC_INVALID = 100, -00577 } rs_blend_src_func; +00044 /* Constants */ +00045 #define M_E 2.718281828459045235360287471352662498f /* e */ +00046 #define M_LOG2E 1.442695040888963407359924681001892137f /* log_2 e */ +00047 #define M_LOG10E 0.434294481903251827651128918916605082f /* log_10 e */ +00048 #define M_LN2 0.693147180559945309417232121458176568f /* log_e 2 */ +00049 #define M_LN10 2.302585092994045684017991454684364208f /* log_e 10 */ +00050 #define M_PI 3.141592653589793238462643383279502884f /* pi */ +00051 #define M_PI_2 1.570796326794896619231321691639751442f /* pi/2 */ +00052 #define M_PI_4 0.785398163397448309615660845819875721f /* pi/4 */ +00053 #define M_1_PI 0.318309886183790671537767526745028724f /* 1/pi */ +00054 #define M_2_PIl 0.636619772367581343075535053490057448f /* 2/pi */ +00055 #define M_2_SQRTPI 1.128379167095512573896158903121545172f /* 2/sqrt(pi) */ +00056 #define M_SQRT2 1.414213562373095048801688724209698079f /* sqrt(2) */ +00057 #define M_SQRT1_2 0.707106781186547524400844362104849039f /* 1/sqrt(2) */ +00058 +00059 #include "stdbool.h" +00063 typedef char int8_t; +00067 typedef short int16_t; +00071 typedef int int32_t; +00075 typedef long long int64_t; +00079 typedef unsigned char uint8_t; +00083 typedef unsigned short uint16_t; +00087 typedef unsigned int uint32_t; +00091 typedef unsigned long long uint64_t; +00095 typedef uint8_t uchar; +00099 typedef uint16_t ushort; +00103 typedef uint32_t uint; +00107 typedef uint64_t ulong; +00111 typedef uint32_t size_t; +00115 typedef int32_t ssize_t; +00116 +00122 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_element; +00128 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_type; +00134 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_allocation; +00140 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_sampler; +00146 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_script; +00152 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_mesh; +00158 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_path; +00164 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_fragment; +00170 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_vertex; +00176 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_raster; +00182 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_store; +00188 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_font; +00189 +00195 typedef float float2 __attribute__((ext_vector_type(2))); +00200 typedef float float3 __attribute__((ext_vector_type(3))); +00206 typedef float float4 __attribute__((ext_vector_type(4))); +00207 +00212 typedef double double2 __attribute__((ext_vector_type(2))); +00217 typedef double double3 __attribute__((ext_vector_type(3))); +00222 typedef double double4 __attribute__((ext_vector_type(4))); +00223 +00228 typedef uchar uchar2 __attribute__((ext_vector_type(2))); +00233 typedef uchar uchar3 __attribute__((ext_vector_type(3))); +00238 typedef uchar uchar4 __attribute__((ext_vector_type(4))); +00239 +00244 typedef ushort ushort2 __attribute__((ext_vector_type(2))); +00249 typedef ushort ushort3 __attribute__((ext_vector_type(3))); +00254 typedef ushort ushort4 __attribute__((ext_vector_type(4))); +00255 +00260 typedef uint uint2 __attribute__((ext_vector_type(2))); +00265 typedef uint uint3 __attribute__((ext_vector_type(3))); +00270 typedef uint uint4 __attribute__((ext_vector_type(4))); +00271 +00276 typedef ulong ulong2 __attribute__((ext_vector_type(2))); +00281 typedef ulong ulong3 __attribute__((ext_vector_type(3))); +00286 typedef ulong ulong4 __attribute__((ext_vector_type(4))); +00287 +00292 typedef char char2 __attribute__((ext_vector_type(2))); +00297 typedef char char3 __attribute__((ext_vector_type(3))); +00302 typedef char char4 __attribute__((ext_vector_type(4))); +00303 +00308 typedef short short2 __attribute__((ext_vector_type(2))); +00313 typedef short short3 __attribute__((ext_vector_type(3))); +00318 typedef short short4 __attribute__((ext_vector_type(4))); +00319 +00324 typedef int int2 __attribute__((ext_vector_type(2))); +00329 typedef int int3 __attribute__((ext_vector_type(3))); +00334 typedef int int4 __attribute__((ext_vector_type(4))); +00335 +00340 typedef long long2 __attribute__((ext_vector_type(2))); +00345 typedef long long3 __attribute__((ext_vector_type(3))); +00350 typedef long long4 __attribute__((ext_vector_type(4))); +00351 +00358 typedef struct { +00359 float m[16]; +00360 } rs_matrix4x4; +00367 typedef struct { +00368 float m[9]; +00369 } rs_matrix3x3; +00376 typedef struct { +00377 float m[4]; +00378 } rs_matrix2x2; +00379 +00383 typedef float4 rs_quaternion; +00384 +00385 #define RS_PACKED __attribute__((packed, aligned(4))) +00386 #define NULL ((void *)0) +00387 +00388 #if (defined(RS_VERSION) && (RS_VERSION >= 14)) +00389 +00393 typedef enum { +00394 RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0, +00395 RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1, +00396 RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2, +00397 RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3, +00398 RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4, +00399 RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5 +00400 } rs_allocation_cubemap_face; +00401 +00408 typedef enum { +00409 RS_ALLOCATION_USAGE_SCRIPT = 0x0001, +00410 RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002, +00411 RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004, +00412 RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008, +00413 RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010 +00414 } rs_allocation_usage_type; +00415 +00416 #endif //defined(RS_VERSION) && (RS_VERSION >= 14) +00417 +00418 // New API's +00419 #if (defined(RS_VERSION) && (RS_VERSION >= 16)) +00420 +00425 typedef enum { +00429 RS_PRIMITIVE_POINT = 0, +00433 RS_PRIMITIVE_LINE = 1, +00437 RS_PRIMITIVE_LINE_STRIP = 2, +00441 RS_PRIMITIVE_TRIANGLE = 3, +00447 RS_PRIMITIVE_TRIANGLE_STRIP = 4, +00452 RS_PRIMITIVE_TRIANGLE_FAN = 5, +00453 +00457 RS_PRIMITIVE_INVALID = 100, +00458 } rs_primitive; +00459 +00478 typedef enum { +00479 RS_TYPE_NONE = 0, +00480 RS_TYPE_FLOAT_32 = 2, +00481 RS_TYPE_FLOAT_64 = 3, +00482 RS_TYPE_SIGNED_8 = 4, +00483 RS_TYPE_SIGNED_16 = 5, +00484 RS_TYPE_SIGNED_32 = 6, +00485 RS_TYPE_SIGNED_64 = 7, +00486 RS_TYPE_UNSIGNED_8 = 8, +00487 RS_TYPE_UNSIGNED_16 = 9, +00488 RS_TYPE_UNSIGNED_32 = 10, +00489 RS_TYPE_UNSIGNED_64 = 11, +00490 +00491 RS_TYPE_BOOLEAN = 12, +00492 +00493 RS_TYPE_UNSIGNED_5_6_5 = 13, +00494 RS_TYPE_UNSIGNED_5_5_5_1 = 14, +00495 RS_TYPE_UNSIGNED_4_4_4_4 = 15, +00496 +00497 RS_TYPE_MATRIX_4X4 = 16, +00498 RS_TYPE_MATRIX_3X3 = 17, +00499 RS_TYPE_MATRIX_2X2 = 18, +00500 +00501 RS_TYPE_ELEMENT = 1000, +00502 RS_TYPE_TYPE = 1001, +00503 RS_TYPE_ALLOCATION = 1002, +00504 RS_TYPE_SAMPLER = 1003, +00505 RS_TYPE_SCRIPT = 1004, +00506 RS_TYPE_MESH = 1005, +00507 RS_TYPE_PROGRAM_FRAGMENT = 1006, +00508 RS_TYPE_PROGRAM_VERTEX = 1007, +00509 RS_TYPE_PROGRAM_RASTER = 1008, +00510 RS_TYPE_PROGRAM_STORE = 1009, +00511 RS_TYPE_FONT = 1010, +00512 +00513 RS_TYPE_INVALID = 10000, +00514 } rs_data_type; +00515 +00524 typedef enum { +00525 RS_KIND_USER = 0, +00526 +00527 RS_KIND_PIXEL_L = 7, +00528 RS_KIND_PIXEL_A = 8, +00529 RS_KIND_PIXEL_LA = 9, +00530 RS_KIND_PIXEL_RGB = 10, +00531 RS_KIND_PIXEL_RGBA = 11, +00532 RS_KIND_PIXEL_DEPTH = 12, +00533 RS_KIND_PIXEL_YUV = 13, +00534 +00535 RS_KIND_INVALID = 100, +00536 } rs_data_kind; +00537 +00538 typedef enum { +00542 RS_DEPTH_FUNC_ALWAYS = 0, +00547 RS_DEPTH_FUNC_LESS = 1, +00552 RS_DEPTH_FUNC_LEQUAL = 2, +00557 RS_DEPTH_FUNC_GREATER = 3, +00562 RS_DEPTH_FUNC_GEQUAL = 4, +00567 RS_DEPTH_FUNC_EQUAL = 5, +00572 RS_DEPTH_FUNC_NOTEQUAL = 6, +00576 RS_DEPTH_FUNC_INVALID = 100, +00577 } rs_depth_func; 00578 00579 typedef enum { -00580 RS_BLEND_DST_ZERO = 0, -00581 RS_BLEND_DST_ONE = 1, -00582 RS_BLEND_DST_SRC_COLOR = 2, -00583 RS_BLEND_DST_ONE_MINUS_SRC_COLOR = 3, -00584 RS_BLEND_DST_SRC_ALPHA = 4, -00585 RS_BLEND_DST_ONE_MINUS_SRC_ALPHA = 5, -00586 RS_BLEND_DST_DST_ALPHA = 6, -00587 RS_BLEND_DST_ONE_MINUS_DST_ALPHA = 7, -00588 -00589 RS_BLEND_DST_INVALID = 100, -00590 } rs_blend_dst_func; -00591 -00592 typedef enum { -00593 RS_CULL_BACK = 0, -00594 RS_CULL_FRONT = 1, -00595 RS_CULL_NONE = 2, -00596 -00597 RS_CULL_INVALID = 100, -00598 } rs_cull_mode; -00599 -00600 typedef enum { -00601 RS_SAMPLER_NEAREST = 0, -00602 RS_SAMPLER_LINEAR = 1, -00603 RS_SAMPLER_LINEAR_MIP_LINEAR = 2, -00604 RS_SAMPLER_WRAP = 3, -00605 RS_SAMPLER_CLAMP = 4, -00606 RS_SAMPLER_LINEAR_MIP_NEAREST = 5, -00607 -00608 RS_SAMPLER_INVALID = 100, -00609 } rs_sampler_value; +00580 RS_BLEND_SRC_ZERO = 0, +00581 RS_BLEND_SRC_ONE = 1, +00582 RS_BLEND_SRC_DST_COLOR = 2, +00583 RS_BLEND_SRC_ONE_MINUS_DST_COLOR = 3, +00584 RS_BLEND_SRC_SRC_ALPHA = 4, +00585 RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA = 5, +00586 RS_BLEND_SRC_DST_ALPHA = 6, +00587 RS_BLEND_SRC_ONE_MINUS_DST_ALPHA = 7, +00588 RS_BLEND_SRC_SRC_ALPHA_SATURATE = 8, +00589 +00590 RS_BLEND_SRC_INVALID = 100, +00591 } rs_blend_src_func; +00592 +00593 typedef enum { +00594 RS_BLEND_DST_ZERO = 0, +00595 RS_BLEND_DST_ONE = 1, +00596 RS_BLEND_DST_SRC_COLOR = 2, +00597 RS_BLEND_DST_ONE_MINUS_SRC_COLOR = 3, +00598 RS_BLEND_DST_SRC_ALPHA = 4, +00599 RS_BLEND_DST_ONE_MINUS_SRC_ALPHA = 5, +00600 RS_BLEND_DST_DST_ALPHA = 6, +00601 RS_BLEND_DST_ONE_MINUS_DST_ALPHA = 7, +00602 +00603 RS_BLEND_DST_INVALID = 100, +00604 } rs_blend_dst_func; +00605 +00606 typedef enum { +00607 RS_CULL_BACK = 0, +00608 RS_CULL_FRONT = 1, +00609 RS_CULL_NONE = 2, 00610 -00611 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) -00612 -00613 #endif // __RS_TYPES_RSH__ +00611 RS_CULL_INVALID = 100, +00612 } rs_cull_mode; +00613 +00614 typedef enum { +00615 RS_SAMPLER_NEAREST = 0, +00616 RS_SAMPLER_LINEAR = 1, +00617 RS_SAMPLER_LINEAR_MIP_LINEAR = 2, +00618 RS_SAMPLER_WRAP = 3, +00619 RS_SAMPLER_CLAMP = 4, +00620 RS_SAMPLER_LINEAR_MIP_NEAREST = 5, +00621 RS_SAMPLER_MIRRORED_REPEAT = 6, +00622 +00623 RS_SAMPLER_INVALID = 100, +00624 } rs_sampler_value; +00625 +00626 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) +00627 +00628 #endif // __RS_TYPES_RSH__
Opaque handle to a Renderscript allocation. +
Opaque handle to a RenderScript allocation. More...
Opaque handle to a Renderscript allocation.
+Opaque handle to a RenderScript allocation.
See: android.renderscript.Allocation
-Definition at line 121 of file rs_types.rsh.
+Definition at line 134 of file rs_types.rsh.
Opaque handle to a Renderscript element. +
Opaque handle to a RenderScript element. More...
Opaque handle to a Renderscript element.
+Opaque handle to a RenderScript element.
See: android.renderscript.Element
-Definition at line 109 of file rs_types.rsh.
+Definition at line 122 of file rs_types.rsh.
Opaque handle to a Renderscript font object. +
Opaque handle to a RenderScript font object. More...
Opaque handle to a Renderscript font object.
+Opaque handle to a RenderScript font object.
See: android.renderscript.Font
-Definition at line 175 of file rs_types.rsh.
+Definition at line 188 of file rs_types.rsh.
2x2 float matrix
Native holder for RS matrix. Elements are stored in the array at the location [row*2 + col]
-Definition at line 363 of file rs_types.rsh.
+Definition at line 376 of file rs_types.rsh.
3x3 float matrix
Native holder for RS matrix. Elements are stored in the array at the location [row*3 + col]
-Definition at line 354 of file rs_types.rsh.
+Definition at line 367 of file rs_types.rsh.
4x4 float matrix
Native holder for RS matrix. Elements are stored in the array at the location [row*4 + col]
-Definition at line 345 of file rs_types.rsh.
+Definition at line 358 of file rs_types.rsh.
Opaque handle to a Renderscript mesh object. +
Opaque handle to a RenderScript mesh object. More...
Opaque handle to a Renderscript mesh object.
+Opaque handle to a RenderScript mesh object.
See: android.renderscript.Mesh
-Definition at line 139 of file rs_types.rsh.
+Definition at line 152 of file rs_types.rsh.
Opaque handle to a Renderscript Path object. +
Opaque handle to a RenderScript Path object. More...
Opaque handle to a Renderscript Path object.
+Opaque handle to a RenderScript Path object.
See: android.renderscript.Path
-Definition at line 145 of file rs_types.rsh.
+Definition at line 158 of file rs_types.rsh.
Opaque handle to a Renderscript ProgramFragment object. +
Opaque handle to a RenderScript ProgramFragment object. More...
Opaque handle to a Renderscript ProgramFragment object.
+Opaque handle to a RenderScript ProgramFragment object.
See: android.renderscript.ProgramFragment
-Definition at line 151 of file rs_types.rsh.
+Definition at line 164 of file rs_types.rsh.
Opaque handle to a Renderscript ProgramRaster object. +
Opaque handle to a RenderScript ProgramRaster object. More...
Opaque handle to a Renderscript ProgramRaster object.
+Opaque handle to a RenderScript ProgramRaster object.
See: android.renderscript.ProgramRaster
-Definition at line 163 of file rs_types.rsh.
+Definition at line 176 of file rs_types.rsh.
Opaque handle to a Renderscript ProgramStore object. +
Opaque handle to a RenderScript ProgramStore object. More...
Opaque handle to a Renderscript ProgramStore object.
+Opaque handle to a RenderScript ProgramStore object.
See: android.renderscript.ProgramStore
-Definition at line 169 of file rs_types.rsh.
+Definition at line 182 of file rs_types.rsh.
Opaque handle to a Renderscript ProgramVertex object. +
Opaque handle to a RenderScript ProgramVertex object. More...
Opaque handle to a Renderscript ProgramVertex object.
+Opaque handle to a RenderScript ProgramVertex object.
See: android.renderscript.ProgramVertex
-Definition at line 157 of file rs_types.rsh.
+Definition at line 170 of file rs_types.rsh.
Opaque handle to a Renderscript sampler object. +
Opaque handle to a RenderScript sampler object. More...
Opaque handle to a Renderscript sampler object.
+Opaque handle to a RenderScript sampler object.
See: android.renderscript.Sampler
-Definition at line 127 of file rs_types.rsh.
+Definition at line 140 of file rs_types.rsh.
Opaque handle to a Renderscript script object. +
Opaque handle to a RenderScript script object. More...
Opaque handle to a Renderscript script object.
+Opaque handle to a RenderScript script object.
See: android.renderscript.ScriptC
-Definition at line 133 of file rs_types.rsh.
+Definition at line 146 of file rs_types.rsh.
Structure to provide extra information to a rsForEach call. Primarly used to restrict the call to a subset of cells in the allocation.
-Definition at line 106 of file rs_core.rsh.
+Definition at line 110 of file rs_core.rsh.
Opaque handle to a Renderscript type. +
Opaque handle to a RenderScript type. More...
Opaque handle to a Renderscript type.
+Opaque handle to a RenderScript type.
See: android.renderscript.Type
-Definition at line 115 of file rs_types.rsh.
+Definition at line 128 of file rs_types.rsh.
This article describes how to design a robust conflict resolution strategy for +apps that save data to the cloud using the + +Cloud Save service. The Cloud Save service +allows you to store application data for each user of an application on Google's +servers. Your application can retrieve and update this user data from Android +devices, iOS devices, or web applications by using the Cloud Save APIs.
+ +Saving and loading progress in Cloud Save is straightforward: it's just a matter +of serializing the player's data to and from byte arrays and storing those arrays +in the cloud. However, when your user has multiple devices and two or more of them attempt +to save data to the cloud, the saves might conflict, and you must decide how to +resolve it. The structure of your cloud save data largely dictates how robust +your conflict resolution can be, so you must design your data carefully in order +to allow your conflict resolution logic to handle each case correctly.
+ +The article starts by describing a few flawed approaches +and explains where they fall short. Then it presents a solution for avoiding +conflicts. The discussion focuses on games, but you can +apply the same principles to any app that saves data to the cloud.
+ +The +{@code OnStateLoadedListener} +methods are responsible for loading an application's state data from Google's servers. +The callback +{@code OnStateLoadedListener.onStateConflict} provides a mechanism +for your application to resolve conflicts between the local state on a user's +device and the state stored in the cloud:
+ +@Override
+public void onStateConflict(int stateKey, String resolvedVersion,
+ byte[] localData, byte[] serverData) {
+ // resolve conflict, then call mAppStateClient.resolveConflict()
+ ...
+}
+
+At this point your application must choose which one of the data sets should +be kept, or it can submit a new data set that represents the merged data. It is +up to you to implement this conflict resolution logic.
+ +It's important to realize that the Cloud Save service synchronizes +data in the background. Therefore, you should ensure that your app is prepared +to receive that callback outside of the context where you originally generated +the data. Specifically, if the Google Play services application detects a conflict +in the background, the callback will be called the next time you attempt to load the +data, which might not happen until the next time the user starts the app.
+ +Therefore, design of your cloud save data and conflict resolution code must be +context-independent: given two conflicting save states, you must be able +to resolve the conflict using only the data available within the data sets, without +consulting any external context.
+ +Here are some simple cases of conflict resolution. For many apps, it is +sufficient to adopt a variant of one of these strategies:
+ +A more complicated case happens when your game allows the player to collect +fungible items or units, such as gold coins or experience points. Let's +consider a hypothetical game, called Coin Run, an infinite runner where the goal +is to collect coins and become very, very rich. Each coin collected gets added to +the player's piggy bank.
+ +The following sections describe three strategies for resolving sync conflicts +between multiple devices: two that sound good but ultimately fail to successfully +resolve all scenarios, and one final solution that can manage conflicts between +any number of devices.
+ +At first thought, it might seem that the cloud save data should simply be the +number of coins in the bank. But if that data is all that's available, conflict +resolution will be severely limited. The best you could do would be to pick the largest of +the two numbers in case of a conflict.
+ +Consider the scenario illustrated in Table 1. Suppose the player initially +has 20 coins, and then collects 10 coins on device A and 15 coins on device B. +Then device B saves the state to the cloud. When device A attempts to save, a +conflict is detected. The "store only the total" conflict resolution algorithm would resolve +the conflict by writing 35 (the largest of the two numbers).
+ +Table 1. Storing only the total number +of coins (failed strategy).
+ +| Event | +Data on Device A | +Data on Device B | +Data on Cloud | +Actual Total | +
|---|---|---|---|---|
| Starting conditions | +20 | +20 | +20 | +20 | +
| Player collects 10 coins on device A | +30 | +20 | +20 | +30 | +
| Player collects 15 coins on device B | +30 | +35 | +20 | +45 | +
| Device B saves state to cloud | +30 | +35 | +35 | +45 | +
| Device A tries to save state to cloud. + Conflict detected. |
+ 30 | +35 | +35 | +45 | +
| Device A resolves conflict by picking largest of the two numbers. | +35 | +35 | +35 | +45 | +
This strategy would fail—the player's bank has gone from 20 +to 35, when the user actually collected a total of 25 coins (10 on device A and 15 on +device B). So 10 coins were lost. Storing only the total number of coins in the +cloud save is not enough to implement a robust conflict resolution algorithm.
+ +A different approach is to include an additional field in +the save data: the number of coins added (the delta) since the last commit. In +this approach the save data can be represented by a tuple (T,d) where T is +the total number of coins and d is the number of coins that you just +added.
+ +With this structure, your conflict resolution algorithm has room to be more +robust, as illustrated below. But this approach still doesn't give your app +a reliable picture of the player's overall state.
+ +Here is the conflict resolution algorithm for including the delta:
+ +For example, when you get a conflict between the local state (T,d) +and the cloud state (T',d'), you can resolve it as (T'+d, d). +What this means is that you are taking the delta from your local data and +incorporating it into the cloud data, hoping that this will correctly account for +any gold coins that were collected on the other device.
+ +This approach might sound promising, but it breaks down in a dynamic mobile +environment:
+To illustrate, consider the scenario illustrated by Table 2. After the +series of operations shown in the table, the cloud state +will be (130, +5). This means the resolved state would be (140, +10). This is +incorrect because in total, the user has collected 110 coins on device A and +120 coins on device B. The total should be 250 coins.
+ +Table 2. Failure case for total+delta +strategy.
+ +| Event | +Data on Device A | +Data on Device B | +Data on Cloud | +Actual Total | +
|---|---|---|---|---|
| Starting conditions | +(20, x) | +(20, x) | +(20, x) | +20 | +
| Player collects 100 coins on device A | +(120, +100) | +(20, x) | +(20, x) | +120 | +
| Player collects 10 more coins on device A | +(130, +10) | +(20, x) | +(20, x) | +130 | +
| Player collects 115 coins on device B | +(130, +10) | +(125, +115) | +(20, x) | +245 | +
| Player collects 5 more coins on device B | +(130, +10) | ++(130, +5) | ++(20, x) | +250 | +
| Device B uploads its data to the cloud + | +(130, +10) | +(130, +5) | ++(130, +5) | +250 | +
| Device A tries to upload its data to the cloud.
+ + Conflict detected. |
+ (130, +10) | +(130, +5) | +(130, +5) | +250 | +
| Device A resolves the conflict by applying the local delta to the cloud total. + | +(140, +10) | +(130, +5) | +(140, +10) | +250 | +
(*): x represents data that is irrelevant to our scenario.
+ +You might try to fix the problem by not resetting the delta after each save, +so that the second save on each device accounts for all the coins collected thus far. +With that change the second save made by device A would be (130, +110) instead of +(130, +10). However, you would then run into the problem illustrated in Table 3.
+ +Table 3. Failure case for the modified +algorithm.
+| Event | +Data on Device A | +Data on Device B | +Data on Cloud | +Actual Total | +
|---|---|---|---|---|
| Starting conditions | +(20, x) | +(20, x) | +(20, x) | +20 | +
| Player collects 100 coins on device A + | +(120, +100) | +(20, x) | +(20, x) | +120 | +
| Device A saves state to cloud | +(120, +100) | +(20, x) | +(120, +100) | +120 | +
| Player collects 10 more coins on device A + | +(130, +110) | ++(20, x) | +(120, +100) | +130 | +
| Player collects 1 coin on device B + + | +(130, +110) | +(21, +1) | +(120, +100) | +131 | +
| Device B attempts to save state to cloud.
+ + Conflict detected. + |
+ (130, +110) | +(21, +1) | ++(120, +100) | +131 | +
| Device B solves conflict by applying local delta to cloud total. + + | +(130, +110) | +(121, +1) | +(121, +1) | +131 | +
| Device A tries to upload its data to the cloud.
+ + Conflict detected. |
+ (130, +110) | +(121, +1) | +(121, +1) | +131 | +
| Device A resolves the conflict by applying the local delta to the cloud total. + + | +(231, +110) | +(121, +1) | +(231, +110) | +131 | +
(*): x represents data that is irrelevant to our scenario.
+ +Now you have the opposite problem: you are giving the player too many coins. +The player has gained 211 coins, when in fact she has collected only 111 coins.
+ +Analyzing the previous attempts, it seems that what those strategies +fundamentally miss is the ability to know which coins have already been counted +and which coins have not been counted yet, especially in the presence of multiple +consecutive commits coming from different devices.
+ +The solution to the problem is to change the structure of your cloud save to +be a dictionary that maps strings to integers. Each key-value pair in this +dictionary represents a "drawer" that contains coins, and the total +number of coins in the save is the sum of the values of all entries. +The fundamental principle of this design is that each device has its own +drawer, and only the device itself can put coins into that drawer.
+ +The structure of the dictionary is (A:a, B:b, C:c, ...), where +a is the total number of coins in the drawer A, b is +the total number of coins in drawer B, and so on.
+ +The new conflict resolution algorithm for the "drawer" solution is as follows:
+ +For example, if the local data is (A:20, B:4, C:7) and the cloud data +is (B:10, C:2, D:14), then the resolved data will be +(A:20, B:10, C:7, D:14). Note that how you apply conflict resolution +logic to this dictionary data may vary depending on your app. For example, for +some apps you might want to take the lower value.
+ +To test this new algorithm, apply it to any of the test scenarios +mentioned above. You will see that it arrives at the correct result.
+ +Table 4 illustrates this, based on the scenario from Table 3. Note the following: + +Table 4. Successful application of the +key-value pair strategy.
+ +| Event | +Data on Device A | +Data on Device B | +Data on Cloud | +Actual Total | +
|---|---|---|---|---|
| Starting conditions | +(X:20, x) | +(X:20, x) | +(X:20, x) | +20 | +
| Player collects 100 coins on device A + + | +(X:20, A:100) | +(X:20) | +(X:20) | +120 | +
| Device A saves state to cloud + + | +(X:20, A:100) | +(X:20) | +(X:20, A:100) | +120 | +
| Player collects 10 more coins on device A + | +(X:20, A:110) | +(X:20) | +(X:20, A:100) | +130 | +
| Player collects 1 coin on device B | +(X:20, A:110) | ++(X:20, B:1) | ++(X:20, A:100) | +131 | +
| Device B attempts to save state to cloud.
+ + Conflict detected. |
+ (X:20, A:110) | +(X:20, B:1) | ++(X:20, A:100) | +131 | +
| Device B solves conflict + + | +(X:20, A:110) | +(X:20, A:100, B:1) | +(X:20, A:100, B:1) | +131 | +
| Device A tries to upload its data to the cloud. + Conflict detected. |
+ (X:20, A:110) | +(X:20, A:100, B:1) | ++(X:20, A:100, B:1) | +131 | +
| Device A resolves the conflict + + | +(X:20, A:110, B:1) | +(X:20, A:100, B:1) | +(X:20, A:110, B:1)
+ + total 131 |
+ 131 | +
There is a limit to the size of cloud save data, so in following the strategy +outlined in this article, take care not to create arbitrarily large dictionaries. At first +glance it may seem that the dictionary will have only one entry per device, and even +the very enthusiastic user is unlikely to have thousands of them. However, +obtaining a device ID is difficult and considered a bad practice, so instead you should +use an installation ID, which is easier to obtain and more reliable. This means +that the dictionary might have one entry for each time the user installed the +application on each device. Assuming each key-value pair takes 32 bytes, and +since an individual cloud save buffer can be +up to 128K in size, you are safe if you have up to 4,096 entries.
+ +In real-life situations, your data will probably be more complex than a number +of coins. In this case, the number of entries in this dictionary may be much more +limited. Depending on your implementation, it might make sense to store the +timestamp for when each entry in the dictionary was modified. When you detect that a +given entry has not been modified in the last several weeks or months, it is +probably safe to transfer the coins into another entry and delete the old entry.
\ No newline at end of file diff --git a/docs/html/training/cloudsync/gcm.jd b/docs/html/training/cloudsync/gcm.jd index fa395e4670248..630337260900a 100644 --- a/docs/html/training/cloudsync/gcm.jd +++ b/docs/html/training/cloudsync/gcm.jd @@ -1,12 +1,7 @@ page.title=Making the Most of Google Cloud Messaging -parent.title=Syncing to the Cloud -parent.link=index.html trainingnavtop=true -previous.title=Using the Backup API -previous.link=backupapi.html - @jd:body