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

Unified Diff: media/gpu/jpeg_decode_accelerator_unittest.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: media/gpu/jpeg_decode_accelerator_unittest.cc
diff --git a/media/gpu/jpeg_decode_accelerator_unittest.cc b/media/gpu/jpeg_decode_accelerator_unittest.cc
index 4f134950e4799b4d7aae523b0b2bd8cdddc54261..f3784adb61669efbe4e4ca57a171c64863890d17 100644
--- a/media/gpu/jpeg_decode_accelerator_unittest.cc
+++ b/media/gpu/jpeg_decode_accelerator_unittest.cc
@@ -392,13 +392,13 @@ bool JpegDecodeAcceleratorTestEnvironment::CreateTestJpegImage(
int width,
int height,
base::FilePath* filename) {
- const int kBytesPerPixel = 3;
+ const int kBytesPerPixel = 4;
const int kJpegQuality = 100;
std::vector<unsigned char> input_buffer(width * height * kBytesPerPixel);
std::vector<unsigned char> encoded;
- if (!gfx::JPEGCodec::Encode(&input_buffer[0], gfx::JPEGCodec::FORMAT_RGB,
- width, height, width * kBytesPerPixel,
- kJpegQuality, &encoded)) {
+ if (!gfx::JPEGCodec::Encode(&input_buffer[0], kRGBA_8888_SkColorType, width,
+ height, width * kBytesPerPixel, kJpegQuality,
+ &encoded)) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698