diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-03 01:32:28 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-03 01:32:28 +0000 |
commit | caba14d54358444cfc4f96afa33ad509de07d941 (patch) | |
tree | edf71b9291fcc8b5441dc6f0a2df3a0f88bdfd1f /remoting/host | |
parent | 74e40f6147d0ac81b8e769a78031d5d2d2bab933 (diff) | |
download | chromium_src-caba14d54358444cfc4f96afa33ad509de07d941.zip chromium_src-caba14d54358444cfc4f96afa33ad509de07d941.tar.gz chromium_src-caba14d54358444cfc4f96afa33ad509de07d941.tar.bz2 |
Fix rate controlling in chromoting host
ScreenRecorder was capturing too fast and wasn't rate limited, resulting in
excessive CPU load. Adding the condition to do proper rate limiting.
BUG=71253
TEST=None
Review URL: http://codereview.chromium.org/6334073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/screen_recorder.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/remoting/host/screen_recorder.cc b/remoting/host/screen_recorder.cc index be4fbeb..d4ba2cf 100644 --- a/remoting/host/screen_recorder.cc +++ b/remoting/host/screen_recorder.cc @@ -236,9 +236,10 @@ void ScreenRecorder::DoFinishOneRecording() { --recordings_; DCHECK_GE(recordings_, 0); - // Try to do a capture again. Note that the following method may do nothing - // if it is too early to perform a capture. - DoCapture(); + // Try to do a capture again only if |frame_skipped_| is set to true by + // capture timer. + if (frame_skipped_) + DoCapture(); } // Network thread -------------------------------------------------------------- |