| Index: src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| index d85be5d3bab053e407e4b0ee4d4df266c328166d..ac0b0bdf1c8140ef66487b07b82901c0b251e8fa 100644
|
| --- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| +++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
|
| @@ -530,7 +530,7 @@ GrEffectRef* GrRadial2Gradient::TestCreate(SkRandom* random,
|
| colors, stops, colorCount,
|
| tm));
|
| SkPaint paint;
|
| - return shader->asNewEffect(context, paint);
|
| + return shader->asNewEffect(context, paint, NULL);
|
| }
|
|
|
| /////////////////////////////////////////////////////////////////////
|
| @@ -670,13 +670,21 @@ GrGLEffect::EffectKey GrGLRadial2Gradient::GenKey(const GrDrawEffect& drawEffect
|
|
|
| /////////////////////////////////////////////////////////////////////
|
|
|
| -GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext* context, const SkPaint&) const {
|
| +GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext* context, const SkPaint&,
|
| + const SkMatrix* localMatrix) const {
|
| SkASSERT(NULL != context);
|
| // invert the localM, translate to center1 (fPtsToUni), rotate so center2 is on x axis.
|
| SkMatrix matrix;
|
| if (!this->getLocalMatrix().invert(&matrix)) {
|
| return NULL;
|
| }
|
| + if (localMatrix) {
|
| + SkMatrix inv;
|
| + if (!localMatrix->invert(&inv)) {
|
| + return NULL;
|
| + }
|
| + matrix.postConcat(inv);
|
| + }
|
| matrix.postConcat(fPtsToUnit);
|
|
|
| SkScalar diffLen = fDiff.length();
|
|
|