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

Unified Diff: src/codec/SkPngCodec.cpp

Issue 2335203002: Implement Fill() for incomplete decodes to RGBA_F16 (Closed)
Patch Set: Fix win builds 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
« no previous file with comments | « src/codec/SkPngCodec.h ('k') | src/codec/SkSampledCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkPngCodec.cpp
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
index 46da29e5594074e3e6359db6ad55568ab47d51fe..0002bc5a31b922eb1e869bc20f9eb6c2440f7886 100644
--- a/src/codec/SkPngCodec.cpp
+++ b/src/codec/SkPngCodec.cpp
@@ -899,12 +899,15 @@ SkCodec::Result SkPngCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst,
return kSuccess;
}
-uint32_t SkPngCodec::onGetFillValue(SkColorType colorType) const {
+uint64_t SkPngCodec::onGetFillValue(const SkImageInfo& dstInfo) const {
const SkPMColor* colorPtr = get_color_ptr(fColorTable.get());
if (colorPtr) {
- return get_color_table_fill_value(colorType, colorPtr, 0);
+ SkAlphaType alphaType = select_alpha_xform(dstInfo.alphaType(),
+ this->getInfo().alphaType());
+ return get_color_table_fill_value(dstInfo.colorType(), alphaType, colorPtr, 0,
+ fColorXform.get());
}
- return INHERITED::onGetFillValue(colorType);
+ return INHERITED::onGetFillValue(dstInfo);
}
SkCodec* SkPngCodec::NewFromStream(SkStream* stream, SkPngChunkReader* chunkReader) {
« no previous file with comments | « src/codec/SkPngCodec.h ('k') | src/codec/SkSampledCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698