Chromium Code Reviews| Index: media/gpu/h264_decoder.cc |
| diff --git a/media/gpu/h264_decoder.cc b/media/gpu/h264_decoder.cc |
| index aed9658374805c9854aaf4c0fa76dc34e67a5412..1f49d723c1796bc81dc7ae7dc26a16966222bf49 100644 |
| --- a/media/gpu/h264_decoder.cc |
| +++ b/media/gpu/h264_decoder.cc |
| @@ -1093,6 +1093,12 @@ bool H264Decoder::ProcessSPS(int sps_id, bool* need_new_buffers) { |
| return false; |
| } |
| + gfx::Rect new_visible_rect = sps->GetVisibleRect().value_or(gfx::Rect()); |
| + if (visible_rect_ != new_visible_rect) { |
| + DVLOG(1) << "New visible rect: " << new_visible_rect.ToString(); |
|
Owen Lin
2017/06/13 03:00:14
level 1 is for error. Please use DVLOG(2).
johnylin1
2017/06/13 07:21:22
Done.
|
| + visible_rect_ = new_visible_rect; |
| + } |
| + |
| int width_mb = new_pic_size.width() / 16; |
| int height_mb = new_pic_size.height() / 16; |
| @@ -1351,6 +1357,7 @@ H264Decoder::DecodeResult H264Decoder::Decode() { |
| if (!curr_pic_) |
| return kRanOutOfSurfaces; |
| + curr_pic_->visible_rect = visible_rect_; |
| if (!StartNewFrame(curr_slice_hdr_.get())) |
| SET_ERROR_AND_RETURN(); |
| } |