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

Unified Diff: src/effects/SkLightingImageFilter.cpp

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/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLightingImageFilter.cpp
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index c0c605ca040b88216ccd3b4dbdf7785aa74cb04f..5fc3474e3d35c1a5c433278fdc83572dabb1feb4 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -339,12 +339,11 @@ public:
SkScalar surfaceScale,
const SkMatrix& matrix,
SkScalar kd) {
- AutoEffectUnref effect(SkNEW_ARGS(GrDiffuseLightingEffect, (texture,
- light,
- surfaceScale,
- matrix,
- kd)));
- return CreateEffectRef(effect);
+ return SkNEW_ARGS(GrDiffuseLightingEffect, (texture,
+ light,
+ surfaceScale,
+ matrix,
+ kd));
}
static const char* Name() { return "DiffuseLighting"; }
@@ -376,13 +375,12 @@ public:
const SkMatrix& matrix,
SkScalar ks,
SkScalar shininess) {
- AutoEffectUnref effect(SkNEW_ARGS(GrSpecularLightingEffect, (texture,
- light,
- surfaceScale,
- matrix,
- ks,
- shininess)));
- return CreateEffectRef(effect);
+ return SkNEW_ARGS(GrSpecularLightingEffect, (texture,
+ light,
+ surfaceScale,
+ matrix,
+ ks,
+ shininess));
}
static const char* Name() { return "SpecularLighting"; }
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698