reed@google.com | baf7a07 | 2011-05-02 19:11:37 +0000 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2010 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 | |
| 17 | |
| 18 | #include "SkTypes.h" |
| 19 | |
| 20 | static const size_t kBufferSize = 2048; |
| 21 | |
| 22 | #include <stdarg.h> |
| 23 | #include <stdio.h> |
reed@google.com | 59d2f63 | 2011-05-02 19:36:59 +0000 | [diff] [blame] | 24 | #include <Windows.h> |
reed@google.com | baf7a07 | 2011-05-02 19:11:37 +0000 | [diff] [blame] | 25 | |
| 26 | void SkDebugf(const char format[], ...) { |
| 27 | char buffer[kBufferSize + 1]; |
| 28 | va_list args; |
| 29 | va_start(args, format); |
| 30 | vsnprintf(buffer, kBufferSize, format, args); |
| 31 | va_end(args); |
| 32 | |
reed@google.com | 59d2f63 | 2011-05-02 19:36:59 +0000 | [diff] [blame] | 33 | OutputDebugStringA(buffer); |
reed@google.com | 30b74fc | 2011-07-13 15:16:42 +0000 | [diff] [blame^] | 34 | printf(buffer); |
reed@google.com | baf7a07 | 2011-05-02 19:11:37 +0000 | [diff] [blame] | 35 | } |
| 36 | |