diff options
author | Ben Wagner <bungeman@google.com> | 2017-02-08 17:29:33 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-09 14:50:05 +0000 |
commit | 8ab590f17fed097758b209c3b82fc1e4d802768e (patch) | |
tree | b9a6c3f5080507eba25bd5b188dfa01cb5172663 /include | |
parent | 6f223283661c1ddc4a5334d2464804c6b6ba3ffa (diff) |
Split custom font managers.
Some users would like to use the empty font manager, but the directory
gont manager brings in extra dependencies to work which would otherwise
be unneeded. Allow these users to build just the bits of code they
actually need.
Change-Id: Ib029ef2682883509bad5a2aa39f1ef55631f4d8a
Reviewed-on: https://skia-review.googlesource.com/8200
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/ports/SkFontMgr_directory.h (renamed from include/ports/SkFontMgr_custom.h) | 14 | ||||
-rw-r--r-- | include/ports/SkFontMgr_empty.h | 21 |
2 files changed, 28 insertions, 7 deletions
diff --git a/include/ports/SkFontMgr_custom.h b/include/ports/SkFontMgr_directory.h index d918763493..8f79a7f560 100644 --- a/include/ports/SkFontMgr_custom.h +++ b/include/ports/SkFontMgr_directory.h @@ -5,17 +5,17 @@ * found in the LICENSE file. */ -#ifndef SkFontMgr_custom_DEFINED -#define SkFontMgr_custom_DEFINED +#ifndef SkFontMgr_directory_DEFINED +#define SkFontMgr_directory_DEFINED +#include "SkRefCnt.h" #include "SkTypes.h" class SkFontMgr; -/** Create a custom font manager which scans a given directory for font files. */ +/** Create a custom font manager which scans a given directory for font files. + * This font manager uses FreeType for rendering. + */ SK_API sk_sp<SkFontMgr> SkFontMgr_New_Custom_Directory(const char* dir); -/** Create a custom font manager that contains no built-in fonts. */ -SK_API sk_sp<SkFontMgr> SkFontMgr_New_Custom_Empty(); - -#endif // SkFontMgr_custom_DEFINED +#endif // SkFontMgr_directory_DEFINED diff --git a/include/ports/SkFontMgr_empty.h b/include/ports/SkFontMgr_empty.h new file mode 100644 index 0000000000..dbeef586cb --- /dev/null +++ b/include/ports/SkFontMgr_empty.h @@ -0,0 +1,21 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkFontMgr_empty_DEFINED +#define SkFontMgr_empty_DEFINED + +#include "SkRefCnt.h" +#include "SkTypes.h" + +class SkFontMgr; + +/** Create a custom font manager that contains no built-in fonts. + * This font manager uses FreeType for rendering. + */ +SK_API sk_sp<SkFontMgr> SkFontMgr_New_Custom_Empty(); + +#endif // SkFontMgr_empty_DEFINED |