Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: src/gpu/effects/GrDistanceFieldTextureEffect.h

Issue 371103003: Remove GrEffect::CreateEffectRef and GrEffect::AutoEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref2
Patch Set: Address comments and update for new YUV effect Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDitherEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldTextureEffect.h
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.h b/src/gpu/effects/GrDistanceFieldTextureEffect.h
index 692290ccdb334f0443fb34da7c2c5c287f17f1d5..b2e21b28955ea6156250625b52f036a0cfed9492 100644
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.h
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.h
@@ -26,17 +26,15 @@ public:
static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
GrTexture* gamma, const GrTextureParams& gammaParams, float lum,
bool similarity) {
- AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params,
- gamma, gammaParams, lum,
- similarity)));
+ return SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params, gamma, gammaParams, lum,
+ similarity));
+ }
#else
static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
bool similarity) {
- AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params,
- similarity)));
-#endif
- return CreateEffectRef(effect);
+ return SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params, similarity));
}
+#endif
virtual ~GrDistanceFieldTextureEffect() {}
@@ -85,10 +83,8 @@ public:
GrTexture* gamma, const GrTextureParams& gammaParams,
SkColor textColor,
bool uniformScale, bool useBGR) {
- AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldLCDTextureEffect,
- (tex, params, gamma, gammaParams, textColor, uniformScale,
- useBGR)));
- return CreateEffectRef(effect);
+ return SkNEW_ARGS(GrDistanceFieldLCDTextureEffect,
+ (tex, params, gamma, gammaParams, textColor, uniformScale, useBGR));
}
virtual ~GrDistanceFieldLCDTextureEffect() {}
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDitherEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698