OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkUtils_DEFINED | 8 #ifndef SkUtils_DEFINED |
9 #define SkUtils_DEFINED | 9 #define SkUtils_DEFINED |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 */ | 106 */ |
107 SkAutoTrace(const char label[]) : fLabel(label) { | 107 SkAutoTrace(const char label[]) : fLabel(label) { |
108 SkDebugf("--- trace: %s Enter\n", fLabel); | 108 SkDebugf("--- trace: %s Enter\n", fLabel); |
109 } | 109 } |
110 ~SkAutoTrace() { | 110 ~SkAutoTrace() { |
111 SkDebugf("--- trace: %s Leave\n", fLabel); | 111 SkDebugf("--- trace: %s Leave\n", fLabel); |
112 } | 112 } |
113 private: | 113 private: |
114 const char* fLabel; | 114 const char* fLabel; |
115 }; | 115 }; |
| 116 #define SkAutoTrace(...) SK_REQUIRE_LOCAL_VAR(SkAutoTrace) |
116 | 117 |
117 #endif | 118 #endif |
OLD | NEW |