8#ifndef SkBitmapProcState_DEFINED
9#define SkBitmapProcState_DEFINED
30#define SkScalarToFractionalInt(x) SkScalarToFixed3232(x)
31#define SkFractionalIntToFixed(x) SkFixed3232ToFixed(x)
32#define SkFixedToFractionalInt(x) SkFixedToFixed3232(x)
33#define SkFractionalIntToInt(x) SkFixed3232ToInt(x)
39 return this->init(
inv,
color, sampling)
40 && this->chooseProcs();
108 MatrixProc chooseMatrixProc(
bool trivial_matrix);
112 bool setupForTranslate();
116 uint32_t[],
int count,
int x,
int y);
125 #define PACK_TWO_SHORTS(pri, sec) ((pri) << 16 | (sec))
126 #define UNPACK_PRIMARY_SHORT(packed) ((uint32_t)(packed) >> 16)
127 #define UNPACK_SECONDARY_SHORT(packed) ((packed) & 0xFFFF)
129 #define PACK_TWO_SHORTS(pri, sec) ((pri) | ((sec) << 16))
130 #define UNPACK_PRIMARY_SHORT(packed) ((packed) & 0xFFFF)
131 #define UNPACK_SECONDARY_SHORT(packed) ((uint32_t)(packed) >> 16)
141 #define pack_two_shorts(pri, sec) PACK_TWO_SHORTS(pri, sec)
163 SkPoint* scalarPoint =
nullptr) {
165 s.fInvProc(
s.fInvMatrix,
171 biasX =
s.fFilterOneX >> 1;
172 biasY =
s.fFilterOneY >> 1;
222 void Init_BitmapProcState();
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(* ShaderProc32)(const void *ctx, int x, int y, SkPMColor[], int count)
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