tfarina | bcbc178 | 2014-06-18 14:32:48 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "Resources.h" |
| 9 | |
| 10 | #include "SkCommandLineFlags.h" |
| 11 | #include "SkOSFile.h" |
| 12 | |
| 13 | DEFINE_string2(resourcePath, i, "resources", "Directory with test resources: images, fonts, etc."); |
| 14 | |
| 15 | SkString GetResourcePath(const char* resource) { |
tfarina | a8e2e15 | 2014-07-28 19:26:58 -0700 | [diff] [blame] | 16 | return SkOSPath::Join(FLAGS_resourcePath[0], resource); |
tfarina | bcbc178 | 2014-06-18 14:32:48 -0700 | [diff] [blame] | 17 | } |
caryclark | 936b734 | 2014-07-11 12:14:51 -0700 | [diff] [blame] | 18 | |
| 19 | void SetResourcePath(const char* resource) { |
| 20 | FLAGS_resourcePath.set(0, resource); |
| 21 | } |