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

Unified Diff: remoting/base/encoder_row_based.cc

Issue 10024072: Cull unnecessary media::VideoFrame::Formats from the enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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: remoting/base/encoder_row_based.cc
diff --git a/remoting/base/encoder_row_based.cc b/remoting/base/encoder_row_based.cc
index c84b38a613c8f3d91ad10536e8487dde77e1f2d5..41d9e9e7941ef8630d863a11f33e7b821e307d19 100644
--- a/remoting/base/encoder_row_based.cc
+++ b/remoting/base/encoder_row_based.cc
@@ -80,8 +80,9 @@ void EncoderRowBased::Encode(
void EncoderRowBased::EncodeRect(const SkIRect& rect, bool last) {
CHECK(capture_data_->data_planes().data[0]);
+ CHECK_EQ(capture_data_->pixel_format(), media::VideoFrame::RGB32);
const int strides = capture_data_->data_planes().strides[0];
- const int bytes_per_pixel = GetBytesPerPixel(capture_data_->pixel_format());
+ const int bytes_per_pixel = 4;
scherkus (not reviewing) 2012/04/10 21:32:31 doesn't VideoFrame offer this info?
Ami GONE FROM CHROMIUM 2012/04/10 22:01:07 Only as row_bytes(0)/width(), and I didn't think t
scherkus (not reviewing) 2012/04/10 22:05:39 that's what I thought :\ SGTM
const int row_size = bytes_per_pixel * rect.width();
compressor_->Reset();

Powered by Google App Engine
This is Rietveld 408576698