diff options
author | robertphillips <robertphillips@google.com> | 2016-02-25 10:58:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-25 10:58:49 -0800 |
commit | 3552ba18ee41e135d6fc52228adae37794fc15ff (patch) | |
tree | 8fd975a1a4159055abbdb42ca54a82c577ce67e9 /src/utils | |
parent | 4dcbe431244c2f1abef8416b95ebf2921708fa63 (diff) |
Make skpinfo able to inspect SK_PICT_TYPEFACE_TAG blocks
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1732263003
BUG=skia:4691
Review URL: https://codereview.chromium.org/1732263003
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/SkWhitelistTypefaces.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/SkWhitelistTypefaces.cpp b/src/utils/SkWhitelistTypefaces.cpp index d3ffe98d16..66d32188a0 100644 --- a/src/utils/SkWhitelistTypefaces.cpp +++ b/src/utils/SkWhitelistTypefaces.cpp @@ -184,7 +184,11 @@ void WhitelistSerializeTypeface(const SkTypeface* tf, SkWStream* wstream) { } SkTypeface* WhitelistDeserializeTypeface(SkStream* stream) { - SkFontDescriptor desc(stream); + SkFontDescriptor desc; + if (!SkFontDescriptor::Deserialize(stream, &desc)) { + return nullptr; + } + SkFontData* data = desc.detachFontData(); if (data) { SkTypeface* typeface = SkTypeface::CreateFromFontData(data); |