Index: src/effects/gradients/SkTwoPointConicalGradient.cpp |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
index f25ad50fcfa294f88e72a052adc8ebe25f0ac015..e26e36bc3d70b98a3ce000275025da8059b1abf2 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp |
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
@@ -351,9 +351,7 @@ SkTwoPointConicalGradient::SkTwoPointConicalGradient( |
fCenter2(buffer.readPoint()), |
fRadius1(buffer.readScalar()), |
fRadius2(buffer.readScalar()) { |
- if (buffer.pictureVersion() >= 24 || 0 == buffer.pictureVersion()) { |
- fFlippedGrad = buffer.readBool(); |
- } else { |
+ if (buffer.isVersionLT(SkReadBuffer::kGradientFlippedFlag_Version)) { |
// V23_COMPATIBILITY_CODE |
// Sort gradient by radius size for old pictures |
if (fRadius2 < fRadius1) { |
@@ -364,6 +362,8 @@ SkTwoPointConicalGradient::SkTwoPointConicalGradient( |
} else { |
fFlippedGrad = false; |
} |
+ } else { |
+ fFlippedGrad = buffer.readBool(); |
} |
this->init(); |
}; |