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

Side by Side Diff: src/effects/SkMatrixConvolutionImageFilter.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/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.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 "SkMatrixConvolutionImageFilter.h" 8 #include "SkMatrixConvolutionImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 typedef SkMatrixConvolutionImageFilter::TileMode TileMode; 332 typedef SkMatrixConvolutionImageFilter::TileMode TileMode;
333 static GrEffectRef* Create(GrTexture* texture, 333 static GrEffectRef* Create(GrTexture* texture,
334 const SkIRect& bounds, 334 const SkIRect& bounds,
335 const SkISize& kernelSize, 335 const SkISize& kernelSize,
336 const SkScalar* kernel, 336 const SkScalar* kernel,
337 SkScalar gain, 337 SkScalar gain,
338 SkScalar bias, 338 SkScalar bias,
339 const SkIPoint& kernelOffset, 339 const SkIPoint& kernelOffset,
340 TileMode tileMode, 340 TileMode tileMode,
341 bool convolveAlpha) { 341 bool convolveAlpha) {
342 AutoEffectUnref effect(SkNEW_ARGS(GrMatrixConvolutionEffect, (texture, 342 return SkNEW_ARGS(GrMatrixConvolutionEffect, (texture,
343 bounds, 343 bounds,
344 kernelSize , 344 kernelSize,
345 kernel, 345 kernel,
346 gain, 346 gain,
347 bias, 347 bias,
348 kernelOffs et, 348 kernelOffset,
349 tileMode, 349 tileMode,
350 convolveAl pha))); 350 convolveAlpha));
351 return CreateEffectRef(effect);
352 } 351 }
353 virtual ~GrMatrixConvolutionEffect(); 352 virtual ~GrMatrixConvolutionEffect();
354 353
355 virtual void getConstantColorComponents(GrColor* color, 354 virtual void getConstantColorComponents(GrColor* color,
356 uint32_t* validFlags) const SK_OVERR IDE { 355 uint32_t* validFlags) const SK_OVERR IDE {
357 // TODO: Try to do better? 356 // TODO: Try to do better?
358 *validFlags = 0; 357 *validFlags = 0;
359 } 358 }
360 359
361 static const char* Name() { return "MatrixConvolution"; } 360 static const char* Name() { return "MatrixConvolution"; }
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 fBias, 676 fBias,
678 fKernelOffset, 677 fKernelOffset,
679 fTileMode, 678 fTileMode,
680 fConvolveAlpha); 679 fConvolveAlpha);
681 return true; 680 return true;
682 } 681 }
683 682
684 /////////////////////////////////////////////////////////////////////////////// 683 ///////////////////////////////////////////////////////////////////////////////
685 684
686 #endif 685 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698