diff options
author | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 04:33:45 +0000 |
---|---|---|
committer | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 04:33:45 +0000 |
commit | b7a15072083c52f0f61bb47ccd6d6ce14677da6c (patch) | |
tree | 9c2e7579ef3fa17cf7f3b26ed144bb7d20518579 | |
parent | 4e7af148d72a312b0615cd0ab868805670168114 (diff) | |
download | chromium_src-b7a15072083c52f0f61bb47ccd6d6ce14677da6c.zip chromium_src-b7a15072083c52f0f61bb47ccd6d6ce14677da6c.tar.gz chromium_src-b7a15072083c52f0f61bb47ccd6d6ce14677da6c.tar.bz2 |
Fix test for previous frame in JniFrameConsumer::ApplyBuffer()
Previously the test was always failing, which meant that ApplyBuffer()
always treated the passed-in buffer as the current one, and always asked
the FrameProducer to draw into it, instead of freeing it. Eventually,
the app would run out of memory.
BUG=325590
Review URL: https://codereview.chromium.org/116873004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241484 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/client/jni/jni_frame_consumer.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/remoting/client/jni/jni_frame_consumer.cc b/remoting/client/jni/jni_frame_consumer.cc index ac1e7a6..9fb8f2f 100644 --- a/remoting/client/jni/jni_frame_consumer.cc +++ b/remoting/client/jni/jni_frame_consumer.cc @@ -48,7 +48,7 @@ void JniFrameConsumer::ApplyBuffer(const webrtc::DesktopSize& view_size, const webrtc::DesktopRegion& region) { DCHECK(jni_runtime_->display_task_runner()->BelongsToCurrentThread()); - if (!view_size_.equals(view_size)) { + if (!view_size_.equals(buffer->size())) { // Drop the frame, since the data belongs to the previous generation, // before SetSourceSize() called SetOutputSizeAndClip(). FreeBuffer(buffer); @@ -83,7 +83,6 @@ void JniFrameConsumer::ApplyBuffer(const webrtc::DesktopSize& view_size, void JniFrameConsumer::ReturnBuffer(webrtc::DesktopFrame* buffer) { DCHECK(jni_runtime_->display_task_runner()->BelongsToCurrentThread()); - VLOG(0) << "Returning image buffer"; FreeBuffer(buffer); } |