diff options
author | 2010-04-13 14:03:27 +0000 | |
---|---|---|
committer | 2010-04-13 14:03:27 +0000 | |
commit | ca77697a9b67106eb9ba75003672351c0d8033d0 (patch) | |
tree | 94b91150ee4b06e2d51e0593821f6988135700b8 /src/images/SkImageDecoder_libico.cpp | |
parent | 337d42626b1192ca8eb68c4325e1357a303d69d9 (diff) |
call premultiply instead of pack32
git-svn-id: http://skia.googlecode.com/svn/trunk@545 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images/SkImageDecoder_libico.cpp')
-rw-r--r-- | src/images/SkImageDecoder_libico.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp index ef5b7ac976..52e9e4fb45 100644 --- a/src/images/SkImageDecoder_libico.cpp +++ b/src/images/SkImageDecoder_libico.cpp @@ -351,7 +351,7 @@ static void editPixelBit24(const int pixelNo, const unsigned char* buf, int alphaBit = (alphaByte & m) >> shift; //alphaBit == 1 => alpha = 0 int alpha = (alphaBit-1) & 0xFF; - *address = SkPackARGB32(alpha, red & alpha, green & alpha, blue & alpha); + *address = SkPreMultiplyARGB(alpha, red, green, blue); } static void editPixelBit32(const int pixelNo, const unsigned char* buf, @@ -364,7 +364,7 @@ static void editPixelBit32(const int pixelNo, const unsigned char* buf, int red = readByte(buf, xorOffset + 4*pixelNo + 2); int alphaBit = (alphaByte & m) >> shift; int alpha = readByte(buf, xorOffset + 4*pixelNo + 3) & ((alphaBit-1)&0xFF); - *address = SkPackARGB32(alpha, red & alpha, green & alpha, blue & alpha); + *address = SkPreMultiplyARGB(alpha, red, green, blue); } ///////////////////////////////////////////////////////////////////////////////////////// |