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

Unified Diff: src/codec/SkGifCodec.cpp

Issue 1907593004: Support the non-native (RGBA/BGRA) swizzle (Closed) Base URL: https://skia.googlesource.com/skia.git@tryagain
Patch Set: Multiple bug fixes Created 4 years, 8 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 | « src/codec/SkCodecPriv.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « src/codec/SkCodecPriv.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698