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

Unified Diff: ui/gfx/codec/png_codec.cc

Issue 10831031: Fix the PNCodec error on Android caused by different Skia color format. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/codec/png_codec.cc
diff --git a/ui/gfx/codec/png_codec.cc b/ui/gfx/codec/png_codec.cc
index 474fbc9f3999b9464a990aaef0f255080c0e2a6e..1cb2b08741e8e5c49c6c38b9d391725df1889339 100644
--- a/ui/gfx/codec/png_codec.cc
+++ b/ui/gfx/codec/png_codec.cc
@@ -64,9 +64,9 @@ void ConvertSkiatoRGB(const unsigned char* skia, int pixel_width,
int alpha = SkGetPackedA32(pixel_in);
if (alpha != 0 && alpha != 255) {
SkColor unmultiplied = SkUnPreMultiply::PMColorToColor(pixel_in);
- pixel_out[0] = SkColorGetR(unmultiplied);
- pixel_out[1] = SkColorGetG(unmultiplied);
- pixel_out[2] = SkColorGetB(unmultiplied);
+ pixel_out[0] = SkGetPackedR32(unmultiplied);
+ pixel_out[1] = SkGetPackedG32(unmultiplied);
+ pixel_out[2] = SkGetPackedB32(unmultiplied);
tony 2012/07/26 17:38:21 Since the else block does the same as this, I woul
} else {
pixel_out[0] = SkGetPackedR32(pixel_in);
pixel_out[1] = SkGetPackedG32(pixel_in);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698