| Index: src/effects/gradients/SkSweepGradient.cpp
|
| diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
|
| index b3474ec1a2cd23aeb808d2a0836719a40bda298b..1ba044386db28a5518f786bae93a5df6d1aff7af 100644
|
| --- a/src/effects/gradients/SkSweepGradient.cpp
|
| +++ b/src/effects/gradients/SkSweepGradient.cpp
|
| @@ -205,10 +205,8 @@ private:
|
|
|
| class GrSweepGradient : public GrGradientEffect {
|
| public:
|
| - static GrEffectRef* Create(GrContext* ctx,
|
| - const SkSweepGradient& shader,
|
| - const SkMatrix& matrix) {
|
| - return SkNEW_ARGS(GrSweepGradient, (ctx, shader, matrix));
|
| + static GrEffect* Create(GrContext* ctx, const SkSweepGradient& shader, const SkMatrix& m) {
|
| + return SkNEW_ARGS(GrSweepGradient, (ctx, shader, m));
|
| }
|
| virtual ~GrSweepGradient() { }
|
|
|
| @@ -233,7 +231,7 @@ private:
|
|
|
| GR_DEFINE_EFFECT_TEST(GrSweepGradient);
|
|
|
| -GrEffectRef* GrSweepGradient::TestCreate(SkRandom* random,
|
| +GrEffect* GrSweepGradient::TestCreate(SkRandom* random,
|
| GrContext* context,
|
| const GrDrawTargetCaps&,
|
| GrTexture**) {
|
| @@ -247,9 +245,9 @@ GrEffectRef* GrSweepGradient::TestCreate(SkRandom* random,
|
| SkAutoTUnref<SkShader> shader(SkGradientShader::CreateSweep(center.fX, center.fY,
|
| colors, stops, colorCount));
|
| SkPaint paint;
|
| - GrEffectRef* effect;
|
| - GrColor grColor;
|
| - shader->asNewEffect(context, paint, NULL, &grColor, &effect);
|
| + GrEffect* effect;
|
| + GrColor paintColor;
|
| + SkAssertResult(shader->asNewEffect(context, paint, NULL, &paintColor, &effect));
|
| return effect;
|
| }
|
|
|
| @@ -283,8 +281,8 @@ void GrGLSweepGradient::emitCode(GrGLShaderBuilder* builder,
|
| /////////////////////////////////////////////////////////////////////
|
|
|
| bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint,
|
| - const SkMatrix* localMatrix, GrColor* grColor,
|
| - GrEffectRef** grEffect) const {
|
| + const SkMatrix* localMatrix, GrColor* paintColor,
|
| + GrEffect** effect) const {
|
|
|
| SkMatrix matrix;
|
| if (!this->getLocalMatrix().invert(&matrix)) {
|
| @@ -299,8 +297,8 @@ bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint,
|
| }
|
| matrix.postConcat(fPtsToUnit);
|
|
|
| - *grEffect = GrSweepGradient::Create(context, *this, matrix);
|
| - *grColor = SkColor2GrColorJustAlpha(paint.getColor());
|
| + *effect = GrSweepGradient::Create(context, *this, matrix);
|
| + *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
|
|
|
| return true;
|
| }
|
| @@ -308,8 +306,8 @@ bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint,
|
| #else
|
|
|
| bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint,
|
| - const SkMatrix* localMatrix, GrColor* grColor,
|
| - GrEffect** grEffect) const {
|
| + const SkMatrix* localMatrix, GrColor* paintColor,
|
| + GrEffect** effect) const {
|
| SkDEBUGFAIL("Should not call in GPU-less build");
|
| return false;
|
| }
|
|
|