Index: src/codec/SkSwizzler.cpp |
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp |
index 0668db6db9e45a25091189fa0dff0946f1c64df4..1aa3793f156cd94f0761690280ccdaff2eefe9e3 100644 |
--- a/src/codec/SkSwizzler.cpp |
+++ b/src/codec/SkSwizzler.cpp |
@@ -199,7 +199,8 @@ static bool swizzle_rgba_to_n32_unpremul_skipZ(void* SK_RESTRICT dstRow, |
SkSwizzler* SkSwizzler::CreateSwizzler(SkSwizzler::SrcConfig sc, |
const SkPMColor* ctable, |
const SkImageInfo& info, void* dst, |
- size_t dstRowBytes, bool skipZeroes) { |
+ size_t dstRowBytes, |
+ SkImageGenerator::ZeroInitialized zeroInit) { |
if (kUnknown_SkColorType == info.colorType()) { |
return NULL; |
} |
@@ -226,7 +227,8 @@ SkSwizzler* SkSwizzler::CreateSwizzler(SkSwizzler::SrcConfig sc, |
case kIndex: |
switch (info.colorType()) { |
case kN32_SkColorType: |
- if (skipZeroes) { |
+ // We assume the color premultiplied ctable (or not) as desired. |
+ if (SkImageGenerator::kYes_ZeroInitialized == zeroInit) { |
proc = &swizzle_index_to_n32_skipZ; |
} else { |
proc = &swizzle_index_to_n32; |
@@ -269,10 +271,10 @@ SkSwizzler* SkSwizzler::CreateSwizzler(SkSwizzler::SrcConfig sc, |
switch (info.colorType()) { |
case kN32_SkColorType: |
if (info.alphaType() == kUnpremul_SkAlphaType) { |
- // Respect skipZeroes? |
+ // Respect zeroInit? |
proc = &swizzle_rgba_to_n32_unpremul; |
} else { |
- if (skipZeroes) { |
+ if (SkImageGenerator::kYes_ZeroInitialized == zeroInit) { |
proc = &swizzle_rgba_to_n32_premul_skipZ; |
} else { |
proc = &swizzle_rgba_to_n32_premul; |