Make SkTypeface::Style and FromOldStyle private.
These are no longer used outside of Skia, so make them private.
Change-Id: I735bb39c10553885cc6051aebddeff150ba4caa9
Reviewed-on: https://skia-review.googlesource.com/59180
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/src/core/SkFontDescriptor.cpp b/src/core/SkFontDescriptor.cpp
index 519e8f2..14b0318 100644
--- a/src/core/SkFontDescriptor.cpp
+++ b/src/core/SkFontDescriptor.cpp
@@ -20,7 +20,6 @@
// defines for names in its 'name' table.
kFontAxes = 0xFC,
kFontIndex = 0xFD,
- kFontFileName = 0xFE, // Remove when MIN_PICTURE_VERSION > 41
kSentinel = 0xFF,
};
@@ -34,14 +33,6 @@
}
}
-// 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()) {
stream->writePackedUInt(id);
@@ -61,14 +52,9 @@
bool SkFontDescriptor::Deserialize(SkStream* stream, SkFontDescriptor* result) {
size_t styleBits = stream->readPackedUInt();
- if (styleBits <= 2) {
- // Remove this branch when MIN_PICTURE_VERSION > 45
- result->fStyle = SkFontStyle::FromOldStyle(styleBits);
- } else {
- result->fStyle = SkFontStyle((styleBits >> 16) & 0xFFFF,
- (styleBits >> 8 ) & 0xFF,
- static_cast<SkFontStyle::Slant>(styleBits & 0xFF));
- }
+ result->fStyle = SkFontStyle((styleBits >> 16) & 0xFFFF,
+ (styleBits >> 8 ) & 0xFF,
+ static_cast<SkFontStyle::Slant>(styleBits & 0xFF));
SkAutoSTMalloc<4, SkFixed> axis;
size_t axisCount = 0;
@@ -94,9 +80,6 @@
case kFontIndex:
index = read_uint(stream);
break;
- case kFontFileName: // Remove when MIN_PICTURE_VERSION > 41
- skip_string(stream);
- break;
default:
SkDEBUGFAIL("Unknown id used by a font descriptor");
return false;