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

Unified Diff: src/codec/SkGifCodec.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/SkGifCodec.h ('k') | src/codec/SkMaskSwizzler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkGifCodec.cpp
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp
index 1e6e300a9233ec8e24d45c392b877b291154d565..c35cd24ae498f5d12f62c39a687a95a57b9fcb08 100644
--- a/src/codec/SkGifCodec.cpp
+++ b/src/codec/SkGifCodec.cpp
@@ -494,7 +494,7 @@ SkCodec::Result SkGifCodec::onGetPixels(const SkImageInfo& dstInfo,
// Initialize the swizzler
if (fFrameIsSubset) {
// Fill the background
- SkSampler::Fill(dstInfo, dst, dstRowBytes, this->getFillValue(dstInfo.colorType()),
+ SkSampler::Fill(dstInfo, dst, dstRowBytes, this->getFillValue(dstInfo),
opts.fZeroInitialized);
}
@@ -512,9 +512,10 @@ SkCodec::Result SkGifCodec::onGetPixels(const SkImageInfo& dstInfo,
// FIXME: This is similar to the implementation for bmp and png. Can we share more code or
// possibly make this non-virtual?
-uint32_t SkGifCodec::onGetFillValue(SkColorType colorType) const {
+uint64_t SkGifCodec::onGetFillValue(const SkImageInfo& dstInfo) const {
const SkPMColor* colorPtr = get_color_ptr(fColorTable.get());
- return get_color_table_fill_value(colorType, colorPtr, fFillIndex);
+ return get_color_table_fill_value(dstInfo.colorType(), dstInfo.alphaType(), colorPtr,
+ fFillIndex, nullptr);
}
SkCodec::Result SkGifCodec::onStartScanlineDecode(const SkImageInfo& dstInfo,
@@ -555,7 +556,7 @@ int SkGifCodec::onGetScanlines(void* dst, int count, size_t rowBytes) {
if (fFrameIsSubset) {
// Fill the requested rows
SkImageInfo fillInfo = this->dstInfo().makeWH(this->dstInfo().width(), count);
- uint32_t fillValue = this->onGetFillValue(this->dstInfo().colorType());
+ uint64_t fillValue = this->onGetFillValue(this->dstInfo());
fSwizzler->fill(fillInfo, dst, rowBytes, fillValue, this->options().fZeroInitialized);
// Start to write pixels at the start of the image frame
« no previous file with comments | « src/codec/SkGifCodec.h ('k') | src/codec/SkMaskSwizzler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698