| Index: src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| index 8ce3f435b77d34ad4fb40f84b3bda534c76bd742..3e400445ae92a6634cb9968412926e997d431924 100644
|
| --- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| +++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| @@ -343,6 +343,17 @@
|
| }
|
| #endif
|
|
|
| +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
|
| +SkTwoPointRadialGradient::SkTwoPointRadialGradient(SkReadBuffer& buffer)
|
| + : INHERITED(buffer),
|
| + fCenter1(buffer.readPoint()),
|
| + fCenter2(buffer.readPoint()),
|
| + fRadius1(buffer.readScalar()),
|
| + fRadius2(buffer.readScalar()) {
|
| + init();
|
| +};
|
| +#endif
|
| +
|
| SkFlattenable* SkTwoPointRadialGradient::CreateProc(SkReadBuffer& buffer) {
|
| DescriptorScope desc;
|
| if (!desc.unflatten(buffer)) {
|
| @@ -675,7 +686,7 @@
|
| const SkMatrix* localMatrix, GrColor* paintColor,
|
| GrFragmentProcessor** fp) const {
|
| SkASSERT(context);
|
| -
|
| +
|
| // invert the localM, translate to center1 (fPtsToUni), rotate so center2 is on x axis.
|
| SkMatrix matrix;
|
| if (!this->getLocalMatrix().invert(&matrix)) {
|
| @@ -701,7 +712,7 @@
|
|
|
| *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
|
| *fp = GrRadial2Gradient::Create(context, *this, matrix, fTileMode);
|
| -
|
| +
|
| return true;
|
| }
|
|
|
|
|