| OLD | NEW |
| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 */ | 216 */ |
| 217 SkString make_filename(const char *path, | 217 SkString make_filename(const char *path, |
| 218 const char *shortName, | 218 const char *shortName, |
| 219 const char *configName, | 219 const char *configName, |
| 220 const char *renderModeDescriptor, | 220 const char *renderModeDescriptor, |
| 221 const char *suffix) { | 221 const char *suffix) { |
| 222 SkString filename = make_shortname_plus_config(shortName, configName); | 222 SkString filename = make_shortname_plus_config(shortName, configName); |
| 223 filename.append(renderModeDescriptor); | 223 filename.append(renderModeDescriptor); |
| 224 filename.appendUnichar('.'); | 224 filename.appendUnichar('.'); |
| 225 filename.append(suffix); | 225 filename.append(suffix); |
| 226 return SkPathJoin(path, filename.c_str()); | 226 return SkOSPathUtils::SkPathJoin(path, filename.c_str()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 /* since PNG insists on unpremultiplying our alpha, we take no | 229 /* since PNG insists on unpremultiplying our alpha, we take no |
| 230 precision chances and force all pixels to be 100% opaque, | 230 precision chances and force all pixels to be 100% opaque, |
| 231 otherwise on compare we may not get a perfect match. | 231 otherwise on compare we may not get a perfect match. |
| 232 */ | 232 */ |
| 233 static void force_all_opaque(const SkBitmap& bitmap) { | 233 static void force_all_opaque(const SkBitmap& bitmap) { |
| 234 SkBitmap::Config config = bitmap.config(); | 234 SkBitmap::Config config = bitmap.config(); |
| 235 switch (config) { | 235 switch (config) { |
| 236 case SkBitmap::kARGB_8888_Config: | 236 case SkBitmap::kARGB_8888_Config: |
| (...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 if (FLAGS_forceBWtext) { | 2089 if (FLAGS_forceBWtext) { |
| 2090 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2090 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
| 2091 } | 2091 } |
| 2092 } | 2092 } |
| 2093 | 2093 |
| 2094 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2094 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 2095 int main(int argc, char * const argv[]) { | 2095 int main(int argc, char * const argv[]) { |
| 2096 return tool_main(argc, (char**) argv); | 2096 return tool_main(argc, (char**) argv); |
| 2097 } | 2097 } |
| 2098 #endif | 2098 #endif |
| OLD | NEW |