diff options
author | Matt Sarett <msarett@google.com> | 2016-11-03 16:15:20 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-03 20:58:13 +0000 |
commit | 1b96c6f91377431cd407c43fedac613fff21c2ed (patch) | |
tree | 0a4d5899f2cae7573aa85d56866ad7613338b6f2 /src/codec/SkBmpCodec.h | |
parent | 6e437b7d177cabdb9822b437ed2caefebe6b469b (diff) |
Add F16, SkColorSpaceXform support to SkBmpCodec
BUG=skia:4895
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4390
Change-Id: I9cb727e7f13816b0ac882f62ec635a4528c3a524
Reviewed-on: https://skia-review.googlesource.com/4390
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/codec/SkBmpCodec.h')
-rw-r--r-- | src/codec/SkBmpCodec.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h index 0ece7ad6ce..a51bbcecc3 100644 --- a/src/codec/SkBmpCodec.h +++ b/src/codec/SkBmpCodec.h @@ -99,9 +99,16 @@ protected: * will be set to the number of colors in the * color table. */ - virtual SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, + virtual SkCodec::Result onPrepareToDecode(const SkImageInfo& dstInfo, const SkCodec::Options& options, SkPMColor inputColorPtr[], int* inputColorCount) = 0; + SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, + const SkCodec::Options& options, SkPMColor inputColorPtr[], + int* inputColorCount); + + void applyColorXform(const SkImageInfo& dstInfo, void* dst, void* src) const; + uint32_t* xformBuffer() const { return fXformBuffer.get(); } + void resetXformBuffer(int count) { fXformBuffer.reset(new uint32_t[count]); } private: @@ -138,9 +145,10 @@ private: bool onSkipScanlines(int count) override; - const uint16_t fBitsPerPixel; - const SkScanlineOrder fRowOrder; - const size_t fSrcRowBytes; + const uint16_t fBitsPerPixel; + const SkScanlineOrder fRowOrder; + const size_t fSrcRowBytes; + std::unique_ptr<uint32_t[]> fXformBuffer; typedef SkCodec INHERITED; }; |