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

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

Issue 2895953003: Use SkJpegEncoder in gfx jpeg_codec (Closed)
Patch Set: Remove brackets Created 3 years, 6 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
« pdf/pdfium/pdfium_engine.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..624620c90bc9fc5a256d3bb1b66b79360adfeb7b 100644
--- a/ui/gfx/image/image_util.cc
+++ b/ui/gfx/image/image_util.cc
@@ -65,12 +65,7 @@ bool JPEG1xEncodedDataFromSkiaRepresentation(const Image& image,
if (!bitmap.readyToDraw())
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);
+ return gfx::JPEGCodec::Encode(bitmap, quality, dst);
}
#endif // !defined(OS_IOS)
« pdf/pdfium/pdfium_engine.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