From dae77c5b1984abc4fa3fec26aa06f805aa73a1fa Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 16 Nov 2020 11:59:10 -0600 Subject: [PATCH] roll back minimum picture version to 73 Please c.f. https://skia-review.googlesource.com/c/skia/+/302836 and the attached bug. This restores kEdgeAAQuadColor4f_Version=73 and sets it as the minimum we can read. No code change is needed for this: there's still code to handle both sides of the format change marked by the current minimum kMorphologyTakesScalar_Version=74. We've either mistakenly tagged the minimum version one too high, or have forgotten to delete this code: sk_sp SkMorphologyImageFilterImpl::CreateProc(SkReadBuffer& buffer) { SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); SkScalar width; SkScalar height; if (buffer.isVersionLT(SkPicturePriv::kMorphologyTakesScalar_Version)) { width = buffer.readInt(); height = buffer.readInt(); } else { width = buffer.readScalar(); height = buffer.readScalar(); } ... Similarly we do not need to restore any code conditioned on buffer.isVersionLT(SkPicturePriv::kEdgeAAQuadColor4f_Version); that's what we'd need to restore if we wanted to support v72 or earlier. Bug: skia:10832 Change-Id: Ibf49feb401cab7dfd00582e68a3aeb1061ffe08b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335177 Reviewed-by: Mike Reed Commit-Queue: Mike Klein --- src/core/SkPicturePriv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/SkPicturePriv.h b/src/core/SkPicturePriv.h index fe988a72e2..abca1ce7c2 100644 --- a/src/core/SkPicturePriv.h +++ b/src/core/SkPicturePriv.h @@ -82,6 +82,7 @@ public: // V79: Cubic Resampler option on imageshader enum Version { + kEdgeAAQuadColor4f_Version = 73, kMorphologyTakesScalar_Version = 74, kVerticesUseReadBuffer_Version = 75, kFilterEnumInImageShader_Version = 76, @@ -90,7 +91,7 @@ public: kCubicResamplerImageShader_Version = 79, // Only SKPs within the min/current picture version range (inclusive) can be read. - kMin_Version = kMorphologyTakesScalar_Version, + kMin_Version = kEdgeAAQuadColor4f_Version, kCurrent_Version = kCubicResamplerImageShader_Version };