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

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
« src/effects/SkDashPathEffect.cpp ('K') | « 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..bf936bf4d2664ac1d1ff0ddd3d26ba53e1ad390a 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.pictureVersionLT(SkReadBuffer::kGradientFlippedFlag_PictureVersion)) {
// 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();
};
« src/effects/SkDashPathEffect.cpp ('K') | « src/effects/SkDashPathEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698