summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 03:19:55 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 03:19:55 +0000
commit0a449248bfcbf2b80686578456d1a2f691920ae0 (patch)
tree405b866cf793728c7e19adf691acc1f6c4acd13b /remoting
parent991564bfce0788aa03625b0783147a56ae611ae8 (diff)
downloadchromium_src-0a449248bfcbf2b80686578456d1a2f691920ae0.zip
chromium_src-0a449248bfcbf2b80686578456d1a2f691920ae0.tar.gz
chromium_src-0a449248bfcbf2b80686578456d1a2f691920ae0.tar.bz2
Fix up-scaling case to early-exit if no updates are within clip area.
The RectangleUpdateDecoder expects Decoders to report an empty update region if no updates lay within the clip area, to provide rendering flow-control. The VP8 Decoder was always reporting the entire frame as having been rendered when up-scaling, resulting in continuous re-rendering of the frame. BUG=116835,133609 TEST=Run Chromoting client with page-zoom >100% to a host with little or no changes happening on-screen and verify that the client's CPU usage is not >50%. Review URL: https://chromiumcodereview.appspot.com/10576017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/decoder_vp8.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/remoting/base/decoder_vp8.cc b/remoting/base/decoder_vp8.cc
index 85edb23..74fd8a8 100644
--- a/remoting/base/decoder_vp8.cc
+++ b/remoting/base/decoder_vp8.cc
@@ -147,6 +147,12 @@ void DecoderVp8::RenderFrame(const SkISize& view_size,
RoundToTwosMultiple(source_rect.top()),
source_rect.right(),
source_rect.bottom());
+
+ // If there were no changes within the clip source area then don't render.
+ if (!updated_region_.intersects(source_rect))
+ return;
+
+ // Scale & convert the entire clip area.
int y_offset = CalculateYOffset(source_rect.x(),
source_rect.y(),
last_image_->stride[0]);