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

Side by Side Diff: src/effects/SkMatrixConvolutionImageFilter.cpp

Issue 376953003: Clean up SkImageFilter constructors. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed 100-col issues 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/SkMatrixImageFilter.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 25 matching lines...) Expand all
36 SkMatrixConvolutionImageFilter::SkMatrixConvolutionImageFilter( 36 SkMatrixConvolutionImageFilter::SkMatrixConvolutionImageFilter(
37 const SkISize& kernelSize, 37 const SkISize& kernelSize,
38 const SkScalar* kernel, 38 const SkScalar* kernel,
39 SkScalar gain, 39 SkScalar gain,
40 SkScalar bias, 40 SkScalar bias,
41 const SkIPoint& kernelOffset, 41 const SkIPoint& kernelOffset,
42 TileMode tileMode, 42 TileMode tileMode,
43 bool convolveAlpha, 43 bool convolveAlpha,
44 SkImageFilter* input, 44 SkImageFilter* input,
45 const CropRect* cropRect) 45 const CropRect* cropRect)
46 : INHERITED(input, cropRect), 46 : INHERITED(1, &input, cropRect),
47 fKernelSize(kernelSize), 47 fKernelSize(kernelSize),
48 fGain(gain), 48 fGain(gain),
49 fBias(bias), 49 fBias(bias),
50 fKernelOffset(kernelOffset), 50 fKernelOffset(kernelOffset),
51 fTileMode(tileMode), 51 fTileMode(tileMode),
52 fConvolveAlpha(convolveAlpha) { 52 fConvolveAlpha(convolveAlpha) {
53 uint32_t size = fKernelSize.fWidth * fKernelSize.fHeight; 53 uint32_t size = fKernelSize.fWidth * fKernelSize.fHeight;
54 fKernel = SkNEW_ARRAY(SkScalar, size); 54 fKernel = SkNEW_ARRAY(SkScalar, size);
55 memcpy(fKernel, kernel, size * sizeof(SkScalar)); 55 memcpy(fKernel, kernel, size * sizeof(SkScalar));
56 SkASSERT(kernelSize.fWidth >= 1 && kernelSize.fHeight >= 1); 56 SkASSERT(kernelSize.fWidth >= 1 && kernelSize.fHeight >= 1);
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 fBias, 677 fBias,
678 fKernelOffset, 678 fKernelOffset,
679 fTileMode, 679 fTileMode,
680 fConvolveAlpha); 680 fConvolveAlpha);
681 return true; 681 return true;
682 } 682 }
683 683
684 /////////////////////////////////////////////////////////////////////////////// 684 ///////////////////////////////////////////////////////////////////////////////
685 685
686 #endif 686 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMatrixImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698