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

Side by Side Diff: src/effects/SkBlurImageFilter.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/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.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 2011 The Android Open Source Project 2 * Copyright 2011 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 19 matching lines...) Expand all
30 buffer.validate(SkScalarIsFinite(fSigma.fWidth) && 30 buffer.validate(SkScalarIsFinite(fSigma.fWidth) &&
31 SkScalarIsFinite(fSigma.fHeight) && 31 SkScalarIsFinite(fSigma.fHeight) &&
32 (fSigma.fWidth >= 0) && 32 (fSigma.fWidth >= 0) &&
33 (fSigma.fHeight >= 0)); 33 (fSigma.fHeight >= 0));
34 } 34 }
35 35
36 SkBlurImageFilter::SkBlurImageFilter(SkScalar sigmaX, 36 SkBlurImageFilter::SkBlurImageFilter(SkScalar sigmaX,
37 SkScalar sigmaY, 37 SkScalar sigmaY,
38 SkImageFilter* input, 38 SkImageFilter* input,
39 const CropRect* cropRect) 39 const CropRect* cropRect)
40 : INHERITED(input, cropRect), fSigma(SkSize::Make(sigmaX, sigmaY)) { 40 : INHERITED(1, &input, cropRect), fSigma(SkSize::Make(sigmaX, sigmaY)) {
41 SkASSERT(sigmaX >= 0 && sigmaY >= 0); 41 SkASSERT(sigmaX >= 0 && sigmaY >= 0);
42 } 42 }
43 43
44 void SkBlurImageFilter::flatten(SkWriteBuffer& buffer) const { 44 void SkBlurImageFilter::flatten(SkWriteBuffer& buffer) const {
45 this->INHERITED::flatten(buffer); 45 this->INHERITED::flatten(buffer);
46 buffer.writeScalar(fSigma.fWidth); 46 buffer.writeScalar(fSigma.fWidth);
47 buffer.writeScalar(fSigma.fHeight); 47 buffer.writeScalar(fSigma.fHeight);
48 } 48 }
49 49
50 enum BlurDirection { 50 enum BlurDirection {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 true, 282 true,
283 sigma.x(), 283 sigma.x(),
284 sigma.y())); 284 sigma.y()));
285 WrapTexture(tex, rect.width(), rect.height(), result); 285 WrapTexture(tex, rect.width(), rect.height(), result);
286 return true; 286 return true;
287 #else 287 #else
288 SkDEBUGFAIL("Should not call in GPU-less build"); 288 SkDEBUGFAIL("Should not call in GPU-less build");
289 return false; 289 return false;
290 #endif 290 #endif
291 } 291 }
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698