| Index: src/core/SkFontDescriptor.cpp
|
| diff --git a/src/core/SkFontDescriptor.cpp b/src/core/SkFontDescriptor.cpp
|
| index b2622d930007849b69782e003f5bec43d3c52d0d..4a6b5db837141b769e3130c5f76a6093d94e157e 100644
|
| --- a/src/core/SkFontDescriptor.cpp
|
| +++ b/src/core/SkFontDescriptor.cpp
|
| @@ -18,7 +18,7 @@ enum {
|
| // These count backwards from 0xFF, so as not to collide with the SFNT
|
| // defines for names in its 'name' table.
|
| kFontIndex = 0xFD,
|
| - kFontFileName = 0xFE,
|
| + kFontFileName = 0xFE, // Remove when MIN_PICTURE_VERSION > 41
|
| kSentinel = 0xFF,
|
| };
|
|
|
| @@ -32,6 +32,14 @@ static void read_string(SkStream* stream, SkString* string) {
|
| }
|
| }
|
|
|
| +// Remove when MIN_PICTURE_VERSION > 41
|
| +static void skip_string(SkStream* stream) {
|
| + const uint32_t length = SkToU32(stream->readPackedUInt());
|
| + if (length > 0) {
|
| + stream->skip(length);
|
| + }
|
| +}
|
| +
|
| static void write_string(SkWStream* stream, const SkString& string,
|
| uint32_t id) {
|
| if (!string.isEmpty()) {
|
| @@ -67,8 +75,8 @@ SkFontDescriptor::SkFontDescriptor(SkStream* stream) : fFontIndex(0) {
|
| case kFontIndex:
|
| fFontIndex = read_uint(stream);
|
| break;
|
| - case kFontFileName:
|
| - read_string(stream, &fFontFileName);
|
| + case kFontFileName: // Remove when MIN_PICTURE_VERSION > 41
|
| + skip_string(stream);
|
| break;
|
| default:
|
| SkDEBUGFAIL("Unknown id used by a font descriptor");
|
| @@ -91,7 +99,6 @@ void SkFontDescriptor::serialize(SkWStream* stream) {
|
| write_string(stream, fFamilyName, kFontFamilyName);
|
| write_string(stream, fFullName, kFullName);
|
| write_string(stream, fPostscriptName, kPostscriptName);
|
| - write_string(stream, fFontFileName, kFontFileName);
|
| if (fFontIndex) {
|
| write_uint(stream, fFontIndex, kFontIndex);
|
| }
|
|
|