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

Side by Side Diff: src/effects/SkMatrixImageFilter.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/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkMergeImageFilter.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 2014 The Android Open Source Project 2 * Copyright 2014 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 "SkMatrixImageFilter.h" 8 #include "SkMatrixImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkDevice.h" 11 #include "SkDevice.h"
12 #include "SkColorPriv.h" 12 #include "SkColorPriv.h"
13 #include "SkReadBuffer.h" 13 #include "SkReadBuffer.h"
14 #include "SkWriteBuffer.h" 14 #include "SkWriteBuffer.h"
15 #include "SkMatrix.h" 15 #include "SkMatrix.h"
16 #include "SkRect.h" 16 #include "SkRect.h"
17 17
18 SkMatrixImageFilter::SkMatrixImageFilter(const SkMatrix& transform, 18 SkMatrixImageFilter::SkMatrixImageFilter(const SkMatrix& transform,
19 SkPaint::FilterLevel filterLevel, 19 SkPaint::FilterLevel filterLevel,
20 SkImageFilter* input) 20 SkImageFilter* input)
21 : INHERITED(input), 21 : INHERITED(1, &input),
22 fTransform(transform), 22 fTransform(transform),
23 fFilterLevel(filterLevel) { 23 fFilterLevel(filterLevel) {
24 } 24 }
25 25
26 SkMatrixImageFilter* SkMatrixImageFilter::Create(const SkMatrix& transform, 26 SkMatrixImageFilter* SkMatrixImageFilter::Create(const SkMatrix& transform,
27 SkPaint::FilterLevel filterLeve l, 27 SkPaint::FilterLevel filterLeve l,
28 SkImageFilter* input) { 28 SkImageFilter* input) {
29 return SkNEW_ARGS(SkMatrixImageFilter, (transform, filterLevel, input)); 29 return SkNEW_ARGS(SkMatrixImageFilter, (transform, filterLevel, input));
30 } 30 }
31 31
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 matrix.mapRect(&floatBounds, SkRect::Make(src)); 117 matrix.mapRect(&floatBounds, SkRect::Make(src));
118 SkIRect bounds; 118 SkIRect bounds;
119 floatBounds.roundOut(&bounds); 119 floatBounds.roundOut(&bounds);
120 if (getInput(0) && !getInput(0)->filterBounds(bounds, ctm, &bounds)) { 120 if (getInput(0) && !getInput(0)->filterBounds(bounds, ctm, &bounds)) {
121 return false; 121 return false;
122 } 122 }
123 123
124 *dst = bounds; 124 *dst = bounds;
125 return true; 125 return true;
126 } 126 }
OLDNEW
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkMergeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698