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

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

Issue 1540203002: Revert of change all factories to return their base-class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.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 2006 The Android Open Source Project 2 * Copyright 2006 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 "SkEmbossMaskFilter.h" 8 #include "SkEmbossMaskFilter.h"
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
11 #include "SkEmbossMask.h" 11 #include "SkEmbossMask.h"
12 #include "SkReadBuffer.h" 12 #include "SkReadBuffer.h"
13 #include "SkWriteBuffer.h" 13 #include "SkWriteBuffer.h"
14 #include "SkString.h" 14 #include "SkString.h"
15 15
16 SkMaskFilter* SkEmbossMaskFilter::Create(SkScalar blurSigma, const Light& light) { 16 SkEmbossMaskFilter* SkEmbossMaskFilter::Create(SkScalar blurSigma, const Light& light) {
17 return new SkEmbossMaskFilter(blurSigma, light); 17 return new SkEmbossMaskFilter(blurSigma, light);
18 } 18 }
19 19
20 static inline int pin2byte(int n) { 20 static inline int pin2byte(int n) {
21 if (n < 0) { 21 if (n < 0) {
22 n = 0; 22 n = 0;
23 } else if (n > 0xFF) { 23 } else if (n > 0xFF) {
24 n = 0xFF; 24 n = 0xFF;
25 } 25 }
26 return n; 26 return n;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 str->append(") "); 154 str->append(") ");
155 155
156 str->appendf("ambient: %d specular: %d ", 156 str->appendf("ambient: %d specular: %d ",
157 fLight.fAmbient, fLight.fSpecular); 157 fLight.fAmbient, fLight.fSpecular);
158 158
159 str->append("blurSigma: "); 159 str->append("blurSigma: ");
160 str->appendScalar(fBlurSigma); 160 str->appendScalar(fBlurSigma);
161 str->append(")"); 161 str->append(")");
162 } 162 }
163 #endif 163 #endif
OLDNEW
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698