| Index: cc/layers/video_layer_impl.cc
|
| diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
|
| index 6bc4b2f82c07a11445e3dd179a6893f4e62b37f9..cf71c3c6b532317e081b03cd83e6b83ef7fef5a5 100644
|
| --- a/cc/layers/video_layer_impl.cc
|
| +++ b/cc/layers/video_layer_impl.cc
|
| @@ -139,10 +139,14 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink,
|
| gfx::Size coded_size = frame_->coded_size();
|
|
|
| // Pixels for macroblocked formats.
|
| - float tex_width_scale =
|
| + const float tex_width_scale =
|
| static_cast<float>(visible_rect.width()) / coded_size.width();
|
| - float tex_height_scale =
|
| + const float tex_height_scale =
|
| static_cast<float>(visible_rect.height()) / coded_size.height();
|
| + const float tex_x_offset =
|
| + static_cast<float>(visible_rect.x()) / coded_size.width();
|
| + const float tex_y_offset =
|
| + static_cast<float>(visible_rect.y()) / coded_size.height();
|
|
|
| switch (frame_resource_type_) {
|
| // TODO(danakj): Remove this, hide it in the hardware path.
|
| @@ -175,14 +179,15 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink,
|
| DCHECK_GE(frame_resources_.size(), 3u);
|
| if (frame_resources_.size() < 3u)
|
| break;
|
| - gfx::SizeF tex_scale(tex_width_scale, tex_height_scale);
|
| + gfx::RectF tex_coord_rect(
|
| + tex_x_offset, tex_y_offset, tex_width_scale, tex_height_scale);
|
| scoped_ptr<YUVVideoDrawQuad> yuv_video_quad = YUVVideoDrawQuad::Create();
|
| yuv_video_quad->SetNew(
|
| shared_quad_state,
|
| quad_rect,
|
| opaque_rect,
|
| visible_quad_rect,
|
| - tex_scale,
|
| + tex_coord_rect,
|
| frame_resources_[0],
|
| frame_resources_[1],
|
| frame_resources_[2],
|
|
|