michael@0: michael@0: /* michael@0: * Copyright 2010 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: michael@0: #include "SkTypes.h" michael@0: michael@0: static const size_t kBufferSize = 2048; michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: void SkDebugf(const char format[], ...) { michael@0: char buffer[kBufferSize + 1]; michael@0: va_list args; michael@0: michael@0: va_start(args, format); michael@0: vprintf(format, args); michael@0: va_end(args); michael@0: // When we crash on Windows we often are missing a lot of prints. Since we don't really care michael@0: // about SkDebugf performance we flush after every print. michael@0: fflush(stdout); michael@0: michael@0: va_start(args, format); michael@0: vsnprintf(buffer, kBufferSize, format, args); michael@0: va_end(args); michael@0: michael@0: OutputDebugStringA(buffer); michael@0: }