diff options
author | msarett <msarett@google.com> | 2016-02-11 13:29:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-11 13:29:36 -0800 |
commit | 9b9497ef14f23562a95afe989d1efe41c603a6f6 (patch) | |
tree | 73bcf52cd5174899c13c816d02092faccdc8453d /src/codec/SkWbmpCodec.cpp | |
parent | f8289d9bd1faff400728cb8e1ac0b1aa68bfbc32 (diff) |
Implement onSkipScanlines() for bmp and wbmp
TBR=reed@google.com
BUG=skia:4270
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691083002
Review URL: https://codereview.chromium.org/1691083002
Diffstat (limited to 'src/codec/SkWbmpCodec.cpp')
-rw-r--r-- | src/codec/SkWbmpCodec.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/codec/SkWbmpCodec.cpp b/src/codec/SkWbmpCodec.cpp index 4dd0f2544d..af1ab46f73 100644 --- a/src/codec/SkWbmpCodec.cpp +++ b/src/codec/SkWbmpCodec.cpp @@ -181,6 +181,11 @@ int SkWbmpCodec::onGetScanlines(void* dst, int count, size_t dstRowBytes) { return count; } +bool SkWbmpCodec::onSkipScanlines(int count) { + const size_t bytesToSkip = count * fSrcRowBytes; + return this->stream()->skip(bytesToSkip) == bytesToSkip; +} + SkCodec::Result SkWbmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& options, SkPMColor inputColorTable[], int* inputColorCount) { if (options.fSubset) { |