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

Unified Diff: gm/gmmain.cpp

Issue 15415003: GM: make behavior of make_filename() more late-binding (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« gm/gm_expectations.h ('K') | « gm/gm_expectations.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
===================================================================
--- gm/gmmain.cpp (revision 9186)
+++ gm/gmmain.cpp (working copy)
@@ -192,6 +192,17 @@
GMMain() : fUseFileHierarchy(false), fIgnorableErrorTypes(kDefaultIgnorableErrorTypes),
fMismatchPath(NULL), fTestsRun(0), fRenderModesEncountered(1) {}
+ SkString make_filename(const char path[],
+ const char renderModeDescriptor[],
+ const char *name,
+ const char suffix[]) {
+ SkString filename(name);
+ filename.append(renderModeDescriptor);
+ filename.appendUnichar('.');
+ filename.append(suffix);
+ return SkPathJoin(path, filename.c_str());
+ }
+
SkString make_name(const char shortName[], const char configName[]) {
SkString name;
if (0 == strlen(configName)) {
@@ -1570,8 +1581,8 @@
if ((1 == FLAGS_writePicturePath.count()) &&
!(gmFlags & GM::kSkipPicture_Flag)) {
const char* pictureSuffix = "skp";
- SkString path = make_filename(FLAGS_writePicturePath[0], "",
- gm->shortName(), pictureSuffix);
+ SkString path = gmmain.make_filename(FLAGS_writePicturePath[0], "",
+ gm->shortName(), pictureSuffix);
SkFILEWStream stream(path.c_str());
pict->serialize(&stream);
}
« gm/gm_expectations.h ('K') | « gm/gm_expectations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698