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

Unified Diff: src/core/SkTypeface.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/SkPaint.cpp ('k') | src/utils/SkWhitelistTypefaces.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypeface.cpp
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index e6a9b4d66cd0f71988cb24e8eb840022ca9316d3..8d4233eac14d62921dba471c6a1a24e4ec0bb9ff 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -180,7 +180,12 @@ SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
if (gDeserializeTypefaceDelegate) {
return (*gDeserializeTypefaceDelegate)(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/SkPaint.cpp ('k') | src/utils/SkWhitelistTypefaces.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698