Merge "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."
This commit is contained in:
committed by
Android (Google) Code Review
commit
3ca506b6d4
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user