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

Side by Side Diff: gm/gmmain.cpp

Issue 428443002: Cleanup: Rename SkOSPath functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 4 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 | « gm/gm_expectations.cpp ('k') | include/core/SkOSFile.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 /* 8 /*
9 * Code for the "gm" (Golden Master) rendering comparison tool. 9 * Code for the "gm" (Golden Master) rendering comparison tool.
10 * 10 *
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 */ 230 */
231 SkString make_filename(const char *path, 231 SkString make_filename(const char *path,
232 const char *shortName, 232 const char *shortName,
233 const char *configName, 233 const char *configName,
234 const char *renderModeDescriptor, 234 const char *renderModeDescriptor,
235 const char *suffix) { 235 const char *suffix) {
236 SkString filename = make_shortname_plus_config(shortName, configName); 236 SkString filename = make_shortname_plus_config(shortName, configName);
237 filename.append(renderModeDescriptor); 237 filename.append(renderModeDescriptor);
238 filename.appendUnichar('.'); 238 filename.appendUnichar('.');
239 filename.append(suffix); 239 filename.append(suffix);
240 return SkOSPath::SkPathJoin(path, filename.c_str()); 240 return SkOSPath::Join(path, filename.c_str());
241 } 241 }
242 242
243 /** 243 /**
244 * Assemble filename suitable for writing out an SkBitmap. 244 * Assemble filename suitable for writing out an SkBitmap.
245 */ 245 */
246 SkString make_bitmap_filename(const char *path, 246 SkString make_bitmap_filename(const char *path,
247 const char *shortName, 247 const char *shortName,
248 const char *configName, 248 const char *configName,
249 const char *renderModeDescriptor, 249 const char *renderModeDescriptor,
250 const GmResultDigest &bitmapDigest) { 250 const GmResultDigest &bitmapDigest) {
251 if (fWriteChecksumBasedFilenames) { 251 if (fWriteChecksumBasedFilenames) {
252 SkString filename; 252 SkString filename;
253 filename.append(bitmapDigest.getHashType()); 253 filename.append(bitmapDigest.getHashType());
254 filename.appendUnichar('_'); 254 filename.appendUnichar('_');
255 filename.append(shortName); 255 filename.append(shortName);
256 filename.appendUnichar('_'); 256 filename.appendUnichar('_');
257 filename.append(bitmapDigest.getDigestValue()); 257 filename.append(bitmapDigest.getDigestValue());
258 filename.appendUnichar('.'); 258 filename.appendUnichar('.');
259 filename.append(kPNG_FileExtension); 259 filename.append(kPNG_FileExtension);
260 return SkOSPath::SkPathJoin(path, filename.c_str()); 260 return SkOSPath::Join(path, filename.c_str());
261 } else { 261 } else {
262 return make_filename(path, shortName, configName, renderModeDescript or, 262 return make_filename(path, shortName, configName, renderModeDescript or,
263 kPNG_FileExtension); 263 kPNG_FileExtension);
264 } 264 }
265 } 265 }
266 266
267 /* since PNG insists on unpremultiplying our alpha, we take no 267 /* since PNG insists on unpremultiplying our alpha, we take no
268 precision chances and force all pixels to be 100% opaque, 268 precision chances and force all pixels to be 100% opaque,
269 otherwise on compare we may not get a perfect match. 269 otherwise on compare we may not get a perfect match.
270 */ 270 */
(...skipping 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 if (FLAGS_forceBWtext) { 2494 if (FLAGS_forceBWtext) {
2495 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); 2495 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref();
2496 } 2496 }
2497 } 2497 }
2498 2498
2499 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 2499 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
2500 int main(int argc, char * const argv[]) { 2500 int main(int argc, char * const argv[]) {
2501 return tool_main(argc, (char**) argv); 2501 return tool_main(argc, (char**) argv);
2502 } 2502 }
2503 #endif 2503 #endif
OLDNEW
« no previous file with comments | « gm/gm_expectations.cpp ('k') | include/core/SkOSFile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698