Index: tools/sk_tool_utils.cpp |
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp |
index 4d0e0bde68fffcb756454a4a1bb89b044c7e859c..4a9a146facd8a64955dd5fc81051ad1faa84287b 100644 |
--- a/tools/sk_tool_utils.cpp |
+++ b/tools/sk_tool_utils.cpp |
@@ -10,15 +10,37 @@ |
#include "SkBitmap.h" |
#include "SkCanvas.h" |
+#include "SkCommonFlags.h" |
#include "SkShader.h" |
#include "SkTestScalerContext.h" |
#include "SkTextBlob.h" |
+extern bool internal_tool_utils_win_gdi(); |
bungeman-skia
2015/07/20 20:15:11
Not using this anymore?
caryclark
2015/07/20 20:28:12
Good catch. (Removed)
|
+ |
DEFINE_bool(portableFonts, false, "Use portable fonts"); |
DEFINE_bool(resourceFonts, false, "Use resource fonts"); |
namespace sk_tool_utils { |
+const char* platform_os_name() { |
+ for (int index = 0; index < FLAGS_key.count(); index += 2) { |
+ if (!strcmp("os", FLAGS_key[index])) { |
+ return FLAGS_key[index + 1]; |
+ } |
+ } |
+ // when running SampleApp or dm without a --key pair, omit the platform name |
+ return ""; |
+} |
+ |
+const char* platform_extra_config(const char* config) { |
+ for (int index = 0; index < FLAGS_key.count(); index += 2) { |
+ if (!strcmp("extra_config", FLAGS_key[index]) && !strcmp(config, FLAGS_key[index + 1])) { |
+ return config; |
+ } |
+ } |
+ return ""; |
+} |
+ |
const char* colortype_name(SkColorType ct) { |
switch (ct) { |
case kUnknown_SkColorType: return "Unknown"; |