Jason Sams | 044e2ee | 2011-08-08 16:52:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** @file rs_debug.rsh |
| 18 | * \brief Utility debugging routines |
| 19 | * |
| 20 | * Routines intended to be used during application developement. These should |
| 21 | * not be used in shipping applications. All print a string and value pair to |
| 22 | * the standard log. |
| 23 | * |
| 24 | */ |
| 25 | |
| 26 | #ifndef __RS_DEBUG_RSH__ |
| 27 | #define __RS_DEBUG_RSH__ |
| 28 | |
| 29 | |
Jason Sams | 044e2ee | 2011-08-08 16:52:30 -0700 | [diff] [blame] | 30 | /** |
| 31 | * Debug function. Prints a string and value to the log. |
| 32 | */ |
| 33 | extern void __attribute__((overloadable)) |
| 34 | rsDebug(const char *, float); |
| 35 | /** |
| 36 | * Debug function. Prints a string and value to the log. |
| 37 | */ |
| 38 | extern void __attribute__((overloadable)) |
| 39 | rsDebug(const char *, float, float); |
| 40 | /** |
| 41 | * Debug function. Prints a string and value to the log. |
| 42 | */ |
| 43 | extern void __attribute__((overloadable)) |
| 44 | rsDebug(const char *, float, float, float); |
| 45 | /** |
| 46 | * Debug function. Prints a string and value to the log. |
| 47 | */ |
| 48 | extern void __attribute__((overloadable)) |
| 49 | rsDebug(const char *, float, float, float, float); |
| 50 | /** |
| 51 | * Debug function. Prints a string and value to the log. |
| 52 | */ |
| 53 | extern void __attribute__((overloadable)) |
Stephen Hines | 6537404 | 2012-05-14 18:04:10 -0700 | [diff] [blame] | 54 | rsDebug(const char *, float2); |
| 55 | /** |
| 56 | * Debug function. Prints a string and value to the log. |
| 57 | */ |
| 58 | extern void __attribute__((overloadable)) |
| 59 | rsDebug(const char *, float3); |
| 60 | /** |
| 61 | * Debug function. Prints a string and value to the log. |
| 62 | */ |
| 63 | extern void __attribute__((overloadable)) |
| 64 | rsDebug(const char *, float4); |
| 65 | /** |
| 66 | * Debug function. Prints a string and value to the log. |
| 67 | */ |
| 68 | extern void __attribute__((overloadable)) |
Jason Sams | 044e2ee | 2011-08-08 16:52:30 -0700 | [diff] [blame] | 69 | rsDebug(const char *, double); |
| 70 | /** |
| 71 | * Debug function. Prints a string and value to the log. |
| 72 | */ |
| 73 | extern void __attribute__((overloadable)) |
| 74 | rsDebug(const char *, const rs_matrix4x4 *); |
| 75 | /** |
| 76 | * Debug function. Prints a string and value to the log. |
| 77 | */ |
| 78 | extern void __attribute__((overloadable)) |
| 79 | rsDebug(const char *, const rs_matrix3x3 *); |
| 80 | /** |
| 81 | * Debug function. Prints a string and value to the log. |
| 82 | */ |
| 83 | extern void __attribute__((overloadable)) |
| 84 | rsDebug(const char *, const rs_matrix2x2 *); |
| 85 | /** |
| 86 | * Debug function. Prints a string and value to the log. |
| 87 | */ |
| 88 | extern void __attribute__((overloadable)) |
| 89 | rsDebug(const char *, int); |
| 90 | /** |
| 91 | * Debug function. Prints a string and value to the log. |
| 92 | */ |
| 93 | extern void __attribute__((overloadable)) |
| 94 | rsDebug(const char *, uint); |
| 95 | /** |
| 96 | * Debug function. Prints a string and value to the log. |
| 97 | */ |
| 98 | extern void __attribute__((overloadable)) |
| 99 | rsDebug(const char *, long); |
| 100 | /** |
| 101 | * Debug function. Prints a string and value to the log. |
| 102 | */ |
| 103 | extern void __attribute__((overloadable)) |
| 104 | rsDebug(const char *, unsigned long); |
| 105 | /** |
| 106 | * Debug function. Prints a string and value to the log. |
| 107 | */ |
| 108 | extern void __attribute__((overloadable)) |
| 109 | rsDebug(const char *, long long); |
| 110 | /** |
| 111 | * Debug function. Prints a string and value to the log. |
| 112 | */ |
| 113 | extern void __attribute__((overloadable)) |
| 114 | rsDebug(const char *, unsigned long long); |
| 115 | /** |
| 116 | * Debug function. Prints a string and value to the log. |
| 117 | */ |
| 118 | extern void __attribute__((overloadable)) |
| 119 | rsDebug(const char *, const void *); |
| 120 | #define RS_DEBUG(a) rsDebug(#a, a) |
| 121 | #define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__) |
| 122 | |
Jason Sams | 044e2ee | 2011-08-08 16:52:30 -0700 | [diff] [blame] | 123 | #endif |