OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 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 #ifndef SkBitmapProcState_DEFINED | 8 #ifndef SkBitmapProcState_DEFINED |
9 #define SkBitmapProcState_DEFINED | 9 #define SkBitmapProcState_DEFINED |
10 | 10 |
11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
12 #include "SkBitmapFilter.h" | 12 #include "SkBitmapFilter.h" |
13 #include "SkMatrix.h" | 13 #include "SkMatrix.h" |
14 #include "SkMipMap.h" | 14 #include "SkMipMap.h" |
15 #include "SkPaint.h" | 15 #include "SkPaint.h" |
16 | 16 |
17 #define FractionalInt_IS_64BIT | 17 typedef SkFixed3232 SkFractionalInt; |
18 | 18 #define SkScalarToFractionalInt(x) SkScalarToFixed3232(x) |
19 #ifdef FractionalInt_IS_64BIT | 19 #define SkFractionalIntToFixed(x) SkFixed3232ToFixed(x) |
20 typedef SkFixed48 SkFractionalInt; | 20 #define SkFixedToFractionalInt(x) SkFixedToFixed3232(x) |
21 #define SkScalarToFractionalInt(x) SkScalarToFixed48(x) | 21 #define SkFractionalIntToInt(x) SkFixed3232ToInt(x) |
22 #define SkFractionalIntToFixed(x) SkFixed48ToFixed(x) | |
23 #define SkFixedToFractionalInt(x) SkFixedToFixed48(x) | |
24 #define SkFractionalIntToInt(x) SkFixed48ToInt(x) | |
25 #else | |
26 typedef SkFixed SkFractionalInt; | |
27 #define SkScalarToFractionalInt(x) SkScalarToFixed(x) | |
28 #define SkFractionalIntToFixed(x) (x) | |
29 #define SkFixedToFractionalInt(x) (x) | |
30 #define SkFractionalIntToInt(x) ((x) >> 16) | |
31 #endif | |
32 | 22 |
33 class SkPaint; | 23 class SkPaint; |
34 | 24 |
35 struct SkBitmapProcState { | 25 struct SkBitmapProcState { |
36 | 26 |
37 SkBitmapProcState() : fBitmapFilter(NULL) {} | 27 SkBitmapProcState() : fBitmapFilter(NULL) {} |
38 ~SkBitmapProcState(); | 28 ~SkBitmapProcState(); |
39 | 29 |
40 typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y, | 30 typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y, |
41 SkPMColor[], int count); | 31 SkPMColor[], int count); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 void S32_D16_filter_DX(const SkBitmapProcState& s, | 205 void S32_D16_filter_DX(const SkBitmapProcState& s, |
216 const uint32_t* xy, int count, uint16_t* colors); | 206 const uint32_t* xy, int count, uint16_t* colors); |
217 | 207 |
218 void highQualityFilter32(const SkBitmapProcState &s, int x, int y, | 208 void highQualityFilter32(const SkBitmapProcState &s, int x, int y, |
219 SkPMColor *SK_RESTRICT colors, int count); | 209 SkPMColor *SK_RESTRICT colors, int count); |
220 void highQualityFilter16(const SkBitmapProcState &s, int x, int y, | 210 void highQualityFilter16(const SkBitmapProcState &s, int x, int y, |
221 uint16_t *SK_RESTRICT colors, int count); | 211 uint16_t *SK_RESTRICT colors, int count); |
222 | 212 |
223 | 213 |
224 #endif | 214 #endif |
OLD | NEW |