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

Unified Diff: include/codec/SkCodec.h

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 | « gyp/codec_android.gyp ('k') | infra/bots/assets/skimage/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index bee4f3c9107ec7c749c6a6033766351a51171960..b0647edc6fef946cfabe1588d990acc4f010c552 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -601,30 +601,30 @@ protected:
* On an incomplete input, getPixels() and getScanlines() will fill any uninitialized
* scanlines. This allows the subclass to indicate what value to fill with.
*
- * @param colorType Destination color type.
+ * @param dstInfo Describes the destination.
* @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.
+ * Note that we can interpret the return value as a 64-bit Float16 color, a 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) const {
- return this->onGetFillValue(colorType);
+ uint64_t getFillValue(const SkImageInfo& dstInfo) const {
+ return this->onGetFillValue(dstInfo);
}
/**
* Some subclasses will override this function, but this is a useful default for the color
- * types that we support. Note that for color types that do not use the full 32-bits,
+ * types that we support. Note that for color types that do not use the full 64-bits,
* we will simply take the low bits of the fill value.
*
+ * The defaults are:
+ * kRGBA_F16_SkColorType: Transparent or Black, depending on the src alpha type
* 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*/) const {
- return kOpaque_SkAlphaType == fSrcInfo.alphaType() ? SK_ColorBLACK : SK_ColorTRANSPARENT;
- }
+ virtual uint64_t onGetFillValue(const SkImageInfo& dstInfo) const;
/**
* Get method for the input stream
« no previous file with comments | « gyp/codec_android.gyp ('k') | infra/bots/assets/skimage/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698