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 | 8 |
9 #include "SkEmbossMask.h" | 9 #include "SkEmbossMask.h" |
| 10 #include "SkFixed.h" |
10 #include "SkMath.h" | 11 #include "SkMath.h" |
11 | 12 |
12 static inline int nonzero_to_one(int x) { | 13 static inline int nonzero_to_one(int x) { |
13 #if 0 | 14 #if 0 |
14 return x != 0; | 15 return x != 0; |
15 #else | 16 #else |
16 return ((unsigned)(x | -x)) >> 31; | 17 return ((unsigned)(x | -x)) >> 31; |
17 #endif | 18 #endif |
18 } | 19 } |
19 | 20 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // additive[x] = 0; | 154 // additive[x] = 0; |
154 // ((uint8_t*)alpha)[x] = alpha[x] * multiply[x] >> 8; | 155 // ((uint8_t*)alpha)[x] = alpha[x] * multiply[x] >> 8; |
155 } | 156 } |
156 } | 157 } |
157 alpha += rowBytes; | 158 alpha += rowBytes; |
158 multiply += rowBytes; | 159 multiply += rowBytes; |
159 additive += rowBytes; | 160 additive += rowBytes; |
160 prev_row = rowBytes; | 161 prev_row = rowBytes; |
161 } | 162 } |
162 } | 163 } |
OLD | NEW |