aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkFontDescriptor.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-02-10 12:32:08 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-10 12:32:21 +0000
commit19c22e946dd9f18de82f7728db80934efe262847 (patch)
treec456f09aaf8dc3039dc12d6f838125fb7d4fbf60 /src/core/SkFontDescriptor.cpp
parentb8b51e6b2f431c89907139bec52ed64b7ed303ed (diff)
Revert "Roll minimum picture version up to 44."
This reverts commit e037d12625b1dbb7952ae8a6553d6830e8b3ebbf. Reason for revert: Checking to see if this broke the Chrome DEPS roll Original change's description: > Roll minimum picture version up to 44. > > This is the version produced by Chrome M54. M56 is stable now. > > I am most interested in deleting SkBitmapSourceDeserializer, > because it awkwardly calls from core into effects (SkImageSource). > > Change-Id: I58b8b990017ba43372ab3333a4ef8312e75abc61 > Reviewed-on: https://skia-review.googlesource.com/8286 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I9202591c7945c9421f335e544bf12461e38acdc6 Reviewed-on: https://skia-review.googlesource.com/8305 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/core/SkFontDescriptor.cpp')
-rw-r--r--src/core/SkFontDescriptor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/SkFontDescriptor.cpp b/src/core/SkFontDescriptor.cpp
index 94fe23d446..73ea2058ce 100644
--- a/src/core/SkFontDescriptor.cpp
+++ b/src/core/SkFontDescriptor.cpp
@@ -20,6 +20,7 @@ enum {
// defines for names in its 'name' table.
kFontAxes = 0xFC,
kFontIndex = 0xFD,
+ kFontFileName = 0xFE, // Remove when MIN_PICTURE_VERSION > 41
kSentinel = 0xFF,
};
@@ -33,6 +34,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()) {
stream->writePackedUInt(id);
@@ -85,6 +94,9 @@ bool SkFontDescriptor::Deserialize(SkStream* stream, SkFontDescriptor* result) {
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;