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

Unified Diff: components/wallpaper/wallpaper_manager_base.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
Index: components/wallpaper/wallpaper_manager_base.cc
diff --git a/components/wallpaper/wallpaper_manager_base.cc b/components/wallpaper/wallpaper_manager_base.cc
index e72039f4af39b08cf64af0a38d3511d24da51a9f..67634ae0109e812d1b83abec7dcd97c8e4772128 100644
--- a/components/wallpaper/wallpaper_manager_base.cc
+++ b/components/wallpaper/wallpaper_manager_base.cc
@@ -431,11 +431,7 @@ bool WallpaperManagerBase::ResizeImage(
gfx::Size(resized_width, resized_height));
SkBitmap bitmap = *(resized_image.bitmap());
- gfx::JPEGCodec::Encode(
- reinterpret_cast<unsigned char*>(bitmap.getAddr32(0, 0)),
- gfx::JPEGCodec::FORMAT_SkBitmap, bitmap.width(), bitmap.height(),
- bitmap.width() * bitmap.bytesPerPixel(), kDefaultEncodingQuality,
- &(*output)->data());
+ gfx::JPEGCodec::Encode(bitmap, kDefaultEncodingQuality, &(*output)->data());
if (output_skia) {
resized_image.MakeThreadSafe();

Powered by Google App Engine
This is Rietveld 408576698