OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
12 | 12 |
13 static const size_t kBufferSize = 2048; | 13 static const size_t kBufferSize = 2048; |
14 | 14 |
15 #include <stdarg.h> | 15 #include <stdarg.h> |
16 #include <stdio.h> | 16 #include <stdio.h> |
17 #include <Windows.h> | 17 #include <Windows.h> |
18 | 18 |
19 void SkDebugf(const char format[], ...) { | 19 void SkDebugf(const char format[], ...) { |
20 char buffer[kBufferSize + 1]; | 20 char buffer[kBufferSize + 1]; |
21 va_list args; | 21 va_list args; |
| 22 |
| 23 va_start(args, format); |
| 24 vprintf(format, args); |
| 25 va_end(args); |
| 26 |
22 va_start(args, format); | 27 va_start(args, format); |
23 vsnprintf(buffer, kBufferSize, format, args); | 28 vsnprintf(buffer, kBufferSize, format, args); |
24 vprintf(format, args); | |
25 va_end(args); | 29 va_end(args); |
26 | 30 |
27 OutputDebugStringA(buffer); | 31 OutputDebugStringA(buffer); |
28 } | 32 } |
OLD | NEW |