Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: src/utils/SkWhitelistTypefaces.cpp

Issue 1732263003: Make skpinfo able to inspect SK_PICT_TYPEFACE_TAG blocks (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review issues Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | tools/skpinfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkWhitelistTypefaces.cpp
diff --git a/src/utils/SkWhitelistTypefaces.cpp b/src/utils/SkWhitelistTypefaces.cpp
index d3ffe98d16c052f95630ae0058512637008cdb9d..66d32188a023e69bfa9fc27fd8c47f933ad5eda6 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);
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | tools/skpinfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698