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

Side by Side Diff: tools/image_expectations.h

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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 | « tools/gpuveto.cpp ('k') | tools/image_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 * 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 7
8 #ifndef image_expectations_DEFINED 8 #ifndef image_expectations_DEFINED
9 #define image_expectations_DEFINED 9 #define image_expectations_DEFINED
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 * the first real expectations. 164 * the first real expectations.
165 */ 165 */
166 bool readExpectationsFile(const char *jsonPath); 166 bool readExpectationsFile(const char *jsonPath);
167 167
168 /** 168 /**
169 * Adds this image to the summary of results. 169 * Adds this image to the summary of results.
170 * 170 *
171 * @param sourceName name of the source file that generated this result 171 * @param sourceName name of the source file that generated this result
172 * @param fileName relative path to the image output file on local disk 172 * @param fileName relative path to the image output file on local disk
173 * @param digest description of the image's contents 173 * @param digest description of the image's contents
174 * @param tileNumber if not NULL, pointer to tile number 174 * @param tileNumber if not nullptr, pointer to tile number
175 */ 175 */
176 void add(const char *sourceName, const char *fileName, ImageDigest &dige st, 176 void add(const char *sourceName, const char *fileName, ImageDigest &dige st,
177 const int *tileNumber=NULL); 177 const int *tileNumber=nullptr);
178 178
179 /** 179 /**
180 * Adds a key/value pair to the descriptions dict within the summary of results. 180 * Adds a key/value pair to the descriptions dict within the summary of results.
181 * 181 *
182 * @param key key within the descriptions dict 182 * @param key key within the descriptions dict
183 * @param value value to associate with that key 183 * @param value value to associate with that key
184 */ 184 */
185 void addDescription(const char *key, const char *value); 185 void addDescription(const char *key, const char *value);
186 186
187 /** 187 /**
188 * Adds the image base Google Storage URL to the summary of results. 188 * Adds the image base Google Storage URL to the summary of results.
189 * 189 *
190 * @param imageBaseGSUrl the image base Google Storage URL 190 * @param imageBaseGSUrl the image base Google Storage URL
191 */ 191 */
192 void setImageBaseGSUrl(const char *imageBaseGSUrl); 192 void setImageBaseGSUrl(const char *imageBaseGSUrl);
193 193
194 /** 194 /**
195 * Returns the Expectation for this test. 195 * Returns the Expectation for this test.
196 * 196 *
197 * @param sourceName name of the source file that generated this result 197 * @param sourceName name of the source file that generated this result
198 * @param tileNumber if not NULL, pointer to tile number 198 * @param tileNumber if not nullptr, pointer to tile number
199 * 199 *
200 * TODO(stephana): To make this work for GMs, we will need to add parame ters for 200 * TODO(stephana): To make this work for GMs, we will need to add parame ters for
201 * config, and maybe renderMode/builder? 201 * config, and maybe renderMode/builder?
202 */ 202 */
203 Expectation getExpectation(const char *sourceName, const int *tileNumber =NULL); 203 Expectation getExpectation(const char *sourceName, const int *tileNumber =nullptr);
204 204
205 /** 205 /**
206 * Writes the summary (as constructed so far) to a file. 206 * Writes the summary (as constructed so far) to a file.
207 * 207 *
208 * @param filename path to write the summary to 208 * @param filename path to write the summary to
209 */ 209 */
210 void writeToFile(const char *filename) const; 210 void writeToFile(const char *filename) const;
211 211
212 private: 212 private:
213 213
214 /** 214 /**
215 * Read the file contents from filePtr and parse them into jsonRoot. 215 * Read the file contents from filePtr and parse them into jsonRoot.
216 * 216 *
217 * It is up to the caller to close filePtr after this is done. 217 * It is up to the caller to close filePtr after this is done.
218 * 218 *
219 * Returns true if successful. 219 * Returns true if successful.
220 */ 220 */
221 static bool Parse(SkFILE* filePtr, Json::Value *jsonRoot); 221 static bool Parse(SkFILE* filePtr, Json::Value *jsonRoot);
222 222
223 Json::Value fActualResults; 223 Json::Value fActualResults;
224 Json::Value fDescriptions; 224 Json::Value fDescriptions;
225 Json::Value fExpectedJsonRoot; 225 Json::Value fExpectedJsonRoot;
226 Json::Value fExpectedResults; 226 Json::Value fExpectedResults;
227 Json::Value fImageBaseGSUrl; 227 Json::Value fImageBaseGSUrl;
228 }; 228 };
229 229
230 } // namespace sk_tools 230 } // namespace sk_tools
231 231
232 #endif // image_expectations_DEFINED 232 #endif // image_expectations_DEFINED
OLDNEW
« no previous file with comments | « tools/gpuveto.cpp ('k') | tools/image_expectations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698