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

Unified Diff: src/codec/SkBmpStandardCodec.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/SkBmpRLECodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpStandardCodec.h
diff --git a/src/codec/SkBmpStandardCodec.h b/src/codec/SkBmpStandardCodec.h
index a7d48c801183f7bc7efed8f836410c3ea22f8ea2..fcc246f3534d2b6fc50817ce3b82d029c245bb6d 100644
--- a/src/codec/SkBmpStandardCodec.h
+++ b/src/codec/SkBmpStandardCodec.h
@@ -36,8 +36,9 @@ public:
* @param rowOrder indicates whether rows are ordered top-down or bottom-up
*/
SkBmpStandardCodec(const SkImageInfo& srcInfo, SkStream* stream,
- uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor,
- uint32_t offset, SkBmpCodec::RowOrder rowOrder, bool isIco);
+ uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor,
+ uint32_t offset, SkScanlineDecoder::SkScanlineOrder rowOrder,
+ bool isIco);
protected:
@@ -48,6 +49,11 @@ protected:
bool onInIco() const override {
return fInIco;
}
+
+ SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo,
+ const SkCodec::Options& options, SkPMColor inputColorPtr[],
+ int* inputColorCount) override;
+
private:
/*
@@ -58,13 +64,17 @@ private:
bool initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts);
- 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;
+
+ Result decodeIcoMask(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes);
SkAutoTUnref<SkColorTable> fColorTable; // owned
const uint32_t fNumColors;
const uint32_t fBytesPerColor;
const uint32_t fOffset;
SkAutoTDelete<SkSwizzler> fSwizzler;
+ const size_t fSrcRowBytes;
SkAutoTDeleteArray<uint8_t> fSrcBuffer;
const bool fInIco;
« no previous file with comments | « src/codec/SkBmpRLECodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698