| Index: cc/layers/video_layer_impl.cc
|
| diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
|
| index 39b8ef20c59f072bcbc8f6815aa9d66ea8a82edb..fe9e85c7aab177f68d7202d2dbfa76f16ad7839b 100644
|
| --- a/cc/layers/video_layer_impl.cc
|
| +++ b/cc/layers/video_layer_impl.cc
|
| @@ -184,7 +184,12 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
|
| if (visible_quad_rect.IsEmpty())
|
| return;
|
|
|
| - // Pixels for macroblocked formats.
|
| + // Pixels for macroblocked formats. To prevent sampling outside the visible
|
| + // rect, stretch the video if needed.
|
| + if (visible_rect.width() < coded_size.width() && visible_rect.width() > 1)
|
| + visible_rect.set_width(visible_rect.width() - 1);
|
| + if (visible_rect.height() < coded_size.height() && visible_rect.height() > 1)
|
| + visible_rect.set_height(visible_rect.height() - 1);
|
| const float tex_width_scale =
|
| static_cast<float>(visible_rect.width()) / coded_size.width();
|
| const float tex_height_scale =
|
|
|