OLD | NEW |
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 SkEmbossMaskFilter* SkEmbossMaskFilter::Create(SkScalar blurSigma, const Light&
light) { | 16 SkMaskFilter* 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 Loading... |
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 |
OLD | NEW |