diff options
author | Matt Sarett <msarett@google.com> | 2016-11-02 16:18:01 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-03 16:33:33 +0000 |
commit | d851795e7992565c1eb2b9474ee5ad01d1a01fad (patch) | |
tree | a7293bc7bf6609e882092ded278956f58852a981 /src/codec/SkBmpCodec.h | |
parent | eea7c16d59a163bd5b858891bc916c49063ed8ac (diff) |
Add F16, SkColorSpaceXform support to SkBmpCodec
BUG=skia:4895
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300
Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789
Reviewed-on: https://skia-review.googlesource.com/4300
Reviewed-by: Leon Scroggins <scroggo@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; }; |