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

Side by Side Diff: bench/SkBenchLogger.h

Issue 26680004: flush after every print in windows (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: bench and gm prints Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gm/gm_expectations.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 #ifndef SkBenchLogger_DEFINED 9 #ifndef SkBenchLogger_DEFINED
10 #define SkBenchLogger_DEFINED 10 #define SkBenchLogger_DEFINED
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 * if any, taking an SkString as input. 56 * if any, taking an SkString as input.
57 */ 57 */
58 void logProgress(const SkString& str) { 58 void logProgress(const SkString& str) {
59 this->nativeLogProgress(str.c_str()); 59 this->nativeLogProgress(str.c_str());
60 this->fileWrite(str.c_str(), str.size()); 60 this->fileWrite(str.c_str(), str.size());
61 } 61 }
62 62
63 private: 63 private:
64 #ifdef SK_BUILD_FOR_ANDROID 64 #ifdef SK_BUILD_FOR_ANDROID
65 void nativeLogError(const char msg[]) { SkDebugf("%s", msg); } 65 void nativeLogError(const char msg[]) { SkDebugf("%s", msg); }
66 void nativeLogProgress(const char msg[]) { SkDebugf("%s", msg); }
67 #else 66 #else
68 void nativeLogError(const char msg[]) { fprintf(stderr, "%s", msg); } 67 void nativeLogError(const char msg[]) { fprintf(stderr, "%s", msg); }
69 void nativeLogProgress(const char msg[]) { printf("%s", msg); }
70 #endif 68 #endif
69 void nativeLogProgress(const char msg[]) { SkDebugf("%s", msg); }
71 70
72 void fileWrite(const char msg[], size_t size); 71 void fileWrite(const char msg[], size_t size);
73 72
74 SkFILEWStream* fFileStream; 73 SkFILEWStream* fFileStream;
75 }; 74 };
76 75
77 #endif // SkBenchLogger_DEFINED 76 #endif // SkBenchLogger_DEFINED
OLDNEW
« no previous file with comments | « no previous file | gm/gm_expectations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698