diff options
author | Ben Wagner <bungeman@google.com> | 2018-07-03 16:15:54 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-05 13:09:26 +0000 |
commit | 9eb1c7d80fb3a0b23c0f6a156424a381b4120d3c (patch) | |
tree | 59b2798bc1629b38d02b8d92841ae8c4de5c3893 /dm | |
parent | 44bad2e86a017fd80b5fc32e85d94a742cd5346d (diff) |
Revert "Revert "Remove gCreateTypefaceDelegate.""
This reverts commit 58a1605d2b9bab077f53b6a223f9e7ce1891d3ea.
Try to make glyph paths as immutable as possible.
Change-Id: Ibef920c4417304e37ca4d4384515e9e7fc31aabf
Reviewed-on: https://skia-review.googlesource.com/139172
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -1291,20 +1291,6 @@ static void run_test(skiatest::Test test, const GrContextOptions& grCtxOptions) /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ -#define PORTABLE_FONT_PREFIX "Toy Liberation " - -static sk_sp<SkTypeface> create_from_name(const char familyName[], SkFontStyle style) { - if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX) - && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_PREFIX) - 1)) { - return sk_tool_utils::create_portable_typeface(familyName, style); - } - return nullptr; -} - -#undef PORTABLE_FONT_PREFIX - -extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle ); - int main(int argc, char** argv) { #if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && defined(SK_HAS_HEIF_LIBRARY) android::ProcessState::self()->startThreadPool(); @@ -1357,7 +1343,6 @@ int main(int argc, char** argv) { JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing. SkAutoGraphics ag; SkTaskGroup::Enabler enabled(FLAGS_threads); - gCreateTypefaceDelegate = &create_from_name; if (nullptr == GetResourceAsData("images/color_wheel.png")) { info("Some resources are missing. Do you need to set --resourcePath?\n"); |