diff options
-rw-r--r-- | bench/SkBenchLogger.h | 3 | ||||
-rw-r--r-- | gm/gm_expectations.cpp | 5 | ||||
-rw-r--r-- | src/ports/SkDebug_win.cpp | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/bench/SkBenchLogger.h b/bench/SkBenchLogger.h index 5eed9d373c..21d64e4ea6 100644 --- a/bench/SkBenchLogger.h +++ b/bench/SkBenchLogger.h @@ -63,11 +63,10 @@ public: private: #ifdef SK_BUILD_FOR_ANDROID void nativeLogError(const char msg[]) { SkDebugf("%s", msg); } - void nativeLogProgress(const char msg[]) { SkDebugf("%s", msg); } #else void nativeLogError(const char msg[]) { fprintf(stderr, "%s", msg); } - void nativeLogProgress(const char msg[]) { printf("%s", msg); } #endif + void nativeLogProgress(const char msg[]) { SkDebugf("%s", msg); } void fileWrite(const char msg[], size_t size); diff --git a/gm/gm_expectations.cpp b/gm/gm_expectations.cpp index 7d6ccf6464..63aa638aac 100644 --- a/gm/gm_expectations.cpp +++ b/gm/gm_expectations.cpp @@ -34,6 +34,11 @@ namespace skiagm { va_start(args, format); fprintf(stream, "GM: "); vfprintf(stream, format, args); +#ifdef SK_BUILD_FOR_WIN + if (stderr == stream || stdout == stream) { + fflush(stream); + } +#endif va_end(args); } diff --git a/src/ports/SkDebug_win.cpp b/src/ports/SkDebug_win.cpp index e368c9719d..599b133e54 100644 --- a/src/ports/SkDebug_win.cpp +++ b/src/ports/SkDebug_win.cpp @@ -23,6 +23,9 @@ void SkDebugf(const char format[], ...) { 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); |