| 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 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 void S32_alpha_D32_filter_DXDY(const SkBitmapProcState& s, | 180 void S32_alpha_D32_filter_DXDY(const SkBitmapProcState& s, |
| 181 const uint32_t xy[], int count, SkPMColor colors[
]); | 181 const uint32_t xy[], int count, SkPMColor colors[
]); |
| 182 void ClampX_ClampY_filter_scale(const SkBitmapProcState& s, uint32_t xy[], | 182 void ClampX_ClampY_filter_scale(const SkBitmapProcState& s, uint32_t xy[], |
| 183 int count, int x, int y); | 183 int count, int x, int y); |
| 184 void ClampX_ClampY_nofilter_scale(const SkBitmapProcState& s, uint32_t xy[], | 184 void ClampX_ClampY_nofilter_scale(const SkBitmapProcState& s, uint32_t xy[], |
| 185 int count, int x, int y); | 185 int count, int x, int y); |
| 186 void ClampX_ClampY_filter_affine(const SkBitmapProcState& s, | 186 void ClampX_ClampY_filter_affine(const SkBitmapProcState& s, |
| 187 uint32_t xy[], int count, int x, int y); | 187 uint32_t xy[], int count, int x, int y); |
| 188 void ClampX_ClampY_nofilter_affine(const SkBitmapProcState& s, | 188 void ClampX_ClampY_nofilter_affine(const SkBitmapProcState& s, |
| 189 uint32_t xy[], int count, int x, int y); | 189 uint32_t xy[], int count, int x, int y); |
| 190 void S32_D16_filter_DX(const SkBitmapProcState& s, | |
| 191 const uint32_t* xy, int count, uint16_t* colors); | |
| 192 void S32_D16_filter_DXDY(const SkBitmapProcState& s, | |
| 193 const uint32_t* xy, int count, uint16_t* colors); | |
| 194 | 190 |
| 195 // Helper class for mapping the middle of pixel (x, y) into SkFractionalInt bitm
ap space. | 191 // Helper class for mapping the middle of pixel (x, y) into SkFractionalInt bitm
ap space. |
| 196 // TODO: filtered version which applies a fFilterOne{X,Y}/2 bias instead of epsi
lon? | 192 // TODO: filtered version which applies a fFilterOne{X,Y}/2 bias instead of epsi
lon? |
| 197 class SkBitmapProcStateAutoMapper { | 193 class SkBitmapProcStateAutoMapper { |
| 198 public: | 194 public: |
| 199 SkBitmapProcStateAutoMapper(const SkBitmapProcState& s, int x, int y) { | 195 SkBitmapProcStateAutoMapper(const SkBitmapProcState& s, int x, int y) { |
| 200 SkPoint pt; | 196 SkPoint pt; |
| 201 s.fInvProc(s.fInvMatrix, | 197 s.fInvProc(s.fInvMatrix, |
| 202 SkIntToScalar(x) + SK_ScalarHalf, | 198 SkIntToScalar(x) + SK_ScalarHalf, |
| 203 SkIntToScalar(y) + SK_ScalarHalf, &pt); | 199 SkIntToScalar(y) + SK_ScalarHalf, &pt); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 216 } | 212 } |
| 217 | 213 |
| 218 SkFractionalInt x() const { return fX; } | 214 SkFractionalInt x() const { return fX; } |
| 219 SkFractionalInt y() const { return fY; } | 215 SkFractionalInt y() const { return fY; } |
| 220 | 216 |
| 221 private: | 217 private: |
| 222 SkFractionalInt fX, fY; | 218 SkFractionalInt fX, fY; |
| 223 }; | 219 }; |
| 224 | 220 |
| 225 #endif | 221 #endif |
| OLD | NEW |