Goodbye GrEffectRef.

Also, reworked some var names and comments around SkShader::asNewEffect.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/374923002
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 9252a58..2045e38 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -93,7 +93,7 @@
                 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}
             };
             for(int edgeType = 0; edgeType < kGrEffectEdgeTypeCnt; ++edgeType) {
-                SkAutoTUnref<GrEffectRef> effect;
+                SkAutoTUnref<GrEffect> effect;
                 {   // scope to contain GrTestTarget
                     GrTestTarget tt;
                     context->getTestTarget(&tt);
@@ -251,7 +251,7 @@
             };
             SkScalar weight = rand.nextRangeF(0.f, 2.f);
             for(int edgeType = 0; edgeType < kGrEffectEdgeTypeCnt; ++edgeType) {
-                SkAutoTUnref<GrEffectRef> effect;
+                SkAutoTUnref<GrEffect> effect;
                 {   // scope to contain GrTestTarget
                     GrTestTarget tt;
                     context->getTestTarget(&tt);
@@ -440,7 +440,7 @@
                 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}
             };
             for(int edgeType = 0; edgeType < kGrEffectEdgeTypeCnt; ++edgeType) {
-                SkAutoTUnref<GrEffectRef> effect;
+                SkAutoTUnref<GrEffect> effect;
                 {   // scope to contain GrTestTarget
                     GrTestTarget tt;
                     context->getTestTarget(&tt);
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 08bd887..00e89db 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -135,7 +135,7 @@
                 path->transform(m, &p);
 
                 GrEffectEdgeType edgeType = (GrEffectEdgeType) et;
-                SkAutoTUnref<GrEffectRef> effect(GrConvexPolyEffect::Create(edgeType, p));
+                SkAutoTUnref<GrEffect> effect(GrConvexPolyEffect::Create(edgeType, p));
                 if (!effect) {
                     continue;
                 }
@@ -187,7 +187,7 @@
                 SkRect rect = *iter.get();
                 rect.offset(x, y);
                 GrEffectEdgeType edgeType = (GrEffectEdgeType) et;
-                SkAutoTUnref<GrEffectRef> effect(GrConvexPolyEffect::Create(edgeType, rect));
+                SkAutoTUnref<GrEffect> effect(GrConvexPolyEffect::Create(edgeType, rect));
                 if (!effect) {
                     continue;
                 }
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index 24636ca..8f4cb3a 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -117,7 +117,7 @@
                         SkRRect rrect = fRRects[curRRect];
                         rrect.offset(SkIntToScalar(x), SkIntToScalar(y));
                         GrEffectEdgeType edgeType = (GrEffectEdgeType) et;
-                        SkAutoTUnref<GrEffectRef> effect(GrRRectEffect::Create(edgeType, rrect));
+                        SkAutoTUnref<GrEffect> effect(GrRRectEffect::Create(edgeType, rrect));
                         if (effect) {
                             drawState->addCoverageEffect(effect);
                             drawState->setIdentityViewMatrix();
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 5f31977..37d256d 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -122,7 +122,7 @@
                 SkScalar x = kDrawPad + kTestPad;
                 for (int m = 0; m < GrTextureDomain::kModeCount; ++m) {
                     GrTextureDomain::Mode mode = (GrTextureDomain::Mode) m;
-                    SkAutoTUnref<GrEffectRef> effect(
+                    SkAutoTUnref<GrEffect> effect(
                         GrTextureDomainEffect::Create(texture, textureMatrices[tm],
                                                 GrTextureDomain::MakeTexelDomain(texture,
                                                                                 texelDomains[d]),
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index b1f495e..12676f2 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -104,7 +104,7 @@
         const int indices[6][3] = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, {1, 2, 0}, {2, 0, 1}, {2, 1, 0}};
 
         for (int i = 0; i < 6; ++i) {
-            SkAutoTUnref<GrEffectRef> effect(
+            SkAutoTUnref<GrEffect> effect(
                         GrYUVtoRGBEffect::Create(texture[indices[i][0]],
                                                  texture[indices[i][1]],
                                                  texture[indices[i][2]]));
diff --git a/include/core/SkColorShader.h b/include/core/SkColorShader.h
index ba17f6c..4ff7d2b 100644
--- a/include/core/SkColorShader.h
+++ b/include/core/SkColorShader.h
@@ -57,8 +57,8 @@
     virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
 
     virtual bool asNewEffect(GrContext* context, const SkPaint& paint,
-                             const SkMatrix* localMatrix, GrColor* grColor,
-                             GrEffect** grEffect) const SK_OVERRIDE;
+                             const SkMatrix* localMatrix, GrColor* paintColor,
+                             GrEffect** effect) const SK_OVERRIDE;
 
     SK_TO_STRING_OVERRIDE()
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader)
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 2ed91f8..8871f1b 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -374,17 +374,24 @@
 
 
     /**
-     *  Returns true if the shader subclass succeeds in setting the grEffect and the grColor output 
-     *  parameters to a value, returns false if it fails or if there is not an implementation of
-     *  this method in the shader subclass.
-     *  The incoming color to the effect has r=g=b=a all extracted from the SkPaint's alpha.
-     *  The output color should be the computed SkShader premul color modulated by the incoming
-     *  color. The GrContext may be used by the effect to create textures. The GPU device does not
+     *  Returns true if the shader subclass succeeds in creating an effect or if none is required.
+     *  False is returned if it fails or if there is not an implementation of this method in the
+     *  shader subclass.
+     *
+     *  On success an implementation of this method must inspect the SkPaint and set paintColor to
+     *  the color the effect expects as its input color. If the SkShader wishes to emit a solid
+     *  color then it should set paintColor to that color and not create an effect. Note that
+     *  GrColor is always premul. The common patterns are to convert paint's SkColor to GrColor or
+     *  to extract paint's alpha and replicate it to all channels in paintColor. Upon failure
+     *  paintColor should not be modified. It is not recommended to specialize the effect to
+     *  the paint's color as then many GPU shaders may be generated.
+     *
+     *  The GrContext may be used by the effect to create textures. The GPU device does not
      *  call createContext. Instead we pass the SkPaint here in case the shader needs paint info.
      */
     virtual bool asNewEffect(GrContext* context, const SkPaint& paint,
-                             const SkMatrix* localMatrixOrNull, GrColor* grColor,
-                             GrEffect** grEffect) const;
+                             const SkMatrix* localMatrixOrNull, GrColor* paintColor,
+                             GrEffect** effect) const;
 
 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
     /**
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index af44aa7..bdea2f9 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -1040,12 +1040,12 @@
      * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. Otherwise, they
      * return NULL.
      */
-    const GrEffectRef* createPMToUPMEffect(GrTexture* texture,
-                                           bool swapRAndB,
-                                           const SkMatrix& matrix);
-    const GrEffectRef* createUPMToPMEffect(GrTexture* texture,
-                                           bool swapRAndB,
-                                           const SkMatrix& matrix);
+    const GrEffect* createPMToUPMEffect(GrTexture* texture,
+                                        bool swapRAndB,
+                                        const SkMatrix& matrix);
+    const GrEffect* createUPMToPMEffect(GrTexture* texture,
+                                        bool swapRAndB,
+                                        const SkMatrix& matrix);
 
     /**
      *  This callback allows the resource cache to callback into the GrContext
diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
index 13a6c43..575e3ea 100644
--- a/include/gpu/GrEffect.h
+++ b/include/gpu/GrEffect.h
@@ -218,8 +218,6 @@
     typedef SkRefCnt INHERITED;
 };
 
-typedef GrEffect GrEffectRef;
-
 /**
  * This creates an effect outside of the effect memory pool. The effect's destructor will be called
  * at global destruction time. NAME will be the name of the created GrEffect.
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h
index 1adac65..e306293 100644
--- a/include/gpu/SkGr.h
+++ b/include/gpu/SkGr.h
@@ -85,12 +85,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader.
-// Sets the color of GrPaint to the value of the parameter grColor
+// Sets the color of GrPaint to the value of the parameter paintColor
 // Callers may subsequently modify the GrPaint. Setting constantColor indicates
 // that the final paint will draw the same color at every pixel. This allows
 // an optimization where the the color filter can be applied to the SkPaint's
 // color once while converting to GrPaint and then ignored.
-void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor grColor,
+void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor paintColor,
                              bool constantColor, GrPaint* grPaint);
 
 // This function is similar to skPaint2GrPaintNoShader but also converts
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 37ba540..e7cc035 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -383,8 +383,8 @@
 #include "SkGr.h"
 
 bool SkBitmapProcShader::asNewEffect(GrContext* context, const SkPaint& paint,
-                                     const SkMatrix* localMatrix, GrColor* grColor,
-                                     GrEffectRef** grEffect) const {
+                                     const SkMatrix* localMatrix, GrColor* paintColor,
+                                     GrEffect** effect) const {
     SkMatrix matrix;
     matrix.setIDiv(fRawBitmap.width(), fRawBitmap.height());
 
@@ -454,13 +454,14 @@
         return false;
     }
     
-    *grColor = (kAlpha_8_SkColorType == fRawBitmap.colorType()) ? SkColor2GrColor(paint.getColor())
-                                        : SkColor2GrColorJustAlpha(paint.getColor());
+    *paintColor = (kAlpha_8_SkColorType == fRawBitmap.colorType()) ?
+                                                SkColor2GrColor(paint.getColor()) :
+                                                SkColor2GrColorJustAlpha(paint.getColor());
 
     if (useBicubic) {
-        *grEffect = GrBicubicEffect::Create(texture, matrix, tm);
+        *effect = GrBicubicEffect::Create(texture, matrix, tm);
     } else {
-        *grEffect = GrSimpleTextureEffect::Create(texture, matrix, params);
+        *effect = GrSimpleTextureEffect::Create(texture, matrix, params);
     }
     GrUnlockAndUnrefCachedBitmapTexture(texture);
 
@@ -470,8 +471,8 @@
 #else 
 
 bool SkBitmapProcShader::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;
 }
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 6240902..64603b4 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -179,7 +179,7 @@
     am.setIdentity(context);
     GrContext::AutoRenderTarget art(context, dst.texture()->asRenderTarget());
     GrContext::AutoClip acs(context, dstRect);
-    GrEffectRef* effect;
+    GrEffect* effect;
     offset->fX = bounds.left();
     offset->fY = bounds.top();
     bounds.offset(-srcOffset);
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index e154131..d6b84c3 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -189,18 +189,18 @@
 
 #if SK_SUPPORT_GPU
 bool SkPictureShader::asNewEffect(GrContext* context, const SkPaint& paint,
-                                  const SkMatrix* localMatrix, GrColor* grColor,
-                                  GrEffectRef** grEffect) const {
+                                  const SkMatrix* localMatrix, GrColor* paintColor,
+                                  GrEffect** effect) const {
     SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix(), localMatrix));
     if (!bitmapShader) {
         return false;
     }
-    return bitmapShader->asNewEffect(context, paint, NULL, grColor, grEffect);
+    return bitmapShader->asNewEffect(context, paint, NULL, paintColor, effect);
 }
 #else
 bool SkPictureShader::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;
 }
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 71781ee..d533cd6 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -209,8 +209,8 @@
 }
 
 bool SkShader::asNewEffect(GrContext* context, const SkPaint& paint,
-                           const SkMatrix* localMatrixOrNull, GrColor* grColor,
-                           GrEffect** grEffect)  const {
+                           const SkMatrix* localMatrixOrNull, GrColor* paintColor,
+                           GrEffect** effect)  const {
     return false;
 }
 
@@ -348,20 +348,20 @@
 #include "SkGr.h"
 
 bool SkColorShader::asNewEffect(GrContext* context, const SkPaint& paint,
-                                const SkMatrix* localMatrix, GrColor* grColor,
-                                GrEffectRef** grEffect) const {
-    *grEffect = NULL;
+                                const SkMatrix* localMatrix, GrColor* paintColor,
+                                GrEffect** effect) const {
+    *effect = NULL;
     SkColor skColor = fColor;
     U8CPU newA = SkMulDiv255Round(SkColorGetA(fColor), paint.getAlpha());
-    *grColor = SkColor2GrColor(SkColorSetA(skColor, newA));
+    *paintColor = SkColor2GrColor(SkColorSetA(skColor, newA));
     return true;
 }
 
 #else
 
 bool SkColorShader::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;
 }
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index cf4f19f..4b15af0 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -793,7 +793,7 @@
         return mode > SkXfermode::kLastCoeffMode && mode <= SkXfermode::kLastMode;
     }
 
-    static GrEffectRef* Create(SkXfermode::Mode mode, GrTexture* background) {
+    static GrEffect* Create(SkXfermode::Mode mode, GrTexture* background) {
         if (!IsSupportedMode(mode)) {
             return NULL;
         } else {
@@ -1223,10 +1223,10 @@
 };
 
 GR_DEFINE_EFFECT_TEST(XferEffect);
-GrEffectRef* XferEffect::TestCreate(SkRandom* rand,
-                                    GrContext*,
-                                    const GrDrawTargetCaps&,
-                                    GrTexture*[]) {
+GrEffect* XferEffect::TestCreate(SkRandom* rand,
+                                 GrContext*,
+                                 const GrDrawTargetCaps&,
+                                 GrTexture*[]) {
     int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode);
 
     return SkNEW_ARGS(XferEffect, (static_cast<SkXfermode::Mode>(mode), NULL));
@@ -1361,8 +1361,7 @@
 }
 
 #if SK_SUPPORT_GPU
-bool SkProcCoeffXfermode::asNewEffect(GrEffectRef** effect,
-                                      GrTexture* background) const {
+bool SkProcCoeffXfermode::asNewEffect(GrEffect** effect, GrTexture* background) const {
     if (XferEffect::IsSupportedMode(fMode)) {
         if (NULL != effect) {
             *effect = XferEffect::Create(fMode, background);
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index a77891a..23937cc 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -58,10 +58,10 @@
 class AlphaThresholdEffect : public GrEffect {
 
 public:
-    static GrEffectRef* Create(GrTexture* texture,
-                               GrTexture* maskTexture,
-                               float innerThreshold,
-                               float outerThreshold) {
+    static GrEffect* Create(GrTexture* texture,
+                            GrTexture* maskTexture,
+                            float innerThreshold,
+                            float outerThreshold) {
         return SkNEW_ARGS(AlphaThresholdEffect, (texture,
                                                  maskTexture,
                                                  innerThreshold,
@@ -197,10 +197,10 @@
 
 GR_DEFINE_EFFECT_TEST(AlphaThresholdEffect);
 
-GrEffectRef* AlphaThresholdEffect::TestCreate(SkRandom* random,
-                                              GrContext* context,
-                                              const GrDrawTargetCaps&,
-                                              GrTexture** textures) {
+GrEffect* AlphaThresholdEffect::TestCreate(SkRandom* random,
+                                           GrContext* context,
+                                           const GrDrawTargetCaps&,
+                                           GrTexture** textures) {
     GrTexture* bmpTex = textures[GrEffectUnitTest::kSkiaPMTextureIdx];
     GrTexture* maskTex = textures[GrEffectUnitTest::kAlphaTextureIdx];
     float inner_thresh = random->nextUScalar1();
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index f04ccf2..0424a6e 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -34,7 +34,7 @@
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArithmeticMode_scalar)
 
 #if SK_SUPPORT_GPU
-    virtual bool asNewEffect(GrEffectRef** effect, GrTexture* background) const SK_OVERRIDE;
+    virtual bool asNewEffect(GrEffect** effect, GrTexture* background) const SK_OVERRIDE;
 #endif
 
 private:
@@ -262,7 +262,7 @@
 
 class GrArithmeticEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(float k1, float k2, float k3, float k4, bool enforcePMColor,
+    static GrEffect* Create(float k1, float k2, float k3, float k4, bool enforcePMColor,
                                GrTexture* background) {
         return SkNEW_ARGS(GrArithmeticEffect, (k1, k2, k3, k4, enforcePMColor, background));
     }
@@ -410,10 +410,10 @@
     return key;
 }
 
-GrEffectRef* GrArithmeticEffect::TestCreate(SkRandom* rand,
-                                            GrContext*,
-                                            const GrDrawTargetCaps&,
-                                            GrTexture*[]) {
+GrEffect* GrArithmeticEffect::TestCreate(SkRandom* rand,
+                                         GrContext*,
+                                         const GrDrawTargetCaps&,
+                                         GrTexture*[]) {
     float k1 = rand->nextF();
     float k2 = rand->nextF();
     float k3 = rand->nextF();
@@ -425,7 +425,7 @@
 
 GR_DEFINE_EFFECT_TEST(GrArithmeticEffect);
 
-bool SkArithmeticMode_scalar::asNewEffect(GrEffectRef** effect, GrTexture* background) const {
+bool SkArithmeticMode_scalar::asNewEffect(GrEffect** effect, GrTexture* background) const {
     if (effect) {
         *effect = GrArithmeticEffect::Create(SkScalarToFloat(fK[0]),
                                              SkScalarToFloat(fK[1]),
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 86a4f5a..e400663 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -555,8 +555,7 @@
     /**
      * Create a simple filter effect with custom bicubic coefficients.
      */
-    static GrEffectRef* Create(GrContext *context, const SkRect& rect,
-                               float sigma) {
+    static GrEffect* Create(GrContext *context, const SkRect& rect, float sigma) {
         GrTexture *blurProfileTexture = NULL;
         int doubleProfileSize = SkScalarCeilToInt(12*sigma);
 
@@ -759,10 +758,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrRectBlurEffect);
 
-GrEffectRef* GrRectBlurEffect::TestCreate(SkRandom* random,
-                                         GrContext* context,
-                                         const GrDrawTargetCaps&,
-                                         GrTexture**) {
+GrEffect* GrRectBlurEffect::TestCreate(SkRandom* random,
+                                       GrContext* context,
+                                       const GrDrawTargetCaps&,
+                                       GrTexture**) {
     float sigma = random->nextRangeF(3,8);
     float width = random->nextRangeF(200,300);
     float height = random->nextRangeF(200,300);
@@ -793,8 +792,7 @@
     int pad=SkScalarCeilToInt(6*xformedSigma)/2;
     rect.outset(SkIntToScalar(pad), SkIntToScalar(pad));
 
-    SkAutoTUnref<GrEffectRef> effect(GrRectBlurEffect::Create(
-            context, rect, xformedSigma));
+    SkAutoTUnref<GrEffect> effect(GrRectBlurEffect::Create(context, rect, xformedSigma));
     if (!effect) {
         return false;
     }
@@ -815,7 +813,7 @@
 class GrRRectBlurEffect : public GrEffect {
 public:
 
-    static GrEffectRef* Create(GrContext* context, float sigma, const SkRRect&);
+    static GrEffect* Create(GrContext* context, float sigma, const SkRRect&);
 
     virtual ~GrRRectBlurEffect() {};
     static const char* Name() { return "GrRRectBlur"; }
@@ -844,7 +842,7 @@
 };
 
 
-GrEffectRef* GrRRectBlurEffect::Create(GrContext* context, float sigma, const SkRRect& rrect) {
+GrEffect* GrRRectBlurEffect::Create(GrContext* context, float sigma, const SkRRect& rrect) {
     if (!rrect.isSimpleCircular()) {
         return NULL;
     }
@@ -941,10 +939,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrRRectBlurEffect);
 
-GrEffectRef* GrRRectBlurEffect::TestCreate(SkRandom* random,
-                                     GrContext* context,
-                                     const GrDrawTargetCaps& caps,
-                                     GrTexture*[]) {
+GrEffect* GrRRectBlurEffect::TestCreate(SkRandom* random,
+                                        GrContext* context,
+                                        const GrDrawTargetCaps& caps,
+                                        GrTexture*[]) {
     SkScalar w = random->nextRangeScalar(100.f, 1000.f);
     SkScalar h = random->nextRangeScalar(100.f, 1000.f);
     SkScalar r = random->nextRangeF(1.f, 9.f);
@@ -1074,7 +1072,7 @@
     float extra=3.f*SkScalarCeilToScalar(xformedSigma-1/6.0f);
     proxy_rect.outset(extra, extra);
 
-    SkAutoTUnref<GrEffectRef> effect(GrRRectBlurEffect::Create(
+    SkAutoTUnref<GrEffect> effect(GrRRectBlurEffect::Create(
             context, xformedSigma, rrect));
     if (!effect) {
         return false;
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index 18dbb95..35b7825 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -187,7 +187,7 @@
 
 class ModeColorFilterEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(const GrColor& c, SkXfermode::Mode mode) {
+    static GrEffect* Create(const GrColor& c, SkXfermode::Mode mode) {
         // TODO: Make the effect take the coeffs rather than mode since we already do the
         // conversion here.
         SkXfermode::Coeff srcCoeff, dstCoeff;
@@ -396,10 +396,10 @@
 }
 
 GR_DEFINE_EFFECT_TEST(ModeColorFilterEffect);
-GrEffectRef* ModeColorFilterEffect::TestCreate(SkRandom* rand,
-                                    GrContext*,
-                                    const GrDrawTargetCaps&,
-                                    GrTexture*[]) {
+GrEffect* ModeColorFilterEffect::TestCreate(SkRandom* rand,
+                                            GrContext*,
+                                            const GrDrawTargetCaps&,
+                                            GrTexture*[]) {
     SkXfermode::Mode mode = SkXfermode::kDst_Mode;
     while (SkXfermode::kDst_Mode == mode) {
         mode = static_cast<SkXfermode::Mode>(rand->nextRangeU(0, SkXfermode::kLastCoeffMode));
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index b3b9c29..cf2e3b7 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -330,7 +330,7 @@
 
 class ColorMatrixEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(const SkColorMatrix& matrix) {
+    static GrEffect* Create(const SkColorMatrix& matrix) {
         return SkNEW_ARGS(ColorMatrixEffect, (matrix));
     }
 
@@ -468,10 +468,10 @@
 
 GR_DEFINE_EFFECT_TEST(ColorMatrixEffect);
 
-GrEffectRef* ColorMatrixEffect::TestCreate(SkRandom* random,
-                                           GrContext*,
-                                           const GrDrawTargetCaps&,
-                                           GrTexture* dummyTextures[2]) {
+GrEffect* ColorMatrixEffect::TestCreate(SkRandom* random,
+                                        GrContext*,
+                                        const GrDrawTargetCaps&,
+                                        GrTexture* dummyTextures[2]) {
     SkColorMatrix colorMatrix;
     for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) {
         colorMatrix.fMat[i] = random->nextSScalar1();
@@ -479,7 +479,7 @@
     return ColorMatrixEffect::Create(colorMatrix);
 }
 
-GrEffectRef* SkColorMatrixFilter::asNewEffect(GrContext*) const {
+GrEffect* SkColorMatrixFilter::asNewEffect(GrContext*) const {
     return ColorMatrixEffect::Create(fMatrix);
 }
 
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 28a4ab3..b270640 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -299,11 +299,11 @@
 
 class GrDisplacementMapEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
-                               SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
-                               SkVector scale,
-                               GrTexture* displacement, const SkMatrix& offsetMatrix,
-                               GrTexture* color) {
+    static GrEffect* Create(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
+                            SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
+                            SkVector scale,
+                            GrTexture* displacement, const SkMatrix& offsetMatrix,
+                            GrTexture* color) {
         return SkNEW_ARGS(GrDisplacementMapEffect, (xChannelSelector,
                                                     yChannelSelector,
                                                     scale,
@@ -475,10 +475,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrDisplacementMapEffect);
 
-GrEffectRef* GrDisplacementMapEffect::TestCreate(SkRandom* random,
-                                                 GrContext*,
-                                                 const GrDrawTargetCaps&,
-                                                 GrTexture* textures[]) {
+GrEffect* GrDisplacementMapEffect::TestCreate(SkRandom* random,
+                                              GrContext*,
+                                              const GrDrawTargetCaps&,
+                                              GrTexture* textures[]) {
     int texIdxDispl = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                            GrEffectUnitTest::kAlphaTextureIdx;
     int texIdxColor = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp
index 9da08e6..5888108 100644
--- a/src/effects/SkGpuBlurUtils.cpp
+++ b/src/effects/SkGpuBlurUtils.cpp
@@ -54,7 +54,7 @@
                                    float bounds[2]) {
     GrPaint paint;
     paint.reset();
-    SkAutoTUnref<GrEffectRef> conv(GrConvolutionEffect::CreateGaussian(
+    SkAutoTUnref<GrEffect> conv(GrConvolutionEffect::CreateGaussian(
         texture, direction, radius, sigma, useBounds, bounds));
     paint.reset();
     paint.addColorEffect(conv);
@@ -174,7 +174,7 @@
             matrix.mapRect(&domain, rect);
             domain.inset(i < scaleFactorX ? SK_ScalarHalf / srcTexture->width() : 0.0f,
                          i < scaleFactorY ? SK_ScalarHalf / srcTexture->height() : 0.0f);
-            SkAutoTUnref<GrEffectRef> effect(GrTextureDomainEffect::Create(
+            SkAutoTUnref<GrEffect> effect(GrTextureDomainEffect::Create(
                 srcTexture,
                 matrix,
                 domain,
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 54bfc04..c5b8fc6 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -274,7 +274,8 @@
     virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
                                SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
 #if SK_SUPPORT_GPU
-    virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkMatrix& matrix, const SkIRect& bounds) const SK_OVERRIDE;
+    virtual bool asNewEffect(GrEffect** effect, GrTexture*, const SkMatrix& matrix,
+                             const SkIRect& bounds) const SK_OVERRIDE;
 #endif
 
 private:
@@ -296,7 +297,8 @@
     virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
                                SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
 #if SK_SUPPORT_GPU
-    virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkMatrix& matrix, const SkIRect& bounds) const SK_OVERRIDE;
+    virtual bool asNewEffect(GrEffect** effect, GrTexture*, const SkMatrix& matrix,
+                             const SkIRect& bounds) const SK_OVERRIDE;
 #endif
 
 private:
@@ -334,11 +336,11 @@
 
 class GrDiffuseLightingEffect : public GrLightingEffect {
 public:
-    static GrEffectRef* Create(GrTexture* texture,
-                               const SkLight* light,
-                               SkScalar surfaceScale,
-                               const SkMatrix& matrix,
-                               SkScalar kd) {
+    static GrEffect* Create(GrTexture* texture,
+                            const SkLight* light,
+                            SkScalar surfaceScale,
+                            const SkMatrix& matrix,
+                            SkScalar kd) {
         return SkNEW_ARGS(GrDiffuseLightingEffect, (texture,
                                                     light,
                                                     surfaceScale,
@@ -369,12 +371,12 @@
 
 class GrSpecularLightingEffect : public GrLightingEffect {
 public:
-    static GrEffectRef* Create(GrTexture* texture,
-                               const SkLight* light,
-                               SkScalar surfaceScale,
-                               const SkMatrix& matrix,
-                               SkScalar ks,
-                               SkScalar shininess) {
+    static GrEffect* Create(GrTexture* texture,
+                            const SkLight* light,
+                            SkScalar surfaceScale,
+                            const SkMatrix& matrix,
+                            SkScalar ks,
+                            SkScalar shininess) {
         return SkNEW_ARGS(GrSpecularLightingEffect, (texture,
                                                      light,
                                                      surfaceScale,
@@ -985,7 +987,8 @@
 }
 
 #if SK_SUPPORT_GPU
-bool SkDiffuseLightingImageFilter::asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkMatrix& matrix, const SkIRect&) const {
+bool SkDiffuseLightingImageFilter::asNewEffect(GrEffect** effect, GrTexture* texture,
+                                               const SkMatrix& matrix, const SkIRect&) const {
     if (effect) {
         SkScalar scale = SkScalarMul(surfaceScale(), SkIntToScalar(255));
         *effect = GrDiffuseLightingEffect::Create(texture, light(), scale, matrix, kd());
@@ -1074,7 +1077,8 @@
 }
 
 #if SK_SUPPORT_GPU
-bool SkSpecularLightingImageFilter::asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkMatrix& matrix, const SkIRect&) const {
+bool SkSpecularLightingImageFilter::asNewEffect(GrEffect** effect, GrTexture* texture,
+                                                const SkMatrix& matrix, const SkIRect&) const {
     if (effect) {
         SkScalar scale = SkScalarMul(surfaceScale(), SkIntToScalar(255));
         *effect = GrSpecularLightingEffect::Create(texture, light(), scale, matrix, ks(), shininess());
@@ -1230,10 +1234,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrDiffuseLightingEffect);
 
-GrEffectRef* GrDiffuseLightingEffect::TestCreate(SkRandom* random,
-                                                 GrContext* context,
-                                                 const GrDrawTargetCaps&,
-                                                 GrTexture* textures[]) {
+GrEffect* GrDiffuseLightingEffect::TestCreate(SkRandom* random,
+                                              GrContext* context,
+                                              const GrDrawTargetCaps&,
+                                              GrTexture* textures[]) {
     SkScalar surfaceScale = random->nextSScalar1();
     SkScalar kd = random->nextUScalar1();
     SkAutoTUnref<SkLight> light(create_random_light(random));
@@ -1436,10 +1440,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrSpecularLightingEffect);
 
-GrEffectRef* GrSpecularLightingEffect::TestCreate(SkRandom* random,
-                                                  GrContext* context,
-                                                  const GrDrawTargetCaps&,
-                                                  GrTexture* textures[]) {
+GrEffect* GrSpecularLightingEffect::TestCreate(SkRandom* random,
+                                               GrContext* context,
+                                               const GrDrawTargetCaps&,
+                                               GrTexture* textures[]) {
     SkScalar surfaceScale = random->nextSScalar1();
     SkScalar ks = random->nextUScalar1();
     SkScalar shininess = random->nextUScalar1();
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp
index 54dfc08..4c5e98a 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -60,7 +60,7 @@
 #if SK_SUPPORT_GPU
 class LumaColorFilterEffect : public GrEffect {
 public:
-    static GrEffectRef* Create() {
+    static GrEffect* Create() {
         GR_CREATE_STATIC_EFFECT(gLumaEffect, LumaColorFilterEffect, ());
         return SkRef(gLumaEffect);
     }
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index a8556d1..7601603 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -25,13 +25,13 @@
 class GrMagnifierEffect : public GrSingleTextureEffect {
 
 public:
-    static GrEffectRef* Create(GrTexture* texture,
-                               float xOffset,
-                               float yOffset,
-                               float xInvZoom,
-                               float yInvZoom,
-                               float xInvInset,
-                               float yInvInset) {
+    static GrEffect* Create(GrTexture* texture,
+                            float xOffset,
+                            float yOffset,
+                            float xInvZoom,
+                            float yInvZoom,
+                            float xInvInset,
+                            float yInvInset) {
         return SkNEW_ARGS(GrMagnifierEffect, (texture,
                                               xOffset,
                                               yOffset,
@@ -181,10 +181,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrMagnifierEffect);
 
-GrEffectRef* GrMagnifierEffect::TestCreate(SkRandom* random,
-                                           GrContext* context,
-                                           const GrDrawTargetCaps&,
-                                           GrTexture** textures) {
+GrEffect* GrMagnifierEffect::TestCreate(SkRandom* random,
+                                        GrContext* context,
+                                        const GrDrawTargetCaps&,
+                                        GrTexture** textures) {
     GrTexture* texture = textures[0];
     const int kMaxWidth = 200;
     const int kMaxHeight = 200;
@@ -195,7 +195,7 @@
     uint32_t y = random->nextULessThan(kMaxHeight - height);
     uint32_t inset = random->nextULessThan(kMaxInset);
 
-    GrEffectRef* effect = GrMagnifierEffect::Create(
+    GrEffect* effect = GrMagnifierEffect::Create(
         texture,
         (float) width / texture->width(),
         (float) height / texture->height(),
@@ -252,7 +252,8 @@
 }
 
 #if SK_SUPPORT_GPU
-bool SkMagnifierImageFilter::asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkMatrix&, const SkIRect&) const {
+bool SkMagnifierImageFilter::asNewEffect(GrEffect** effect, GrTexture* texture, const SkMatrix&,
+                                         const SkIRect&) const {
     if (effect) {
         SkScalar yOffset = (texture->origin() == kTopLeft_GrSurfaceOrigin) ? fSrcRect.y() :
                            (texture->height() - (fSrcRect.y() + fSrcRect.height()));
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index 684281a..5baf36b 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -330,15 +330,15 @@
 class GrMatrixConvolutionEffect : public GrSingleTextureEffect {
 public:
     typedef SkMatrixConvolutionImageFilter::TileMode TileMode;
-    static GrEffectRef* Create(GrTexture* texture,
-                               const SkIRect& bounds,
-                               const SkISize& kernelSize,
-                               const SkScalar* kernel,
-                               SkScalar gain,
-                               SkScalar bias,
-                               const SkIPoint& kernelOffset,
-                               TileMode tileMode,
-                               bool convolveAlpha) {
+    static GrEffect* Create(GrTexture* texture,
+                            const SkIRect& bounds,
+                            const SkISize& kernelSize,
+                            const SkScalar* kernel,
+                            SkScalar gain,
+                            SkScalar bias,
+                            const SkIPoint& kernelOffset,
+                            TileMode tileMode,
+                            bool convolveAlpha) {
         return SkNEW_ARGS(GrMatrixConvolutionEffect, (texture,
                                                       bounds,
                                                       kernelSize,
@@ -625,10 +625,10 @@
 // Allows for a 5x5 kernel (or 25x1, for that matter).
 #define MAX_KERNEL_SIZE 25
 
-GrEffectRef* GrMatrixConvolutionEffect::TestCreate(SkRandom* random,
-                                                   GrContext* context,
-                                                   const GrDrawTargetCaps&,
-                                                   GrTexture* textures[]) {
+GrEffect* GrMatrixConvolutionEffect::TestCreate(SkRandom* random,
+                                                GrContext* context,
+                                                const GrDrawTargetCaps&,
+                                                GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     int width = random->nextRangeU(1, MAX_KERNEL_SIZE);
@@ -659,7 +659,7 @@
                                              convolveAlpha);
 }
 
-bool SkMatrixConvolutionImageFilter::asNewEffect(GrEffectRef** effect,
+bool SkMatrixConvolutionImageFilter::asNewEffect(GrEffect** effect,
                                                  GrTexture* texture,
                                                  const SkMatrix&,
                                                  const SkIRect& bounds
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index a18388e..53180fa 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -278,7 +278,7 @@
         kDilate_MorphologyType,
     };
 
-    static GrEffectRef* Create(GrTexture* tex, Direction dir, int radius, MorphologyType type) {
+    static GrEffect* Create(GrTexture* tex, Direction dir, int radius, MorphologyType type) {
         return SkNEW_ARGS(GrMorphologyEffect, (tex, dir, radius, type));
     }
 
@@ -446,10 +446,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrMorphologyEffect);
 
-GrEffectRef* GrMorphologyEffect::TestCreate(SkRandom* random,
-                                            GrContext*,
-                                            const GrDrawTargetCaps&,
-                                            GrTexture* textures[]) {
+GrEffect* GrMorphologyEffect::TestCreate(SkRandom* random,
+                                         GrContext*,
+                                         const GrDrawTargetCaps&,
+                                         GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     Direction dir = random->nextBool() ? kX_Direction : kY_Direction;
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp
index 894af42..f57fcf3 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -525,11 +525,11 @@
 
 class GrPerlinNoiseEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(SkPerlinNoiseShader::Type type,
-                               int numOctaves, bool stitchTiles,
-                               SkPerlinNoiseShader::PaintingData* paintingData,
-                               GrTexture* permutationsTexture, GrTexture* noiseTexture,
-                               const SkMatrix& matrix, uint8_t alpha) {
+    static GrEffect* Create(SkPerlinNoiseShader::Type type,
+                            int numOctaves, bool stitchTiles,
+                            SkPerlinNoiseShader::PaintingData* paintingData,
+                            GrTexture* permutationsTexture, GrTexture* noiseTexture,
+                            const SkMatrix& matrix, uint8_t alpha) {
         return SkNEW_ARGS(GrPerlinNoiseEffect, (type, numOctaves, stitchTiles, paintingData,
                                                 permutationsTexture, noiseTexture, matrix, alpha));
     }
@@ -608,10 +608,10 @@
 /////////////////////////////////////////////////////////////////////
 GR_DEFINE_EFFECT_TEST(GrPerlinNoiseEffect);
 
-GrEffectRef* GrPerlinNoiseEffect::TestCreate(SkRandom* random,
-                                             GrContext* context,
-                                             const GrDrawTargetCaps&,
-                                             GrTexture**) {
+GrEffect* GrPerlinNoiseEffect::TestCreate(SkRandom* random,
+                                          GrContext* context,
+                                          const GrDrawTargetCaps&,
+                                          GrTexture**) {
     int      numOctaves = random->nextRangeU(2, 10);
     bool     stitchTiles = random->nextBool();
     SkScalar seed = SkIntToScalar(random->nextU());
@@ -628,9 +628,9 @@
                                              stitchTiles ? &tileSize : NULL);
 
     SkPaint paint;
-    GrColor grColor;
-    GrEffectRef* effect;
-    shader->asNewEffect(context, paint, NULL, &grColor, &effect);
+    GrColor paintColor;
+    GrEffect* effect;
+    SkAssertResult(shader->asNewEffect(context, paint, NULL, &paintColor, &effect));
 
     SkDELETE(shader);
 
@@ -944,11 +944,11 @@
 /////////////////////////////////////////////////////////////////////
 
 bool SkPerlinNoiseShader::asNewEffect(GrContext* context, const SkPaint& paint,
-                                      const SkMatrix* externalLocalMatrix, GrColor* grColor,
-                                      GrEffect** grEffect) const {
+                                      const SkMatrix* externalLocalMatrix, GrColor* paintColor,
+                                      GrEffect** effect) const {
     SkASSERT(NULL != context);
     
-    *grColor = SkColor2GrColorJustAlpha(paint.getColor());
+    *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
 
     SkMatrix localMatrix = this->getLocalMatrix();
     if (externalLocalMatrix) {
@@ -965,7 +965,7 @@
         }
         SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(
                                                 clearColor, SkXfermode::kSrc_Mode));
-        *grEffect = cf->asNewEffect(context);
+        *effect = cf->asNewEffect(context);
         return true;
     }
 
@@ -982,7 +982,7 @@
     m.setTranslateX(-localMatrix.getTranslateX() + SK_Scalar1);
     m.setTranslateY(-localMatrix.getTranslateY() + SK_Scalar1);
     if ((NULL != permutationsTexture) && (NULL != noiseTexture)) {
-        *grEffect = GrPerlinNoiseEffect::Create(fType,
+        *effect = GrPerlinNoiseEffect::Create(fType,
                                                 fNumOctaves,
                                                 fStitchTiles,
                                                 paintingData,
@@ -990,7 +990,7 @@
                                                 m, paint.getAlpha());
     } else {
         SkDELETE(paintingData);
-        *grEffect = NULL;
+        *effect = NULL;
     }
 
     // Unlock immediately, this is not great, but we don't have a way of
@@ -1009,8 +1009,8 @@
 #else
 
 bool SkPerlinNoiseShader::asNewEffect(GrContext* context, const SkPaint& paint,
-                                      const SkMatrix* externalLocalMatrix, GrColor* grColor,
-                                      GrEffect** grEffect) const {
+                                      const SkMatrix* externalLocalMatrix, GrColor* paintColor,
+                                      GrEffect** effect) const {
     SkDEBUGFAIL("Should not call in GPU-less build");
     return false;
 }
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index d4a111e..09024d3 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -236,7 +236,7 @@
 
 class ColorTableEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(GrTexture* texture, unsigned flags) {
+    static GrEffect* Create(GrTexture* texture, unsigned flags) {
         return SkNEW_ARGS(ColorTableEffect, (texture, flags));
     }
 
@@ -377,18 +377,18 @@
 
 GR_DEFINE_EFFECT_TEST(ColorTableEffect);
 
-GrEffectRef* ColorTableEffect::TestCreate(SkRandom* random,
-                                          GrContext* context,
-                                          const GrDrawTargetCaps&,
-                                          GrTexture* textures[]) {
+GrEffect* ColorTableEffect::TestCreate(SkRandom* random,
+                                       GrContext* context,
+                                       const GrDrawTargetCaps&,
+                                       GrTexture* textures[]) {
     static unsigned kAllFlags = SkTable_ColorFilter::kR_Flag | SkTable_ColorFilter::kG_Flag |
                                 SkTable_ColorFilter::kB_Flag | SkTable_ColorFilter::kA_Flag;
     return ColorTableEffect::Create(textures[GrEffectUnitTest::kAlphaTextureIdx], kAllFlags);
 }
 
-GrEffectRef* SkTable_ColorFilter::asNewEffect(GrContext* context) const {
+GrEffect* SkTable_ColorFilter::asNewEffect(GrContext* context) const {
     SkBitmap bitmap;
-    GrEffectRef* effect = NULL;
+    GrEffect* effect = NULL;
     this->asComponentTable(&bitmap);
     // passing NULL because this effect does no tiling or filtering.
     GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, bitmap, NULL);
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index bcfb785..cf32cf5 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -123,7 +123,7 @@
     GrTexture* foregroundTex = foreground.getTexture();
     GrContext* context = foregroundTex->getContext();
 
-    GrEffectRef* xferEffect = NULL;
+    GrEffect* xferEffect = NULL;
 
     GrTextureDesc desc;
     desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit;
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index d518cc7..113877c 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -480,10 +480,10 @@
 class GrLinearGradient : public GrGradientEffect {
 public:
 
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkLinearGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkLinearGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm) {
         return SkNEW_ARGS(GrLinearGradient, (ctx, shader, matrix, tm));
     }
 
@@ -511,10 +511,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrLinearGradient);
 
-GrEffectRef* GrLinearGradient::TestCreate(SkRandom* random,
-                                          GrContext* context,
-                                          const GrDrawTargetCaps&,
-                                          GrTexture**) {
+GrEffect* GrLinearGradient::TestCreate(SkRandom* random,
+                                       GrContext* context,
+                                       const GrDrawTargetCaps&,
+                                       GrTexture**) {
     SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()},
                         {random->nextUScalar1(), random->nextUScalar1()}};
 
@@ -527,9 +527,9 @@
                                                                  colors, stops, colorCount,
                                                                  tm));
     SkPaint paint;
-    GrColor grColor;
-    GrEffectRef* effect;
-    shader->asNewEffect(context, paint, NULL, &grColor, &effect);
+    GrColor paintColor;
+    GrEffect* effect;
+    SkAssertResult(shader->asNewEffect(context, paint, NULL, &paintColor, &effect));
     return effect;
 }
 
@@ -551,8 +551,8 @@
 /////////////////////////////////////////////////////////////////////
 
 bool SkLinearGradient::asNewEffect(GrContext* context, const SkPaint& paint,
-                                   const SkMatrix* localMatrix, GrColor* grColor,
-                                   GrEffectRef** grEffect)  const {
+                                   const SkMatrix* localMatrix, GrColor* paintColor,
+                                   GrEffect** effect)  const {
     SkASSERT(NULL != context);
     
     SkMatrix matrix;
@@ -568,8 +568,8 @@
     }
     matrix.postConcat(fPtsToUnit);
     
-    *grColor = SkColor2GrColorJustAlpha(paint.getColor());
-    *grEffect = GrLinearGradient::Create(context, *this, matrix, fTileMode);
+    *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
+    *effect = GrLinearGradient::Create(context, *this, matrix, fTileMode);
     
     return true;
 }
@@ -577,8 +577,8 @@
 #else
 
 bool SkLinearGradient::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;
 }
diff --git a/src/effects/gradients/SkLinearGradient.h b/src/effects/gradients/SkLinearGradient.h
index bb64188..41d0152 100644
--- a/src/effects/gradients/SkLinearGradient.h
+++ b/src/effects/gradients/SkLinearGradient.h
@@ -31,7 +31,7 @@
     virtual BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERRIDE;
     virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
     virtual bool asNewEffect(GrContext* context, const SkPaint& paint, const SkMatrix* localMatrix,
-                             GrColor* grColor, GrEffect** grEffect) const SK_OVERRIDE;
+                             GrColor* paintColor, GrEffect** effect) const SK_OVERRIDE;
 
     SK_TO_STRING_OVERRIDE()
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient)
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index bb60d0f..2267d8d 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -489,10 +489,10 @@
 
 class GrRadialGradient : public GrGradientEffect {
 public:
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkRadialGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkRadialGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm) {
         return SkNEW_ARGS(GrRadialGradient, (ctx, shader, matrix, tm));
     }
 
@@ -522,10 +522,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrRadialGradient);
 
-GrEffectRef* GrRadialGradient::TestCreate(SkRandom* random,
-                                          GrContext* context,
-                                          const GrDrawTargetCaps&,
-                                          GrTexture**) {
+GrEffect* GrRadialGradient::TestCreate(SkRandom* random,
+                                       GrContext* context,
+                                       const GrDrawTargetCaps&,
+                                       GrTexture**) {
     SkPoint center = {random->nextUScalar1(), random->nextUScalar1()};
     SkScalar radius = random->nextUScalar1();
 
@@ -538,9 +538,9 @@
                                                                  colors, stops, colorCount,
                                                                  tm));
     SkPaint paint;
-    GrColor grColor;
-    GrEffectRef* effect;
-    shader->asNewEffect(context, paint, NULL, &grColor, &effect);
+    GrColor paintColor;
+    GrEffect* effect;
+    SkAssertResult(shader->asNewEffect(context, paint, NULL, &paintColor, &effect));
     return effect;
 }
 
@@ -563,8 +563,8 @@
 /////////////////////////////////////////////////////////////////////
 
 bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint,
-                                   const SkMatrix* localMatrix, GrColor* grColor,
-                                   GrEffectRef** grEffect) const {
+                                   const SkMatrix* localMatrix, GrColor* paintColor,
+                                   GrEffect** effect) const {
     SkASSERT(NULL != context);
     
     SkMatrix matrix;
@@ -580,8 +580,8 @@
     }
     matrix.postConcat(fPtsToUnit);
     
-    *grColor = SkColor2GrColorJustAlpha(paint.getColor());
-    *grEffect = GrRadialGradient::Create(context, *this, matrix, fTileMode);
+    *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
+    *effect = GrRadialGradient::Create(context, *this, matrix, fTileMode);
     
     return true;
 }
@@ -589,8 +589,8 @@
 #else
 
 bool SkRadialGradient::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;
 }
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index b3474ec..1ba0443 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -205,10 +205,8 @@
 
 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 @@
 
 GR_DEFINE_EFFECT_TEST(GrSweepGradient);
 
-GrEffectRef* GrSweepGradient::TestCreate(SkRandom* random,
+GrEffect* GrSweepGradient::TestCreate(SkRandom* random,
                                          GrContext* context,
                                          const GrDrawTargetCaps&,
                                          GrTexture**) {
@@ -247,9 +245,9 @@
     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 @@
 /////////////////////////////////////////////////////////////////////
 
 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 @@
     }
     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 @@
 #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;
 }
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 6678000..bb702ff 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -382,21 +382,21 @@
 #include "SkGr.h"
 
 bool SkTwoPointConicalGradient::asNewEffect(GrContext* context, const SkPaint& paint,
-                                             const SkMatrix* localMatrix, GrColor* grColor,
-                                             GrEffectRef** grEffect)  const {
+                                             const SkMatrix* localMatrix, GrColor* paintColor,
+                                             GrEffect** effect)  const {
     SkASSERT(NULL != context);
     SkASSERT(fPtsToUnit.isIdentity());
 
-    *grEffect = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMatrix);
-    *grColor = SkColor2GrColorJustAlpha(paint.getColor());
+    *effect = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMatrix);
+    *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
     return true;
 }
 
 #else
 
 bool SkTwoPointConicalGradient::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;
 }
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h
index bff377e..418c92d 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.h
+++ b/src/effects/gradients/SkTwoPointConicalGradient.h
@@ -65,7 +65,7 @@
                                  SkMatrix* matrix,
                                  TileMode* xy) const;
     virtual SkShader::GradientType asAGradient(GradientInfo* info) const  SK_OVERRIDE;
-    virtual bool asNewEffect(GrContext*, const SkPaint&, const SkMatrix*, GrColor* grColor,
+    virtual bool asNewEffect(GrContext*, const SkPaint&, const SkMatrix*, GrColor* paintColor,
                              GrEffect**) const SK_OVERRIDE;
     virtual bool isOpaque() const SK_OVERRIDE;
 
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
index b6959e3..4d0aa0f 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -59,10 +59,10 @@
 class Edge2PtConicalEffect : public GrGradientEffect {
 public:
 
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkTwoPointConicalGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkTwoPointConicalGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm) {
         return SkNEW_ARGS(Edge2PtConicalEffect, (ctx, shader, matrix, tm));
     }
 
@@ -172,10 +172,10 @@
 
 GR_DEFINE_EFFECT_TEST(Edge2PtConicalEffect);
 
-GrEffectRef* Edge2PtConicalEffect::TestCreate(SkRandom* random,
-                                              GrContext* context,
-                                              const GrDrawTargetCaps&,
-                                              GrTexture**) {
+GrEffect* Edge2PtConicalEffect::TestCreate(SkRandom* random,
+                                           GrContext* context,
+                                           const GrDrawTargetCaps&,
+                                           GrTexture**) {
     SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()};
     SkScalar radius1 = random->nextUScalar1();
     SkPoint center2;
@@ -202,9 +202,9 @@
                                                                           colors, stops, colorCount,
                                                                           tm));
     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;
 }
 
@@ -365,11 +365,11 @@
 class FocalOutside2PtConicalEffect : public GrGradientEffect {
 public:
 
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkTwoPointConicalGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm,
-                               SkScalar focalX) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkTwoPointConicalGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm,
+                            SkScalar focalX) {
         return SkNEW_ARGS(FocalOutside2PtConicalEffect, (ctx, shader, matrix, tm, focalX));
     }
 
@@ -448,10 +448,10 @@
 
 GR_DEFINE_EFFECT_TEST(FocalOutside2PtConicalEffect);
 
-GrEffectRef* FocalOutside2PtConicalEffect::TestCreate(SkRandom* random,
-                                                      GrContext* context,
-                                                      const GrDrawTargetCaps&,
-                                                      GrTexture**) {
+GrEffect* FocalOutside2PtConicalEffect::TestCreate(SkRandom* random,
+                                                   GrContext* context,
+                                                   const GrDrawTargetCaps&,
+                                                   GrTexture**) {
     SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()};
     SkScalar radius1 = 0.f;
     SkPoint center2;
@@ -475,9 +475,9 @@
                                                                           colors, stops, colorCount,
                                                                           tm));
     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;
 }
 
@@ -579,11 +579,11 @@
 class FocalInside2PtConicalEffect : public GrGradientEffect {
 public:
 
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkTwoPointConicalGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm,
-                               SkScalar focalX) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkTwoPointConicalGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm,
+                            SkScalar focalX) {
         return SkNEW_ARGS(FocalInside2PtConicalEffect, (ctx, shader, matrix, tm, focalX));
     }
 
@@ -657,10 +657,10 @@
 
 GR_DEFINE_EFFECT_TEST(FocalInside2PtConicalEffect);
 
-GrEffectRef* FocalInside2PtConicalEffect::TestCreate(SkRandom* random,
-                                                     GrContext* context,
-                                                     const GrDrawTargetCaps&,
-                                                     GrTexture**) {
+GrEffect* FocalInside2PtConicalEffect::TestCreate(SkRandom* random,
+                                                  GrContext* context,
+                                                  const GrDrawTargetCaps&,
+                                                  GrTexture**) {
     SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()};
     SkScalar radius1 = 0.f;
     SkPoint center2;
@@ -686,10 +686,10 @@
                                                                           colors, stops, colorCount,
                                                                           tm));
     SkPaint paint;
-    GrColor grColor;
-    GrEffectRef* grEffect;
-    shader->asNewEffect(context, paint, NULL, &grColor, &grEffect);
-    return grEffect;
+    GrColor paintColor;
+    GrEffect* effect;
+    SkAssertResult(shader->asNewEffect(context, paint, NULL, &paintColor, &effect));
+    return effect;
 }
 
 GLFocalInside2PtConicalEffect::GLFocalInside2PtConicalEffect(const GrBackendEffectFactory& factory,
@@ -812,11 +812,11 @@
 class CircleInside2PtConicalEffect : public GrGradientEffect {
 public:
 
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkTwoPointConicalGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm,
-                               const CircleConicalInfo& info) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkTwoPointConicalGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm,
+                            const CircleConicalInfo& info) {
         return SkNEW_ARGS(CircleInside2PtConicalEffect, (ctx, shader, matrix, tm, info));
     }
 
@@ -902,10 +902,10 @@
 
 GR_DEFINE_EFFECT_TEST(CircleInside2PtConicalEffect);
 
-GrEffectRef* CircleInside2PtConicalEffect::TestCreate(SkRandom* random,
-                                                      GrContext* context,
-                                                      const GrDrawTargetCaps&,
-                                                      GrTexture**) {
+GrEffect* CircleInside2PtConicalEffect::TestCreate(SkRandom* random,
+                                                   GrContext* context,
+                                                   const GrDrawTargetCaps&,
+                                                   GrTexture**) {
     SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()};
     SkScalar radius1 = random->nextUScalar1() + 0.0001f; // make sure radius1 != 0
     SkPoint center2;
@@ -930,10 +930,10 @@
                                                                           colors, stops, colorCount,
                                                                           tm));
     SkPaint paint;
-    GrColor grColor;
-    GrEffectRef* grEffect;
-    shader->asNewEffect(context, paint, NULL, &grColor, &grEffect);
-    return grEffect;
+    GrColor paintColor;
+    GrEffect* effect;
+    SkAssertResult(shader->asNewEffect(context, paint, NULL, &paintColor, &effect));
+    return effect;
 }
 
 GLCircleInside2PtConicalEffect::GLCircleInside2PtConicalEffect(const GrBackendEffectFactory& factory,
@@ -1024,11 +1024,11 @@
 class CircleOutside2PtConicalEffect : public GrGradientEffect {
 public:
 
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkTwoPointConicalGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm,
-                               const CircleConicalInfo& info) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkTwoPointConicalGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm,
+                            const CircleConicalInfo& info) {
         return SkNEW_ARGS(CircleOutside2PtConicalEffect, (ctx, shader, matrix, tm, info));
     }
 
@@ -1131,10 +1131,10 @@
 
 GR_DEFINE_EFFECT_TEST(CircleOutside2PtConicalEffect);
 
-GrEffectRef* CircleOutside2PtConicalEffect::TestCreate(SkRandom* random,
-                                                       GrContext* context,
-                                                       const GrDrawTargetCaps&,
-                                                       GrTexture**) {
+GrEffect* CircleOutside2PtConicalEffect::TestCreate(SkRandom* random,
+                                                    GrContext* context,
+                                                    const GrDrawTargetCaps&,
+                                                    GrTexture**) {
     SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()};
     SkScalar radius1 = random->nextUScalar1() + 0.0001f; // make sure radius1 != 0
     SkPoint center2;
@@ -1160,10 +1160,10 @@
                                                                           colors, stops, colorCount,
                                                                           tm));
     SkPaint paint;
-    GrColor grColor;
-    GrEffectRef* grEffect;
-    shader->asNewEffect(context, paint, NULL, &grColor, &grEffect);
-    return grEffect;
+    GrColor paintColor;
+    GrEffect* effect;
+    SkAssertResult(shader->asNewEffect(context, paint, NULL, &paintColor, &effect));
+    return effect;
 }
 
 GLCircleOutside2PtConicalEffect::GLCircleOutside2PtConicalEffect(const GrBackendEffectFactory& factory,
@@ -1280,10 +1280,10 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
-                                                const SkTwoPointConicalGradient& shader,
-                                                SkShader::TileMode tm,
-                                                const SkMatrix* localMatrix) {
+GrEffect* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
+                                             const SkTwoPointConicalGradient& shader,
+                                             SkShader::TileMode tm,
+                                             const SkMatrix* localMatrix) {
     SkMatrix matrix;
     if (!shader.getLocalMatrix().invert(&matrix)) {
         return NULL;
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 22feb71..79c231d 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -434,10 +434,10 @@
 
 class GrRadial2Gradient : public GrGradientEffect {
 public:
-    static GrEffectRef* Create(GrContext* ctx,
-                               const SkTwoPointRadialGradient& shader,
-                               const SkMatrix& matrix,
-                               SkShader::TileMode tm) {
+    static GrEffect* Create(GrContext* ctx,
+                            const SkTwoPointRadialGradient& shader,
+                            const SkMatrix& matrix,
+                            SkShader::TileMode tm) {
         return SkNEW_ARGS(GrRadial2Gradient, (ctx, shader, matrix, tm));
     }
 
@@ -506,10 +506,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrRadial2Gradient);
 
-GrEffectRef* GrRadial2Gradient::TestCreate(SkRandom* random,
-                                           GrContext* context,
-                                           const GrDrawTargetCaps&,
-                                           GrTexture**) {
+GrEffect* GrRadial2Gradient::TestCreate(SkRandom* random,
+                                        GrContext* context,
+                                        const GrDrawTargetCaps&,
+                                        GrTexture**) {
     SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()};
     SkScalar radius1 = random->nextUScalar1();
     SkPoint center2;
@@ -530,9 +530,9 @@
                                                                          colors, stops, colorCount,
                                                                          tm));
     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;
 }
 
@@ -674,8 +674,8 @@
 /////////////////////////////////////////////////////////////////////
 
 bool SkTwoPointRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint,
-                                           const SkMatrix* localMatrix, GrColor* grColor,
-                                           GrEffectRef** grEffect)  const {
+                                           const SkMatrix* localMatrix, GrColor* paintColor,
+                                           GrEffect** effect)  const {
     SkASSERT(NULL != context);
     
     // invert the localM, translate to center1 (fPtsToUni), rotate so center2 is on x axis.
@@ -701,8 +701,8 @@
         matrix.postConcat(rot);
     }
 
-    *grColor = SkColor2GrColorJustAlpha(paint.getColor());
-    *grEffect = GrRadial2Gradient::Create(context, *this, matrix, fTileMode);
+    *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
+    *effect = GrRadial2Gradient::Create(context, *this, matrix, fTileMode);
     
     return true;
 }
@@ -710,8 +710,8 @@
 #else
 
 bool SkTwoPointRadialGradient::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;
 }
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index d0f6e0e..7765eb1 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -506,7 +506,7 @@
 class QuadEdgeEffect : public GrVertexEffect {
 public:
 
-    static GrEffectRef* Create() {
+    static GrEffect* Create() {
         GR_CREATE_STATIC_EFFECT(gQuadEdgeEffect, QuadEdgeEffect, ());
         gQuadEdgeEffect->ref();
         return gQuadEdgeEffect;
@@ -595,10 +595,10 @@
 
 GR_DEFINE_EFFECT_TEST(QuadEdgeEffect);
 
-GrEffectRef* QuadEdgeEffect::TestCreate(SkRandom* random,
-                                        GrContext*,
-                                        const GrDrawTargetCaps& caps,
-                                        GrTexture*[]) {
+GrEffect* QuadEdgeEffect::TestCreate(SkRandom* random,
+                                     GrContext*,
+                                     const GrDrawTargetCaps& caps,
+                                     GrTexture*[]) {
     // Doesn't work without derivative instructions.
     return caps.shaderDerivativeSupport() ? QuadEdgeEffect::Create() : NULL;
 }
@@ -675,7 +675,7 @@
     drawState->setVertexAttribs<gPathAttribs>(SK_ARRAY_COUNT(gPathAttribs));
 
     static const int kEdgeAttrIndex = 1;
-    GrEffectRef* quadEffect = QuadEdgeEffect::Create();
+    GrEffect* quadEffect = QuadEdgeEffect::Create();
     drawState->addCoverageEffect(quadEffect, kEdgeAttrIndex)->unref();
 
     GrDrawTarget::AutoReleaseGeometry arg(target, vCount, iCount);
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 0014bbe..d5ff40d 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -997,8 +997,8 @@
                                             kVertsPerQuad * quadCnt + kVertsPerQuad * conicCnt));
 
         if (quadCnt > 0) {
-            GrEffectRef* hairQuadEffect = GrQuadEffect::Create(kHairlineAA_GrEffectEdgeType,
-                                                               *target->caps());
+            GrEffect* hairQuadEffect = GrQuadEffect::Create(kHairlineAA_GrEffectEdgeType,
+                                                            *target->caps());
             SkASSERT(NULL != hairQuadEffect);
             GrDrawState::AutoRestoreEffects are(drawState);
             target->setIndexSourceToBuffer(fQuadsIndexBuffer);
@@ -1018,8 +1018,8 @@
 
         if (conicCnt > 0) {
             GrDrawState::AutoRestoreEffects are(drawState);
-            GrEffectRef* hairConicEffect = GrConicEffect::Create(kHairlineAA_GrEffectEdgeType,
-                                                                 *target->caps());
+            GrEffect* hairConicEffect = GrConicEffect::Create(kHairlineAA_GrEffectEdgeType,
+                                                              *target->caps());
             SkASSERT(NULL != hairConicEffect);
             drawState->addCoverageEffect(hairConicEffect, 1, 2)->unref();
             int conics = 0;
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index 497b3cf..48024a6 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -19,7 +19,7 @@
 // Axis Aligned special case
 class GrAlignedRectEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create() {
+    static GrEffect* Create() {
         GR_CREATE_STATIC_EFFECT(gAlignedRectEffect, GrAlignedRectEffect, ());
         gAlignedRectEffect->ref();
         return gAlignedRectEffect;
@@ -113,10 +113,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrAlignedRectEffect);
 
-GrEffectRef* GrAlignedRectEffect::TestCreate(SkRandom* random,
-                                             GrContext* context,
-                                             const GrDrawTargetCaps&,
-                                             GrTexture* textures[]) {
+GrEffect* GrAlignedRectEffect::TestCreate(SkRandom* random,
+                                          GrContext* context,
+                                          const GrDrawTargetCaps&,
+                                          GrTexture* textures[]) {
     return GrAlignedRectEffect::Create();
 }
 
@@ -137,7 +137,7 @@
  */
 class GrRectEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create() {
+    static GrEffect* Create() {
         GR_CREATE_STATIC_EFFECT(gRectEffect, GrRectEffect, ());
         gRectEffect->ref();
         return gRectEffect;
@@ -248,10 +248,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrRectEffect);
 
-GrEffectRef* GrRectEffect::TestCreate(SkRandom* random,
-                                      GrContext* context,
-                                      const GrDrawTargetCaps&,
-                                      GrTexture* textures[]) {
+GrEffect* GrRectEffect::TestCreate(SkRandom* random,
+                                   GrContext* context,
+                                   const GrDrawTargetCaps&,
+                                   GrTexture* textures[]) {
     return GrRectEffect::Create();
 }
 
@@ -631,7 +631,7 @@
 
     RectVertex* verts = reinterpret_cast<RectVertex*>(geo.vertices());
 
-    GrEffectRef* effect = GrRectEffect::Create();
+    GrEffect* effect = GrRectEffect::Create();
     static const int kRectAttrIndex = 1;
     static const int kWidthIndex = 2;
     drawState->addCoverageEffect(effect, kRectAttrIndex, kWidthIndex)->unref();
@@ -681,7 +681,7 @@
 
     AARectVertex* verts = reinterpret_cast<AARectVertex*>(geo.vertices());
 
-    GrEffectRef* effect = GrAlignedRectEffect::Create();
+    GrEffect* effect = GrAlignedRectEffect::Create();
     static const int kOffsetIndex = 1;
     drawState->addCoverageEffect(effect, kOffsetIndex)->unref();
 
diff --git a/src/gpu/GrBitmapTextContext.h b/src/gpu/GrBitmapTextContext.h
index 5be2e99..b9d5ce7 100644
--- a/src/gpu/GrBitmapTextContext.h
+++ b/src/gpu/GrBitmapTextContext.h
@@ -47,7 +47,7 @@
     void*                       fVertices;
     int32_t                     fMaxVertices;
     GrTexture*                  fCurrTexture;
-    SkAutoTUnref<GrEffectRef>   fCachedEffect;
+    SkAutoTUnref<GrEffect>      fCachedEffect;
     uint32_t                    fEffectTextureGenID;
     int                         fCurrVertex;
     SkRect                      fVertexBounds;
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index a878894..704750e 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -165,7 +165,7 @@
             } else {
                 edgeType = invert ? kInverseFillBW_GrEffectEdgeType : kFillBW_GrEffectEdgeType;
             }
-            SkAutoTUnref<GrEffectRef> effect;
+            SkAutoTUnref<GrEffect> effect;
             switch (iter.get()->getType()) {
                 case SkClipStack::Element::kPath_Type:
                     effect.reset(GrConvexPolyEffect::Create(edgeType, iter.get()->getPath(),
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index cdef414..9cae6b0 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1482,7 +1482,7 @@
             textureMatrix.setTranslate(SK_Scalar1 *left, SK_Scalar1 *top);
             textureMatrix.postIDiv(src->width(), src->height());
 
-            SkAutoTUnref<const GrEffectRef> effect;
+            SkAutoTUnref<const GrEffect> effect;
             if (unpremul) {
                 effect.reset(this->createPMToUPMEffect(src, swapRAndB, textureMatrix));
                 if (NULL != effect) {
@@ -1654,7 +1654,7 @@
         return false;
     }
 
-    SkAutoTUnref<const GrEffectRef> effect;
+    SkAutoTUnref<const GrEffect> effect;
     SkMatrix textureMatrix;
     textureMatrix.setIDiv(texture->width(), texture->height());
 
@@ -1861,9 +1861,9 @@
 }
 }
 
-const GrEffectRef* GrContext::createPMToUPMEffect(GrTexture* texture,
-                                                  bool swapRAndB,
-                                                  const SkMatrix& matrix) {
+const GrEffect* GrContext::createPMToUPMEffect(GrTexture* texture,
+                                               bool swapRAndB,
+                                               const SkMatrix& matrix) {
     if (!fDidTestPMConversions) {
         test_pm_conversions(this, &fPMToUPMConversion, &fUPMToPMConversion);
         fDidTestPMConversions = true;
@@ -1877,9 +1877,9 @@
     }
 }
 
-const GrEffectRef* GrContext::createUPMToPMEffect(GrTexture* texture,
-                                                  bool swapRAndB,
-                                                  const SkMatrix& matrix) {
+const GrEffect* GrContext::createUPMToPMEffect(GrTexture* texture,
+                                               bool swapRAndB,
+                                               const SkMatrix& matrix) {
     if (!fDidTestPMConversions) {
         test_pm_conversions(this, &fPMToUPMConversion, &fUPMToPMConversion);
         fDidTestPMConversions = true;
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index 8a76646..fe4c03e 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -61,7 +61,7 @@
 
 class CircleEdgeEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create(bool stroke) {
+    static GrEffect* Create(bool stroke) {
         GR_CREATE_STATIC_EFFECT(gCircleStrokeEdge, CircleEdgeEffect, (true));
         GR_CREATE_STATIC_EFFECT(gCircleFillEdge, CircleEdgeEffect, (false));
 
@@ -153,10 +153,10 @@
 
 GR_DEFINE_EFFECT_TEST(CircleEdgeEffect);
 
-GrEffectRef* CircleEdgeEffect::TestCreate(SkRandom* random,
-                                          GrContext* context,
-                                          const GrDrawTargetCaps&,
-                                          GrTexture* textures[]) {
+GrEffect* CircleEdgeEffect::TestCreate(SkRandom* random,
+                                       GrContext* context,
+                                       const GrDrawTargetCaps&,
+                                       GrTexture* textures[]) {
     return CircleEdgeEffect::Create(random->nextBool());
 }
 
@@ -172,7 +172,7 @@
 
 class EllipseEdgeEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create(bool stroke) {
+    static GrEffect* Create(bool stroke) {
         GR_CREATE_STATIC_EFFECT(gEllipseStrokeEdge, EllipseEdgeEffect, (true));
         GR_CREATE_STATIC_EFFECT(gEllipseFillEdge, EllipseEdgeEffect, (false));
 
@@ -284,10 +284,10 @@
 
 GR_DEFINE_EFFECT_TEST(EllipseEdgeEffect);
 
-GrEffectRef* EllipseEdgeEffect::TestCreate(SkRandom* random,
-                                           GrContext* context,
-                                           const GrDrawTargetCaps&,
-                                           GrTexture* textures[]) {
+GrEffect* EllipseEdgeEffect::TestCreate(SkRandom* random,
+                                        GrContext* context,
+                                        const GrDrawTargetCaps&,
+                                        GrTexture* textures[]) {
     return EllipseEdgeEffect::Create(random->nextBool());
 }
 
@@ -306,7 +306,7 @@
 public:
     enum Mode { kStroke = 0, kHairline, kFill };
 
-    static GrEffectRef* Create(Mode mode) {
+    static GrEffect* Create(Mode mode) {
         GR_CREATE_STATIC_EFFECT(gEllipseStrokeEdge, DIEllipseEdgeEffect, (kStroke));
         GR_CREATE_STATIC_EFFECT(gEllipseHairlineEdge, DIEllipseEdgeEffect, (kHairline));
         GR_CREATE_STATIC_EFFECT(gEllipseFillEdge, DIEllipseEdgeEffect, (kFill));
@@ -440,10 +440,10 @@
 
 GR_DEFINE_EFFECT_TEST(DIEllipseEdgeEffect);
 
-GrEffectRef* DIEllipseEdgeEffect::TestCreate(SkRandom* random,
-                                             GrContext* context,
-                                             const GrDrawTargetCaps&,
-                                             GrTexture* textures[]) {
+GrEffect* DIEllipseEdgeEffect::TestCreate(SkRandom* random,
+                                          GrContext* context,
+                                          const GrDrawTargetCaps&,
+                                          GrTexture* textures[]) {
     return DIEllipseEdgeEffect::Create((Mode)(random->nextRangeU(0,2)));
 }
 
@@ -541,7 +541,7 @@
         }
     }
 
-    GrEffectRef* effect = CircleEdgeEffect::Create(isStrokeOnly && innerRadius > 0);
+    GrEffect* effect = CircleEdgeEffect::Create(isStrokeOnly && innerRadius > 0);
     static const int kCircleEdgeAttrIndex = 1;
     drawState->addCoverageEffect(effect, kCircleEdgeAttrIndex)->unref();
 
@@ -681,8 +681,8 @@
 
     EllipseVertex* verts = reinterpret_cast<EllipseVertex*>(geo.vertices());
 
-    GrEffectRef* effect = EllipseEdgeEffect::Create(isStrokeOnly &&
-                                                    innerXRadius > 0 && innerYRadius > 0);
+    GrEffect* effect = EllipseEdgeEffect::Create(isStrokeOnly &&
+                                                 innerXRadius > 0 && innerYRadius > 0);
 
     static const int kEllipseCenterAttrIndex = 1;
     static const int kEllipseEdgeAttrIndex = 2;
@@ -800,7 +800,7 @@
 
     DIEllipseVertex* verts = reinterpret_cast<DIEllipseVertex*>(geo.vertices());
 
-    GrEffectRef* effect = DIEllipseEdgeEffect::Create(mode);
+    GrEffect* effect = DIEllipseEdgeEffect::Create(mode);
 
     static const int kEllipseOuterOffsetAttrIndex = 1;
     static const int kEllipseInnerOffsetAttrIndex = 2;
@@ -898,7 +898,7 @@
         }
         GrEffectEdgeType edgeType = applyAA ? kInverseFillAA_GrEffectEdgeType :
                                               kInverseFillBW_GrEffectEdgeType;
-        GrEffectRef* effect = GrRRectEffect::Create(edgeType, *inner);
+        GrEffect* effect = GrRRectEffect::Create(edgeType, *inner);
         if (NULL == effect) {
             return false;
         }
@@ -920,7 +920,7 @@
     }
     GrEffectEdgeType edgeType = applyAA ? kFillAA_GrEffectEdgeType :
                                           kFillBW_GrEffectEdgeType;
-    GrEffectRef* effect = GrRRectEffect::Create(edgeType, *outer);
+    GrEffect* effect = GrRRectEffect::Create(edgeType, *outer);
     if (NULL == effect) {
         return false;
     }
@@ -1051,7 +1051,7 @@
 
         isStrokeOnly = (isStrokeOnly && innerRadius >= 0);
 
-        GrEffectRef* effect = CircleEdgeEffect::Create(isStrokeOnly);
+        GrEffect* effect = CircleEdgeEffect::Create(isStrokeOnly);
         static const int kCircleEdgeAttrIndex = 1;
         drawState->addCoverageEffect(effect, kCircleEdgeAttrIndex)->unref();
 
@@ -1155,7 +1155,7 @@
         }
         EllipseVertex* verts = reinterpret_cast<EllipseVertex*>(geo.vertices());
 
-        GrEffectRef* effect = EllipseEdgeEffect::Create(isStrokeOnly);
+        GrEffect* effect = EllipseEdgeEffect::Create(isStrokeOnly);
         static const int kEllipseOffsetAttrIndex = 1;
         static const int kEllipseRadiiAttrIndex = 2;
         drawState->addCoverageEffect(effect,
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 42acc9b..a0e4076 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1328,7 +1328,7 @@
                       SkScalarMul(srcRect.fBottom, hInv));
 
     SkRect textureDomain = SkRect::MakeEmpty();
-    SkAutoTUnref<GrEffectRef> effect;
+    SkAutoTUnref<GrEffect> effect;
     if (needsTextureDomain && !(flags & SkCanvas::kBleed_DrawBitmapRectFlag)) {
         // Use a constrained texture domain to avoid color bleeding
         SkScalar left, top, right, bottom;
@@ -1369,9 +1369,9 @@
     GrPaint grPaint;
     grPaint.addColorEffect(effect);
     bool alphaOnly = !(kAlpha_8_SkColorType == bitmap.colorType());
-    GrColor grColor = (alphaOnly) ? SkColor2GrColorJustAlpha(paint.getColor()) :
-                                    SkColor2GrColor(paint.getColor());
-    SkPaint2GrPaintNoShader(this->context(), paint, grColor, false, &grPaint);
+    GrColor paintColor = (alphaOnly) ? SkColor2GrColorJustAlpha(paint.getColor()) :
+                                       SkColor2GrColor(paint.getColor());
+    SkPaint2GrPaintNoShader(this->context(), paint, paintColor, false, &grPaint);
 
     fContext->drawRectToRect(grPaint, dstRect, paintRect, NULL);
 }
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index a1b379f..c4e2c1f 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -419,7 +419,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor grColor,
+void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor paintColor,
                              bool constantColor, GrPaint* grPaint) {
 
     grPaint->setDither(skPaint.isDither());
@@ -429,7 +429,7 @@
     SkXfermode::Coeff dm;
 
     SkXfermode* mode = skPaint.getXfermode();
-    GrEffectRef* xferEffect = NULL;
+    GrEffect* xferEffect = NULL;
     if (SkXfermode::AsNewEffectOrCoeff(mode, &xferEffect, &sm, &dm)) {
         if (NULL != xferEffect) {
             grPaint->addColorEffect(xferEffect)->unref();
@@ -445,7 +445,7 @@
     grPaint->setBlendFunc(sk_blend_to_grblend(sm), sk_blend_to_grblend(dm));
     
     //set the color of the paint to the one of the parameter
-    grPaint->setColor(grColor);
+    grPaint->setColor(paintColor);
 
     SkColorFilter* colorFilter = skPaint.getColorFilter();
     if (NULL != colorFilter) {
@@ -455,7 +455,7 @@
             SkColor filtered = colorFilter->filterColor(skPaint.getColor());
             grPaint->setColor(SkColor2GrColor(filtered));
         } else {
-            SkAutoTUnref<GrEffectRef> effect(colorFilter->asNewEffect(context));
+            SkAutoTUnref<GrEffect> effect(colorFilter->asNewEffect(context));
             if (NULL != effect.get()) {
                 grPaint->addColorEffect(effect);
             }
@@ -476,7 +476,7 @@
             target->config() == kBGRA_8888_GrPixelConfig) {
             // The dither flag is set and the target is likely
             // not going to be dithered by the GPU.
-            SkAutoTUnref<GrEffectRef> effect(GrDitherEffect::Create());
+            SkAutoTUnref<GrEffect> effect(GrDitherEffect::Create());
             if (NULL != effect.get()) {
                 grPaint->addColorEffect(effect);
                 grPaint->setDither(false);
@@ -515,30 +515,29 @@
         return;
     }
 
-    // SkShader::asNewEffect() may do offscreen rendering. Save off the current RT, clip, and
-    // matrix. We don't reset the matrix on the context because SkShader::asNewEffect may use
-    // GrContext::getMatrix() to know the transformation from local coords to device space.
-    GrColor grColor = SkColor2GrColor(skPaint.getColor());
+    GrColor paintColor = SkColor2GrColor(skPaint.getColor());
 
     // Start a new block here in order to preserve our context state after calling
     // asNewEffect(). Since these calls get passed back to the client, we don't really
     // want them messing around with the context.
     {
+        // SkShader::asNewEffect() may do offscreen rendering. Save off the current RT, clip, and
+        // matrix. We don't reset the matrix on the context because SkShader::asNewEffect may use
+        // GrContext::getMatrix() to know the transformation from local coords to device space.
         GrContext::AutoRenderTarget art(context, NULL);
         GrContext::AutoClip ac(context, GrContext::AutoClip::kWideOpen_InitialClip);
         AutoMatrix am(context);
 
-        // setup the shader as the first color effect on the paint
-        // the default grColor is the paint's color
-        GrEffectRef* grEffect = NULL;
-        if (shader->asNewEffect(context, skPaint, NULL, &grColor, &grEffect) && NULL != grEffect) {
-            SkAutoTUnref<GrEffectRef> effect(grEffect);
-            grPaint->addColorEffect(effect);
+        // Allow the shader to modify paintColor and also create an effect to be installed as
+        // the first color effect on the GrPaint.
+        GrEffect* effect = NULL;
+        if (shader->asNewEffect(context, skPaint, NULL, &paintColor, &effect) && NULL != effect) {
+            grPaint->addColorEffect(effect)->unref();
             constantColor = false;
         }
     }
 
     // The grcolor is automatically set when calling asneweffect.
     // If the shader can be seen as an effect it returns true and adds its effect to the grpaint.
-    SkPaint2GrPaintNoShader(context, skPaint, grColor, constantColor, grPaint);
+    SkPaint2GrPaintNoShader(context, skPaint, paintColor, constantColor, grPaint);
 }
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index 862c1d2..0736b5a 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -143,11 +143,11 @@
 
 GR_DEFINE_EFFECT_TEST(GrConicEffect);
 
-GrEffectRef* GrConicEffect::TestCreate(SkRandom* random,
-                                             GrContext*,
-                                             const GrDrawTargetCaps& caps,
-                                             GrTexture*[]) {
-    GrEffectRef* effect;
+GrEffect* GrConicEffect::TestCreate(SkRandom* random,
+                                    GrContext*,
+                                    const GrDrawTargetCaps& caps,
+                                    GrTexture*[]) {
+    GrEffect* effect;
     do {
         GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(
                                                     random->nextULessThan(kGrEffectEdgeTypeCnt));
@@ -281,11 +281,11 @@
 
 GR_DEFINE_EFFECT_TEST(GrQuadEffect);
 
-GrEffectRef* GrQuadEffect::TestCreate(SkRandom* random,
-                                             GrContext*,
-                                             const GrDrawTargetCaps& caps,
-                                             GrTexture*[]) {
-    GrEffectRef* effect;
+GrEffect* GrQuadEffect::TestCreate(SkRandom* random,
+                                   GrContext*,
+                                   const GrDrawTargetCaps& caps,
+                                   GrTexture*[]) {
+    GrEffect* effect;
     do {
         GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(
                                                     random->nextULessThan(kGrEffectEdgeTypeCnt));
@@ -429,11 +429,11 @@
 
 GR_DEFINE_EFFECT_TEST(GrCubicEffect);
 
-GrEffectRef* GrCubicEffect::TestCreate(SkRandom* random,
-                                             GrContext*,
-                                             const GrDrawTargetCaps& caps,
-                                             GrTexture*[]) {
-    GrEffectRef* effect;
+GrEffect* GrCubicEffect::TestCreate(SkRandom* random,
+                                    GrContext*,
+                                    const GrDrawTargetCaps& caps,
+                                    GrTexture*[]) {
+    GrEffect* effect;
     do {
         GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(
                                                     random->nextULessThan(kGrEffectEdgeTypeCnt));
diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h
index e2fc592..b8d8f7b 100644
--- a/src/gpu/effects/GrBezierEffect.h
+++ b/src/gpu/effects/GrBezierEffect.h
@@ -57,7 +57,7 @@
 
 class GrConicEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
+    static GrEffect* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
         GR_CREATE_STATIC_EFFECT(gConicFillAA, GrConicEffect, (kFillAA_GrEffectEdgeType));
         GR_CREATE_STATIC_EFFECT(gConicHairAA, GrConicEffect, (kHairlineAA_GrEffectEdgeType));
         GR_CREATE_STATIC_EFFECT(gConicFillBW, GrConicEffect, (kFillBW_GrEffectEdgeType));
@@ -124,7 +124,7 @@
 
 class GrQuadEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
+    static GrEffect* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
         GR_CREATE_STATIC_EFFECT(gQuadFillAA, GrQuadEffect, (kFillAA_GrEffectEdgeType));
         GR_CREATE_STATIC_EFFECT(gQuadHairAA, GrQuadEffect, (kHairlineAA_GrEffectEdgeType));
         GR_CREATE_STATIC_EFFECT(gQuadFillBW, GrQuadEffect, (kFillBW_GrEffectEdgeType));
@@ -193,7 +193,7 @@
 
 class GrCubicEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
+    static GrEffect* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
         GR_CREATE_STATIC_EFFECT(gCubicFillAA, GrCubicEffect, (kFillAA_GrEffectEdgeType));
         GR_CREATE_STATIC_EFFECT(gCubicHairAA, GrCubicEffect, (kHairlineAA_GrEffectEdgeType));
         GR_CREATE_STATIC_EFFECT(gCubicFillBW, GrCubicEffect, (kFillBW_GrEffectEdgeType));
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 9c6d1a3..132d2f4 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -165,10 +165,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrBicubicEffect);
 
-GrEffectRef* GrBicubicEffect::TestCreate(SkRandom* random,
-                                         GrContext* context,
-                                         const GrDrawTargetCaps&,
-                                         GrTexture* textures[]) {
+GrEffect* GrBicubicEffect::TestCreate(SkRandom* random,
+                                      GrContext* context,
+                                      const GrDrawTargetCaps&,
+                                      GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     SkScalar coefficients[16];
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index eea4d4e..6cfb827 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -37,8 +37,8 @@
     /**
      * Create a simple filter effect with custom bicubic coefficients and optional domain.
      */
-    static GrEffectRef* Create(GrTexture* tex, const SkScalar coefficients[16],
-                               const SkRect* domain = NULL) {
+    static GrEffect* Create(GrTexture* tex, const SkScalar coefficients[16],
+                            const SkRect* domain = NULL) {
         if (NULL == domain) {
             static const SkShader::TileMode kTileModes[] = { SkShader::kClamp_TileMode,
                                                              SkShader::kClamp_TileMode };
@@ -52,8 +52,8 @@
     /**
      * Create a Mitchell filter effect with specified texture matrix and x/y tile modes.
      */
-    static GrEffectRef* Create(GrTexture* tex, const SkMatrix& matrix,
-                               SkShader::TileMode tileModes[2]) {
+    static GrEffect* Create(GrTexture* tex, const SkMatrix& matrix,
+                            SkShader::TileMode tileModes[2]) {
         return Create(tex, gMitchellCoefficients, matrix, tileModes);
     }
 
@@ -61,15 +61,15 @@
      * Create a filter effect with custom bicubic coefficients, the texture matrix, and the x/y
      * tilemodes.
      */
-    static GrEffectRef* Create(GrTexture* tex, const SkScalar coefficients[16],
-                               const SkMatrix& matrix, const SkShader::TileMode tileModes[2]) {
+    static GrEffect* Create(GrTexture* tex, const SkScalar coefficients[16],
+                            const SkMatrix& matrix, const SkShader::TileMode tileModes[2]) {
         return SkNEW_ARGS(GrBicubicEffect, (tex, coefficients, matrix, tileModes));
     }
 
     /**
      * Create a Mitchell filter effect with a texture matrix and a domain.
      */
-    static GrEffectRef* Create(GrTexture* tex, const SkMatrix& matrix, const SkRect& domain) {
+    static GrEffect* Create(GrTexture* tex, const SkMatrix& matrix, const SkRect& domain) {
         return SkNEW_ARGS(GrBicubicEffect, (tex, gMitchellCoefficients, matrix, domain));
     }
 
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 260008c..ff18ef2 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -118,10 +118,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect);
 
-GrEffectRef* GrConfigConversionEffect::TestCreate(SkRandom* random,
-                                                  GrContext*,
-                                                  const GrDrawTargetCaps&,
-                                                  GrTexture* textures[]) {
+GrEffect* GrConfigConversionEffect::TestCreate(SkRandom* random,
+                                               GrContext*,
+                                               const GrDrawTargetCaps&,
+                                               GrTexture* textures[]) {
     PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMConversionCnt));
     bool swapRB;
     if (kNone_PMConversion == pmConv) {
@@ -247,10 +247,10 @@
     }
 }
 
-const GrEffectRef* GrConfigConversionEffect::Create(GrTexture* texture,
-                                                    bool swapRedAndBlue,
-                                                    PMConversion pmConversion,
-                                                    const SkMatrix& matrix) {
+const GrEffect* GrConfigConversionEffect::Create(GrTexture* texture,
+                                                 bool swapRedAndBlue,
+                                                 PMConversion pmConversion,
+                                                 const SkMatrix& matrix) {
     if (!swapRedAndBlue && kNone_PMConversion == pmConversion) {
         // If we returned a GrConfigConversionEffect that was equivalent to a GrSimpleTextureEffect
         // then we may pollute our texture cache with redundant shaders. So in the case that no
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h
index 169c3d7..4416d05 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -35,10 +35,10 @@
     };
 
     // Installs an effect in the GrEffectStage to perform a config conversion.
-    static const GrEffectRef* Create(GrTexture*,
-                                     bool swapRedAndBlue,
-                                     PMConversion pmConversion,
-                                     const SkMatrix& matrix);
+    static const GrEffect* Create(GrTexture*,
+                                  bool swapRedAndBlue,
+                                  PMConversion pmConversion,
+                                  const SkMatrix& matrix);
 
     static const char* Name() { return "Config Conversion"; }
     typedef GrGLConfigConversionEffect GLEffect;
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index aebd5b0..49521ca 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -24,7 +24,7 @@
 
     static const char* Name() { return "AARect"; }
 
-    static GrEffectRef* Create(GrEffectEdgeType edgeType, const SkRect& rect) {
+    static GrEffect* Create(GrEffectEdgeType edgeType, const SkRect& rect) {
         return SkNEW_ARGS(AARectEffect, (edgeType, rect));
     }
 
@@ -64,15 +64,15 @@
 
 GR_DEFINE_EFFECT_TEST(AARectEffect);
 
-GrEffectRef* AARectEffect::TestCreate(SkRandom* random,
-                                      GrContext*,
-                                      const GrDrawTargetCaps& caps,
-                                      GrTexture*[]) {
+GrEffect* AARectEffect::TestCreate(SkRandom* random,
+                                   GrContext*,
+                                   const GrDrawTargetCaps& caps,
+                                   GrTexture*[]) {
     SkRect rect = SkRect::MakeLTRB(random->nextSScalar1(),
                                    random->nextSScalar1(),
                                    random->nextSScalar1(),
                                    random->nextSScalar1());
-    GrEffectRef* effect;
+    GrEffect* effect;
     do {
         GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(random->nextULessThan(
                                                                     kGrEffectEdgeTypeCnt));
@@ -262,7 +262,8 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* GrConvexPolyEffect::Create(GrEffectEdgeType type, const SkPath& path, const SkVector* offset) {
+GrEffect* GrConvexPolyEffect::Create(GrEffectEdgeType type, const SkPath& path,
+                                     const SkVector* offset) {
     if (kHairlineAA_GrEffectEdgeType == type) {
         return NULL;
     }
@@ -312,7 +313,7 @@
     return Create(type, n, edges);
 }
 
-GrEffectRef* GrConvexPolyEffect::Create(GrEffectEdgeType edgeType, const SkRect& rect) {
+GrEffect* GrConvexPolyEffect::Create(GrEffectEdgeType edgeType, const SkRect& rect) {
     if (kHairlineAA_GrEffectEdgeType == edgeType){
         return NULL;
     }
@@ -354,17 +355,17 @@
 
 GR_DEFINE_EFFECT_TEST(GrConvexPolyEffect);
 
-GrEffectRef* GrConvexPolyEffect::TestCreate(SkRandom* random,
-                                            GrContext*,
-                                            const GrDrawTargetCaps& caps,
-                                            GrTexture*[]) {
+GrEffect* GrConvexPolyEffect::TestCreate(SkRandom* random,
+                                         GrContext*,
+                                         const GrDrawTargetCaps& caps,
+                                         GrTexture*[]) {
     int count = random->nextULessThan(kMaxEdges) + 1;
     SkScalar edges[kMaxEdges * 3];
     for (int i = 0; i < 3 * count; ++i) {
         edges[i] = random->nextSScalar1();
     }
 
-    GrEffectRef* effect;
+    GrEffect* effect;
     do {
         GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(
                                         random->nextULessThan(kGrEffectEdgeTypeCnt));
diff --git a/src/gpu/effects/GrConvexPolyEffect.h b/src/gpu/effects/GrConvexPolyEffect.h
index 1a00f12..9164b3e 100644
--- a/src/gpu/effects/GrConvexPolyEffect.h
+++ b/src/gpu/effects/GrConvexPolyEffect.h
@@ -37,7 +37,7 @@
      * have to modify the effect/shaderbuilder interface to make it possible (e.g. give access
      * to the view matrix or untransformed positions in the fragment shader).
      */
-    static GrEffectRef* Create(GrEffectEdgeType edgeType, int n, const SkScalar edges[]) {
+    static GrEffect* Create(GrEffectEdgeType edgeType, int n, const SkScalar edges[]) {
         if (n <= 0 || n > kMaxEdges || kHairlineAA_GrEffectEdgeType == edgeType) {
             return NULL;
         }
@@ -49,12 +49,12 @@
      * inverse filled, or has too many edges, this will return NULL. If offset is non-NULL, then
      * the path is translated by the vector.
      */
-    static GrEffectRef* Create(GrEffectEdgeType, const SkPath&, const SkVector* offset = NULL);
+    static GrEffect* Create(GrEffectEdgeType, const SkPath&, const SkVector* offset = NULL);
 
     /**
      * Creates an effect that fills inside the rect with AA edges..
      */
-    static GrEffectRef* Create(GrEffectEdgeType, const SkRect&);
+    static GrEffect* Create(GrEffectEdgeType, const SkRect&);
 
     virtual ~GrConvexPolyEffect();
 
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index aad7c87..14ba4d7 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -211,10 +211,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrConvolutionEffect);
 
-GrEffectRef* GrConvolutionEffect::TestCreate(SkRandom* random,
-                                             GrContext*,
-                                             const GrDrawTargetCaps&,
-                                             GrTexture* textures[]) {
+GrEffect* GrConvolutionEffect::TestCreate(SkRandom* random,
+                                          GrContext*,
+                                          const GrDrawTargetCaps&,
+                                          GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     Direction dir = random->nextBool() ? kX_Direction : kY_Direction;
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index 77c2d34..a96ea7b 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -22,12 +22,12 @@
 public:
 
     /// Convolve with an arbitrary user-specified kernel
-    static GrEffectRef* Create(GrTexture* tex,
-                               Direction dir,
-                               int halfWidth,
-                               const float* kernel,
-                               bool useBounds,
-                               float bounds[2]) {
+    static GrEffect* Create(GrTexture* tex,
+                            Direction dir,
+                            int halfWidth,
+                            const float* kernel,
+                            bool useBounds,
+                            float bounds[2]) {
         return SkNEW_ARGS(GrConvolutionEffect, (tex,
                                                 dir,
                                                 halfWidth,
@@ -37,12 +37,12 @@
     }
 
     /// Convolve with a Gaussian kernel
-    static GrEffectRef* CreateGaussian(GrTexture* tex,
-                                       Direction dir,
-                                       int halfWidth,
-                                       float gaussianSigma,
-                                       bool useBounds,
-                                       float bounds[2]) {
+    static GrEffect* CreateGaussian(GrTexture* tex,
+                                    Direction dir,
+                                    int halfWidth,
+                                    float gaussianSigma,
+                                    bool useBounds,
+                                    float bounds[2]) {
         return SkNEW_ARGS(GrConvolutionEffect, (tex,
                                                 dir,
                                                 halfWidth,
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
index f85a927..62326b9 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
@@ -84,10 +84,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrCustomCoordsTextureEffect);
 
-GrEffectRef* GrCustomCoordsTextureEffect::TestCreate(SkRandom* random,
-                                                     GrContext*,
-                                                     const GrDrawTargetCaps&,
-                                                     GrTexture* textures[]) {
+GrEffect* GrCustomCoordsTextureEffect::TestCreate(SkRandom* random,
+                                                  GrContext*,
+                                                  const GrDrawTargetCaps&,
+                                                  GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     static const SkShader::TileMode kTileModes[] = {
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.h b/src/gpu/effects/GrCustomCoordsTextureEffect.h
index 5dc830a..95e0fbb 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.h
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.h
@@ -20,7 +20,7 @@
  */
 class GrCustomCoordsTextureEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& p) {
+    static GrEffect* Create(GrTexture* tex, const GrTextureParams& p) {
         return SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p));
     }
 
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index fb58b84..723f59d 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -426,8 +426,7 @@
 public:
     typedef SkPathEffect::DashInfo DashInfo;
 
-    static GrEffectRef* Create(GrEffectEdgeType edgeType, const DashInfo& info,
-                               SkScalar radius);
+    static GrEffect* Create(GrEffectEdgeType edgeType, const DashInfo& info, SkScalar radius);
 
     virtual ~DashingCircleEffect();
 
@@ -557,8 +556,8 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* DashingCircleEffect::Create(GrEffectEdgeType edgeType, const DashInfo& info,
-                                         SkScalar radius) {
+GrEffect* DashingCircleEffect::Create(GrEffectEdgeType edgeType, const DashInfo& info,
+                                      SkScalar radius) {
     if (info.fCount != 2 || info.fIntervals[0] != 0) {
         return NULL;
     }
@@ -598,11 +597,11 @@
 
 GR_DEFINE_EFFECT_TEST(DashingCircleEffect);
 
-GrEffectRef* DashingCircleEffect::TestCreate(SkRandom* random,
-                                             GrContext*,
-                                             const GrDrawTargetCaps& caps,
-                                             GrTexture*[]) {
-    GrEffectRef* effect;
+GrEffect* DashingCircleEffect::TestCreate(SkRandom* random,
+                                          GrContext*,
+                                          const GrDrawTargetCaps& caps,
+                                          GrTexture*[]) {
+    GrEffect* effect;
     GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(random->nextULessThan(
             kGrEffectEdgeTypeCnt));
     SkScalar strokeWidth = random->nextRangeScalar(0, 100.f);
@@ -635,8 +634,7 @@
 public:
     typedef SkPathEffect::DashInfo DashInfo;
 
-    static GrEffectRef* Create(GrEffectEdgeType edgeType, const DashInfo& info,
-                               SkScalar strokeWidth);
+    static GrEffect* Create(GrEffectEdgeType edgeType, const DashInfo& info, SkScalar strokeWidth);
 
     virtual ~DashingLineEffect();
 
@@ -775,8 +773,8 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* DashingLineEffect::Create(GrEffectEdgeType edgeType, const DashInfo& info,
-                                       SkScalar strokeWidth) {
+GrEffect* DashingLineEffect::Create(GrEffectEdgeType edgeType, const DashInfo& info,
+                                    SkScalar strokeWidth) {
     if (info.fCount != 2) {
         return NULL;
     }
@@ -816,11 +814,11 @@
 
 GR_DEFINE_EFFECT_TEST(DashingLineEffect);
 
-GrEffectRef* DashingLineEffect::TestCreate(SkRandom* random,
-                                         GrContext*,
-                                         const GrDrawTargetCaps& caps,
-                                         GrTexture*[]) {
-    GrEffectRef* effect;
+GrEffect* DashingLineEffect::TestCreate(SkRandom* random,
+                                        GrContext*,
+                                        const GrDrawTargetCaps& caps,
+                                        GrTexture*[]) {
+    GrEffect* effect;
     GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(random->nextULessThan(
             kGrEffectEdgeTypeCnt));
     SkScalar strokeWidth = random->nextRangeScalar(0, 100.f);
@@ -838,8 +836,8 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* GrDashingEffect::Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info,
-                                     SkScalar strokeWidth, GrDashingEffect::DashCap cap) {
+GrEffect* GrDashingEffect::Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info,
+                                  SkScalar strokeWidth, GrDashingEffect::DashCap cap) {
     switch (cap) {
         case GrDashingEffect::kRound_DashCap:
             return DashingCircleEffect::Create(edgeType, info, SkScalarHalf(strokeWidth));
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
index 9305ba9..5ae0129 100755
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
@@ -209,10 +209,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrDistanceFieldTextureEffect);
 
-GrEffectRef* GrDistanceFieldTextureEffect::TestCreate(SkRandom* random,
-                                                     GrContext*,
-                                                     const GrDrawTargetCaps&,
-                                                     GrTexture* textures[]) {
+GrEffect* GrDistanceFieldTextureEffect::TestCreate(SkRandom* random,
+                                                   GrContext*,
+                                                   const GrDrawTargetCaps&,
+                                                   GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
 #ifdef SK_GAMMA_APPLY_TO_A8
@@ -468,10 +468,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrDistanceFieldLCDTextureEffect);
 
-GrEffectRef* GrDistanceFieldLCDTextureEffect::TestCreate(SkRandom* random,
-                                                         GrContext*,
-                                                         const GrDrawTargetCaps&,
-                                                         GrTexture* textures[]) {
+GrEffect* GrDistanceFieldLCDTextureEffect::TestCreate(SkRandom* random,
+                                                      GrContext*,
+                                                      const GrDrawTargetCaps&,
+                                                      GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     int texIdx2 = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.h b/src/gpu/effects/GrDistanceFieldTextureEffect.h
index b2e21b2..38e41e5 100644
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.h
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.h
@@ -23,15 +23,15 @@
 class GrDistanceFieldTextureEffect : public GrVertexEffect {
 public:
 #ifdef SK_GAMMA_APPLY_TO_A8
-    static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
-                               GrTexture* gamma, const GrTextureParams& gammaParams, float lum,
-                               bool similarity) {
+    static GrEffect* Create(GrTexture* tex, const GrTextureParams& params,
+                            GrTexture* gamma, const GrTextureParams& gammaParams, float lum,
+                            bool similarity) {
        return SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params, gamma, gammaParams, lum,
                                                         similarity));
     }
 #else
-    static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
-                               bool similarity) {
+    static GrEffect* Create(GrTexture* tex, const GrTextureParams& params,
+                            bool similarity) {
         return  SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params, similarity));
     }
 #endif
@@ -79,10 +79,9 @@
  */
 class GrDistanceFieldLCDTextureEffect : public GrVertexEffect {
 public:
-    static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
-                               GrTexture* gamma, const GrTextureParams& gammaParams, 
-                               SkColor textColor,
-                               bool uniformScale, bool useBGR) {
+    static GrEffect* Create(GrTexture* tex, const GrTextureParams& params,
+                            GrTexture* gamma, const GrTextureParams& gammaParams, 
+                            SkColor textColor, bool uniformScale, bool useBGR) {
         return SkNEW_ARGS(GrDistanceFieldLCDTextureEffect,
                           (tex, params, gamma, gammaParams, textColor, uniformScale, useBGR));
     }
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp
index 1db61ba..fc37d1a 100644
--- a/src/gpu/effects/GrDitherEffect.cpp
+++ b/src/gpu/effects/GrDitherEffect.cpp
@@ -19,7 +19,7 @@
 
 class DitherEffect : public GrEffect {
 public:
-    static GrEffectRef* Create() {
+    static GrEffect* Create() {
         GR_CREATE_STATIC_EFFECT(gDitherEffect, DitherEffect, ())
         return SkRef(gDitherEffect);
     }
@@ -56,10 +56,10 @@
 
 GR_DEFINE_EFFECT_TEST(DitherEffect);
 
-GrEffectRef* DitherEffect::TestCreate(SkRandom*,
-                                      GrContext*,
-                                      const GrDrawTargetCaps&,
-                                      GrTexture*[]) {
+GrEffect* DitherEffect::TestCreate(SkRandom*,
+                                   GrContext*,
+                                   const GrDrawTargetCaps&,
+                                   GrTexture*[]) {
     return DitherEffect::Create();
 }
 
@@ -111,6 +111,4 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* GrDitherEffect::Create() {
-    return DitherEffect::Create();
-}
+GrEffect* GrDitherEffect::Create() { return DitherEffect::Create(); }
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp
index 678abd0..ddda4b9 100644
--- a/src/gpu/effects/GrOvalEffect.cpp
+++ b/src/gpu/effects/GrOvalEffect.cpp
@@ -19,7 +19,7 @@
 
 class CircleEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(GrEffectEdgeType, const SkPoint& center, SkScalar radius);
+    static GrEffect* Create(GrEffectEdgeType, const SkPoint& center, SkScalar radius);
 
     virtual ~CircleEffect() {};
     static const char* Name() { return "Circle"; }
@@ -49,9 +49,7 @@
     typedef GrEffect INHERITED;
 };
 
-GrEffectRef* CircleEffect::Create(GrEffectEdgeType edgeType,
-                                  const SkPoint& center,
-                                  SkScalar radius) {
+GrEffect* CircleEffect::Create(GrEffectEdgeType edgeType, const SkPoint& center, SkScalar radius) {
     SkASSERT(radius >= 0);
     return SkNEW_ARGS(CircleEffect, (edgeType, center, radius));
 }
@@ -80,10 +78,10 @@
 
 GR_DEFINE_EFFECT_TEST(CircleEffect);
 
-GrEffectRef* CircleEffect::TestCreate(SkRandom* random,
-                                      GrContext*,
-                                      const GrDrawTargetCaps& caps,
-                                      GrTexture*[]) {
+GrEffect* CircleEffect::TestCreate(SkRandom* random,
+                                   GrContext*,
+                                   const GrDrawTargetCaps& caps,
+                                   GrTexture*[]) {
     SkPoint center;
     center.fX = random->nextRangeScalar(0.f, 1000.f);
     center.fY = random->nextRangeScalar(0.f, 1000.f);
@@ -189,7 +187,7 @@
 
 class EllipseEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(GrEffectEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry);
+    static GrEffect* Create(GrEffectEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry);
 
     virtual ~EllipseEffect() {};
     static const char* Name() { return "Ellipse"; }
@@ -219,10 +217,10 @@
     typedef GrEffect INHERITED;
 };
 
-GrEffectRef* EllipseEffect::Create(GrEffectEdgeType edgeType,
-                                   const SkPoint& center,
-                                   SkScalar rx,
-                                   SkScalar ry) {
+GrEffect* EllipseEffect::Create(GrEffectEdgeType edgeType,
+                                const SkPoint& center,
+                                SkScalar rx,
+                                SkScalar ry) {
     SkASSERT(rx >= 0 && ry >= 0);
     return SkNEW_ARGS(EllipseEffect, (edgeType, center, rx, ry));
 }
@@ -251,10 +249,10 @@
 
 GR_DEFINE_EFFECT_TEST(EllipseEffect);
 
-GrEffectRef* EllipseEffect::TestCreate(SkRandom* random,
-                                       GrContext*,
-                                       const GrDrawTargetCaps& caps,
-                                       GrTexture*[]) {
+GrEffect* EllipseEffect::TestCreate(SkRandom* random,
+                                    GrContext*,
+                                    const GrDrawTargetCaps& caps,
+                                    GrTexture*[]) {
     SkPoint center;
     center.fX = random->nextRangeScalar(0.f, 1000.f);
     center.fY = random->nextRangeScalar(0.f, 1000.f);
@@ -366,7 +364,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* GrOvalEffect::Create(GrEffectEdgeType edgeType, const SkRect& oval) {
+GrEffect* GrOvalEffect::Create(GrEffectEdgeType edgeType, const SkRect& oval) {
     if (kHairlineAA_GrEffectEdgeType == edgeType) {
         return NULL;
     }
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index 33291ed..d39ab0d 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -44,7 +44,7 @@
 
     // The flags are used to indicate which corners are circluar (unflagged corners are assumed to
     // be square).
-    static GrEffectRef* Create(GrEffectEdgeType, uint32_t circularCornerFlags, const SkRRect&);
+    static GrEffect* Create(GrEffectEdgeType, uint32_t circularCornerFlags, const SkRRect&);
 
     virtual ~CircularRRectEffect() {};
     static const char* Name() { return "CircularRRect"; }
@@ -75,9 +75,9 @@
     typedef GrEffect INHERITED;
 };
 
-GrEffectRef* CircularRRectEffect::Create(GrEffectEdgeType edgeType,
-                                 uint32_t circularCornerFlags,
-                                 const SkRRect& rrect) {
+GrEffect* CircularRRectEffect::Create(GrEffectEdgeType edgeType,
+                                      uint32_t circularCornerFlags,
+                                      const SkRRect& rrect) {
     if (kFillAA_GrEffectEdgeType != edgeType && kInverseFillAA_GrEffectEdgeType != edgeType) {
         return NULL;
     }
@@ -110,16 +110,16 @@
 
 GR_DEFINE_EFFECT_TEST(CircularRRectEffect);
 
-GrEffectRef* CircularRRectEffect::TestCreate(SkRandom* random,
-                                     GrContext*,
-                                     const GrDrawTargetCaps& caps,
-                                     GrTexture*[]) {
+GrEffect* CircularRRectEffect::TestCreate(SkRandom* random,
+                                          GrContext*,
+                                          const GrDrawTargetCaps& caps,
+                                          GrTexture*[]) {
     SkScalar w = random->nextRangeScalar(20.f, 1000.f);
     SkScalar h = random->nextRangeScalar(20.f, 1000.f);
     SkScalar r = random->nextRangeF(kRadiusMin, 9.f);
     SkRRect rrect;
     rrect.setRectXY(SkRect::MakeWH(w, h), r, r);
-    GrEffectRef* effect;
+    GrEffect* effect;
     do {
         GrEffectEdgeType et = (GrEffectEdgeType)random->nextULessThan(kGrEffectEdgeTypeCnt);
         effect = GrRRectEffect::Create(et, rrect);
@@ -382,7 +382,7 @@
 
 class EllipticalRRectEffect : public GrEffect {
 public:
-    static GrEffectRef* Create(GrEffectEdgeType, const SkRRect&);
+    static GrEffect* Create(GrEffectEdgeType, const SkRRect&);
 
     virtual ~EllipticalRRectEffect() {};
     static const char* Name() { return "EllipticalRRect"; }
@@ -411,7 +411,7 @@
     typedef GrEffect INHERITED;
 };
 
-GrEffectRef* EllipticalRRectEffect::Create(GrEffectEdgeType edgeType, const SkRRect& rrect) {
+GrEffect* EllipticalRRectEffect::Create(GrEffectEdgeType edgeType, const SkRRect& rrect) {
     if (kFillAA_GrEffectEdgeType != edgeType && kInverseFillAA_GrEffectEdgeType != edgeType) {
         return NULL;
     }
@@ -441,10 +441,10 @@
 
 GR_DEFINE_EFFECT_TEST(EllipticalRRectEffect);
 
-GrEffectRef* EllipticalRRectEffect::TestCreate(SkRandom* random,
-                                               GrContext*,
-                                               const GrDrawTargetCaps& caps,
-                                               GrTexture*[]) {
+GrEffect* EllipticalRRectEffect::TestCreate(SkRandom* random,
+                                            GrContext*,
+                                            const GrDrawTargetCaps& caps,
+                                            GrTexture*[]) {
     SkScalar w = random->nextRangeScalar(20.f, 1000.f);
     SkScalar h = random->nextRangeScalar(20.f, 1000.f);
     SkVector r[4];
@@ -471,7 +471,7 @@
         rrect.setRectXY(SkRect::MakeWH(w, h), r[SkRRect::kUpperLeft_Corner].fX,
                                               r[SkRRect::kUpperLeft_Corner].fY);
     }
-    GrEffectRef* effect;
+    GrEffect* effect;
     do {
         GrEffectEdgeType et = (GrEffectEdgeType)random->nextULessThan(kGrEffectEdgeTypeCnt);
         effect = GrRRectEffect::Create(et, rrect);
@@ -631,7 +631,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* GrRRectEffect::Create(GrEffectEdgeType edgeType, const SkRRect& rrect) {
+GrEffect* GrRRectEffect::Create(GrEffectEdgeType edgeType, const SkRRect& rrect) {
     if (rrect.isRect()) {
         return GrConvexPolyEffect::Create(edgeType, rrect.getBounds());
     }
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 841561b..b5ad386 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -51,10 +51,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrSimpleTextureEffect);
 
-GrEffectRef* GrSimpleTextureEffect::TestCreate(SkRandom* random,
-                                               GrContext*,
-                                               const GrDrawTargetCaps&,
-                                               GrTexture* textures[]) {
+GrEffect* GrSimpleTextureEffect::TestCreate(SkRandom* random,
+                                            GrContext*,
+                                            const GrDrawTargetCaps&,
+                                            GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     static const SkShader::TileMode kTileModes[] = {
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index fea18e5..49e3d7a 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -23,25 +23,25 @@
 class GrSimpleTextureEffect : public GrSingleTextureEffect {
 public:
     /* unfiltered, clamp mode */
-    static GrEffectRef* Create(GrTexture* tex,
-                               const SkMatrix& matrix,
-                               GrCoordSet coordSet = kLocal_GrCoordSet) {
+    static GrEffect* Create(GrTexture* tex,
+                            const SkMatrix& matrix,
+                            GrCoordSet coordSet = kLocal_GrCoordSet) {
         return SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, GrTextureParams::kNone_FilterMode,
                                                   coordSet));
     }
 
     /* clamp mode */
-    static GrEffectRef* Create(GrTexture* tex,
-                               const SkMatrix& matrix,
-                               GrTextureParams::FilterMode filterMode,
-                               GrCoordSet coordSet = kLocal_GrCoordSet) {
+    static GrEffect* Create(GrTexture* tex,
+                            const SkMatrix& matrix,
+                            GrTextureParams::FilterMode filterMode,
+                            GrCoordSet coordSet = kLocal_GrCoordSet) {
         return SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, filterMode, coordSet));
     }
 
-    static GrEffectRef* Create(GrTexture* tex,
-                               const SkMatrix& matrix,
-                               const GrTextureParams& p,
-                               GrCoordSet coordSet = kLocal_GrCoordSet) {
+    static GrEffect* Create(GrTexture* tex,
+                            const SkMatrix& matrix,
+                            const GrTextureParams& p,
+                            GrCoordSet coordSet = kLocal_GrCoordSet) {
         return SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, p, coordSet));
     }
 
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index cb2ad5f..f12fec5 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -196,7 +196,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* GrTextureDomainEffect::Create(GrTexture* texture,
+GrEffect* GrTextureDomainEffect::Create(GrTexture* texture,
                                            const SkMatrix& matrix,
                                            const SkRect& domain,
                                            GrTextureDomain::Mode mode,
@@ -253,10 +253,10 @@
 
 GR_DEFINE_EFFECT_TEST(GrTextureDomainEffect);
 
-GrEffectRef* GrTextureDomainEffect::TestCreate(SkRandom* random,
-                                               GrContext*,
-                                               const GrDrawTargetCaps&,
-                                               GrTexture* textures[]) {
+GrEffect* GrTextureDomainEffect::TestCreate(SkRandom* random,
+                                            GrContext*,
+                                            const GrDrawTargetCaps&,
+                                            GrTexture* textures[]) {
     int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
                                       GrEffectUnitTest::kAlphaTextureIdx;
     SkRect domain;
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index b4c0b29..dc78187 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -136,12 +136,12 @@
 class GrTextureDomainEffect : public GrSingleTextureEffect {
 
 public:
-    static GrEffectRef* Create(GrTexture*,
-                               const SkMatrix&,
-                               const SkRect& domain,
-                               GrTextureDomain::Mode,
-                               GrTextureParams::FilterMode filterMode,
-                               GrCoordSet = kLocal_GrCoordSet);
+    static GrEffect* Create(GrTexture*,
+                            const SkMatrix&,
+                            const SkRect& domain,
+                            GrTextureDomain::Mode,
+                            GrTextureParams::FilterMode filterMode,
+                            GrCoordSet = kLocal_GrCoordSet);
 
     virtual ~GrTextureDomainEffect();
 
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index 539b4ac..01ff6d6 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -100,8 +100,6 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-GrEffectRef* GrYUVtoRGBEffect::Create(GrTexture* yTexture,
-                                      GrTexture* uTexture,
-                                      GrTexture* vTexture) {
+GrEffect* GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture) {
     return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture);
 }
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 8ead5b8..6ee4890 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -166,7 +166,7 @@
         bool useFixedFunctionTexturing = this->shouldUseFixedFunctionTexturing();
 
         for (int s = 0; s < numStages;) {
-            SkAutoTUnref<const GrEffectRef> effect(GrEffectTestFactory::CreateStage(
+            SkAutoTUnref<const GrEffect> effect(GrEffectTestFactory::CreateStage(
                                                                             &random,
                                                                             this->getContext(),
                                                                             *this->caps(),
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp
index cdb5ef3..e1850f9 100644
--- a/tests/GpuColorFilterTest.cpp
+++ b/tests/GpuColorFilterTest.cpp
@@ -98,10 +98,10 @@
     for (size_t i = 0; i < SK_ARRAY_COUNT(filterTests); ++i) {
         const GetConstantComponentTestCase& test = filterTests[i];
         SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(test.filterColor, test.filterMode));
-        SkAutoTUnref<GrEffectRef> grEffect(cf->asNewEffect(grContext));
+        SkAutoTUnref<GrEffect> effect(cf->asNewEffect(grContext));
         GrColor color = test.inputColor;
         uint32_t components = test.inputComponents;
-        grEffect->getConstantColorComponents(&color, &components);
+        effect->getConstantColorComponents(&color, &components);
 
         REPORTER_ASSERT(reporter, filterColor(color, components) == test.outputColor);
         REPORTER_ASSERT(reporter, test.outputComponents == components);