OLD | NEW |
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 "sk_tool_utils.h" | 8 #include "sk_tool_utils.h" |
9 #include "sk_tool_utils_flags.h" | 9 #include "sk_tool_utils_flags.h" |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 return gStandardFontNames[5][index]; | 64 return gStandardFontNames[5][index]; |
65 } | 65 } |
66 return name; | 66 return name; |
67 } | 67 } |
68 | 68 |
69 const char* platform_os_emoji() { | 69 const char* platform_os_emoji() { |
70 const char* osName = platform_os_name(); | 70 const char* osName = platform_os_name(); |
71 if (!strcmp(osName, "Android") || !strcmp(osName, "Ubuntu")) { | 71 if (!strcmp(osName, "Android") || !strcmp(osName, "Ubuntu")) { |
72 return "CBDT"; | 72 return "CBDT"; |
73 } | 73 } |
74 if (!strncmp(osName, "Mac", 3)) { | 74 if (!strncmp(osName, "Mac", 3) || !strncmp(osName, "iOS", 3)) { |
75 return "SBIX"; | 75 return "SBIX"; |
76 } | 76 } |
77 if (!strncmp(osName, "Win", 3)) { | 77 if (!strncmp(osName, "Win", 3)) { |
78 return "COLR"; | 78 return "COLR"; |
79 } | 79 } |
80 return ""; | 80 return ""; |
81 } | 81 } |
82 | 82 |
83 sk_sp<SkTypeface> emoji_typeface() { | 83 sk_sp<SkTypeface> emoji_typeface() { |
84 if (!strcmp(sk_tool_utils::platform_os_emoji(), "CBDT")) { | 84 if (!strcmp(sk_tool_utils::platform_os_emoji(), "CBDT")) { |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 for (int y = 0; y < src.height(); ++y) { | 457 for (int y = 0; y < src.height(); ++y) { |
458 for (int x = 0; x < src.width(); ++x) { | 458 for (int x = 0; x < src.width(); ++x) { |
459 *dst.getAddr32(x, y) = blur_pixel(src, x, y, kernel.get(), wh); | 459 *dst.getAddr32(x, y) = blur_pixel(src, x, y, kernel.get(), wh); |
460 } | 460 } |
461 } | 461 } |
462 | 462 |
463 return dst; | 463 return dst; |
464 } | 464 } |
465 | 465 |
466 } // namespace sk_tool_utils | 466 } // namespace sk_tool_utils |
OLD | NEW |