diff options
author | 2018-02-28 18:47:27 -0500 | |
---|---|---|
committer | 2018-03-05 19:35:45 +0000 | |
commit | dfeb2aa13baab291ea794502a16daa270b11e153 (patch) | |
tree | af4711e0b71bd9e93dd3bd4cf01282fbf0b481ab /include | |
parent | 2a4f983c94e4f749fe24b08bc8b5ae7cc8550d1d (diff) |
SkGlyphCache - update core routines.
- Allows different methods for creating SkGlyphCaches
- Enables passing FontMetrics for cache creation.
- Removes VisitCache
- Removes VisitAll
- Introduces SkExclusiveStrikePtr which should
replaces SkAutoGlyphCache with simpler mechanism.
BUG=skia:7515
Change-Id: Ibada35e3985335179d2cc8284a837fc525224c92
Reviewed-on: https://skia-review.googlesource.com/111063
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkTypeface.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h index 61620a46d3..8fe80887dd 100644 --- a/include/core/SkTypeface.h +++ b/include/core/SkTypeface.h @@ -365,6 +365,9 @@ private: }; static SkFontStyle FromOldStyle(Style oldStyle); static SkTypeface* GetDefaultTypeface(Style style = SkTypeface::kNormal); + static SkTypeface* NormalizeTypeface(SkTypeface* typeface) { + return typeface != nullptr ? typeface : SkTypeface::GetDefaultTypeface(); + } friend class GrPathRendering; // GetDefaultTypeface friend class SkGlyphCache; // GetDefaultTypeface friend class SkPaint; // GetDefaultTypeface |