Chromium Code Reviews| Index: src/effects/gradients/SkSweepGradient.cpp |
| diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp |
| index 3dddbbabed10e168f3c6690722bee787d49f9530..6e8e1adb550b3f0ff9f6942d0b9de69d80f27a47 100644 |
| --- a/src/effects/gradients/SkSweepGradient.cpp |
| +++ b/src/effects/gradients/SkSweepGradient.cpp |
| @@ -247,7 +247,10 @@ GrEffectRef* GrSweepGradient::TestCreate(SkRandom* random, |
| SkAutoTUnref<SkShader> shader(SkGradientShader::CreateSweep(center.fX, center.fY, |
| colors, stops, colorCount)); |
| SkPaint paint; |
| - return shader->asNewEffect(context, paint, NULL); |
| + GrEffectRef* effect; |
| + GrColor grColor; |
| + shader->asNewEffect(context, paint, &grColor, &effect, NULL); |
| + return effect; |
| } |
| ///////////////////////////////////////////////////////////////////// |
| @@ -279,21 +282,22 @@ void GrGLSweepGradient::emitCode(GrGLShaderBuilder* builder, |
| ///////////////////////////////////////////////////////////////////// |
| -GrEffectRef* SkSweepGradient::asNewEffect(GrContext* context, const SkPaint&, |
| - const SkMatrix* localMatrix) const { |
| +bool SkSweepGradient::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.
|
| 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); |
| } |
| matrix.postConcat(fPtsToUnit); |
| - return GrSweepGradient::Create(context, *this, matrix); |
| + *grEffect = GrSweepGradient::Create(context, *this, matrix); |
| + return true; |
| } |
| #else |