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

Unified Diff: include/codec/SkCodec.h

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: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index 023ae51c499de1c90227322236878cfa4deeb94e..edc8ec38fa2f5a8cce3d0bdf1217a586d430929d 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -570,15 +570,14 @@ protected:
* scanlines. This allows the subclass to indicate what value to fill with.
*
* @param colorType Destination color type.
- * @param alphaType Destination alpha type.
* @return The value with which to fill uninitialized pixels.
*
* Note that we can interpret the return value as an SkPMColor, a 16-bit 565 color,
* an 8-bit gray color, or an 8-bit index into a color table, depending on the color
* type.
*/
- uint32_t getFillValue(SkColorType colorType, SkAlphaType alphaType) const {
- return this->onGetFillValue(colorType, alphaType);
+ uint32_t getFillValue(SkColorType colorType) const {
+ return this->onGetFillValue(colorType);
}
/**
@@ -586,13 +585,13 @@ protected:
* types that we support. Note that for color types that do not use the full 32-bits,
* we will simply take the low bits of the fill value.
*
- * kN32_SkColorType: Transparent or Black
+ * kN32_SkColorType: Transparent or Black, depending on the src alpha type
* kRGB_565_SkColorType: Black
* kGray_8_SkColorType: Black
* kIndex_8_SkColorType: First color in color table
*/
- virtual uint32_t onGetFillValue(SkColorType /*colorType*/, SkAlphaType alphaType) const {
- return kOpaque_SkAlphaType == alphaType ? SK_ColorBLACK : SK_ColorTRANSPARENT;
+ virtual uint32_t onGetFillValue(SkColorType /*colorType*/) const {
+ return kOpaque_SkAlphaType == fSrcInfo.alphaType() ? SK_ColorBLACK : SK_ColorTRANSPARENT;
}
/**
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/codec/SkBmpStandardCodec.h » ('j') | src/codec/SkMaskSwizzler.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698