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

Side by Side Diff: gm/gm_expectations.cpp

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 | « bench/SkBenchLogger.h ('k') | src/ports/SkDebug_win.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 2013 Google Inc. 2 * Copyright 2013 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 "gm_expectations.h" 8 #include "gm_expectations.h"
9 #include "SkBitmapHasher.h" 9 #include "SkBitmapHasher.h"
10 #include "SkImageDecoder.h" 10 #include "SkImageDecoder.h"
(...skipping 16 matching lines...) Expand all
27 27
28 28
29 namespace skiagm { 29 namespace skiagm {
30 SK_DEFINE_INST_COUNT(ExpectationsSource) 30 SK_DEFINE_INST_COUNT(ExpectationsSource)
31 31
32 void gm_fprintf(FILE *stream, const char format[], ...) { 32 void gm_fprintf(FILE *stream, const char format[], ...) {
33 va_list args; 33 va_list args;
34 va_start(args, format); 34 va_start(args, format);
35 fprintf(stream, "GM: "); 35 fprintf(stream, "GM: ");
36 vfprintf(stream, format, args); 36 vfprintf(stream, format, args);
37 #ifdef SK_BUILD_FOR_WIN
38 if (stderr == stream || stdout == stream) {
39 fflush(stream);
40 }
41 #endif
37 va_end(args); 42 va_end(args);
38 } 43 }
39 44
40 Json::Value CreateJsonTree(Json::Value expectedResults, 45 Json::Value CreateJsonTree(Json::Value expectedResults,
41 Json::Value actualResultsFailed, 46 Json::Value actualResultsFailed,
42 Json::Value actualResultsFailureIgnored, 47 Json::Value actualResultsFailureIgnored,
43 Json::Value actualResultsNoComparison, 48 Json::Value actualResultsNoComparison,
44 Json::Value actualResultsSucceeded) { 49 Json::Value actualResultsSucceeded) {
45 Json::Value actualResults; 50 Json::Value actualResults;
46 actualResults[kJsonKey_ActualResults_Failed] = actualResultsFailed; 51 actualResults[kJsonKey_ActualResults_Failed] = actualResultsFailed;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 Json::Reader reader; 268 Json::Reader reader;
264 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { 269 if (!reader.parse(bytes, bytes+size, *jsonRoot)) {
265 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath); 270 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath);
266 DEBUGFAIL_SEE_STDERR; 271 DEBUGFAIL_SEE_STDERR;
267 return false; 272 return false;
268 } 273 }
269 return true; 274 return true;
270 } 275 }
271 276
272 } 277 }
OLDNEW
« no previous file with comments | « bench/SkBenchLogger.h ('k') | src/ports/SkDebug_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698