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

Unified Diff: cc/debug/picture_debug_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
Index: cc/debug/picture_debug_util.cc
diff --git a/cc/debug/picture_debug_util.cc b/cc/debug/picture_debug_util.cc
index f20715fc2960ffab9312f8998090caa18ee9eaf5..e88b86db95922c7bb40f97114c8b9d497984e9d2 100644
--- a/cc/debug/picture_debug_util.cc
+++ b/cc/debug/picture_debug_util.cc
@@ -41,9 +41,9 @@ class BitmapSerializer : public SkPixelSerializer {
DCHECK_LE(row_bytes,
static_cast<size_t>(std::numeric_limits<int>::max()));
encoding_succeeded = gfx::JPEGCodec::Encode(
- reinterpret_cast<const unsigned char*>(pixels),
- gfx::JPEGCodec::FORMAT_SkBitmap, info.width(), info.height(),
- static_cast<int>(row_bytes), kJpegQuality, &data);
+ reinterpret_cast<const unsigned char*>(pixels), kN32_SkColorType,
+ info.width(), info.height(), static_cast<int>(row_bytes),
+ kJpegQuality, &data);
} else {
SkBitmap bm;
// The cast is ok, since we only read the bm.

Powered by Google App Engine
This is Rietveld 408576698