Index: src/codec/SkGifCodec.cpp |
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp |
index 774131f648039c5c40993136be133f199a6f74cd..75e9d63fa72ad3e6099341db39eb7de376d0b470 100644 |
--- a/src/codec/SkGifCodec.cpp |
+++ b/src/codec/SkGifCodec.cpp |
@@ -410,8 +410,9 @@ void SkGifCodec::initializeColorTable(const SkImageInfo& dstInfo, SkPMColor* inp |
// giflib guarantees these properties |
SkASSERT(colorCount == (unsigned) (1 << (colorMap->BitsPerPixel))); |
SkASSERT(colorCount <= 256); |
+ PackColorProc proc = choose_pack_color_proc(false, dstInfo.colorType()); |
for (uint32_t i = 0; i < colorCount; i++) { |
- colorPtr[i] = SkPackARGB32(0xFF, colorMap->Colors[i].Red, |
+ colorPtr[i] = proc(0xFF, colorMap->Colors[i].Red, |
colorMap->Colors[i].Green, colorMap->Colors[i].Blue); |
} |
} |