diff options
| author | Shih-wei Liao <sliao@google.com> | 2010-10-07 18:21:32 -0700 |
|---|---|---|
| committer | Shih-wei Liao <sliao@google.com> | 2010-10-07 18:21:32 -0700 |
| commit | 708e04ff413ee5c9b2700de1d83391704e0d2292 (patch) | |
| tree | e133c0fca8cc8fb11807181de17604b127b5830c /libs/rs/scriptc | |
| parent | c4838afb343f1479d8239c60d51132fda66c1617 (diff) | |
| download | frameworks_base-708e04ff413ee5c9b2700de1d83391704e0d2292.zip frameworks_base-708e04ff413ee5c9b2700de1d83391704e0d2292.tar.gz frameworks_base-708e04ff413ee5c9b2700de1d83391704e0d2292.tar.bz2 | |
Move rsDebug from rs_math.rsh to rs_core.rsh: rsDebug is more like core functionalities instead of math functionalities. Also portions of rsDebug implementation has been in rs_core.rsh already.
Add #define guard for rs_types.rsh to prevent multiple inclusion.
Change-Id: I1db6dac9825c2618db3660e22c8791aff08d6243
Diffstat (limited to 'libs/rs/scriptc')
| -rw-r--r-- | libs/rs/scriptc/rs_core.rsh | 24 | ||||
| -rw-r--r-- | libs/rs/scriptc/rs_math.rsh | 28 | ||||
| -rw-r--r-- | libs/rs/scriptc/rs_types.rsh | 3 |
3 files changed, 27 insertions, 28 deletions
diff --git a/libs/rs/scriptc/rs_core.rsh b/libs/rs/scriptc/rs_core.rsh index 99fc166..9950184 100644 --- a/libs/rs/scriptc/rs_core.rsh +++ b/libs/rs/scriptc/rs_core.rsh @@ -1,6 +1,30 @@ #ifndef __RS_CORE_RSH__ #define __RS_CORE_RSH__ +// Debugging, print to the LOG a description string and a value. +extern void __attribute__((overloadable)) + rsDebug(const char *, float); +extern void __attribute__((overloadable)) + rsDebug(const char *, float, float); +extern void __attribute__((overloadable)) + rsDebug(const char *, float, float, float); +extern void __attribute__((overloadable)) + rsDebug(const char *, float, float, float, float); +extern void __attribute__((overloadable)) + rsDebug(const char *, const rs_matrix4x4 *); +extern void __attribute__((overloadable)) + rsDebug(const char *, const rs_matrix3x3 *); +extern void __attribute__((overloadable)) + rsDebug(const char *, const rs_matrix2x2 *); +extern void __attribute__((overloadable)) + rsDebug(const char *, int); +extern void __attribute__((overloadable)) + rsDebug(const char *, uint); +extern void __attribute__((overloadable)) + rsDebug(const char *, const void *); +#define RS_DEBUG(a) rsDebug(#a, a) +#define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__) + static void __attribute__((overloadable)) rsDebug(const char *s, float2 v) { rsDebug(s, v.x, v.y); } diff --git a/libs/rs/scriptc/rs_math.rsh b/libs/rs/scriptc/rs_math.rsh index 5720b05..d059997 100644 --- a/libs/rs/scriptc/rs_math.rsh +++ b/libs/rs/scriptc/rs_math.rsh @@ -1,34 +1,6 @@ #ifndef __RS_MATH_RSH__ #define __RS_MATH_RSH__ -// Debugging, print to the LOG a description string and a value. -extern void __attribute__((overloadable)) - rsDebug(const char *, float); -extern void __attribute__((overloadable)) - rsDebug(const char *, float, float); -extern void __attribute__((overloadable)) - rsDebug(const char *, float, float, float); -extern void __attribute__((overloadable)) - rsDebug(const char *, float, float, float, float); -extern void __attribute__((overloadable)) - rsDebug(const char *, const rs_matrix4x4 *); -extern void __attribute__((overloadable)) - rsDebug(const char *, const rs_matrix3x3 *); -extern void __attribute__((overloadable)) - rsDebug(const char *, const rs_matrix2x2 *); -extern void __attribute__((overloadable)) - rsDebug(const char *, int); -extern void __attribute__((overloadable)) - rsDebug(const char *, uint); -extern void __attribute__((overloadable)) - rsDebug(const char *, const void *); -#define RS_DEBUG(a) rsDebug(#a, a) -#define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__) - - -#include "rs_cl.rsh" -#include "rs_core.rsh" - extern void __attribute__((overloadable)) rsSetObject(rs_element *dst, rs_element src); extern void __attribute__((overloadable)) diff --git a/libs/rs/scriptc/rs_types.rsh b/libs/rs/scriptc/rs_types.rsh index dd42972..212eb83 100644 --- a/libs/rs/scriptc/rs_types.rsh +++ b/libs/rs/scriptc/rs_types.rsh @@ -1,3 +1,5 @@ +#ifndef __RS_TYPES_RSH__ +#define __RS_TYPES_RSH__ typedef char int8_t; typedef short int16_t; @@ -72,3 +74,4 @@ typedef float4 rs_quaternion; #define RS_PACKED __attribute__((packed, aligned(4))) +#endif |
