diff -r 000000000000 -r 6474c204b198 gfx/skia/trunk/src/ports/SkDebug_win.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gfx/skia/trunk/src/ports/SkDebug_win.cpp Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,35 @@ + +/* + * Copyright 2010 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + + + +#include "SkTypes.h" + +static const size_t kBufferSize = 2048; + +#include +#include +#include + +void SkDebugf(const char format[], ...) { + char buffer[kBufferSize + 1]; + va_list args; + + va_start(args, format); + vprintf(format, args); + va_end(args); + // When we crash on Windows we often are missing a lot of prints. Since we don't really care + // about SkDebugf performance we flush after every print. + fflush(stdout); + + va_start(args, format); + vsnprintf(buffer, kBufferSize, format, args); + va_end(args); + + OutputDebugStringA(buffer); +}