8#ifndef SkBitmapProcState_DEFINED
9#define SkBitmapProcState_DEFINED
31#define SkScalarToFractionalInt(x) SkScalarToFixed3232(x)
32#define SkFractionalIntToFixed(x) SkFixed3232ToFixed(x)
33#define SkFixedToFractionalInt(x) SkFixedToFixed3232(x)
34#define SkFractionalIntToInt(x) SkFixed3232ToInt(x)
41 && this->chooseProcs();
109 MatrixProc chooseMatrixProc(
bool trivial_matrix);
113 bool setupForTranslate();
117 uint32_t[],
int count,
int x,
int y);
126 #define PACK_TWO_SHORTS(pri, sec) ((pri) << 16 | (sec))
127 #define UNPACK_PRIMARY_SHORT(packed) ((uint32_t)(packed) >> 16)
128 #define UNPACK_SECONDARY_SHORT(packed) ((packed) & 0xFFFF)
130 #define PACK_TWO_SHORTS(pri, sec) ((pri) | ((sec) << 16))
131 #define UNPACK_PRIMARY_SHORT(packed) ((packed) & 0xFFFF)
132 #define UNPACK_SECONDARY_SHORT(packed) ((uint32_t)(packed) >> 16)
142 #define pack_two_shorts(pri, sec) PACK_TWO_SHORTS(pri, sec)
164 SkPoint* scalarPoint =
nullptr) {
166 s.fInvProc(
s.fInvMatrix,
172 biasX =
s.fFilterOneX >> 1;
173 biasY =
s.fFilterOneY >> 1;
static SkM44 inv(const SkM44 &m)
#define SkScalarToFractionalInt(x)
#define pack_two_shorts(pri, sec)
#define PACK_TWO_SHORTS(pri, sec)
SkFixed3232 SkFractionalInt
#define SkFractionalIntToFixed(x)
#define SkFractionalIntToInt(x)
#define SkFixedToFractionalInt(x)
#define SkFixedToScalar(x)
SkFractionalInt fractionalIntY() const
SkFractionalInt fractionalIntX() const
SkBitmapProcStateAutoMapper(const SkBitmapProcState &s, int x, int y, SkPoint *scalarPoint=nullptr)
SkMatrix::MapXYProc MapXYProc
static float max(float r, float g, float b)
void(* S32_alpha_D32_filter_DX)(const SkBitmapProcState &, const uint32_t *xy, int count, SkPMColor *)
void(* S32_alpha_D32_filter_DXDY)(const SkBitmapProcState &, const uint32_t *xy, int count, SkPMColor *)
void Init_BitmapProcState()
sk_sp< const SkImage > image
PODArray< SkColor > colors
SkSamplingOptions sampling
uint32_t pack_repeat(SkFixed f, unsigned max, size_t width)
uint32_t pack_mirror(SkFixed f, unsigned max, size_t width)
uint32_t pack_clamp(SkFixed f, unsigned max)
void(* ShaderProc32)(const void *ctx, int x, int y, SkPMColor[], int count)
SkBitmapProcState(const SkImage_Base *image, SkTileMode tmx, SkTileMode tmy)
bool setup(const SkMatrix &inv, SkColor color, const SkSamplingOptions &sampling)
ShaderProc32 getShaderProc32() const
SkFractionalInt fInvSxFractionalInt
void(* MatrixProc)(const SkBitmapProcState &, uint32_t bitmapXY[], int count, int x, int y)
SkMatrixPriv::MapXYProc fInvProc
void(* SampleProc32)(const SkBitmapProcState &, const uint32_t[], int count, SkPMColor colors[])
int maxCountForBufferSize(size_t bufferSize) const
const SkImage_Base * fImage
MatrixProc getMatrixProc() const
SampleProc32 getSampleProc32() const
SkFractionalInt fInvKyFractionalInt
constexpr float y() const
constexpr float x() const