| Index: src/core/SkTypeface.cpp
|
| diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
|
| index 75ff58eea87e44bb25cdf2e7595d956d3d25da5b..b86cfa7cafe223978300a00a1213e77195101a57 100644
|
| --- a/src/core/SkTypeface.cpp
|
| +++ b/src/core/SkTypeface.cpp
|
| @@ -156,7 +156,7 @@ void SkTypeface::serialize(SkWStream* wstream) const {
|
| this->onGetFontDescriptor(&desc, &isLocal);
|
|
|
| // Embed font data if it's a local font.
|
| - if (isLocal && NULL == desc.getFontData()) {
|
| + if (isLocal && !desc.hasFontData()) {
|
| int ttcIndex;
|
| desc.setFontData(this->onOpenStream(&ttcIndex));
|
| desc.setFontIndex(ttcIndex);
|
| @@ -170,7 +170,7 @@ void SkTypeface::serializeForcingEmbedding(SkWStream* wstream) const {
|
| this->onGetFontDescriptor(&desc, &ignoredIsLocal);
|
|
|
| // Always embed font data.
|
| - if (NULL == desc.getFontData()) {
|
| + if (!desc.hasFontData()) {
|
| int ttcIndex;
|
| desc.setFontData(this->onOpenStream(&ttcIndex));
|
| desc.setFontIndex(ttcIndex);
|
| @@ -180,7 +180,7 @@ void SkTypeface::serializeForcingEmbedding(SkWStream* wstream) const {
|
|
|
| SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
|
| SkFontDescriptor desc(stream);
|
| - SkStream* data = desc.getFontData();
|
| + SkStream* data = desc.transferFontData();
|
| if (data) {
|
| SkTypeface* typeface = SkTypeface::CreateFromStream(data, desc.getFontIndex());
|
| if (typeface) {
|
|
|