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

Unified Diff: src/codec/SkGifCodec.cpp

Issue 1641273003: Support decoding opaque to *premul (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update SkMaskSwizzler to support opaque to premul Created 4 years, 11 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/SkGifCodec.cpp
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp
index 92470bf3a0ca2dc77cc7baee665a3046d9a6988b..a938f5fc48fac46ece1f929597ae5844675d3917 100644
--- a/src/codec/SkGifCodec.cpp
+++ b/src/codec/SkGifCodec.cpp
@@ -476,8 +476,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(), dstInfo.alphaType()),
+ SkSampler::Fill(dstInfo, dst, dstRowBytes, this->getFillValue(dstInfo.colorType()),
opts.fZeroInitialized);
}
@@ -495,7 +494,7 @@ 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, SkAlphaType alphaType) const {
+uint32_t SkGifCodec::onGetFillValue(SkColorType colorType) const {
const SkPMColor* colorPtr = get_color_ptr(fColorTable.get());
return get_color_table_fill_value(colorType, colorPtr, fFillIndex);
}
@@ -538,8 +537,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(),
- this->dstInfo().alphaType());
+ uint32_t fillValue = this->onGetFillValue(this->dstInfo().colorType());
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/SkJpegCodec.cpp » ('j') | src/codec/SkMaskSwizzler.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698