| Index: remoting/client/rectangle_update_decoder.cc
|
| diff --git a/remoting/client/rectangle_update_decoder.cc b/remoting/client/rectangle_update_decoder.cc
|
| index 9e09d7f70364d0c998b02fc4f8995faf417db102..69a4bb2af8480e3c287efbac8e0fd88c9f2f9147 100644
|
| --- a/remoting/client/rectangle_update_decoder.cc
|
| +++ b/remoting/client/rectangle_update_decoder.cc
|
| @@ -129,19 +129,25 @@ void RectangleUpdateDecoder::ProcessPacketData(
|
| SubmitToConsumer();
|
| }
|
|
|
| -void RectangleUpdateDecoder::SetScaleRatios(double horizontal_ratio,
|
| - double vertical_ratio) {
|
| +void RectangleUpdateDecoder::SetOutputDimensions(const SkISize& size) {
|
| if (message_loop_ != MessageLoop::current()) {
|
| message_loop_->PostTask(
|
| - FROM_HERE, base::Bind(&RectangleUpdateDecoder::SetScaleRatios,
|
| - this, horizontal_ratio, vertical_ratio));
|
| + FROM_HERE, base::Bind(&RectangleUpdateDecoder::SetOutputDimensions,
|
| + this, size));
|
| return;
|
| }
|
|
|
| // TODO(hclam): If the scale ratio has changed we should reallocate a
|
| // VideoFrame of different size. However if the scale ratio is always
|
| // smaller than 1.0 we can use the same video frame.
|
| - decoder_->SetScaleRatios(horizontal_ratio, vertical_ratio);
|
| +
|
| + // TODO(wez): Because we're not using a scaling ratio, we do need to
|
| + // reallocate the video frame here, and re-initialize the decoder.
|
| +
|
| + if (decoder_.get()) {
|
| + decoder_->SetOutputDimensions(size);
|
| + RefreshFullFrame();
|
| + }
|
| }
|
|
|
| void RectangleUpdateDecoder::UpdateClipRect(const SkIRect& new_clip_rect) {
|
|
|