OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 * Classes for writing out bench results in various formats. | 7 * Classes for writing out bench results in various formats. |
8 */ | 8 */ |
9 | 9 |
10 #ifndef SkPictureResultsWriter_DEFINED | 10 #ifndef SkPictureResultsWriter_DEFINED |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 private: | 97 private: |
98 SkTArray<PictureResultsWriter*> fWriters; | 98 SkTArray<PictureResultsWriter*> fWriters; |
99 }; | 99 }; |
100 | 100 |
101 /** | 101 /** |
102 * Writes to BenchLogger to mimic original behavior | 102 * Writes to BenchLogger to mimic original behavior |
103 */ | 103 */ |
104 class PictureResultsLoggerWriter : public PictureResultsWriter { | 104 class PictureResultsLoggerWriter : public PictureResultsWriter { |
105 private: | 105 private: |
106 void logProgress(const char str[]) { | 106 void logProgress(const char str[]) { |
107 if(fLogger != NULL) { | 107 if(fLogger != nullptr) { |
108 fLogger->logProgress(str); | 108 fLogger->logProgress(str); |
109 } | 109 } |
110 } | 110 } |
111 public: | 111 public: |
112 PictureResultsLoggerWriter(BenchLogger* log) | 112 PictureResultsLoggerWriter(BenchLogger* log) |
113 : fLogger(log), fCurrentLine() {} | 113 : fLogger(log), fCurrentLine() {} |
114 void bench(const char name[], int32_t x, int32_t y) override { | 114 void bench(const char name[], int32_t x, int32_t y) override { |
115 SkString result; | 115 SkString result; |
116 result.printf("running bench [%i %i] %s ", x, y, name); | 116 result.printf("running bench [%i %i] %s ", x, y, name); |
117 this->logProgress(result.c_str()); | 117 this->logProgress(result.c_str()); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 SkString fConfigString; | 304 SkString fConfigString; |
305 SkString fBuilderName; | 305 SkString fBuilderName; |
306 int fBuildNumber; | 306 int fBuildNumber; |
307 int fTimestamp; | 307 int fTimestamp; |
308 SkString fGitHash; | 308 SkString fGitHash; |
309 int fGitNumber; | 309 int fGitNumber; |
310 }; | 310 }; |
311 | 311 |
312 #endif | 312 #endif |
OLD | NEW |