summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 19:08:15 +0000
committergarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 19:08:15 +0000
commit0ca5bb5a118a4cee7a2976a2db286720e50537fe (patch)
treec53e86659abdddcc3040c2a5f2f3cc0ca5f2a022
parent168329801030758d09443e84cc8f240f3444444b (diff)
downloadchromium_src-0ca5bb5a118a4cee7a2976a2db286720e50537fe.zip
chromium_src-0ca5bb5a118a4cee7a2976a2db286720e50537fe.tar.gz
chromium_src-0ca5bb5a118a4cee7a2976a2db286720e50537fe.tar.bz2
Chromoting: Fix it2me crash on connect due to mismatched frame buffer size.
BUG=none TEST=none Review URL: http://codereview.chromium.org/9151018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117068 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/base/decoder_vp8.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/remoting/base/decoder_vp8.cc b/remoting/base/decoder_vp8.cc
index af1f718..dbb75c81 100644
--- a/remoting/base/decoder_vp8.cc
+++ b/remoting/base/decoder_vp8.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -102,16 +102,6 @@ Decoder::DecodeResult DecoderVp8::DecodePacket(const VideoPacket* packet) {
remoting_rect.height()));
}
- // TODO(wez): Fix the rest of the decode pipeline not to assume the frame
- // size is the host dimensions, since it's not when scaling. If the host
- // gets smaller, then the output size will be too big and we'll overrun the
- // frame, so currently we render 1:1 in that case; the app will see the
- // host size change and resize us if need be.
- if ((output_size_.width() > static_cast<int>(frame_->width())) ||
- (output_size_.height() > static_cast<int>(frame_->height()))) {
- output_size_.set(frame_->width(), frame_->height());
- }
-
RefreshRects(rects);
return DECODE_DONE;
}
@@ -142,6 +132,16 @@ void DecoderVp8::SetClipRect(const SkIRect& clip_rect) {
}
void DecoderVp8::RefreshRects(const RectVector& rects) {
+ // TODO(wez): Fix the rest of the decode pipeline not to assume the frame
+ // size is the host dimensions, since it's not when scaling. If the host
+ // gets smaller, then the output size will be too big and we'll overrun the
+ // frame, so currently we render 1:1 in that case; the app will see the
+ // host size change and resize us if need be.
+ if (output_size_.width() > static_cast<int>(frame_->width()))
+ output_size_.set(frame_->width(), output_size_.height());
+ if (output_size_.height() > static_cast<int>(frame_->height()))
+ output_size_.set(output_size_.width(), frame_->height());
+
if (!DoScaling())
ConvertRects(rects, &updated_rects_);
else