Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: src/ports/SkDebug_win.cpp

Issue 2041943002: SkLeanWindows.h: #include "Windows.h" fewer places (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-06-07 (Tuesday) 11:28:42 EDT Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
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 #include "SkTypes.h"
8 9
10 #if defined(SK_BUILD_FOR_WIN32)
9 11
10 #include "SkTypes.h" 12 #include "SkLeanWindows.h"
11 #if defined(SK_BUILD_FOR_WIN32) 13
14 #include <stdarg.h>
15 #include <stdio.h>
12 16
13 static const size_t kBufferSize = 2048; 17 static const size_t kBufferSize = 2048;
14 18
15 #include <stdarg.h>
16 #include <stdio.h>
17 #include <windows.h>
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 22
23 va_start(args, format); 23 va_start(args, format);
24 vfprintf(stderr, format, args); 24 vfprintf(stderr, format, args);
25 va_end(args); 25 va_end(args);
26 fflush(stderr); // stderr seems to be buffered on Windows. 26 fflush(stderr); // stderr seems to be buffered on Windows.
27 27
28 va_start(args, format); 28 va_start(args, format);
29 vsnprintf(buffer, kBufferSize, format, args); 29 vsnprintf(buffer, kBufferSize, format, args);
30 va_end(args); 30 va_end(args);
31 31
32 OutputDebugStringA(buffer); 32 OutputDebugStringA(buffer);
33 } 33 }
34 #endif//defined(SK_BUILD_FOR_WIN32) 34 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698