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

Side by Side Diff: bench/ResultsWriter.h

Issue 282053002: Generate bench/Android.mk from gyp. (Closed) Base URL: https://skia.googlesource.com/skia.git@baselines
Patch Set: Remove modifications to generated files to submit. Created 6 years, 7 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
« no previous file with comments | « bench/DeferredSurfaceCopyBench.cpp ('k') | bench/benchmain.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 * Classes for writing out bench results in various formats. 7 * Classes for writing out bench results in various formats.
8 */ 8 */
9 #ifndef SkResultsWriter_DEFINED 9 #ifndef SkResultsWriter_DEFINED
10 #define SkResultsWriter_DEFINED 10 #define SkResultsWriter_DEFINED
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 fLogger.logProgress(SkStringPrintf(fTimeFormat, ms)); 70 fLogger.logProgress(SkStringPrintf(fTimeFormat, ms));
71 } 71 }
72 virtual void end() { 72 virtual void end() {
73 fLogger.logProgress("\n"); 73 fLogger.logProgress("\n");
74 } 74 }
75 private: 75 private:
76 SkBenchLogger& fLogger; 76 SkBenchLogger& fLogger;
77 const char* fTimeFormat; 77 const char* fTimeFormat;
78 }; 78 };
79 79
80 #ifdef SK_BUILD_JSON_WRITER
80 /** 81 /**
81 * This ResultsWriter handles writing out the results in JSON. 82 * This ResultsWriter handles writing out the results in JSON.
82 * 83 *
83 * The output looks like: 84 * The output looks like:
84 * 85 *
85 * { 86 * {
86 * "options" : { 87 * "options" : {
87 * "alpha" : "0xFF", 88 * "alpha" : "0xFF",
88 * "scale" : "0", 89 * "scale" : "0",
89 * ... 90 * ...
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 stream.flush(); 127 stream.flush();
127 } 128 }
128 private: 129 private:
129 SkString fFilename; 130 SkString fFilename;
130 Json::Value fRoot; 131 Json::Value fRoot;
131 Json::Value& fResults; 132 Json::Value& fResults;
132 Json::Value* fBench; 133 Json::Value* fBench;
133 Json::Value* fConfig; 134 Json::Value* fConfig;
134 }; 135 };
135 136
137 #endif // SK_BUILD_JSON_WRITER
136 /** 138 /**
137 * This ResultsWriter writes out to multiple ResultsWriters. 139 * This ResultsWriter writes out to multiple ResultsWriters.
138 */ 140 */
139 class MultiResultsWriter : public ResultsWriter { 141 class MultiResultsWriter : public ResultsWriter {
140 public: 142 public:
141 MultiResultsWriter() : writers() { 143 MultiResultsWriter() : writers() {
142 }; 144 };
143 void add(ResultsWriter* writer) { 145 void add(ResultsWriter* writer) {
144 writers.push_back(writer); 146 writers.push_back(writer);
145 } 147 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 */ 179 */
178 template <typename T> class CallEnd : SkNoncopyable { 180 template <typename T> class CallEnd : SkNoncopyable {
179 public: 181 public:
180 CallEnd(T& obj) : fObj(obj) {} 182 CallEnd(T& obj) : fObj(obj) {}
181 ~CallEnd() { fObj.end(); } 183 ~CallEnd() { fObj.end(); }
182 private: 184 private:
183 T& fObj; 185 T& fObj;
184 }; 186 };
185 187
186 #endif 188 #endif
OLDNEW
« no previous file with comments | « bench/DeferredSurfaceCopyBench.cpp ('k') | bench/benchmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698