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

Side by Side Diff: tools/bench_playback.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 | « tools/bench_pictures_main.cpp ('k') | tools/bench_record.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 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkForceLinking.h" 10 #include "SkForceLinking.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 SkAutoTMalloc<SkPMColor> scratch(kMaxArea); 99 SkAutoTMalloc<SkPMColor> scratch(kMaxArea);
100 100
101 SkOSFile::Iter it(FLAGS_skps[0], ".skp"); 101 SkOSFile::Iter it(FLAGS_skps[0], ".skp");
102 SkString filename; 102 SkString filename;
103 bool failed = false; 103 bool failed = false;
104 while (it.next(&filename)) { 104 while (it.next(&filename)) {
105 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) { 105 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) {
106 continue; 106 continue;
107 } 107 }
108 108
109 const SkString path = SkOSPath::SkPathJoin(FLAGS_skps[0], filename.c_str ()); 109 const SkString path = SkOSPath::Join(FLAGS_skps[0], filename.c_str());
110 110
111 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path.c_str())); 111 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path.c_str()));
112 if (!stream) { 112 if (!stream) {
113 SkDebugf("Could not read %s.\n", path.c_str()); 113 SkDebugf("Could not read %s.\n", path.c_str());
114 failed = true; 114 failed = true;
115 continue; 115 continue;
116 } 116 }
117 SkAutoTUnref<const SkPicture> src(SkPicture::CreateFromStream(stream)); 117 SkAutoTUnref<const SkPicture> src(SkPicture::CreateFromStream(stream));
118 if (!src) { 118 if (!src) {
119 SkDebugf("Could not read %s as an SkPicture.\n", path.c_str()); 119 SkDebugf("Could not read %s as an SkPicture.\n", path.c_str());
(...skipping 11 matching lines...) Expand all
131 bench(scratch.get(), *src, filename.c_str()); 131 bench(scratch.get(), *src, filename.c_str());
132 } 132 }
133 return failed ? 1 : 0; 133 return failed ? 1 : 0;
134 } 134 }
135 135
136 #if !defined SK_BUILD_FOR_IOS 136 #if !defined SK_BUILD_FOR_IOS
137 int main(int argc, char * const argv[]) { 137 int main(int argc, char * const argv[]) {
138 return tool_main(argc, (char**) argv); 138 return tool_main(argc, (char**) argv);
139 } 139 }
140 #endif 140 #endif
OLDNEW
« no previous file with comments | « tools/bench_pictures_main.cpp ('k') | tools/bench_record.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698