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

Unified Diff: media/capture/video/fake_video_capture_device.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/capture/video/fake_video_capture_device.cc
diff --git a/media/capture/video/fake_video_capture_device.cc b/media/capture/video/fake_video_capture_device.cc
index 2d0ec493b6a7e6604fbecd4488c22d27a4806495..9732b0db77d28e9d3a19d1a90832033ff79a110a 100644
--- a/media/capture/video/fake_video_capture_device.cc
+++ b/media/capture/video/fake_video_capture_device.cc
@@ -591,12 +591,8 @@ void JpegEncodingFrameDeliverer::PaintAndDeliverNextFrame(
frame_painter()->PaintFrame(timestamp_to_paint, &sk_n32_buffer_[0]);
static const int kQuality = 75;
- const gfx::JPEGCodec::ColorFormat encoding_source_format =
- (kN32_SkColorType == kRGBA_8888_SkColorType)
- ? gfx::JPEGCodec::FORMAT_RGBA
- : gfx::JPEGCodec::FORMAT_BGRA;
bool success = gfx::JPEGCodec::Encode(
- &sk_n32_buffer_[0], encoding_source_format,
+ &sk_n32_buffer_[0], kN32_SkColorType,
device_state()->format.frame_size.width(),
device_state()->format.frame_size.height(),
VideoFrame::RowBytes(0 /* plane */, PIXEL_FORMAT_ARGB,

Powered by Google App Engine
This is Rietveld 408576698