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 |
(...skipping 16 matching lines...) Expand all Loading... |
27 #define SkScalarToFractionalInt(x) SkScalarToFixed(x) | 27 #define SkScalarToFractionalInt(x) SkScalarToFixed(x) |
28 #define SkFractionalIntToFixed(x) (x) | 28 #define SkFractionalIntToFixed(x) (x) |
29 #define SkFixedToFractionalInt(x) (x) | 29 #define SkFixedToFractionalInt(x) (x) |
30 #define SkFractionalIntToInt(x) ((x) >> 16) | 30 #define SkFractionalIntToInt(x) ((x) >> 16) |
31 #endif | 31 #endif |
32 | 32 |
33 class SkPaint; | 33 class SkPaint; |
34 | 34 |
35 struct SkBitmapProcState { | 35 struct SkBitmapProcState { |
36 | 36 |
| 37 SkBitmapProcState(): fBitmapFilter(NULL) {} |
| 38 ~SkBitmapProcState() { |
| 39 SkDELETE(fBitmapFilter); |
| 40 } |
| 41 |
37 typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y, | 42 typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y, |
38 SkPMColor[], int count); | 43 SkPMColor[], int count); |
39 | 44 |
40 typedef void (*ShaderProc16)(const SkBitmapProcState&, int x, int y, | 45 typedef void (*ShaderProc16)(const SkBitmapProcState&, int x, int y, |
41 uint16_t[], int count); | 46 uint16_t[], int count); |
42 | 47 |
43 typedef void (*MatrixProc)(const SkBitmapProcState&, | 48 typedef void (*MatrixProc)(const SkBitmapProcState&, |
44 uint32_t bitmapXY[], | 49 uint32_t bitmapXY[], |
45 int count, | 50 int count, |
46 int x, int y); | 51 int x, int y); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 void S32_D16_filter_DX(const SkBitmapProcState& s, | 207 void S32_D16_filter_DX(const SkBitmapProcState& s, |
203 const uint32_t* xy, int count, uint16_t* colo
rs); | 208 const uint32_t* xy, int count, uint16_t* colo
rs); |
204 | 209 |
205 void highQualityFilter_ScaleOnly(const SkBitmapProcState &s, int x, int y, | 210 void highQualityFilter_ScaleOnly(const SkBitmapProcState &s, int x, int y, |
206 SkPMColor *SK_RESTRICT colors, int count); | 211 SkPMColor *SK_RESTRICT colors, int count); |
207 void highQualityFilter(const SkBitmapProcState &s, int x, int y, | 212 void highQualityFilter(const SkBitmapProcState &s, int x, int y, |
208 SkPMColor *SK_RESTRICT colors, int count); | 213 SkPMColor *SK_RESTRICT colors, int count); |
209 | 214 |
210 | 215 |
211 #endif | 216 #endif |
OLD | NEW |