Remove the always_inline attribute on all RS builtins.
Remove the always_inline attribute on all RenderScript builtins
in the specification files. This leads to the removal of that
attribute from the declarations of all those functions in the
RenderScript header files.
Also, updates a comment in the unrelated file rs_for_each.rsh.
I presume someone forgot to update that when they changed the
corresponding spec file.
Signed-off-by: Verena Beckham <verena@codeplay.com>
Change-Id: Ia4cdffdbdc9866a5b961356218dd01732bf2e830
diff --git a/api/rs_graphics.spec b/api/rs_graphics.spec
index f5b8096..db93cfc 100644
--- a/api/rs_graphics.spec
+++ b/api/rs_graphics.spec
@@ -691,7 +691,6 @@
function: rsgMeshComputeBoundingBox
version: 9 22
size: 32
-attrib: always_inline
ret: void
arg: rs_mesh mesh
arg: float3* bBoxMin
diff --git a/api/rs_math.spec b/api/rs_math.spec
index 070bb4f..b390610 100644
--- a/api/rs_math.spec
+++ b/api/rs_math.spec
@@ -3387,8 +3387,7 @@
end:
function: rsClamp
-# TODO Why always_inline?
-attrib: const, always_inline
+attrib: const
t: i8, i16, i32, u8, u16, u32
ret: #1
arg: #1 amount, "Value to clamp."
diff --git a/api/rs_matrix.spec b/api/rs_matrix.spec
index d66e9d9..7f7ff0b 100644
--- a/api/rs_matrix.spec
+++ b/api/rs_matrix.spec
@@ -46,8 +46,6 @@
end:
function: rsExtractFrustumPlanes
-# TODO Why always_inline?
-attrib: always_inline
ret: void
arg: const rs_matrix4x4* viewProj, "Matrix to extract planes from."
arg: float4* left, "Left plane."
@@ -107,7 +105,6 @@
end:
function: rsIsSphereInFrustum
-attrib: always_inline
ret: bool
arg: float4* sphere, "float4 representing the sphere."
arg: float4* left, "Left plane."
diff --git a/scriptc/rs_graphics.rsh b/scriptc/rs_graphics.rsh
index fc311a3..f1c5732 100644
--- a/scriptc/rs_graphics.rsh
+++ b/scriptc/rs_graphics.rsh
@@ -1037,7 +1037,7 @@
#ifndef __LP64__
#if !defined(RS_VERSION) || (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 22)
-static inline void __attribute__((always_inline, overloadable
+static inline void __attribute__((overloadable
#if (defined(RS_VERSION) && (RS_VERSION >= 22))
, deprecated
#endif
diff --git a/scriptc/rs_math.rsh b/scriptc/rs_math.rsh
index 1a51316..d539867 100644
--- a/scriptc/rs_math.rsh
+++ b/scriptc/rs_math.rsh
@@ -6306,42 +6306,42 @@
* low: Lower bound.
* high: Upper bound.
*/
-extern char __attribute__((const, always_inline, overloadable
+extern char __attribute__((const, overloadable
#if (defined(RS_VERSION) && (RS_VERSION >= 22))
, deprecated("Use clamp() instead.")
#endif
))
rsClamp(char amount, char low, char high);
-extern uchar __attribute__((const, always_inline, overloadable
+extern uchar __attribute__((const, overloadable
#if (defined(RS_VERSION) && (RS_VERSION >= 22))
, deprecated("Use clamp() instead.")
#endif
))
rsClamp(uchar amount, uchar low, uchar high);
-extern short __attribute__((const, always_inline, overloadable
+extern short __attribute__((const, overloadable
#if (defined(RS_VERSION) && (RS_VERSION >= 22))
, deprecated("Use clamp() instead.")
#endif
))
rsClamp(short amount, short low, short high);
-extern ushort __attribute__((const, always_inline, overloadable
+extern ushort __attribute__((const, overloadable
#if (defined(RS_VERSION) && (RS_VERSION >= 22))
, deprecated("Use clamp() instead.")
#endif
))
rsClamp(ushort amount, ushort low, ushort high);
-extern int __attribute__((const, always_inline, overloadable
+extern int __attribute__((const, overloadable
#if (defined(RS_VERSION) && (RS_VERSION >= 22))
, deprecated("Use clamp() instead.")
#endif
))
rsClamp(int amount, int low, int high);
-extern uint __attribute__((const, always_inline, overloadable
+extern uint __attribute__((const, overloadable
#if (defined(RS_VERSION) && (RS_VERSION >= 22))
, deprecated("Use clamp() instead.")
#endif
diff --git a/scriptc/rs_matrix.rsh b/scriptc/rs_matrix.rsh
index aafc864..9f9cf56 100644
--- a/scriptc/rs_matrix.rsh
+++ b/scriptc/rs_matrix.rsh
@@ -64,7 +64,7 @@
* near: Near plane.
* far: Far plane.
*/
-static inline void __attribute__((always_inline, overloadable))
+static inline void __attribute__((overloadable))
rsExtractFrustumPlanes(const rs_matrix4x4* viewProj, float4* left, float4* right, float4* top,
float4* bottom, float4* near, float4* far) {
// x y z w = a b c d in the plane equation
@@ -126,7 +126,7 @@
* near: Near plane.
* far: Far plane.
*/
-static inline bool __attribute__((always_inline, overloadable))
+static inline bool __attribute__((overloadable))
rsIsSphereInFrustum(float4* sphere, float4* left, float4* right, float4* top, float4* bottom,
float4* near, float4* far) {
float distToCenter = dot(left->xyz, sphere->xyz) + left->w;