Revert "Revert "remove legacy support for old old picture versions""
This reverts commit 6f1151140f331c78d99ede3cac10462dc8b32cde.
Chrome has been updated, so this should be able to land.
Bug: skia:
Change-Id: I5a66782a39fecfac00edeb66fbd03dae4df1712c
Reviewed-on: https://skia-review.googlesource.com/90205
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp
index 91ec79b..6d89e6f 100644
--- a/src/core/SkTextBlob.cpp
+++ b/src/core/SkTextBlob.cpp
@@ -790,20 +790,13 @@
}
sk_sp<SkTextBlob> SkTextBlob::MakeFromBuffer(SkReadBuffer& reader) {
- const int runCount = reader.isVersionLT(SkReadBuffer::kTextBlobImplicitRunCount_Version)
- ? reader.read32() : std::numeric_limits<int>::max();
- if (runCount < 0) {
- return nullptr;
- }
-
SkRect bounds;
reader.readRect(&bounds);
SkTextBlobBuilder blobBuilder;
- for (int i = 0; i < runCount; ++i) {
+ for (;;) {
int glyphCount = reader.read32();
- if (glyphCount == 0 &&
- !reader.isVersionLT(SkReadBuffer::kTextBlobImplicitRunCount_Version)) {
+ if (glyphCount == 0) {
// End-of-runs marker.
break;
}