reed@google.com | 3e1313c | 2011-02-07 20:00:40 +0000 | [diff] [blame^] | 1 | /* libs/corecg/SkDebug_brew.cpp |
| 2 | ** |
| 3 | ** Copyright 2009, The Android Open Source Project |
| 4 | ** Copyright 2009, Company 100, Inc. |
| 5 | ** |
| 6 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | ** you may not use this file except in compliance with the License. |
| 8 | ** You may obtain a copy of the License at |
| 9 | ** |
| 10 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | ** |
| 12 | ** Unless required by applicable law or agreed to in writing, software |
| 13 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | ** See the License for the specific language governing permissions and |
| 16 | ** limitations under the License. |
| 17 | */ |
| 18 | |
| 19 | #include "SkTypes.h" |
| 20 | |
| 21 | #ifdef SK_BUILD_FOR_BREW |
| 22 | |
| 23 | static const size_t kBufferSize = 256; |
| 24 | |
| 25 | #include <AEEStdLib.h> |
| 26 | #include <stdarg.h> |
| 27 | |
| 28 | void SkDebugf(const char format[], ...) { |
| 29 | char buffer[kBufferSize + 1]; |
| 30 | va_list args; |
| 31 | va_start(args, format); |
| 32 | VSNPRINTF(buffer, kBufferSize, format, args); |
| 33 | va_end(args); |
| 34 | DBGPRINTF(buffer); |
| 35 | } |
| 36 | |
| 37 | #endif SK_BUILD_FOR_BREW |