tomhudson@google.com | 278cbb4 | 2011-06-30 19:37:01 +0000 | [diff] [blame^] | 1 | /* |
| 2 | Copyright 2011 Google Inc. |
| 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 | #ifndef SkUserTrace_DEFINED |
| 17 | #define SkUserTrace_DEFINED |
| 18 | |
| 19 | /* Sample implementation of SkUserTrace that routes all of the |
| 20 | trace macros to debug output stream. |
| 21 | To use this, redefine SK_USER_TRACE_INCLUDE_FILE in |
| 22 | include/config/SkUserConfig.h to point to this file |
| 23 | */ |
| 24 | #define SK_TRACE_EVENT0(event) \ |
| 25 | SkDebugf("Trace: %s\n", event) |
| 26 | #define SK_TRACE_EVENT1(event, name1, value1) \ |
| 27 | SkDebugf("Trace: %s (%s=%s)\n", event, name1, value1) |
| 28 | #define SK_TRACE_EVENT2(event, name1, value1, name2, value2) \ |
| 29 | SkDebugf("Trace: %s (%s=%s, %s=%s)\n", event, name1, value1, name2, value2) |
| 30 | |
| 31 | #endif |
| 32 | |
| 33 | |