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

Side by Side Diff: gm/gmmain.cpp

Issue 15740024: Reland 'Add path utils, plus a test for it.' (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 */ 215 */
216 SkString make_filename(const char *path, 216 SkString make_filename(const char *path,
217 const char *shortName, 217 const char *shortName,
218 const char *configName, 218 const char *configName,
219 const char *renderModeDescriptor, 219 const char *renderModeDescriptor,
220 const char *suffix) { 220 const char *suffix) {
221 SkString filename = make_shortname_plus_config(shortName, configName); 221 SkString filename = make_shortname_plus_config(shortName, configName);
222 filename.append(renderModeDescriptor); 222 filename.append(renderModeDescriptor);
223 filename.appendUnichar('.'); 223 filename.appendUnichar('.');
224 filename.append(suffix); 224 filename.append(suffix);
225 return SkPathJoin(path, filename.c_str()); 225 return SkOSPath::SkPathJoin(path, filename.c_str());
226 } 226 }
227 227
228 /* since PNG insists on unpremultiplying our alpha, we take no 228 /* since PNG insists on unpremultiplying our alpha, we take no
229 precision chances and force all pixels to be 100% opaque, 229 precision chances and force all pixels to be 100% opaque,
230 otherwise on compare we may not get a perfect match. 230 otherwise on compare we may not get a perfect match.
231 */ 231 */
232 static void force_all_opaque(const SkBitmap& bitmap) { 232 static void force_all_opaque(const SkBitmap& bitmap) {
233 SkBitmap::Config config = bitmap.config(); 233 SkBitmap::Config config = bitmap.config();
234 switch (config) { 234 switch (config) {
235 case SkBitmap::kARGB_8888_Config: 235 case SkBitmap::kARGB_8888_Config:
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 if (FLAGS_forceBWtext) { 2078 if (FLAGS_forceBWtext) {
2079 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); 2079 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref();
2080 } 2080 }
2081 } 2081 }
2082 2082
2083 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 2083 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
2084 int main(int argc, char * const argv[]) { 2084 int main(int argc, char * const argv[]) {
2085 return tool_main(argc, (char**) argv); 2085 return tool_main(argc, (char**) argv);
2086 } 2086 }
2087 #endif 2087 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698