Chromium Code Reviews| Index: src/effects/gradients/SkTwoPointRadialGradient.cpp |
| diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp |
| index 8243cda33cf4114b4ee8651b7b88db11b0d060e0..536e8a02393e5e7ea82081550064f91cbbb47db1 100644 |
| --- a/src/effects/gradients/SkTwoPointRadialGradient.cpp |
| +++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp |
| @@ -530,7 +530,10 @@ GrEffectRef* GrRadial2Gradient::TestCreate(SkRandom* random, |
| colors, stops, colorCount, |
| tm)); |
| SkPaint paint; |
| - return shader->asNewEffect(context, paint, NULL); |
| + GrEffectRef* effect; |
| + GrColor grColor; |
| + shader->asNewEffect(context, paint, &grColor, &effect, NULL); |
| + return effect; |
| } |
| ///////////////////////////////////////////////////////////////////// |
| @@ -670,18 +673,19 @@ GrGLEffect::EffectKey GrGLRadial2Gradient::GenKey(const GrDrawEffect& drawEffect |
| ///////////////////////////////////////////////////////////////////// |
| -GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext* context, const SkPaint&, |
| - const SkMatrix* localMatrix) const { |
| +bool SkTwoPointRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint, |
| + GrColor* grColor, GrEffectRef** grEffect, |
| + const SkMatrix* localMatrix) const { |
|
jvanverth1
2014/06/05 17:36:31
grColor never gets set by this method
dandov
2014/06/06 21:50:43
Done.
|
| 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; |
| + return false; |
| } |
| if (localMatrix) { |
| SkMatrix inv; |
| if (!localMatrix->invert(&inv)) { |
| - return NULL; |
| + return false; |
| } |
| matrix.postConcat(inv); |
| } |
| @@ -696,7 +700,8 @@ GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext* context, const SkP |
| matrix.postConcat(rot); |
| } |
| - return GrRadial2Gradient::Create(context, *this, matrix, fTileMode); |
| + *grEffect = GrRadial2Gradient::Create(context, *this, matrix, fTileMode); |
| + return true; |
| } |
| #else |