Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Unified Diff: src/effects/gradients/SkTwoPointConicalGradient.cpp

Issue 291913004: formalize named picture versions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkDashPathEffect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
};
« no previous file with comments | « src/effects/SkDashPathEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698