7#ifndef SkBmpCodec_DEFINED
8#define SkBmpCodec_DEFINED
30 static bool IsBmp(
const void*,
size_t);
145 int onGetScanlines(
void*
dst,
int count,
size_t rowBytes)
override;
147 bool onSkipScanlines(
int count)
override;
149 const uint16_t fBitsPerPixel;
151 const size_t fSrcRowBytes;
152 std::unique_ptr<uint32_t[]> fXformBuffer;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
void resetXformBuffer(int count)
virtual int decodeRows(const SkImageInfo &dstInfo, void *dst, size_t dstRowBytes, const Options &opts)=0
SkEncodedImageFormat onGetEncodedFormat() const override
static std::unique_ptr< SkCodec > MakeFromIco(std::unique_ptr< SkStream >, Result *)
static std::unique_ptr< SkCodec > MakeFromStream(std::unique_ptr< SkStream >, Result *)
static constexpr auto kXformSrcColorFormat
SkBmpCodec(SkEncodedInfo &&info, std::unique_ptr< SkStream >, uint16_t bitsPerPixel, SkCodec::SkScanlineOrder rowOrder)
virtual bool onInIco() const
virtual SkCodec::Result onPrepareToDecode(const SkImageInfo &dstInfo, const SkCodec::Options &options)=0
virtual bool skipRows(int count)
int32_t getDstRow(int32_t y, int32_t height) const
SkCodec::Result prepareToDecode(const SkImageInfo &dstInfo, const SkCodec::Options &options)
SkScanlineOrder onGetScanlineOrder() const override
size_t srcRowBytes() const
uint32_t * xformBuffer() const
static constexpr SkColorType kXformSrcColorType
static bool IsBmp(const void *, size_t)
uint16_t bitsPerPixel() const
static Result ReadHeader(SkStream *, bool inIco, std::unique_ptr< SkCodec > *codecOut)
const SkImageInfo & dstInfo() const
SkCodec(SkEncodedInfo &&, XformFormat srcFormat, std::unique_ptr< SkStream >, SkEncodedOrigin=kTopLeft_SkEncodedOrigin)
const Options & options() const
@ skcms_PixelFormat_BGRA_8888