aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkPngCodec.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-10-11 12:15:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-11 12:15:03 -0700
commit31d097e865f266c8398f45114e4c75c0dfdef058 (patch)
tree474aa98958055b0d7e85483c014fccb4235ef7ef /src/codec/SkPngCodec.cpp
parent7a1c53d0f67dcc98937ee5f06c6ba3f3b24882c6 (diff)
Add SkColorSpaceXform to the public API
Diffstat (limited to 'src/codec/SkPngCodec.cpp')
-rw-r--r--src/codec/SkPngCodec.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
index 55a29604a9..83032e6c18 100644
--- a/src/codec/SkPngCodec.cpp
+++ b/src/codec/SkPngCodec.cpp
@@ -272,8 +272,9 @@ bool SkPngCodec::createColorTable(const SkImageInfo& dstInfo, int* ctableCount)
SkColorSpaceXform::kBGRA_8888_ColorFormat;
SkAlphaType xformAlphaType = select_xform_alpha(dstInfo.alphaType(),
this->getInfo().alphaType());
- fColorXform->apply(colorTable, colorTable, numColors, xformColorFormat,
- SkColorSpaceXform::kRGBA_8888_ColorFormat, xformAlphaType);
+ SkAssertResult(fColorXform->apply(xformColorFormat, colorTable,
+ SkColorSpaceXform::kRGBA_8888_ColorFormat, colorTable,
+ numColors, xformAlphaType));
}
// Pad the color table with the last color in the table (or black) in the case that
@@ -441,13 +442,13 @@ void SkPngCodec::applyXformRow(void* dst, const void* src) {
fSwizzler->swizzle(dst, (const uint8_t*) src);
break;
case kColorOnly_XformMode:
- fColorXform->apply(dst, (const uint32_t*) src, fXformWidth, fXformColorFormat,
- srcColorFormat, fXformAlphaType);
+ SkAssertResult(fColorXform->apply(fXformColorFormat, dst, srcColorFormat, src,
+ fXformWidth, fXformAlphaType));
break;
case kSwizzleColor_XformMode:
fSwizzler->swizzle(fColorXformSrcRow, (const uint8_t*) src);
- fColorXform->apply(dst, fColorXformSrcRow, fXformWidth, fXformColorFormat,
- srcColorFormat, fXformAlphaType);
+ SkAssertResult(fColorXform->apply(fXformColorFormat, dst, srcColorFormat, fColorXformSrcRow,
+ fXformWidth, fXformAlphaType));
break;
}
}