24 std::unique_ptr<SkStream>
stream,
25 uint16_t bitsPerPixel,
SkMasks* masks,
29 , fMaskSwizzler(nullptr)
36 void*
dst,
size_t dstRowBytes,
53 int rows = this->decodeRows(
dstInfo,
dst, dstRowBytes, opts);
77 fMasks.get(), this->bitsPerPixel(),
options));
86int SkBmpMaskCodec::decodeRows(
const SkImageInfo& dstInfo,
87 void*
dst,
size_t dstRowBytes,
88 const Options& opts) {
101 void* dstRow = SkTAddOffset<void>(
dst, row * dstRowBytes);
104 fMaskSwizzler->swizzle(this->
xformBuffer(), srcRow);
107 fMaskSwizzler->swizzle(dstRow, srcRow);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkCodecPrintf(...)
static bool read(SkStream *stream, void *buffer, size_t amount)
void resetXformBuffer(int count)
int32_t getDstRow(int32_t y, int32_t height) const
SkCodec::Result prepareToDecode(const SkImageInfo &dstInfo, const SkCodec::Options &options)
size_t srcRowBytes() const
uint32_t * xformBuffer() const
static constexpr SkColorType kXformSrcColorType
SkCodec::Result onPrepareToDecode(const SkImageInfo &dstInfo, const SkCodec::Options &options) override
SkBmpMaskCodec(SkEncodedInfo &&info, std::unique_ptr< SkStream >, uint16_t bitsPerPixel, SkMasks *masks, SkCodec::SkScanlineOrder rowOrder)
Result onGetPixels(const SkImageInfo &dstInfo, void *dst, size_t dstRowBytes, const Options &, int *) override
const SkImageInfo & dstInfo() const
void applyColorXform(void *dst, const void *src, int count) const
const SkEncodedInfo & getEncodedInfo() const
const Options & options() const
static SkMaskSwizzler * CreateMaskSwizzler(const SkImageInfo &dstInfo, bool srcIsOpaque, SkMasks *masks, uint32_t bitsPerPixel, const SkCodec::Options &options)
SkImageInfo makeAlphaType(SkAlphaType newAlphaType) const
SkISize dimensions() const
SkAlphaType alphaType() const
SkImageInfo makeColorType(SkColorType newColorType) const