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

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

Issue 770703002: Bump min picture version. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: TODO Created 6 years, 1 month 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/gradients/SkGradientShaderPriv.h ('k') | tools/skpinfo.cpp » ('j') | 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 bb3b9b3715179fb9208d63360e64a8be437632ca..5410f6a9dfaed46a03025801a25cf25bdf8a5c76 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -346,27 +346,14 @@ SkShader::GradientType SkTwoPointConicalGradient::asAGradient(
#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
SkTwoPointConicalGradient::SkTwoPointConicalGradient(
SkReadBuffer& buffer)
- : INHERITED(buffer),
- fCenter1(buffer.readPoint()),
- fCenter2(buffer.readPoint()),
- fRadius1(buffer.readScalar()),
- fRadius2(buffer.readScalar()) {
- if (buffer.isVersionLT(SkReadBuffer::kGradientFlippedFlag_Version)) {
- // V23_COMPATIBILITY_CODE
- // Sort gradient by radius size for old pictures
- if (fRadius2 < fRadius1) {
- SkTSwap(fCenter1, fCenter2);
- SkTSwap(fRadius1, fRadius2);
- this->flipGradientColors();
- fFlippedGrad = true;
- } else {
- fFlippedGrad = false;
- }
- } else {
- fFlippedGrad = buffer.readBool();
- }
+ : INHERITED(buffer)
+ , fCenter1(buffer.readPoint())
+ , fCenter2(buffer.readPoint())
+ , fRadius1(buffer.readScalar())
+ , fRadius2(buffer.readScalar())
+ , fFlippedGrad(buffer.readBool()) {
this->init();
-};
+}
#endif
SkFlattenable* SkTwoPointConicalGradient::CreateProc(SkReadBuffer& buffer) {
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | tools/skpinfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698