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/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]),