diff options
author | Matt Sarett <msarett@google.com> | 2016-11-08 16:13:43 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-08 22:27:02 +0000 |
commit | 562e681e5c600e919c3b57201b85776c4789f5aa (patch) | |
tree | cd513930870236e8ebd3b6a16aadf0eebd79a4f8 /src/codec/SkBmpCodec.cpp | |
parent | 1d3ab12b82e1fa16a0d6b6b9cc1c0290b45cbca9 (diff) |
Refactor RGBA/BGRA xform logic in SkCodecs
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4554
Change-Id: Ic9105a2806b915fc56b6810a80dd444561d0d959
Reviewed-on: https://skia-review.googlesource.com/4554
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/codec/SkBmpCodec.cpp')
-rw-r--r-- | src/codec/SkBmpCodec.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp index 7cd1dfe6c1..78f6b20d3b 100644 --- a/src/codec/SkBmpCodec.cpp +++ b/src/codec/SkBmpCodec.cpp @@ -636,10 +636,10 @@ bool SkBmpCodec::onSkipScanlines(int count) { void SkBmpCodec::applyColorXform(const SkImageInfo& dstInfo, void* dst, void* src) const { SkColorSpaceXform* xform = this->colorXform(); if (xform) { - SkColorSpaceXform::ColorFormat dstFormat = select_xform_format(dstInfo.colorType()); - SkColorSpaceXform::ColorFormat srcFormat = SkColorSpaceXform::kBGRA_8888_ColorFormat; - SkAlphaType alphaType = select_xform_alpha(dstInfo.alphaType(), - this->getInfo().alphaType()); + const SkColorSpaceXform::ColorFormat dstFormat = select_xform_format(dstInfo.colorType()); + const SkColorSpaceXform::ColorFormat srcFormat = select_xform_format(kXformSrcColorType); + const SkAlphaType alphaType = select_xform_alpha(dstInfo.alphaType(), + this->getInfo().alphaType()); SkAssertResult(xform->apply(dstFormat, dst, srcFormat, src, dstInfo.width(), alphaType)); } |