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

Unified Diff: ui/gfx/image/image_util.cc

Issue 2895953003: Use SkJpegEncoder in gfx jpeg_codec (Closed)
Patch Set: Created 3 years, 7 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
« ui/gfx/codec/jpeg_codec.cc ('K') | « ui/gfx/codec/jpeg_codec_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_util.cc
diff --git a/ui/gfx/image/image_util.cc b/ui/gfx/image/image_util.cc
index 16387149d142c76d4d91126c314a526b8c3c8249..2bc4a2912fa3af37f28208a089196e10f4226ff9 100644
--- a/ui/gfx/image/image_util.cc
+++ b/ui/gfx/image/image_util.cc
@@ -66,11 +66,9 @@ bool JPEG1xEncodedDataFromSkiaRepresentation(const Image& image,
return false;
return gfx::JPEGCodec::Encode(
- reinterpret_cast<unsigned char*>(bitmap.getAddr32(0, 0)),
- gfx::JPEGCodec::FORMAT_SkBitmap, bitmap.width(),
- bitmap.height(),
- static_cast<int>(bitmap.rowBytes()), quality,
- dst);
+ reinterpret_cast<unsigned char*>(bitmap.getAddr32(0, 0)),
+ kN32_SkColorType, bitmap.width(), bitmap.height(),
+ static_cast<int>(bitmap.rowBytes()), quality, dst);
}
#endif // !defined(OS_IOS)
« ui/gfx/codec/jpeg_codec.cc ('K') | « ui/gfx/codec/jpeg_codec_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698