Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ca506b6 authored by Shih-wei Liao's avatar Shih-wei Liao Committed by Android (Google) Code Review
Browse files

Merge "Move rsDebug from rs_math.rsh to rs_core.rsh: rsDebug is more like core...

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."
parents 0ff647b0 708e04ff
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
#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);
}
+0 −28
Original line number Diff line number Diff line
#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))
+3 −0
Original line number Diff line number Diff line
#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