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

Unified Diff: src/codec/SkBmpStandardCodec.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/SkBmpStandardCodec.cpp
diff --git a/src/codec/SkBmpStandardCodec.cpp b/src/codec/SkBmpStandardCodec.cpp
index 85b40778b6c1c8bc1ff38d4347a5592034b62b6c..e73d55ebba500bc2b39279bb7dbc89bbbf1a72be 100644
--- a/src/codec/SkBmpStandardCodec.cpp
+++ b/src/codec/SkBmpStandardCodec.cpp
@@ -182,7 +182,7 @@ bool SkBmpStandardCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Op
config = SkSwizzler::kBGR;
break;
case 32:
- if (kOpaque_SkAlphaType == dstInfo.alphaType()) {
+ if (kOpaque_SkAlphaType == this->getInfo().alphaType()) {
config = SkSwizzler::kBGRX;
} else {
config = SkSwizzler::kBGRA;
@@ -337,10 +337,10 @@ void SkBmpStandardCodec::decodeIcoMask(SkStream* stream, const SkImageInfo& dstI
}
}
-uint32_t SkBmpStandardCodec::onGetFillValue(SkColorType colorType, SkAlphaType alphaType) const {
+uint32_t SkBmpStandardCodec::onGetFillValue(SkColorType colorType) const {
const SkPMColor* colorPtr = get_color_ptr(fColorTable.get());
if (colorPtr) {
return get_color_table_fill_value(colorType, colorPtr, 0);
}
- return INHERITED::onGetFillValue(colorType, alphaType);
+ return INHERITED::onGetFillValue(colorType);
}

Powered by Google App Engine
This is Rietveld 408576698