Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: src/codec/SkWebpCodec.cpp

Issue 2339233003: Support Float32 output from SkColorSpaceXform (Closed)
Patch Set: Some fixes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/codec/SkWebpCodec.cpp
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index e8b27b2178fa98b76fa7afd6cf629e1366171632..86bda576e4b2d6801e5834d17108313eac1dd455 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -307,13 +307,14 @@ SkCodec::Result SkWebpCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst,
}
if (colorXform) {
- SkAlphaType xformAlphaType = select_alpha_xform(dstInfo.alphaType(),
+ SkColorSpaceXform::ColorFormat colorFormat = select_xform_format(dstInfo.colorType());
+ SkAlphaType xformAlphaType = select_xform_alpha(dstInfo.alphaType(),
this->getInfo().alphaType());
uint32_t* src = (uint32_t*) config.output.u.RGBA.rgba;
size_t srcRowBytes = config.output.u.RGBA.stride;
for (int y = 0; y < rowsDecoded; y++) {
- colorXform->apply(dst, src, dstInfo.width(), dstInfo.colorType(), xformAlphaType);
+ colorXform->apply(dst, src, dstInfo.width(), colorFormat, xformAlphaType);
dst = SkTAddOffset<void>(dst, rowBytes);
src = SkTAddOffset<uint32_t>(src, srcRowBytes);
}

Powered by Google App Engine
This is Rietveld 408576698