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

Unified Diff: src/effects/SkMagnifierImageFilter.cpp

Issue 374923002: Goodbye GrEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@noref3
Patch Set: Address comments 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/SkLumaColorFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMagnifierImageFilter.cpp
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 16f4066d3add1f1a6a8285f4d0fd621d99ee8a08..5a0c858ad55dfba08169d69196edb66d0f76802d 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -25,13 +25,13 @@ class GrGLMagnifierEffect;
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 @@ void GrGLMagnifierEffect::setData(const GrGLUniformManager& uman,
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 @@ GrEffectRef* GrMagnifierEffect::TestCreate(SkRandom* random,
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 @@ SkMagnifierImageFilter::SkMagnifierImageFilter(const SkRect& srcRect, SkScalar i
}
#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()));
« no previous file with comments | « src/effects/SkLumaColorFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698