Index: src/codec/SkSwizzler.h |
diff --git a/src/codec/SkSwizzler.h b/src/codec/SkSwizzler.h |
index 63afbf73bc3d75717f20dc8650f64e3f54d29425..2bf357b8601d7044b1b7905f9288902174abebdf 100644 |
--- a/src/codec/SkSwizzler.h |
+++ b/src/codec/SkSwizzler.h |
@@ -61,7 +61,7 @@ public: |
static bool IsOpaque(ResultAlpha r) { |
return kOpaque_ResultAlpha == r; |
} |
- |
+ |
/* |
* |
* Constructs the proper result code based on accumulated alpha masks |
@@ -128,6 +128,27 @@ public: |
const SkImageInfo&, void* dst, |
size_t dstRowBytes, |
SkImageGenerator::ZeroInitialized); |
+ |
+ /** |
+ * Fill the remainder of the destination with a single color |
+ * @param y The starting row for the fill. |
+ * @param input The value to fill with - may be a color or an index. |
+ * It will be an index in the case where the encoded image was |
+ * stored in an indexed format. If we are decoding to kIndex8 |
+ * we will fill with the index directly. If we are decoding to |
+ * kN32, we will use the index to look up the color that we are |
+ * to fill with. If the input is an index, it will be treated |
+ * as a uint8_t. |
+ * We recognize that the input is not an index if we are |
+ * decoding to kN32 and the input color table is NULL. In this |
+ * case, we assume the input is an SkPMColor and fill with it |
+ * directly. |
+ * @param colorTable a non-NULL colorTable indicates that the input is an index |
+ * even if the dst color type is not an index type |
+ */ |
+ static void Fill(void* dst, const SkImageInfo& dstInfo, size_t dstRowBytes, uint32_t y, |
+ uint32_t input, SkPMColor* colorTable); |
+ |
/** |
* Swizzle the next line. Call height times, once for each row of source. |
* @param src The next row of the source data. |
@@ -156,6 +177,7 @@ public: |
* destination? |
*/ |
void setDstRow(void* dst) { fDstRow = dst; } |
+ |
private: |
#ifdef SK_DEBUG |