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

Side by Side Diff: src/effects/SkMorphologyImageFilter.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 unified diff | Download patch
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkMorphologyImageFilter.h" 8 #include "SkMorphologyImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 class GrMorphologyEffect : public Gr1DKernelEffect { 272 class GrMorphologyEffect : public Gr1DKernelEffect {
273 273
274 public: 274 public:
275 275
276 enum MorphologyType { 276 enum MorphologyType {
277 kErode_MorphologyType, 277 kErode_MorphologyType,
278 kDilate_MorphologyType, 278 kDilate_MorphologyType,
279 }; 279 };
280 280
281 static GrEffectRef* Create(GrTexture* tex, Direction dir, int radius, Morpho logyType type) { 281 static GrEffectRef* Create(GrTexture* tex, Direction dir, int radius, Morpho logyType type) {
282 AutoEffectUnref effect(SkNEW_ARGS(GrMorphologyEffect, (tex, dir, radius, type))); 282 return SkNEW_ARGS(GrMorphologyEffect, (tex, dir, radius, type));
283 return CreateEffectRef(effect);
284 } 283 }
285 284
286 virtual ~GrMorphologyEffect(); 285 virtual ~GrMorphologyEffect();
287 286
288 MorphologyType type() const { return fType; } 287 MorphologyType type() const { return fType; }
289 288
290 static const char* Name() { return "Morphology"; } 289 static const char* Name() { return "Morphology"; }
291 290
292 typedef GrGLMorphologyEffect GLEffect; 291 typedef GrGLMorphologyEffect GLEffect;
293 292
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 SkBitmap* result, SkIPoint* offset) con st { 577 SkBitmap* result, SkIPoint* offset) con st {
579 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); 578 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset);
580 } 579 }
581 580
582 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 581 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
583 SkBitmap* result, SkIPoint* offset) cons t { 582 SkBitmap* result, SkIPoint* offset) cons t {
584 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); 583 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset);
585 } 584 }
586 585
587 #endif 586 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698