7#ifndef SkBmpRLECodec_DEFINED
8#define SkBmpRLECodec_DEFINED
49 uint16_t
bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor,
59 size_t dstRowBytes,
const Options&,
73 bool initializeStreamBuffer();
82 size_t checkForMoreData();
87 void setPixel(
void*
dst,
size_t dstRowBytes,
93 void setRGBPixel(
void*
dst,
size_t dstRowBytes,
95 uint8_t red, uint8_t green, uint8_t blue);
104 bool skipRows(
int count)
override;
106 SkSampler* getSampler(
bool createIfNecessary)
override;
110 const uint32_t fNumColors;
111 const uint32_t fBytesPerColor;
112 const uint32_t fOffset;
114 inline static constexpr size_t kBufferSize = 4096;
115 uint8_t fStreamBuffer[kBufferSize];
116 size_t fBytesBuffered;
118 uint32_t fCurrRLEByte;
120 std::unique_ptr<SkSampler> fSampler;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkBmpCodec(SkEncodedInfo &&info, std::unique_ptr< SkStream >, uint16_t bitsPerPixel, SkCodec::SkScanlineOrder rowOrder)
uint16_t bitsPerPixel() const
Result onGetPixels(const SkImageInfo &dstInfo, void *dst, size_t dstRowBytes, const Options &, int *) override
SkCodec::Result onPrepareToDecode(const SkImageInfo &dstInfo, const SkCodec::Options &options) override
SkBmpRLECodec(SkEncodedInfo &&info, std::unique_ptr< SkStream >, uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor, uint32_t offset, SkCodec::SkScanlineOrder rowOrder)
const SkImageInfo & dstInfo() const
const Options & options() const