Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: src/codec/SkBmpRLECodec.h

Issue 1287423002: Scanline decoding for bmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix windows errors Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpRLECodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpRLECodec.h
diff --git a/src/codec/SkBmpRLECodec.h b/src/codec/SkBmpRLECodec.h
index 65b0180f98fb6d46710bc1c3c6d36f8c1a499b26..aa5b06127329cef971d7365d180a169434bb4093 100644
--- a/src/codec/SkBmpRLECodec.h
+++ b/src/codec/SkBmpRLECodec.h
@@ -35,9 +35,9 @@ public:
* after decoding the headers
*/
SkBmpRLECodec(const SkImageInfo& srcInfo, SkStream* stream,
- uint16_t bitsPerPixel, uint32_t numColors,
- uint32_t bytesPerColor, uint32_t offset,
- SkBmpCodec::RowOrder rowOrder, size_t RLEBytes);
+ uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor,
+ uint32_t offset, SkScanlineDecoder::SkScanlineOrder rowOrder,
+ size_t RLEBytes);
protected:
@@ -45,6 +45,10 @@ protected:
size_t dstRowBytes, const Options&, SkPMColor*,
int*) override;
+ SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo,
+ const SkCodec::Options& options, SkPMColor inputColorPtr[],
+ int* inputColorCount) override;
+
private:
/*
@@ -77,11 +81,8 @@ private:
const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
uint8_t red, uint8_t green, uint8_t blue);
- /*
- * Performs the bitmap decoding for RLE input format
- */
- Result decode(const SkImageInfo& dstInfo, void* dst,
- size_t dstRowBytes, const Options& opts);
+ Result decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
+ const Options& opts) override;
SkAutoTUnref<SkColorTable> fColorTable; // owned
const uint32_t fNumColors;
@@ -90,6 +91,7 @@ private:
SkAutoTDeleteArray<uint8_t> fStreamBuffer;
size_t fRLEBytes;
uint32_t fCurrRLEByte;
+ int fSampleX;
typedef SkBmpCodec INHERITED;
};
« no previous file with comments | « src/codec/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpRLECodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698