aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-02-25 10:58:49 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-25 10:58:49 -0800
commit3552ba18ee41e135d6fc52228adae37794fc15ff (patch)
tree8fd975a1a4159055abbdb42ca54a82c577ce67e9 /src/utils
parent4dcbe431244c2f1abef8416b95ebf2921708fa63 (diff)
Make skpinfo able to inspect SK_PICT_TYPEFACE_TAG blocks
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkWhitelistTypefaces.cpp6
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);