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

Unified Diff: src/codec/SkBmpCodec.h

Issue 1691083002: Implement onSkipScanlines() for bmp and wbmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « include/codec/SkCodec.h ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpCodec.h
diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h
index 5d77ca3fc8e3440123eb2eb1dc06c0bc1fe5c713..a54734f431cff4c334b8a93dcd17779214d170c4 100644
--- a/src/codec/SkBmpCodec.h
+++ b/src/codec/SkBmpCodec.h
@@ -81,6 +81,7 @@ protected:
*/
uint16_t bitsPerPixel() const { return fBitsPerPixel; }
SkScanlineOrder onGetScanlineOrder() const override { return fRowOrder; }
+ size_t srcRowBytes() const { return fSrcRowBytes; }
/*
* To be overriden by bmp subclasses, which provide unique implementations.
@@ -127,15 +128,18 @@ private:
virtual int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
const Options& opts) = 0;
+ virtual bool skipRows(int count);
+
Result onStartScanlineDecode(const SkImageInfo& dstInfo, const SkCodec::Options&,
SkPMColor inputColorPtr[], int* inputColorCount) override;
int onGetScanlines(void* dst, int count, size_t rowBytes) override;
- // TODO(msarett): Override default skipping with something more clever.
+ bool onSkipScanlines(int count) override;
const uint16_t fBitsPerPixel;
const SkScanlineOrder fRowOrder;
+ const size_t fSrcRowBytes;
typedef SkCodec INHERITED;
};
« no previous file with comments | « include/codec/SkCodec.h ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698