OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkBitmapProcState_DEFINED | 10 #ifndef SkBitmapProcState_DEFINED |
11 #define SkBitmapProcState_DEFINED | 11 #define SkBitmapProcState_DEFINED |
12 | 12 |
13 #include "SkBitmap.h" | 13 #include "SkBitmap.h" |
14 #include "SkBitmapFilter.h" | 14 #include "SkBitmapFilter.h" |
15 #include "SkMatrix.h" | 15 #include "SkMatrix.h" |
16 #include "SkPaint.h" | |
16 #include "SkScaledImageCache.h" | 17 #include "SkScaledImageCache.h" |
17 | 18 |
18 #define FractionalInt_IS_64BIT | 19 #define FractionalInt_IS_64BIT |
19 | 20 |
20 #ifdef FractionalInt_IS_64BIT | 21 #ifdef FractionalInt_IS_64BIT |
21 typedef SkFixed48 SkFractionalInt; | 22 typedef SkFixed48 SkFractionalInt; |
22 #define SkScalarToFractionalInt(x) SkScalarToFixed48(x) | 23 #define SkScalarToFractionalInt(x) SkScalarToFixed48(x) |
23 #define SkFractionalIntToFixed(x) SkFixed48ToFixed(x) | 24 #define SkFractionalIntToFixed(x) SkFixed48ToFixed(x) |
24 #define SkFixedToFractionalInt(x) SkFixedToFixed48(x) | 25 #define SkFixedToFractionalInt(x) SkFixedToFixed48(x) |
25 #define SkFractionalIntToInt(x) SkFixed48ToInt(x) | 26 #define SkFractionalIntToInt(x) SkFixed48ToInt(x) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 | 154 |
154 SkBitmap fOrigBitmap; // CONSTRUCTOR | 155 SkBitmap fOrigBitmap; // CONSTRUCTOR |
155 SkBitmap fScaledBitmap; // chooseProcs | 156 SkBitmap fScaledBitmap; // chooseProcs |
156 | 157 |
157 SkScaledImageCache::ID* fScaledCacheID; | 158 SkScaledImageCache::ID* fScaledCacheID; |
158 | 159 |
159 MatrixProc chooseMatrixProc(bool trivial_matrix); | 160 MatrixProc chooseMatrixProc(bool trivial_matrix); |
160 bool chooseProcs(const SkMatrix& inv, const SkPaint&); | 161 bool chooseProcs(const SkMatrix& inv, const SkPaint&); |
161 ShaderProc32 chooseShaderProc32(); | 162 ShaderProc32 chooseShaderProc32(); |
162 | 163 |
163 void possiblyScaleImage(); | 164 bool possiblyScaleImage(); |
scroggo
2013/09/10 18:08:31
Can you add documentation for what the return valu
reed1
2013/09/10 20:28:11
Done.
| |
165 bool lockBaseBitmap(); | |
164 | 166 |
165 SkBitmapFilter* fBitmapFilter; | 167 SkBitmapFilter* fBitmapFilter; |
166 | 168 |
167 // If supported, sets fShaderProc32 and fShaderProc16 and returns true, | 169 // If supported, sets fShaderProc32 and fShaderProc16 and returns true, |
168 // otherwise returns false. | 170 // otherwise returns false. |
169 bool setBitmapFilterProcs(); | 171 bool setBitmapFilterProcs(); |
170 | 172 |
171 // Return false if we failed to setup for fast translate (e.g. overflow) | 173 // Return false if we failed to setup for fast translate (e.g. overflow) |
172 bool setupForTranslate(); | 174 bool setupForTranslate(); |
173 | 175 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 void S32_D16_filter_DX(const SkBitmapProcState& s, | 224 void S32_D16_filter_DX(const SkBitmapProcState& s, |
223 const uint32_t* xy, int count, uint16_t* colors); | 225 const uint32_t* xy, int count, uint16_t* colors); |
224 | 226 |
225 void highQualityFilter32(const SkBitmapProcState &s, int x, int y, | 227 void highQualityFilter32(const SkBitmapProcState &s, int x, int y, |
226 SkPMColor *SK_RESTRICT colors, int count); | 228 SkPMColor *SK_RESTRICT colors, int count); |
227 void highQualityFilter16(const SkBitmapProcState &s, int x, int y, | 229 void highQualityFilter16(const SkBitmapProcState &s, int x, int y, |
228 uint16_t *SK_RESTRICT colors, int count); | 230 uint16_t *SK_RESTRICT colors, int count); |
229 | 231 |
230 | 232 |
231 #endif | 233 #endif |
OLD | NEW |